Jump to navigation

Namespace: marking

Numbas.marking

Members

(static) feedback :Object.<function()>

Constructors for feedback items.

Type:
Source:
See:

(static, readonly) FeedbackOps :String

Kinds of feedback item

Type:
Properties:
Name Type Description
SET_CREDIT String

Set the credit to the given value

ADD_CREDIT String

Add the given amount of credit

MULTIPLY_CREDIT String

Multiply the current credit by the given amount

SUB_CREDIT String

Subtract the given amount of credit

END String

End marking

WARNING String

Give the student a warning next to the answer widget

FEEDBACK String

Give the student a message

CONCAT String

Add the given list of items to the end of the current list of feedback items

Source:

Methods

(static) compute_note(name, todo, scope) → {Numbas.jme.token}

Compute the marking note with the given name in the given scope

Parameters:
Name Type Description
name String
todo Object

dictionary of notes still to evaluate

scope Numbas.marking.StatefulScope
Returns:
Type Description
Numbas.jme.token
Source:
See:

(static) finalise_state(states) → {Numbas.marking.finalised_state}

Run through a sequence of state operations, accumulating credit. It might look like this is duplicated in Numbas.parts.Part#apply_feedback, but we need to be able to get a description of what a sequence of operations does in abstract so it can be reused in marking scripts for parent parts.

Parameters:
Name Type Description
states Array.<Numbas.marking.feedback_item>
Returns:
Type Description
Numbas.marking.finalised_state
Source:
See:

Type Definitions

feedback_item

A line of feedback to give to the student, produced while marking their answer. Can modify the credit awarded.

Type:
Properties:
Name Type Attributes Description
op String

The operation to perform. See Numbas.marking.FeedbackOps

credit Number <optional>

Parameter to change the credit awarded. The exact meaning depends on op.

reason String <optional>

An extra note about why the op is being applied. For 'correct' and 'incorrect' feedback, this helps distinguish cases when the credit awarded doesn't change. 'invalid' means the answer could not be marked.

message String <optional>

A message to display to the student.

Source:

finalised_state

The result of attempting to mark a part.

Type:
Properties:
Name Type Description
valid Boolean

Can the answer be marked?

credit Number

Proportion of the credit to award

states Array.<Object>

Feedback actions

Source:

marking_script_result

The result of a marking script.

Type:
Properties:
Name Type Description
states Object.<Array.<Numbas.marking.feedback_item>>

the feedback resulting from each of the notes

values Object.<Numbas.jme.token>

the values of each of the notes

state_valid Object.<Boolean>

See Numbas.marking.StatefulScope#state_valid

state_errors Object.<Error>

See Numbas.marking.StatefulScope#state_errors

Source:

note_definition

A definition of a marking note.

The note's name, followed by an optional description enclosed in parentheses, then a colon, and finally a JME expression to evaluate.

Type:
Source: