function quizfileupload_update_7001 in Quiz File Upload 7.4
Same name and namespace in other branches
- 7.5 quizfileupload.install \quizfileupload_update_7001()
Fixes the data structure for users with the original #2092275 patch
File
- ./
quizfileupload.install, line 121 - The installer file for quizfileupload.
Code
function quizfileupload_update_7001() {
$instance = field_info_instance('node', 'quizfileupload_scoring', 'quizfileupload');
if ($instance) {
field_delete_instance($instance, TRUE);
}
if (db_field_exists('quiz_fileupload_user_answers', 'is_evaluated')) {
$spec = array(
'type' => 'int',
'unsigned' => TRUE,
'size' => 'tiny',
'not null' => TRUE,
'default' => 0,
);
db_change_field('quiz_fileupload_user_answers', 'is_evaluated', 'is_evaluated', $spec);
}
if (db_field_exists('quiz_fileupload_node_properties', 'type')) {
$spec = array(
'type' => 'int',
'unsigned' => TRUE,
'size' => 'tiny',
'not null' => TRUE,
'default' => 0,
);
db_change_field('quiz_fileupload_node_properties', 'type', 'correct_answer_evaluation', $spec);
}
}