Select Question

A select question component.

Example:

<SelectQuestion
    question="The usual t-test is"
    solution="two-sided"
    options={[
        'left-sided',
        'right-sided',
        'two-sided'
    ]}
/>

Open interactive preview

Options:

  • question | string: question for which the student has to select one of the available answer options. Default: ''.
  • options | array (required): available answer options from which the student can select. Default: none.
  • solution | string (required): question solution (must be equal to one of the answer options). Default: none.
  • defaultValue | string: preselected answer option. Default: ''.
  • inline | boolean: controls whether the component is rendered inline or not. Default: false.
  • hintPlacement | string: placement of the hints (either top, left, right, or bottom). Default: 'bottom'.
  • hints | array<string>: hints providing guidance on how to answer the question. Default: [].
  • feedback | boolean: controls whether to display feedback buttons. Default: false.
  • chat | boolean: controls whether the element should have an integrated chat. Default: false.
  • provideFeedback | boolean: indicates whether feedback including the correct answer should be displayed after learners submit their answers. Default: true.
  • failureMsg | string: message to be displayed when student selects a wrong answer. Default: 'Not quite, try again!'.
  • successMsg | string: message to be displayed when student selects the correct answer. Default: 'That's the correct answer!'.
  • onChange | function: callback which is triggered after the submit action. Default: onChange() {}.
  • onSubmit | function: callback invoked when answer is submitted; has as first parameter a boolean indicating whether the answer was correctly anwered (if applicable, null otherwise) and the supplied answer as the second parameter. Default: onSubmit() {}.

results matching ""

    No results matching ""