You are here

function multichoice_update_6401 in Quiz 6.4

Implementation of hook_update_N().

Change how we store the user settings

File

question_types/multichoice/multichoice.install, line 245
Sponsored by: Norwegian Centre for Telemedicine Code: falcon

Code

function multichoice_update_6401(&$sandbox = NULL) {
  $results = array();
  db_drop_field($results, 'quiz_multichoice_user_settings', 'last_nid');
  db_drop_field($results, 'quiz_multichoice_user_settings', 'last_vid');
  db_add_field($results, 'quiz_multichoice_user_settings', 'choice_boolean', array(
    'type' => 'int',
    'unsigned' => TRUE,
    'not null' => TRUE,
    'default' => 0,
  ));
  db_add_field($results, 'quiz_multichoice_user_settings', 'choice_random', array(
    'type' => 'int',
    'unsigned' => TRUE,
    'not null' => TRUE,
    'default' => 0,
  ));
  db_add_field($results, 'quiz_multichoice_user_settings', 'choice_multi', array(
    'type' => 'int',
    'unsigned' => TRUE,
    'not null' => TRUE,
    'default' => 0,
  ));
  return $results;
}