Skip to main content
Version: 1.2

Quiz item

Extends Item

Example

In the items option in the part

<course>/<part>/config.json
{
"name": "Quiz",
"time": 600,
"type": "quiz",
"questions": [
{
"title": "Question 1 title",
"description": "Question 1 description",
"evaluation": "An evaluation",
"answers": [
{
"name": "A"
},
{
"name": "B"
},
{
"name": "C",
"points": 5,
"correct": true
},
{
"name": "D",
"points": 2,
"correct": true
}
]
},
{
"title": "Question 2 title",
"description": "Question 2 description",
"evaluation": "An evaluation for question 2",
"answers": [
{
"name": "A",
"correct": true
},
{
"name": "B",
"correct": true
},
{
"name": "C"
},
{
"name": "D"
}
]
}
]
}

Options

NameTypeRequiredDescription
timeIntegerfalseHow long should the user have time to solve this quiz. If not set, there is no time limit
questionsArray<Quiz question>trueAll questions from the part item

Inner classes

Quiz question

Example

<course>/<part>/config.json
{
"title": "Question 1 title",
"description": "Question 1 description",
"evaluation": "An evaluation",
"answers": [
{
"name": "A"
},
{
"name": "B"
},
{
"name": "C",
"points": 5,
"correct": true
},
{
"name": "D",
"points": 2,
"correct": true
}
]
}

Options

NameTypeRequiredDescription
titleStringtrueThis will be displayed above the answers
descriptionStringfalseThis will be displayed as subtitle
evaluationStringfalseThis will be displayed if the user validate the form
answersArray<Quiz answer>trueAll answers of the question

Quiz answer

Example

<course>/<part>/config.json
{
"name": "C",
"points": 5,
"correct": true
}

Options

NameTypeRequiredDescription
nameStringtrueThe text which will be shown as answer
pointsIntegerfalseThis are the points which will be given if the player give this answer. Default it is 1 point.
correctBooleantrueThis will be displayed if the user validate the form