Extensions/Assessment/hideAlternatives

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).

Parameters:
NameTypeAttributesDescription
numnumber<optional>

The number of MCQ options to hide. Defaults to 1.

Since
0.3.0
Example
import { LT } from '@caspingus/lt/assessment';

LT.init(itemsApp); // Set up LT with the Items API application instance variable
LT.extensions.hideAlternatives.run();

shuffleArrayWithSeed(arr, seed)

Utility function to randomise an array with a seed.

Parameters:
NameTypeDescription
arrarray

Array to randomise

seedstring

array