Issue:

After a user finishes a quiz the results are emailed to the user and the admin. The user can click the link in the email and view their test results, however the admin account receives an access denied error.

the link in the email is:

http://www.quantifiededucation.com/user/quiz/55/userresults

Even with all permissions set to open the page is still unavailable to admin. I have delved through many threads and have not found anything that resolves this issue. Any assistance with this would be very appreciated.

Comments

moriartymedia’s picture

Issue tags: +quiz statistics

I'm also having the same issue with my administration account not being able to see the userresult data... "access denied." Please help.

matdab’s picture

Version: 6.x-4.3 » 6.x-4.4
Category: support » bug

subscribing!

Anonymous’s picture

has this been solved yet?

i put the !url in the email settings for the body of the email, and it goes to a page that neither the admin (me) or the author of the test (client) can access, even with full permissions.

it seems as though the links are wrong.

The email shows this as the link "domain.com/user/quiz/15/userresults" when really it should be "domain.com/node/182/results/15".

403 Access Denied is what I get when clicking, but I'm pretty much a super user.

b0b’s picture

#3 is correct. Changing line 2279 of the module from...

'!url' => url('user/quiz/' . $rid . '/userresults', array('absolute' => TRUE)),

to...

'!url' => url('node/' . $quiz->nid . '/results/' . $rid, array('absolute' => TRUE)),

fixes the problem.

pbonnefoi’s picture

I had the same problem and changing line 2279 from the quiz.module fixed the problem.

I also had the problem when you go on "My account -> My results" and click on the results. In order to fix the problem, you can also change line 307 from the quiz.pages.inc file from :

'title' => l($result['title'], 'user/quiz/'. $result['result_id'] .'/userresults'),

to

'title' => l($result['title'], 'node/' . $result['nid'] . '/results/'. $result['result_id']),

Rodgey’s picture

Priority: Normal » Major

It's great to notice that this overcomes the problem. Is this going to be implemented in the core of quiz6.x-4?

IMO this is a bug that has a major priority, since seeing the individual results (answers to questions in a quiz) is a very important issue for this module. If there is any help needed about reproducing the bug, let me know :)

Can anyone provide me some directions how to apply these changes without hacking the core module?

Thanks in advance :)

Rosamunda’s picture

I have the same issue in D7 in a live site, is #3 the same in D7 case?
Thanks!

As If’s picture

@Rosamunda - Yes but it's line 2538 in 7.x-4.0-beta1. Just search for the line:
'!url' => url('user/quiz/' . $rid . '/userresults', array('absolute' => TRUE)),

memcinto’s picture

RE #8 -- and do what to that line? It's completely unclear how to modify that line to get rid of the Access Denied error when administrative users navigate to /user/quiz/xx/userresults.

Drupal 7, Quiz 7.x-4.0-beta2.

As If’s picture

The error discussed in #3 is addressed by the code change shown in #4. In earlier versions of the module it appeared on line 2279. In version 4.0-beta-1 it appears on line 2538, but the same code change applies. I don't know about beta-2, but try searching for the string.

memcinto’s picture

Thank you As If, that is exactly what I needed to know. Thanks for the help.

alexanderpas’s picture

Version: 6.x-4.4 » 7.x-4.0-beta2
Component: Miscellaneous » Code - Feedback/results
Issue summary: View changes

Moving to 7.x-4.0-beta2.

Let's try to get the underlying problem fixed before 7.x-4.0 leaves beta.

I don't think changing the url is the solution, but just a workaround that bypasses the underlying problem.

djdevin’s picture

Status: Active » Closed (outdated)