You are here

function quizfileupload_update_7002 in Quiz File Upload 7.4

Same name and namespace in other branches
  1. 7.5 quizfileupload.install \quizfileupload_update_7002()

Add the option to manually score the question.

File

./quizfileupload.install, line 154
The installer file for quizfileupload.

Code

function quizfileupload_update_7002() {

  // Add the required fields to the database.
  if (!db_field_exists('quiz_fileupload_node_properties', 'correct_answer_evaluation')) {
    $spec = array(
      'type' => 'int',
      'unsigned' => TRUE,
      'size' => 'tiny',
      'not null' => TRUE,
      'default' => 0,
    );
    db_add_field('quiz_fileupload_node_properties', 'correct_answer_evaluation', $spec);
  }
  if (!db_field_exists('quiz_fileupload_user_answers', 'is_evaluated')) {
    $spec = array(
      'type' => 'int',
      'unsigned' => TRUE,
      'size' => 'tiny',
      'not null' => TRUE,
      'default' => 0,
    );
    db_add_field('quiz_fileupload_user_answers', 'is_evaluated', $spec);
  }
  if (!db_field_exists('quiz_fileupload_user_answers', 'answer_feedback')) {
    $spec = array(
      'type' => 'text',
    );
    db_add_field('quiz_fileupload_user_answers', 'answer_feedback', $spec);
  }
  if (!db_field_exists('quiz_fileupload_user_answers', 'answer_feedback_format')) {
    $spec = array(
      'type' => 'varchar',
      'length' => 255,
    );
    db_add_field('quiz_fileupload_user_answers', 'answer_feedback_format', $spec);
  }
}