From 5e96e5a2960e090829ebea2d48b2531e93e0f77f Mon Sep 17 00:00:00 2001 From: Benjamin Auder Date: Thu, 8 Feb 2018 18:34:10 +0100 Subject: [PATCH] Fix sign of deltaTime for disconnections --- models/assessment.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/models/assessment.js b/models/assessment.js index d5bd3a1..65d594b 100644 --- a/models/assessment.js +++ b/models/assessment.js @@ -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); }); }, -- 2.44.0