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
|
- Source:
- mathex/res-otto/js/mathex.js, line 1165
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:
- mathex/res-otto/js/mathex.js, line 616
-
run(router)
Executes the step
-
Renders the parsed text
Parameters:
Name Type Description router
Object a mathex.Router instance - Source:
- mathex/res-otto/js/mathex.js, line 1171
Returns:
void