new TestInputQuestion(options) → {Object}
Test - Test question, answers with only text fields
Parameters:
Name | Type | Argument | Description | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
options |
Object |
<optional> |
Options
Properties
|
- Source:
- mathex/res-otto/js/mathex.js, line 1842
Returns:
mathex.TestInputQuestion instance
- Type
- Object
Example
var question1 = new mathex.TestQuestion('input', {
question: '<p>How do you write the pow with base 20 and exponent 3?</p><p>{%\\FormInput0 ^ \\FormInput1%}</p>',
inputs: {
0: {
size: 2,
result: '20',
type: 'int'
},
1: {
size: 1,
result: 3,
type: 'int'
}
}
});
Methods
-
checkAnswer()
Cheks the user answer, saves the result and proceeds with the next question
-
- Source:
- mathex/res-otto/js/mathex.js, line 1863
Returns:
void -
run(test)
Executes the test question
-
Parameters:
Name Type Description test
Object The mathex.Test instance - Source:
- mathex/res-otto/js/mathex.js, line 1846
Returns:
void