From 7a7dc732599b358b25b770cfc27036f4b403d1b4 Mon Sep 17 00:00:00 2001 From: Benjamin Auder Date: Tue, 13 Feb 2018 14:29:48 +0100 Subject: [PATCH] remove extra step in end assessment process --- models/assessment.js | 8 -------- routes/assessments.js | 2 +- stt.csv | 4 ++++ 3 files changed, 5 insertions(+), 9 deletions(-) create mode 100644 stt.csv diff --git a/models/assessment.js b/models/assessment.js index 8bc08d5..d0e0d0b 100644 --- a/models/assessment.js +++ b/models/assessment.js @@ -126,14 +126,6 @@ const AssessmentModel = AssessmentEntity.addDisco(aid, number, Date.now() - discoTime); }); }, - - endSession: function(aid, number, password, cb) - { - AssessmentEntity.endAssessment(aid, number, password, (err,ret) => { - if (!!err || !ret) - return cb(err,ret); - }); - }, }; module.exports = AssessmentModel; diff --git a/routes/assessments.js b/routes/assessments.js index c1a99cf..3a91b5a 100644 --- a/routes/assessments.js +++ b/routes/assessments.js @@ -119,7 +119,7 @@ router.get("/end/assessment", access.ajax, (req,res) => { if (error.length > 0) return res.json({errmsg:error}); // Destroy pwd, set endTime - AssessmentModel.endSession(ObjectId(aid), number, password, (err,ret) => { + AssessmentEntity.endAssessment(ObjectId(aid), number, password, (err,ret) => { access.checkRequest(res,err,ret,"Cannot end assessment", () => { res.clearCookie('password'); res.json({}); diff --git a/stt.csv b/stt.csv new file mode 100644 index 0000000..5bd2d4a --- /dev/null +++ b/stt.csv @@ -0,0 +1,4 @@ +name +PLAISANCE William +DUPUY Rosamonde +AUBIN Fabienne -- 2.44.0