Hi there, i get a SQL error when i press the next button of the Quiz for the Drag Drop question. Here is the message :
PDOException : SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '10-94-106' for key 'PRIMARY': INSERT INTO {quiz_drag_drop_user_answers} (question_nid, question_vid, result_id, score) VALUES (:db_insert_placeholder_0, :db_insert_placeholder_1, :db_insert_placeholder_2, :db_insert_placeholder_3); Array ( [:db_insert_placeholder_0] => 94 [:db_insert_placeholder_1] => 106 [:db_insert_placeholder_2] => 10 [:db_insert_placeholder_3] => 1 ) dans DragDropResponse->save() (line 308 dans sites\all\modules\quiz_drag_drop\quiz_drag_drop.classes.inc).
Comments
Comment #1
alex_21 commentedAfter testing somes options from the quiz, it look like this SQL error comes if the option "start again the question if incorrect" is chosen form the edit quiz section. Hope this can help.
Comment #2
npscode commentedHey Alex,
I will look in to this issue. Give me some time.
Thanks,
Naren
Comment #3
alex_21 commentedHi,
After some tests and without the option "start again the question if incorrect" from the quiz option, i can reproduce the same kind of error :
PDOException : SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '11-102-142' for key 'PRIMARY': INSERT INTO {quiz_drag_drop_user_answers} (question_nid, question_vid, result_id, score) VALUES (:db_insert_placeholder_0, :db_insert_placeholder_1, :db_insert_placeholder_2, :db_insert_placeholder_3); Array ( [:db_insert_placeholder_0] => 102 [:db_insert_placeholder_1] => 142 [:db_insert_placeholder_2] => 11 [:db_insert_placeholder_3] => 1 ) dans DragDropResponse->save() (line 308 in sites\all\modules\quiz_drag_drop\quiz_drag_drop.classes.inc).
This error come only if the user put all the images of the quiz in the wrong places. Strangely, if we go back to the quiz and do it again, (right or wrong) we can continue and finish the quiz, but the Drag drop question doesn't appears in the results if we get this error.
Thanks.
Comment #4
npscode commentedHi alex,
Issue is fixed, download 7.x-1.4 version.
Let me know if you still find any issue.
Comment #5
alex_21 commentedLooks fine, good job !!
Thank Naren.
Comment #6
shenzhuxi commentedWith 7.x-1.x-dev and 7.x-1.4, I still have
It seems because that Quiz 7.x-5.0-beta3 changed something.
I fixed it by: