X-Git-Url: https://git.auder.net/?a=blobdiff_plain;f=public%2Fjavascripts%2Futils%2Fvalidation.js;h=f604f77d9ad3ed9c8c4ee79775bb46231f86fc4e;hb=a3080c337cfaca9d600911396cae5a9233d43554;hp=560bd5cf596b606f3c7b549be062f4afcfcf4486;hpb=e99c53fb3be56eb4c685dd061eef0e5b5bf22b73;p=qomet.git diff --git a/public/javascripts/utils/validation.js b/public/javascripts/utils/validation.js index 560bd5c..f604f77 100644 --- a/public/javascripts/utils/validation.js +++ b/public/javascripts/utils/validation.js @@ -2,7 +2,7 @@ try { var _ = require("underscore"); } catch (err) {} //for server let Validator = { }; -// Cell in assessment.questions array +// Cell in evaluation.questions array Validator.Question = { "index": "section", //"2.2.1", "3.2", "1" ...etc "wording": "string", @@ -26,10 +26,13 @@ Validator.Paper = { "inputs": Validator.Input, "startTime": "positiveInteger", "endTime": "positiveInteger", + "discoTime": "positiveInteger", + "discoCount": "positiveInteger", + "totalDisco": "positiveInteger", "password": "password", }; -Validator.Assessment = { +Validator.Evaluation = { "_id": "bson", "cid": "bson", "name": "code", @@ -39,7 +42,6 @@ Validator.Assessment = { "display": "alphanumeric", //"one" or "all" "time": "integer", "introduction": "string", - "conclusion": "string", "coefficient": "number", "questions": Validator.Question, "papers": Validator.Paper, @@ -48,7 +50,6 @@ Validator.Assessment = { Validator.User = { "_id": "bson", "email": "email", - "forename": "name", "name": "name", "initials": "unchecked", //not a user input "loginToken": "unchecked", @@ -58,7 +59,6 @@ Validator.User = { Validator.Student = { "number": "code", - "forename": "name", "name": "name", "group": "positiveInteger", };