+ checkPassword: function(aid, number, password, cb)
+ {
+ AssessmentEntity.getById(aid, (err,assessment) => {
+ if (!!err || !assessment)
+ return cb(err, assessment);
+ const paperIdx = assessment.papers.findIndex( item => { return item.number == number; });
+ if (paperIdx === -1)
+ return cb({errmsg: "Paper not found"}, false);
+ cb(null, assessment.papers[paperIdx].password == password);
+ });
+ },
+