Display Distractor Rationale

Distractor Rationale provides feedback to educators and students on their response. Learnosity provides two ways for Authors to associate distractor rationale: per_question or per_response. Distractor rationale per question is intended as feedback for an entire question, whereas distractor rationale per response allows Authors to write unique feedback against each possible response.

Learnosity provides two approaches to display distractor rationale:

  1. Initialization options

  2. JavaScript method

Note: This feature is currently available for a subset of question types. Multiple Choice, Cloze with drop down, Cloze with drag & drop, and Cloze with text support both question-level and response-level distractor rationale out of the box. When using version v2024.3.LTS and higher, an additional 7 question types support question-level distractor rationale only: Label image with drag & drop, Classification, Match list, Hotspot, Token highlight, Math and Multi-step math.

Demo 1: Display Distractor Rationale using initialization options

This is the simplest way to display Distractor Rationale, by configuring Items API initialization options. Learnosity offers a number of ways to render Distractor Rationale to the end user. You can see how these different options behave using the dropdown elements below.


Demo 2: Display Distractor Rationale with additional custom logic using public methods

In this demo, the Distractor Rationale is only shown the second time an answer is checked. Allowing the student to correct their response, and show the Distractor Rationale feedback on the second attempt. Rationale is rendered using the validate() method.


Demo 3: Build your own Distractor Rationale display

You can also render Distractor Rationale using a custom UI. Authors create distractor rationale as normal in the Authoring tools, from there, a developer can render the content according to their design guidelines.

This demo uses the mapValidationMetadata() method to map the authored Distractor Rationale to the MCQ response options.

You can also use the renderMath() method to render any LaTeX or MathML elements that have been created in the Distractor Rationale.

For a deeper example of how to implement custom distractor rationale, refer to this tutorial.