Closed (fixed)
Project:
Quiz
Version:
5.x-1.1
Component:
Code - Quiz module
Priority:
Critical
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
7 Nov 2008 at 22:05 UTC
Updated:
8 May 2009 at 20:57 UTC
I'm really confused on why the score isn't updating in the quiz_result table. It's zero on every submit. After looking through the code I see that this update section (which maybe should have the score insertion) isn't updating the score. Could someone tell me if I'm completely insane or have looked over something?
db_query("UPDATE {quiz_result} SET time_end = %d, score = %d WHERE rid = %d", $now, $score['percentage_score'], $_SESSION['quiz_'. $quiz->nid]['rid']);
Comments
Comment #1
mysterri commentedOn a related note: I notice that each time the quiz is accessed (whether any answers are provided or not), it creates an "in progress" count of number of times quiz is administered per user and empty score value. If the code checked for answers before incrementing (and ignored when no answers are provided), that would be more intuitive... And if it counted the number of questions answered and allowed "partially complete" quizzes to return to where the user left off at next log in, that would truly rock. Is anyone working on this? If not, I'm open to doing so...even though I'm a Drupal newbie.
Comment #2
mbutcher commentedIs this bug in the 5.x-1.1 or the 6.x-2 branch? Or are there two bug reports here?
mysterri -- I think you have a feature request there. That would be a great thing to work on for 6.x-3.0 (the current development version).
Comment #3
darkcss commentedWell, I've tried 5.x-1.1 as well as the rc's. Viewing the results, I am seeing the correct percentage. Where is it grabbing this data from?
Comment #4
mbutcher commenteddarkcss: I believe it is generating the report on the fly. When the quiz is finished, the answers are calculated.
As for the underlying cause of the quiz answers not being stored, I haven't been able to replicate this in 6.x-2.x or 6.x-3.x. Any additional data you can give me would help.
(5.x versions are now unsupported, since I don't have time to work on them.)
Comment #5
mbutcher commentedVersion 5.x-x.x is no longer supported