Multiple choice assessment JSON
A multiple choice assessment in Codio is stored as a JSON file in the
.guides/assessments directory.
This assessment type supports both:
single-answer multiple choice, where learners select one option
multiple selection, where learners select more than one correct option
Use the same assessment type for both. The difference is controlled by the
multipleResponse setting.
File location and naming
Store each assessment in:
.guides/assessments/
Use this filename pattern:
multiple-choice-<unique-id>.json
The <unique-id> portion is a 10-digit numeric string made of random
numbers, for example:
multiple-choice-1214417678.json
Do not use consecutive numbers for this value.
The taskId value should match the filename stem exactly:
{
"type": "multiple-choice",
"taskId": "multiple-choice-1214417678",
"source": {
"name": "Programming basics"
}
}
For example, this file:
.guides/assessments/multiple-choice-1214417678.json
should use this value:
"taskId": "multiple-choice-1214417678"
To embed this multiple choice assessment in a guide, use:
{Text |assessment}(multiple-choice-1214417678)
Use {Text |assessment} exactly as shown, with no spaces before the closing brace.
Structure
A multiple choice assessment uses this structure. This example uses the default values shown in the available settings for this assessment type.
{
"type": "multiple-choice",
"taskId": "multiple-choice-1214417678",
"source": {
"name": "Assessment name",
"showName": true,
"instructions": "Question text or instructions.",
"multipleResponse": false,
"isRandomized": false,
"answers": [
{
"_id": "195edb63-54dd-51e6-29e0-ba5266450ef4",
"correct": true,
"answer": "Answer text"
}
],
"metadata": {
"tags": [
{
"name": "Assessment Type",
"value": "Multiple Choice"
}
],
"files": [],
"opened": []
},
"bloomsObjectiveLevel": "",
"learningObjectives": "",
"guidance": "",
"showGuidanceAfterResponseOption": {
"type": "Attempts",
"passedFrom": 1
},
"maxAttemptsCount": 1,
"showExpectedAnswerOption": {
"type": "Always"
},
"points": 20,
"incorrectPoints": 0,
"arePartialPointsAllowed": false,
"useMaximumScore": false
}
}
Field reference
Top-level fields
Field |
Type |
Description |
|---|---|---|
|
string |
Required assessment type. Use |
|
string |
Assessment identifier. Uses the pattern
|
|
object |
Contains the assessment content, answers, rationale settings, and scoring options. |
source fields
Field |
Type |
Description |
|---|---|---|
|
string |
Assessment name. |
|
boolean |
Controls whether the assessment name is shown to learners. Default:
|
|
string |
The prompt, question text, or instructions shown to learners. |
|
boolean |
Set to |
|
boolean |
Randomizes the order of answer options when |
|
array |
Array of answer objects. Each answer should have a unique |
|
object |
Metadata container. |
|
string |
Bloom’s objective level. Default: |
|
string |
Optional learning objective text. Default: |
|
string |
Rationale text shown according to
|
|
object |
Controls when rationale is shown. Only one |
|
integer |
Maximum number of attempts. Default: |
|
object |
Controls when the expected answer is shown. Default:
|
|
number |
Points awarded for a correct response. Default: |
|
number |
Score applied for an incorrect response. Default: |
|
boolean |
Enables partial scoring. This is especially relevant when
|
|
boolean |
Enables maximum-score behavior. Default: |
Answer objects
Each item in answers is an object with the following fields.
Field |
Type |
Description |
|---|---|---|
|
string |
Answer identifier. This is a 36-character UUID-format string using
lowercase hexadecimal characters and hyphens, in the form
|
|
boolean |
Marks whether the answer is correct. |
|
string |
The answer text shown to learners. |
metadata fields
Field |
Type |
Description |
|---|---|---|
|
array |
Tag array for the assessment metadata. Default:
|
|
array |
Default: |
|
array |
Default: |
Rationale display options
showGuidanceAfterResponseOption is an object with a type field. Only
one type value can be used at a time.
|
Additional field |
Behavior |
|---|---|---|
|
|
Show rationale starting from a specific attempt number. |
|
|
Show rationale when the learner reaches the specified score threshold. |
|
None |
Always show rationale. |
|
None |
Never show rationale. |
|
None |
Show rationale when grades are released. |
Expected answer display options
showExpectedAnswerOption is an object with a type field.
|
Behavior |
|---|---|
|
Always show the expected answer. |
|
Never show the expected answer. |
|
Show the expected answer when grades are released. |
Multiple selection
Set multipleResponse to true when more than one answer can be correct.
This uses the same assessment type and file structure.
{
"type": "multiple-choice",
"taskId": "multiple-choice-3914419031",
"source": {
"name": "Solar system objects",
"showName": true,
"instructions": "**Which of the following are found in the solar system?**",
"multipleResponse": true,
"isRandomized": true,
"answers": [
{
"_id": "2e14860f-3179-75b1-b41f-b8a339c47871",
"correct": true,
"answer": "Planets"
},
{
"_id": "a0bf5603-02dc-e47e-3e97-03bdf8d61c02",
"correct": true,
"answer": "Moons"
},
{
"_id": "e55d6b9e-d839-bb48-c570-4cff2dc0393f",
"correct": true,
"answer": "Asteroids"
},
{
"_id": "c7ba4087-c95c-806a-a8e6-1d2742b445f7",
"correct": false,
"answer": "Traffic lights"
}
],
"metadata": {
"tags": [
{
"name": "Assessment Type",
"value": "Multiple Choice"
}
],
"files": [],
"opened": []
},
"bloomsObjectiveLevel": "2",
"learningObjectives": "SWBAT identify common objects in the solar system",
"guidance": "Planets, moons, and asteroids are all part of the solar system. Traffic lights are human-made objects found on Earth.",
"showGuidanceAfterResponseOption": {
"type": "Always"
},
"maxAttemptsCount": 1,
"showExpectedAnswerOption": {
"type": "Always"
},
"points": 20,
"incorrectPoints": 0,
"arePartialPointsAllowed": true,
"useMaximumScore": true
}
}