From: Benjamin Auder Date: Thu, 8 Feb 2018 17:34:10 +0000 (+0100) Subject: Fix sign of deltaTime for disconnections X-Git-Url: https://git.auder.net/variants/current/doc/scripts/pieces/mini-custom.min.css?a=commitdiff_plain;h=5e96e5a2960e090829ebea2d48b2531e93e0f77f;p=qomet.git Fix sign of deltaTime for disconnections --- 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); }); },