quiz MDL-25884 mod/quiz/index.php broken when logged in as a student.
authorTim Hunt <T.J.Hunt@open.ac.uk>
Tue, 18 Jan 2011 23:13:37 +0000 (23:13 +0000)
committerTim Hunt <T.J.Hunt@open.ac.uk>
Tue, 18 Jan 2011 23:17:46 +0000 (23:17 +0000)
mod/quiz/index.php

index 631f95b..22e1229 100644 (file)
@@ -92,8 +92,8 @@
                 SELECT qg.quiz, qg.grade
                 FROM {quiz_grades} qg
                 JOIN {quiz} q ON q.id = qg.quiz
-                WHERE q.course = ?',
-                $course->id);
+                WHERE q.course = ? AND qg.userid = ?',
+                array($course->id, $USER->id));
     }
 
     $table = new html_table();