Jump to navigation

Class: ExamEvent

Numbas.ExamEvent

new ExamEvent(eventNode)

Represents what should happen when a particular timing or navigation event happens

Parameters:
Name Type Description
eventNode Element

XML to load settings from

Source:

Members

action :String

Action to take when the event happens.

Choices for timer events:

  • none - don't do anything
  • warn - show a message

Choices for navigation events:

  • none - just allow the navigation
  • warnifunattempted - Show a warning but allow the student to continue.
  • preventifunattempted - Show a warning but allow the student to continue.
Type:
Source:

message :String

Message to show the student when the event happens.

Type:
Source:

type :String

Name of the event this corresponds to

Navigation events:

  • onleave - the student tries to move to another question without answering the current one.

(there used to be more, but now they're all the same one)

Timer events:

  • timedwarning - Five minutes until the exam ends.
  • timeout - There's no time left; the exam is over.
Type:
Source: