Note:

If you want to create a new page for developers, you should create it on the Moodle Developer Resource site.

True/False question type: Difference between revisions

From MoodleDocs
No edit summary
 
Line 12: Line 12:
:int(10) unsigned NOT NULL default '0',
:int(10) unsigned NOT NULL default '0',
==Response storage==
==Response storage==
The true/false questiontype stores a single answer id (from the table quiz_answers) in the answer field. Each true/false question defines two answer records, one for the 'true' option, one for the 'false' option, so either of these two ids gets stored as response.


==Question->options==
==Question->options==

Revision as of 08:32, 6 February 2006

Database tables

An extension of the quiz_questions table the quiz_truefalse table stores the answer ids for the true and for the false answers.

id
int(10) unsigned NOT NULL auto_increment,
question
int(10) unsigned NOT NULL default '0',
trueanswer
int(10) unsigned NOT NULL default '0',
falseanswer
int(10) unsigned NOT NULL default '0',

Response storage

The true/false questiontype stores a single answer id (from the table quiz_answers) in the answer field. Each true/false question defines two answer records, one for the 'true' option, one for the 'false' option, so either of these two ids gets stored as response.

Question->options

State->options