remove extra step in end assessment process
authorBenjamin Auder <benjamin.auder@somewhere>
Tue, 13 Feb 2018 13:29:48 +0000 (14:29 +0100)
committerBenjamin Auder <benjamin.auder@somewhere>
Tue, 13 Feb 2018 13:29:48 +0000 (14:29 +0100)
models/assessment.js
routes/assessments.js
stt.csv [new file with mode: 0644]

index 8bc08d5..d0e0d0b 100644 (file)
@@ -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;
index c1a99cf..3a91b5a 100644 (file)
@@ -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 (file)
index 0000000..5bd2d4a
--- /dev/null
+++ b/stt.csv
@@ -0,0 +1,4 @@
+name
+PLAISANCE William
+DUPUY Rosamonde
+AUBIN Fabienne