This is a lower-level API. Lower-level APIs are not recommended for most projects, and may not be available on all plans. See our page on recommended deployment patterns for more information.
Initialization Option Questions API

show_distractor_rationale

Options for controlling how distractor rationale are displayed based on the student's response.

In "initial" and "resume" state, distractor rationale are displayed when the Check Answer button is clicked, or when the validate() method is called. In "review" state, distractor rationale are displayed immediately.

Boolean values can be used as shorthand for the following:

  • When set to true, this will have the same effect as a DistractorRationaleOptions object with "per_question": "incorrect" and "per_response": "always".
  • When set to false, this will have the same effect as a DistractorRationaleOptions object with "per_question": "never" and "per_response": "never".

Note For more information, see the DistractorRationaleOptions object definition.

Values

Request object key show_distractor_rationale

Default: false

Type boolean | DistractorRationaleOptions

Type definitions

DistractorRationaleOptions object

  • per_question string

    Determines when question-level distractor rationale are displayed. Question-level distractor rationale content is defined for each question in metadata.distractor_rationale.

    Default: "incorrect"

    Possible values:
    • "always" will display question-level distractor rationale for any response.
    • "never" will never display question-level distractor rationale.
    • "correct" will only display question-level distractor rationale when the response is correct.
    • "incorrect" will only display question-level distractor rationale when the response is incorrect.
  • per_response string

    Determines when response-level distractor rationale are displayed. Response-level distractor rationale content is defined for each question in metadata.distractor_rationale_response_level.

    Note This only applies to Question types that support the metadata.distractor_rationale_response_level property. See Question Types for further information.

    Default: "always"

    Possible values:
    • "always" will display distractor rationale for every checked response or non-empty response container.
    • "never" will never display response-level distractor rationale.

Versioning

Version added: v2020.1.LTS

Was this article helpful?