Add modal popups to all courseware views

This commit is contained in:
Nathan Leniz
2015-02-22 19:35:55 +09:00
parent 5a68ac5411
commit ddf96c2ef2
3 changed files with 25 additions and 20 deletions

View File

@@ -44,12 +44,12 @@ exports.returnNextCourseware = function(req, res) {
if (err) {
next(err);
}
debug('This is the courseware object returned from mongo', courseware);
courseware = courseware.pop();
if (courseware === undefined) {
req.flash('errors', {
msg: "It looks like you've completed all the courses we have available. Good job!"
})
});
return res.redirect('../coursewares/start-our-challenges');
}
nameString = courseware.name.toLowerCase().replace(/\s/g, '-');