Marking answers

How a question’s answer is judged: a maths answer against its expected value and form, a text answer against its accepted strings, and a choice scored by the options picked. Then where the reader stands on a scene’s tasks: each part’s status, reported as they work, and the one status the scene shows for them all.

@internote/canvas-sdk18 exports
On this page

A question judges a reader's answer against what its author expects. Each kind of answer has its own judge:

  • judgeMaths checks a maths answer: the right shape, only the letters the question allows, equal in value to the expected answer, and in the form asked for (exact, simplified or rounded(n)).
  • judgeText accepts a text answer that matches any accepted string, ignoring case and extra spaces.
  • judgeChoice scores a multiple choice by the options picked.

Each returns a verdict, and a maths verdict carries a sentence the reader can act on when the answer is wrong.

equivalent is the test beneath judgeMaths: whether two expressions take the same value wherever both are defined.

#Functions

#Classes

#Constants

#Interfaces

#Types

Last updated