Multiple Choice Question
An ISLE component that renders a multiple choice question. It supports the case where the learner has to select a single answer and when there might be multiple correct answers and all correct ones must be picked.
Options
- question |
(string|node)
: the question displayed at the top of the multiple choice component. Default:''
. - solution |
(number|array)
: number denoting which answer is correct or anarray
of the correct answer numbers in case the learner should be able to select multiple answers. Default:none
. - answers |
array (required)
: anarray
of answer objects. Each answer should be an object withcontent
andexplanation
fields, which denote the displayed answer option and an explanation visible after the question has been submitted to explain why the answer is correct or incorrect. Default:none
. - hintPlacement |
string
: placement of the hints (eithertop
,left
,right
, orbottom
). Default:'bottom'
. - hints |
array<(string|node)>
: hints providing guidance on how to answer the question. Default:[]
. - feedback |
boolean
: controls whether to display feedback buttons. Default:true
. - disabled |
boolean
: controls whether the question is disabled. Default:false
. - chat |
boolean
: controls whether the element should have an integrated chat. Default:false
. - provideFeedback |
string
: eitherfull
,incremental
, ornone
. Iffull
, feedback including the correct answer is displayed after learners submit their answers; ifincremental
, feedback is only displayed for the selected answer; ifnone
, no feedback is returned. Default:'incremental'
. - disableSubmitNotification |
boolean
: controls whether to disable submission notifications. Default:false
. - displaySolution |
boolean
: controls whether the solution is displayed upfront. Default:false
. - until |
Date
: time until students should be allowed to submit answers. Default:none
. - points |
number
: maximum number of points awarded in grading. Default:10
. - style |
object
: CSS inline styles. Default:{}
. - onChange |
function
: callback invoked every time the selected answer changes; receives the index of the selected question as its sole argument (or an array in case the question is of type "Choose all that apply"). Default:onChange(){}
. - onSubmit |
function
: callback invoked after an answer is submitted. Default:onSubmit(){}
.
Examples
- Single Answer
- Formatted Answers
- Instant Feedback
- Multiple Answers
- Series of Questions
- With Hints
Live Editor
Result
ReferenceError: Provider is not defined