When a user goes back to a previous question using the backwards navigation, and he gives the same answer to the question, he gets an error message:

user warning: Duplicate entry '27-4-4-5' for key 1 query: INSERT INTO quiz_multichoice_user_answers (question_nid, question_vid, result_id, answer_id) VALUES (4, 4, 27, 5) in /var/www/html/DRUPAL_SHARED_CODEBASE/includes/database.mysql.inc on line 172.

Don't know what would be a right solution to this. If we allow users to go back and answers the question again, we should overwrite or delete the previous user answer. Or not allow them to go back at all...

Comments

mbutcher’s picture

Version: 5.x-2.0-rc1 » 6.x-2.x-dev
Component: Miscellaneous » Code - Multichoice
Assigned: Unassigned » mbutcher
Priority: Normal » Critical

Tested in Alpha 1 and the problem persists.

mbutcher’s picture

Status: Active » Fixed

Resolved in latest dev version. This will be rolled into Alpha 2.

Anonymous’s picture

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.

dadderley’s picture

Version: 6.x-2.x-dev » 6.x-3.x-dev

Problem exists in version 6.x-3.x-dev