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-sdkOn this page
A question judges a reader's answer against what its author expects. Each kind of answer has its own judge:
judgeMathschecks 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,simplifiedorrounded(n)).judgeTextaccepts a text answer that matches any accepted string, ignoring case and extra spaces.judgeChoicescores 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.