Fix bug where users could get points for completing the same challenge.

This commit is contained in:
terakilobyte
2015-04-17 01:40:32 -04:00
parent f1acc59f82
commit edefd90268

View File

@ -258,7 +258,7 @@ exports.completedCourseware = function (req, res, next) {
});
var index = req.user.completedCoursewares.indexOf(coursewareHash);
if (index === -1) {
if (index > -1) {
req.user.progressTimestamps.push(Date.now() || 0);
req.user.uncompletedCoursewares.splice(index, 1);
}