Closed (fixed)
Project:
Quiz
Version:
7.x-4.0-alpha4
Component:
Code - Quiz core
Priority:
Major
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
16 Apr 2012 at 12:18 UTC
Updated:
6 Jun 2012 at 22:08 UTC
Jump to comment: Most recent file
Comments
Comment #1
edboost commentedI'm getting the same thing. I went back to the quiz to delete the pass/fail text (and just rely on Results text) and when I saved, all question were unassigned.
I'm only using MC questions, if that helps.
Comment #2
ludo.rSame here, when I edit the quiz, all questions are unassigned.
I'm only using Multiple choice questions.
Comment #3
ludo.rComment #4
dkliewer commentedAny news on this? This bug makes the module useless. Even changing a word in the quiz description removes all questions!
Comment #5
isaac.niebeling commentedI'm seeing the same issue with multiple choice questions and quiz directions.
Comment #6
isaac.niebeling commentedSo I did a little investigating in the database, and it looks like the parent_vid isn't getting updated when the quiz node is saved after adding a new question. Manually updating that in the DB fixes the questions not showing up. Haven't looked at the code yet, but that might give some direction to others.
Comment #7
joel_osc commentedI have a db that this happens on a particular quiz the first time I edit it - luckily I have a backup so I can restore and recreate the problem every time. If I just edit the quiz and select the field 'Allow jumping' in 'Taking options' and select save, the questions will get removed from the quiz. I think the problem happens around line 733 in the quiz.module:
For some reason only the first time I save the quiz after restoring the database $node->revision is set to 1 so quiz_update_quiz_question_relationship is called with the parametres (277,277,112) where 277 is the vid of node.
I don't know this code too well but I believe a possible fix is to change the above segment to:
I tested it and it seems to work, but again I don't really know if this change will have other ramifications.
Comment #8
amagdy commentedI'll test your comment
Comment #9
amagdy commentedit is working .. nice :)
create a patch for it
Comment #10
joel_osc commentedThanks for testing. Here is a patch...
Comment #11
bonobo commentedFWIW, I checked out the latest dev branch after seeing this commit: http://drupalcode.org/project/quiz.git/commit/1d920a9
Note the commit message:
And, the issue did not appear.
This did *not* look at either the comment in 7, or the related patch in 10.
Comment #12
amagdy commentedyes, but if you check the diff .. it is the same fix :)
gj joel_liquidcms
Comment #13
thememex commentedSame behavior with a MC only quiz on 7.x-4.0-alpha4. The patch in #10 seems to solve this issue.
Thanks @joel_liquidcms
Comment #14
drewbe121212 commentedI seem to still be experiencing this issue when 0 results have been logged for a specific quiz. Can anyone else confirm this or replicate it?
- Created Questions
- Created Quiz
- Attached Questions to Quiz
- Edit Quiz *questions disappear*
- Re-attach questions to Quiz
- Start and/or complete the quiz
- Edit Quiz *questions are retained correctly*
- Delete result record from table quiz_node_results on the current quiz/revision
- Edit Quiz *questions disappear*
Edit: Just as a FYI, I have applied the single page quiz patch, so it would be nice to at least see if others are experiencing the same issue or if it is something single page did to this.
Comment #15
drewbe121212 commentedOk. It looks like my issue was still coming from a bug in the code during the update_quiz_relationships call. Posted a patch on the issue: #1301584: Saving questions to a quiz gives a fatal error
Comment #16
klausiPatch does not apply, see http://drupal.org/node/707484
Comment #17
falcon commentedThis issue was fixed quite some time ago. We just haven't made a new release yet...
Comment #17.0
falcon commentedadd update in the descrription