Jump to navigation

Class: MarkingScript

Numbas.marking.MarkingScript

new MarkingScript(source, baseopt)

A script to mark a part. A list of notes, which can refer to each other. The dependencies must form a directed acyclic graph, like for JME variables.

Two notes are required:

  • The mark note is the final note, used to provide feedback on the part.
  • The value of the interpreted_answer note is used to represent the student's answer, as the script interpreted it.
Parameters:
Name Type Attributes Description
source String

The definitions of the script's notes.

base Numbas.marking.MarkingScript <optional>

a base script to extend.

Properties:
Name Type Description
notes Array.<Numbas.marking.MarkingNote>
Source:

Members

source :String

The source code of the script

Type:
Source:

Methods

evaluate(scope, variables) → {Numbas.marking.marking_script_result}

Evaluate all of this script's notes in the given scope.

Parameters:
Name Type Description
scope Numbas.jme.Scope
variables Object.<Numbas.jme.token>

Extra variables defined in the scope

Returns:
Type Description
Numbas.marking.marking_script_result
Source: