function quiz_update_6415 in Quiz 6.4
Implementation of hook_update_N
Move setting for showing allowed number of attempts to the quiz node form.
File
- ./quiz.install, line 196 
- Quiz install schema for installing the quiz module
Code
function quiz_update_6415() {
  $results = array();
  $def_attempts = variable_get('quiz_show_allowed_times', 1);
  variable_del('quiz_show_allowed_times');
  variable_del('quiz_display_feedback');
  db_add_field($results, 'quiz_node_properties', 'show_attempt_stats', array(
    'type' => 'int',
    'size' => 'tiny',
    'unsigned' => FALSE,
    'not null' => TRUE,
    'default' => $def_attempts,
  ));
  db_add_field($results, 'quiz_user_settings', 'show_attempt_stats', array(
    'type' => 'int',
    'size' => 'tiny',
    'unsigned' => FALSE,
    'not null' => TRUE,
    'default' => $def,
  ));
  return $results;
}