Extensions add specific functionality to Items API. They rely on modules within LT being available.
--
Hides a number of MCQ distractors/alternatives, that aren't the correct answer, as an accommodation capability for students wanting to avoid cognitive load.
Methods
run(numopt)
Sets up an item load listener to hide distractor(s).
Since
- 0.3.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.hideAlternatives.run();
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
num |
number |
<optional> |
The number of MCQ options to hide. Defaults to |
shuffleArrayWithSeed(arr, seed)
Utility function to randomise an array with a seed.
Parameters:
Name | Type | Description |
---|---|---|
arr |
array | Array to randomise |
seed |
string |
Returns
array