config.questions_api_init_options.show_distractor_rationale - Initialization - Items API

Items API Initialization

show_distractor_rationale

Displays distractor rationales based on the learner's response.

You would want to use this so that you can display the additional distractor rationale information to the learner.

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 rationales are displayed immediately.

Examples

// Standard usage for displaying distractor rationale
var initializationOptions = {
    config: {
        questions_api_init_options: {
            show_distractor_rationale: true
        }
    }
    // ...
};

// Customized options for displaying distractor rationale
var initializationOptions = {
    config: {
        questions_api_init_options: {
            show_distractor_rationale: {
                per_question: "always",
                per_response: "never",
            }
        }
    }
    // ...
};

Values

Attribute path config.questions_api_init_options.show_distractor_rationale

Default false

  • Type boolean

    Boolean values can be used as shorthand configurations.

  • Type object

    An object definition can be provided for finer controls.

    • per_question string

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

      Default: "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"

Related articles

Was this article helpful?

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