Class: TextSelectFieldStep

mathex. TextSelectFieldStep

new TextSelectFieldStep() → {Object}

Exercises - Text plus one select input

Source:
Returns:
TextSelectFieldStep instance
Type
Object
Example
 var step4 = new mathex.TextSelectFieldStep(
   '<h3>Title</h3>' + 
   '<p>Which color is yellow?</p>' + 
   '<p>[[]] choose one</p>',
   ['red', 'orange', 'yellow'],
   'yellow'
 );

Extends

Methods

addInputEvents()

Adds events to the select input

Source:
Returns:
void

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:

checkSelectFieldResult(field)

Checks the user answer

Parameters:
Name Type Description
field Object The mootools select input object
Source:
Returns:
void

deactivate()

Deactivates all inputs

Source:
Returns:
void

populateSelect()

Populates the select field with the options

Source:
Returns:
void

removeInputEvents()

Removes events from the select input

Source:
Returns:
void

run(router)

Executes the step

Renders the template and activates the select input
Parameters:
Name Type Description
router Object a mathex.Router instance
Source:
Returns:
void