The access check for the url mailed to the quiz author (user/quiz/%/userresults) does not pass, even for user 1.
Checked this in the dev version too -- same problem.

Comments

sivaji_ganesh_jojodae’s picture

invisibleink’s picture

Thank 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!

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

  • Commit 03328c5 on 7.x-4.x, 7.x-5.x by sivaji:
    Issue #1982048 by invisibleink: Fixed Access denied for user 1 on...

  • Commit 03328c5 on 7.x-4.x, 7.x-5.x, quiz-pages by sivaji:
    Issue #1982048 by invisibleink: Fixed Access denied for user 1 on...

  • Commit 03328c5 on 7.x-4.x, 7.x-5.x, quiz-pages, 2269219 by sivaji:
    Issue #1982048 by invisibleink: Fixed Access denied for user 1 on...

  • Commit 03328c5 on 7.x-4.x, 7.x-5.x, 2269219 by sivaji:
    Issue #1982048 by invisibleink: Fixed Access denied for user 1 on...