Hi, I was trying to upgrade quiz from version 6.x-3.5 to version 6.x-4.0-rc7, I have about 640 multichoice questions, I did the steps as mentioned in the quiz project page (remove quiz folder than upload the quiz 4), I also have the autoload installed and didnt forget to back it up first. But when I tried to update it, it keeps getting error. And below is the error message after it failed updating:
* user warning: Incorrect table definition; there can be only one auto column and it must be defined as a key query: ALTER TABLE quiz_multichoice_user_answers DROP PRIMARY KEY in /home/sloki/user/ariestai/sites/masukui.com/www/includes/database.mysql-common.inc on line 386.
* user warning: Duplicate column name 'id' query: ALTER TABLE quiz_multichoice_user_answers ADD `id` INT auto_increment DEFAULT NULL, ADD PRIMARY KEY (id) in /home/sloki/user/ariestai/sites/masukui.com/www/includes/database.mysql-common.inc on line 298.
* user warning: Duplicate column name 'choice_order' query: ALTER TABLE quiz_multichoice_user_answers ADD `choice_order` TEXT DEFAULT NULL in /home/sloki/user/ariestai/sites/masukui.com/www/includes/database.mysql-common.inc on line 298.
* user warning: Table 'quiz_multichoice_user_answer_multi' already exists query: CREATE TABLE quiz_multichoice_user_answer_multi ( `user_answer_id` INT unsigned NOT NULL, `answer_id` INT unsigned NOT NULL, PRIMARY KEY (user_answer_id, answer_id) ) /*!40100 DEFAULT CHARACTER SET UTF8 */ in /home/sloki/user/ariestai/sites/masukui.com/www/includes/database.inc on line 550.
I hope somebody here could help me to figure it out, or give me another option to get the quiz 4 installed and keep the multichoice questions exist.
Thanks in advance
Comments
Comment #1
Aquade CreditAttribution: Aquade commentedStill working on updating multichoice...
I am trying to use another option (node_save), but it still does not work, firstly I back up the old quiz_multichoice_answers table and named it quiz_multichoice_answers_lama, then use node_save to insert all data from quiz_multichoice_answers_lama into new quiz_multichoice_answers, the problem is, it only inserts one answer field, below is the code:
I look forward for anybody here helping me to figure it out.
Thanks
Comment #2
Aquade CreditAttribution: Aquade commentedNever mind I have figured it out myself, Just in case anyone here have the same problem in updating quiz 3 to quiz 4, to get multichoice updated, here is the solution to try:
- Back up old table quiz_multichoice_answers then rename it
- uninstall old quiz (6.x.3.x)
- upload new quiz (6.x.4.x)
- Install new quiz
- create a new content/ node and fill out below snippets
Note: do not forget to remove the node after it successfully updated multichoice, because if it is viewed it will execute the node_save again.
Comment #3
Aquade CreditAttribution: Aquade commentedComment #5
mazdakaps CreditAttribution: mazdakaps commentedHello this works partially for me. I do what you suggest but except that not all questions are getting into the table and the question/answer relationship is gone. I believe at first we should focus why this is happening. I am having the late ver of quiz 4.
Comment #6
mazdakaps CreditAttribution: mazdakaps commentedComment #7
djdevinThis issue is being closed because it is filed against a version that is no longer supported.