From edefd90268f767fce2009f8f8b6e66444afc9653 Mon Sep 17 00:00:00 2001 From: terakilobyte Date: Fri, 17 Apr 2015 01:40:32 -0400 Subject: [PATCH] Fix bug where users could get points for completing the same challenge. --- controllers/courseware.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/controllers/courseware.js b/controllers/courseware.js index 08cb36a680..72b23b3cf6 100644 --- a/controllers/courseware.js +++ b/controllers/courseware.js @@ -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); }