show_distractor_rationale - Initialization - Questions API

Questions API Initialization

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

Attribute path show_distractor_rationale

Default false

Type boolean | DistractorRationaleOptions

Type definitions

  • DistractorRationaleOptions object

    • perQuestion string

      Determines whether 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 if the response is correct.
      • "incorrect" will only display question-level distractor rationale if the response is incorrect.
    • perResponse string

      Determines whether 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 futher 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?

Did you arrive here by accident? If so, learn more about Learnosity.