Development:Numerical question type: Difference between revisions
Helen Foster (talk | contribs) m (Numerical question developer docs moved to Development:Numerical question type) |
Helen Foster (talk | contribs) m (cat edit) |
||
Line 29: | Line 29: | ||
==State->options== | ==State->options== | ||
[[Category:Developer]] | [[Category:Developer|Numerical question type]] | ||
[[Category:Quiz]] | [[Category:Quiz]] |
Revision as of 09:19, 18 June 2007
Template:Questiontype developer docs
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.