judgeChoice
Judges a choice from the indices the reader selected and the indices of the correct options.
@internote/canvas-sdkOn this page
import { judgeChoice } from '@internote/canvas-sdk';With multiple off, the answer is correct only when the one selected option is a correct one. With multiple on, the fraction is correct picks minus wrong picks over the number of correct options, floored at zero, so selecting everything scores nothing.
#Signature
(
selected: readonly number[],
correct: readonly number[],
multiple: boolean,
): ChoiceJudgement#Parameters
selectedThe indices the reader selected.
correctThe indices of the correct options.
multipleWhether the question allows several selections.
Declared in packages/canvas-sdk/src/assess/judge.ts:468.