You are here

function _multichoice_create_user_settings in Quiz 8.4

Same name and namespace in other branches
  1. 6.4 question_types/multichoice/multichoice_update_6400.inc \_multichoice_create_user_settings()
  2. 7 question_types/multichoice/multichoice_update_6400.inc \_multichoice_create_user_settings()
  3. 7.4 question_types/multichoice/multichoice_update_6400.inc \_multichoice_create_user_settings()

We create the user settings table

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 369

Code

function _multichoice_create_user_settings(&$to_return, &$sandbox = NULL) {
  db_create_table('quiz_multichoice_user_settings', array(
    'fields' => array(
      'uid' => array(
        'type' => 'int',
        'unsigned' => TRUE,
        'not null' => TRUE,
      ),
      'last_nid' => array(
        'type' => 'int',
        'unsigned' => TRUE,
        'not null' => TRUE,
      ),
      'last_vid' => array(
        'type' => 'int',
        'unsigned' => TRUE,
        'not null' => TRUE,
      ),
    ),
    'primary key' => array(
      'uid',
    ),
  ));
}