Multiple choice (mcq)
Allows the learner to select one or more correct answers from a list of potential answers.
The multiple choice Question is referenced by its type
in the code, which is "mcq"
.
- Read the authoring documentation for instructions on how to author content for this Question type.
Examples
{
"type": "mcq",
"stimulus": "Which of the following has the smallest wavelength?",
"instant_feedback": true,
"options": [{
"value": "red",
"label": "Red"
}, {
"value": "violet",
"label": "Violet"
}, {
"value": "blue",
"label": "Blue"
}, {
"value": "orange",
"label": "Orange"
}],
"response_id": "60003",
"ui_style": {
"type": "horizontal"
},
"validation": {
"scoring_type": "exactMatch",
"valid_response": {
"value": ["violet"],
"score": 1
}
}
}
Attributes
-
type string
Defines the Question type to be rendered.
Must be set to
"mcq"
in this case. -
options array[object]
An array of options that represent the possibilities for this Question.
Important At least two options are required.
See below for configurable attributes for each object.
-
options[ ].label editor
The label to be shown for this option. This can include text, tables, images, resources, and LaTeX entered via the math editor.
-
options[ ].value string
The value for this option that would be stored as the response if selected.
Default: The option array index as a string when the Question JSON is generated using Learnosity authoring tools.
-
options[ ].assistive_label object
A list of alternate labels for screen readers and assistive technologies.
-
options[ ].assistive_label.label string
A plain text description available to screen readers and assistive technologies when navigating to the respective response.
-
options[ ].assistive_label.exposed_visible_label boolean
Controls whether the assistive label is navigable by screen readers. By default, it is hidden from screen readers and all content from the original label will be spoken.
Default:
false
-
feedback_attempts number
Determines how many times the learner can click on the "Check Answer" button.
To allow an unlimited number of clicks, set this value to
0
.Note The
instant_feedback
option must be set totrue
.Default:
0
-
instant_feedback boolean
Controls whether to show a "Check Answer" button to provide instant feedback to the learner based on their given response(s).
See Using the Check Answer Button in the Question Editor for more information.
Default:
false
-
instructor_stimulus string
Additional notes for the educator that appears above the stimulus.
For example, the content entered in this field could be used as notes during an assessment and could contain extra instructions that must be read out to the learners.
This content will be shown when the
showInstructorStimulus
initialization option is set totrue
. HTML and simple Features are supported. -
is_math boolean
Indicates whether this Question contains math content, when set to
true
it will render LaTeX or MathML content with MathJax.You would want to use this when including math expressions in this Question type.
Default:
false
-
max_selection number
The maximum number of responses that can be selected by the learner.
Important The
multiple_responses
option must be set totrue
for this to take effect. -
metadata object
Additional information about the Question.
See below for configurable attributes.
-
metadata.acknowledgements string
Acknowledgements of the original creator(s) for any content used in the Question, such as, text passages, documents, images, etc.
-
metadata.distractor_rationale string
Show individual response feedback (rationale) to the learner.
-
metadata.distractor_rationale_response_level array[string]
Show individual response feedback (rationale) to the learner based on the incorrect responses. Each response has its own distractor rationale.
-
metadata.response_shuffle_seed string
A seed to use to randomize the order of response options. If a value is set, the responses will be shuffled according to this seed, and all learners will see the same randomized order.
-
metadata.rubric_reference string
A unique identifier for the rubric to be used with the Question.
Defaults to the course rubric if it was assigned in the Activity configuration.
-
metadata.sample_answer string
A sample answer to be shown in reporting with Learnosity Reports API. HTML is supported.
-
min_selection number
The minimum number of responses required to be selected by the learner.
Important The
multiple_responses
option must be set totrue
for this to take effect. -
multiple_responses boolean
Controls whether the learner can select multiple responses. By default, only one selection is allowed.
When set to
true
, the radio elements are changed into checkboxes in the user interface.See
min_selection
andmax_selection
to control the allowed minimum and maximum selected responses.Default:
false
-
shuffle_options boolean
Randomly shuffle the order of the options presented to the learner.
Default:
false
-
stimulus string
The Question prompt shown to the learner. This can include text, tables, images, resources, and LaTeX entered via the math editor.
-
stimulus_review string
Alternative content which will override the stimulus in review mode.
This is intended as a field that contains an alternative/abbreviated version of the Question's stimulus, that will only show in review mode. This means that the content in this field is not visible to the learner, and it is also not possible to preview it using the Author Site. HTML and simple Features are supported.
-
ui_style object
Configuration to control different aspects of the Question type UI.
See below for configurable attributes.
-
ui_style.type string
Controls the layout of the response options for the Question.
Default:
"horizontal"
Possible values
-
"horizontal"
- Standard radio buttons beside response options. When authoring the Question, this option is called "Standard" in the user interface. -
"block"
- Each response option becomes a large clickable element with no radio buttons. When authoring the Question, this option is called "Block" in the user interface. -
"horizontal-input-bottom"
- Response text appears above the radio buttons, vertically aligned, and centered. When authoring the Question, this option is called "Radio button under option" in the user interface.
-
-
ui_style.choice_label string
Numeration character to be shown to the left of the label content when using the
"block"
style.Default:
""
Possible values
-
"number"
- Numbered starting from "1". -
"upper-alpha"
- Uppercase letters starting from "A". -
"lower-alpha"
- Lowercase letters starting from "a".
-
-
ui_style.columns number
The number of columns to render.
Default:
1
-
ui_style.fontsize string
Controls the size of the font for this Question.
See Controlling Font Size in Learnosity Questions for more information.
Default:
"normal"
Possible values
"small"
"normal"
"large"
"xlarge"
"xxlarge"
-
ui_style.orientation string
Lists the order of the responses vertically or horizontally when there is more than one column.
Default:
"vertical"
Possible values
"horizontal"
"vertical"
-
ui_style.validation_stem_numeration string
Numeration character to be shown to the left of the validation label.
Default:
"number"
Possible values
-
"number"
- Numbered starting from "1". -
"upper-alpha"
- Uppercase letters starting from "A". -
"lower-alpha"
- Lowercase letters starting from "a".
-
-
validation object
Configure the correct answer(s) for the Question.
See below for configurable attributes.
-
validation.scoring_type string
Selects the scoring method to be used for auto-scoring.
See Multiple Choice - Scoring types on the Author Guide for more information.
Default:
"exactMatch"
Possible values
-
"exactMatch"
Exact match. -
"partialMatchV2"
Partial match. -
"partialMatch"
Partial match per response.
-
-
validation.valid_response object
Configures the valid response for the Question and total score.
You must use this to define what the correct answer(s) are.
See below for configurable attributes.
-
validation.valid_response.score number
The score awarded for the correct response(s).
Default:
1
-
validation.valid_response.value array[string]
See the Response format section below for more information.
Default:
[]
-
validation.allow_negative_scores boolean
Allowing negative scores means that the final score can drop below zero when penalties are applied. For example, the score can be -3. By default, negative scores are converted to zero.
Default:
false
-
validation.alt_responses array[object]
Adds alternate response(s) if there is more than one correct overall solution to a Question.
See below for configurable attributes.
-
validation.alt_responses[ ].score number
The score awarded for the correct alternate response(s).
Default:
1
-
validation.alt_responses[ ].value array
See the Response format section below for more information.
Default:
[]
-
validation.automarkable boolean
Controls whether the Question will be scored automatically or manually.
Default:
true
-
validation.min_score_if_attempted number
The minimum score awarded to the learner if they attempted the Question.
Default:
0
-
validation.penalty number
The points to be deducted for an incorrect response.
Default:
0
-
validation.unscored boolean
Controls whether to remove all scoring options from the Question.
You would want to use this when creating practice Questions, for example.
Default:
false
-
description string Deprecated
This option has been replaced by
stimulus_review
.Description of the Question and its context to be shown.
It supports HTML tags.
Response format
The data returned in the response format for this Question is the response(s) the learner selected when answering the Question.
Response format examples
{
"value": [ "2", "0" ],
"type": "array",
"apiVersion": "v2.173.0",
"revision": 1,
"feedbackAttemptsCount": 1
}
Response attributes
-
value array
The response(s) selected by the learner.
By default, when the Question is authored using Learnosity tools, the value represents the array index of the selected option as a string.
Also, there will usually be one string in the value array when using the default authoring settings.
The number of strings in the array can be more than one when the
multiple_responses
option is set totrue
to allow multiple selections. -
type string
Informs the scoring engine about what kind of data to expect in the values entered by the learner.
Must be set to
"array"
. -
apiVersion string
The version of the Questions API that returned this response.
-
revision numeric
Keeps track of the number of Question attempts and submissions, meaning, how many times the learner answered the Question and submitted it.
-
feedbackAttemptsCount numeric
Keeps track of the number of times the learner has clicked on "Check Answer".