openct-tasks/_common/modules/pemFioi/quiz2
Haifeng Luo a2feebe153 Add code from commit: 5eace44153 2021-04-11 20:28:50 +08:00
..
questions Add code from commit: 5eace44153 2021-04-11 20:28:50 +08:00
grader.js Add code from commit: 5eace44153 2021-04-11 20:28:50 +08:00
loader.js Add code from commit: 5eace44153 2021-04-11 20:28:50 +08:00
quiz.js Add code from commit: 5eace44153 2021-04-11 20:28:50 +08:00
quizStyles-0.1.css Add code from commit: 5eace44153 2021-04-11 20:28:50 +08:00
readme.txt Add code from commit: 5eace44153 2021-04-11 20:28:50 +08:00
task.js Add code from commit: 5eace44153 2021-04-11 20:28:50 +08:00
todo.txt Add code from commit: 5eace44153 2021-04-11 20:28:50 +08:00

readme.txt

Grader data format

1. Function
a) may return number or boolean
function(answer) {
    return .. // boolean value
}
b) may return object:
function(answer) {
    return {
        score: .. // number or boolean ( true will add 1 to nb_valid  )
        message: .. // string (optional)
    }
}


2. Array
must be array of correct answers


3. Object
{
    strict: boolean,
    value: .. // string or number value or array of values
    messages: .. // array of messages
}
if strict option is true then value and answer arrays must contain same items in same order


4. Scalar value
value will be compared with answer