function quizfileupload_update_7002 in Quiz File Upload 7.5
Same name and namespace in other branches
- 7.4 quizfileupload.install \quizfileupload_update_7002()
Add the option to manually score the question.
File
- ./
quizfileupload.install, line 150 - The install file for installing the quizfileupload module.
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);
}
}