Numerical question type: Difference between revisions
Helen Foster (talk | contribs) m (Numerical question developer docs moved to Development:Numerical question type) |
|||
(5 intermediate revisions by 3 users not shown) | |||
Line 29: | Line 29: | ||
==State->options== | ==State->options== | ||
[[Category:Quiz]] | |||
==See also== | |||
[[ | [[Question Engine 2:Numerical formats |Numerical formats]], gives a proposal for implementing various numerical formats for numerical and calculated question type in Question Engine 2.1. | ||
[[Question Engine 2:Numerical tolerances |Numerical tolerances]], analysis of the various tolerances for numerical and calculated question type answer (MDL-31837). |
Latest revision as of 04:25, 14 August 2012
Database tables
quiz_numerical
The quiz_numerical table is an extension of the quiz_answers table, defining a tolerance value for each answer.
- id
- int(10) unsigned NOT NULL auto_increment,
- question
- int(10) unsigned NOT NULL default '0',
- answer
- int(10) unsigned NOT NULL default '0',
- tolerance
- varchar(255) NOT NULL default '0.0',
quiz_numerical_units
The quiz_numerical_units table is used by the numerical questiontype and the calculated questionype. It extends the quiz_questions table, defining an arbitrary number of units that can be used in the responses.
- id
- int(10) unsigned NOT NULL auto_increment,
- question
- int(10) unsigned NOT NULL default '0',
- multiplier
- decimal(40,20) NOT NULL default '1.00000000000000000000',
- unit
- varchar(50) NOT NULL default ,
Response storage
The numerical questiontype, which inherits the function print_question_formulation_and_controls() from the shortanswer questiontype, has only one response field, so its responses are handled by the default questiontype. The response is stored without any modifications in the answer field of the table quiz_states.
Question->options
State->options
See also
Numerical formats, gives a proposal for implementing various numerical formats for numerical and calculated question type in Question Engine 2.1.
Numerical tolerances, analysis of the various tolerances for numerical and calculated question type answer (MDL-31837).