Class: QuestionRouter

mathex. QuestionRouter

The Router class handles the navigation through questions

new QuestionRouter() → {Object}

Questions - Question Router Class

Source:
Returns:
mathex.QuestionRouter instance
Type
Object

Methods

addPoint(point)

Add a point to the rating

Parameters:
Name Type Description
point Number The point to add
Source:
Returns:
void

endStep(result, obj)

Ends the question step

Parameters:
Name Type Description
result String The question result ('success', 'failed')
obj Object The mathex.Question object
Source:
Returns:
void

getEndMessage() → {String}

Gets the final message basing upon the final rating

Source:
Returns:
The message
Type
String

init(s)

Initializes the QuestionRouter instance

Renders widgets and gui
Parameters:
Name Type Description
s Array Array of managed questions @see mathex.Question
Source:
Returns:
void

startStep(index)

Executes the given question

Parameters:
Name Type Argument Default Description
index Number <optional>
0 The index of the question to execute
Source:
Returns:
void