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

mysterri’s picture

Version: 5.x-1.1 » 6.x-2.0-rc2

On 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.

mbutcher’s picture

Status: Active » Postponed (maintainer needs more info)

Is 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).

darkcss’s picture

Version: 6.x-2.0-rc2 » 5.x-1.1

Well, 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?

mbutcher’s picture

darkcss: 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.)

mbutcher’s picture

Status: Postponed (maintainer needs more info) » Closed (fixed)

Version 5.x-x.x is no longer supported