Make Basejumps show up properly and get their github routes persisting in the database.
This commit is contained in:
@ -151,7 +151,22 @@ exports.returnIndividualCourseware = function(req, res, next) {
|
|||||||
coursewareHash: courseware._id,
|
coursewareHash: courseware._id,
|
||||||
challengeType: courseware.challengeType
|
challengeType: courseware.challengeType
|
||||||
});
|
});
|
||||||
}
|
},
|
||||||
|
|
||||||
|
4: function() {
|
||||||
|
res.render('coursewares/showZiplineOrBasejump', {
|
||||||
|
title: courseware.name,
|
||||||
|
dashedName: dashedName,
|
||||||
|
name: courseware.name,
|
||||||
|
details: courseware.description,
|
||||||
|
video: courseware.challengeSeed[0],
|
||||||
|
verb: resources.randomVerb(),
|
||||||
|
phrase: resources.randomPhrase(),
|
||||||
|
compliment: resources.randomCompliment(),
|
||||||
|
coursewareHash: courseware._id,
|
||||||
|
challengeType: courseware.challengeType
|
||||||
|
});
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
return challengeType[courseware.challengeType]();
|
return challengeType[courseware.challengeType]();
|
||||||
@ -262,7 +277,7 @@ exports.completedZiplineOrBasejump = function (req, res, next) {
|
|||||||
var isCompletedDate = Math.round(+new Date());
|
var isCompletedDate = Math.round(+new Date());
|
||||||
var coursewareHash = req.body.coursewareInfo.coursewareHash;
|
var coursewareHash = req.body.coursewareInfo.coursewareHash;
|
||||||
var solutionLink = req.body.coursewareInfo.publicURL;
|
var solutionLink = req.body.coursewareInfo.publicURL;
|
||||||
var githubLink = req.body.coursewareInfo.challengeType === 4
|
var githubLink = req.body.coursewareInfo.challengeType === '4'
|
||||||
? req.body.coursewareInfo.githubURL : true;
|
? req.body.coursewareInfo.githubURL : true;
|
||||||
if (!solutionLink || !githubLink) {
|
if (!solutionLink || !githubLink) {
|
||||||
req.flash('errors', {
|
req.flash('errors', {
|
||||||
@ -285,8 +300,6 @@ exports.completedZiplineOrBasejump = function (req, res, next) {
|
|||||||
}
|
}
|
||||||
pairedWith = pairedWith.pop();
|
pairedWith = pairedWith.pop();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
req.user.completedCoursewares.push({
|
req.user.completedCoursewares.push({
|
||||||
_id: coursewareHash,
|
_id: coursewareHash,
|
||||||
completedWith: pairedWith._id,
|
completedWith: pairedWith._id,
|
||||||
|
@ -789,7 +789,7 @@
|
|||||||
"Once it has loaded, install all of MEAN.js's packages by clicking into Cloud 9's terminal at the bottom and running <code>npm install</code>.",
|
"Once it has loaded, install all of MEAN.js's packages by clicking into Cloud 9's terminal at the bottom and running <code>npm install</code>.",
|
||||||
"Once that command has finished, set up MongoDB and start it by copying and pasting this code into Cloud 9's terminal: <code>mkdir data && echo 'mongod --bind_ip=$IP --dbpath=data --nojournal --rest \"$@\"' > mongod && chmod a+x mongod && ./mongod</code>. You don't worry if you don't understand what that means. From now on, you'll just need to run this command to start MongoDB: <code>./mongod</code>."
|
"Once that command has finished, set up MongoDB and start it by copying and pasting this code into Cloud 9's terminal: <code>mkdir data && echo 'mongod --bind_ip=$IP --dbpath=data --nojournal --rest \"$@\"' > mongod && chmod a+x mongod && ./mongod</code>. You don't worry if you don't understand what that means. From now on, you'll just need to run this command to start MongoDB: <code>./mongod</code>."
|
||||||
],
|
],
|
||||||
"challengeType": 3,
|
"challengeType": 4,
|
||||||
"tests": []
|
"tests": []
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user