Posted by lsolesen on December 2, 2012 at 1:12pm
4 followers
Jump to:
| Project: | Quiz |
| Version: | 7.x-4.0-alpha12 |
| Component: | Code - Short/long answer |
| Category: | bug report |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | active |
Issue Summary
I have a quiz module I have upgraded from a 6.x to 7.x where the first version I used was alpha9.
Comments
#1
Hello,
I had the same error, so I verificated the code of update and I noticed that there is a function that is used only for drupal 6 updates, it is in line 145 of /quiz/questions_types/short_answer/short_answer.install:
/*** Implementation of hook_update_N()
*
* Adding feedback field to table {quiz_short_answer_user_answers}
*
function short_answer_update_6401() {
$to_return = array();
$spec = array(
'type' => 'text',
'not null' => FALSE,
);
db_add_field($to_return, 'quiz_short_answer_user_answers', 'answer_feedback', $spec);
return $to_return;
}*/
Besides I noticed that the correct function is in the same file, it is in line 137
/*** Adding feedback field to table {quiz_short_answer_user_answers}
*/
function short_answer_update_7401() {
$spec = array(
'type' => 'text',
'not null' => FALSE,
);
db_add_field('quiz_short_answer_user_answers', 'answer_feedback', $spec);
}
In order to know more about the diference I recomend you to view: db_add_field/7 and db_add_field/6. hook_update_N/7 is useful too.
To solve the problem I only comment the first function and run the update.php I hope it could help you.
Regards from Perú.
#2
To confirm, #1 worked for me. Commenting out the function seemed to have resolved the issue.
#3
Removing that function worked for me as well.