Closed (fixed)
Project:
Quiz
Version:
6.x-4.2
Component:
Code - Quiz core
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
29 Jul 2011 at 12:48 UTC
Updated:
22 Jun 2014 at 16:17 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
pearson.gn commentedI agree. I'd like it to show all results for each user in their My Results section, not just the latest revision.
I want users to be able to retain a record of safety quizzes they complete. The quizzes get updated occasionally, but older results still remain valid. It's a nuisance when the old results disappear.
I'll dig around the code a bit, but if anyone has a quick fix, much appreciated.
Comment #2
regi.bradley commentedI ended up changing the query in quiz.pages.inc for function quiz_get_user_results($user_id) - line 232.
$sql = "SELECT n.nid, n.title, qnp.pass_rate, qnrs.result_id, qnrs.time_start, qnrs.time_end, qnrs.score, qnrs.is_evaluated
FROM {node} n
INNER JOIN {quiz_node_properties} qnp ON n.nid = qnp.nid
INNER JOIN {quiz_node_results} qnrs ON qnrs.vid = qnp.vid
INNER JOIN {users} u ON u.uid = qnrs.uid
WHERE n.type = 'quiz'
AND u.uid = %d
AND qnrs.time_end > 0
ORDER BY qnrs.result_id ASC"
This seems to have done the trick for me.
Comment #3
fuzzy76 commentedRolled as a patch against the 4.x branch. Hopefully someone can get this in before the next update. This is regi.bradley's code, so he should be credited. :)
Comment #4
fuzzy76 commentedComment #5
fuzzy76 commentedI guess not. The last update reverted my patch, and I got support requests on this again. Is 2 testers enough for RTBC? :)
Comment #6
falcon commentedThanks!
Comment #9
1websitedesigner commentedIn Drupal 6 on the Results page I'm still only showing the most recent results.
Most of my users are Anonymous and I was hoping to see a range of results for anonymous users, however I'm only seeing one value for me (admin) and one value for 'Anonymous', even though lots of different people have taken the test.
It's not a show stopper, but any help would be appreciated!