Closed (fixed)
Project:
Quiz
Version:
7.x-4.0-beta1
Component:
Code - Quiz core
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
29 Apr 2013 at 01:22 UTC
Updated:
22 Jun 2014 at 16:17 UTC
Jump to comment: Most recent
Comments
Comment #1
sivaji_ganesh_jojodae commentedFixed in commit http://drupalcode.org/project/quiz.git/commitdiff/03328c558a6778f9fce718...
Comment #2
invisibleink commentedThank you for addressing this issue. And thank you for the module, it is truly appreciated!
While this does work for user 1, unfortunately it does not necessarily allow the quiz author to see results, if that author is not user 1. I apologize for not framing the issue well in the first place. But, here is what I have noticed by taking a look at the code.
It seems that the quiz_access_my_result access callback is aimed at the quiz taker, not at the author. It looks for 'view own quiz results'. It should work great if it is a quiz taker requesting the page.
But when it's the author, who might only 'view any quiz results' or 'view results for own quiz' they will not gain access on the user/quiz/RID/userresults URL.
I wonder if perhaps it should look for 'view results for own quiz' or 'view any quiz results' first, and then check authorship on the quiz node. (Oy, that's a pain to write since only the RID is passed in!)
Or, the issue could be skirted altogether by sending the general quiz results URL in the email to the author. (quiz/%/results) Even though that would leave them to browse for the recent submission.
Or if quiz authors are required to have the permission 'view own quiz results' in addition to 'view results for own quizes' or 'view any quiz results'....then it works.
For my current application, I just assigned the additional permission to quiz authors, but wanted to let you know about this unexpected permission behavior.
Thank you again!