As teacher not able to see students answers

I found a problem: when a teacher wants to view a students' results answers, an 'Access denied' page comes up. How to reproduce: Log in as Teacher on the demo site: Go to the students' "My results": Click on a 'View answers' link The problem is caused by wrong use of the 'og_quiz_access_my_result' in the og_quiz module: <?php $time_end = db_query('SELECT time_end FROM {quiz_node_results} WHERE result_id = :result_id AND uid = :uid', array(':result_id' => $rid, ':uid' => $user->uid))->fetchField(); ?> It searches for the result_id in combination with the user_id of the current user. But in this case, that is not correct because we are looking for the students' result. The query fails and returns false, so the teacher is never granted to access see the answers. I hope this can be fixed! Thanks!
James Aparicio

Hi BdN

Hi BdN

When teachers want to see their student results usually they go to the course and then they click on the results or on the admin tab results.

Depending on the context, the teacher should be able to see the student results.

For example if you log in as the teacher and do user/quiz/1744/userresults, you have access denied.

If you go to the course, node/346/results/1744, you see that the teacher has access.


But yes. we should probably change this, ill take a look at it.


Best regards



Hi James

Ah you are right, that is the page I'm looking for. So there are 2 pages that are exactly the same, but with different paths and credentials. That is a little confusing ;-) Many thanks for your answer! I will figure out how to redirect the teachers to the correct place :-)

Displaying user results/certificate

* deleted - posted in wrong thread *

Same issue

For some reason, My teachers cannot see or grade the assignments. How did you get it to work? My teachers have the role as Teacher.