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;
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({});