Extensions add specific functionality to Items API. They rely on modules within LT being available.
--
Resets a question by clearing (resetting) the UI
and setting the attempted
status to false.
Supports all question types, however we set to multiple choice (mcq
) by default.
If you want all types, pass ['*']
as the second argument.
If you want a subset, pass an array of type alias' as the second argument.
See the type
property for each type here https://reference.learnosity.com/questions-api/questiontypes
Methods
run(label, type)
Sets up an item load listener and injects a reset response button to the UI at the bottom of each configured question on the item.
Since
- 0.8.0
Example
import { LT } from '@caspingus/lt/src/assessment/index';
LT.init(itemsApp); // Set up LT with the Items API application instance variable
LT.extensions.resetResponse.run();
Parameters:
Name | Type | Description |
---|---|---|
label |
string | A custom label to use for the reset button. |
type |
array | Which question types to support. |