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

Currently, we provide out of the box support for Multiple choice, Cloze with drop down, Cloze with drag & drop, Cloze with text. If you would like to implement further hints and feedback, you can write custom code to display Distractor Rationale and other metadata.

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.