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,
|
||||
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]();
|
||||
@ -262,7 +277,7 @@ exports.completedZiplineOrBasejump = function (req, res, next) {
|
||||
var isCompletedDate = Math.round(+new Date());
|
||||
var coursewareHash = req.body.coursewareInfo.coursewareHash;
|
||||
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;
|
||||
if (!solutionLink || !githubLink) {
|
||||
req.flash('errors', {
|
||||
@ -285,8 +300,6 @@ exports.completedZiplineOrBasejump = function (req, res, next) {
|
||||
}
|
||||
pairedWith = pairedWith.pop();
|
||||
|
||||
|
||||
|
||||
req.user.completedCoursewares.push({
|
||||
_id: coursewareHash,
|
||||
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 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": []
|
||||
},
|
||||
{
|
||||
@ -3614,4 +3614,4 @@
|
||||
],
|
||||
"challengeType": 1
|
||||
}
|
||||
]
|
||||
]
|
||||
|
@ -57,7 +57,7 @@ block content
|
||||
|
||||
if (user)
|
||||
a.animated.fadeIn.btn.btn-lg.btn-primary.btn-block#next-courseware-button(name='_csrf', value=_csrf, ng-disabled='completedWithForm.$invalid && existingUser.length > 0') Go to my next challenge (ctrl + enter)
|
||||
|
||||
|
||||
- if (user.progressTimestamps.length > 2)
|
||||
a.animated.fadeIn.btn.btn-lg.btn-block.btn-twitter(target="_blank")
|
||||
i.fa.fa-twitter  
|
||||
|
Reference in New Issue
Block a user