Fix sign of deltaTime for disconnections
[qomet.git] / models / assessment.js
index d5bd3a1..65d594b 100644 (file)
@@ -123,7 +123,7 @@ const AssessmentModel =
                //increment discoCount, reset discoTime to NULL, update totalDisco
                AssessmentEntity.getDiscoTime(aid, number, (err,discoTime) => {
                        if (!!discoTime)
-                               AssessmentEntity.addDisco(aid, number, discoTime - Date.now());
+                               AssessmentEntity.addDisco(aid, number, Date.now() - discoTime);
                });
        },