projects
/
qomet.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
'update'
[qomet.git]
/
models
/
evaluation.js
diff --git
a/models/evaluation.js
b/models/evaluation.js
index
89f2560
..
be5dbc2
100644
(file)
--- a/
models/evaluation.js
+++ b/
models/evaluation.js
@@
-20,13
+20,15
@@
const EvaluationModel =
* coefficient: number, default 1
* questions: array of
* index: for paper test, like 2.1.a (?!); and quiz: 0, 1, 2, 3...
* coefficient: number, default 1
* questions: array of
* index: for paper test, like 2.1.a (?!); and quiz: 0, 1, 2, 3...
- * wording: varchar (HTML)
+ * wording: varchar (HTML)
with potential placeholders for params
* options: array of varchar --> if present, question type == quiz!
* fixed: bool, options in fixed order (default: false)
* options: array of varchar --> if present, question type == quiz!
* fixed: bool, options in fixed order (default: false)
- * answer: array of integers (for quiz) or html text (for paper); striped in exam mode
- * active: boolean, is question in current evaluation?
* points: points for this question (default 1)
* points: points for this question (default 1)
- * param: parameter (if applicable)
+ * answers:
+ * array of index +
+ * array of integers (for quiz) or
+ * html text (for paper) or
+ * function (as string, for parameterized questions)
* papers : array of
* number: student number
* inputs: array of {index,answer[array of integers or html text],startTime}
* papers : array of
* number: student number
* inputs: array of {index,answer[array of integers or html text],startTime}
@@
-73,6
+75,7
@@
const EvaluationModel =
introduction: "",
coefficient: 1,
questions: [ ],
introduction: "",
coefficient: 1,
questions: [ ],
+ answers: [ ],
papers: [ ],
},
callback
papers: [ ],
},
callback
@@
-243,7
+246,6
@@
const EvaluationModel =
"papers.password": password,
},
{ $set: {
"papers.password": password,
},
{ $set: {
- "papers.$.endTime": Date.now(),
"papers.$.password": "",
} },
callback
"papers.$.password": "",
} },
callback
@@
-357,7
+359,6
@@
const EvaluationModel =
{ $push: { papers: {
number: number,
startTime: Date.now(),
{ $push: { papers: {
number: number,
startTime: Date.now(),
- endTime: undefined,
password: password,
totalDisco: 0,
discoCount: 0,
password: password,
totalDisco: 0,
discoCount: 0,