Class: TextStep

mathex. TextStep

new TextStep(tpl, end_message, options) → {Object}

Exercises - Only text step

Parameters:
Name Type Argument Description
tpl String The step template.

The math to be parsed by mathjax must be placed inside the tag {%%}, i.e. {% 2^4=16 %}

end_message String <optional>
A message to be displayed at the end of the step
options Object <optional>
The step options
Properties
Name Type Argument Default Description
container Boolean <optional>
true Whether or not to insert the exercise text inside a div container
Source:
Returns:
TextStep instance
Type
Object
Example
 var step = new mathex.TextStep('<p>my text</p>', 'my message', {container: false});

Extends

Methods

checkFieldResult(field, result, fieldobj)

Checks the result of a text field

Parameters:
Name Type Description
field Object The mootools input field object
result Mixed The right result
fieldobj Object The input object
Inherited From:
Source:

run(router)

Executes the step

Renders the parsed text
Parameters:
Name Type Description
router Object a mathex.Router instance
Source:
Returns:
void