function _multichoice_create_properties in Quiz 7.4
Same name and namespace in other branches
- 8.4 question_types/multichoice/multichoice_update_6400.inc \_multichoice_create_properties()
- 6.4 question_types/multichoice/multichoice_update_6400.inc \_multichoice_create_properties()
- 7 question_types/multichoice/multichoice_update_6400.inc \_multichoice_create_properties()
We create a new table to store multichoice properties in
Parameters
$to_return: Array where progress can be reported
$sandbox: Array where persistent data can be stored, and progress can be found
File
- question_types/
multichoice/ multichoice_update_6400.inc, line 167
Code
function _multichoice_create_properties(&$to_return, &$sandbox = NULL) {
db_create_table('quiz_multichoice_properties', array(
'fields' => array(
'nid' => array(
'type' => 'int',
'unsigned' => TRUE,
'not null' => TRUE,
),
'vid' => array(
'type' => 'int',
'unsigned' => TRUE,
'not null' => TRUE,
),
'choice_multi' => array(
'type' => 'int',
'unsigned' => TRUE,
'not null' => TRUE,
'default' => 0,
),
'choice_random' => array(
'type' => 'int',
'unsigned' => TRUE,
'not null' => TRUE,
'default' => 0,
),
'choice_boolean' => array(
'type' => 'int',
'unsigned' => TRUE,
'not null' => TRUE,
'default' => 0,
),
),
'primary key' => array(
'nid',
'vid',
),
));
}