Permalink
Browse files

MDL-5799 - quiz previews were sometimes showing up in the quiz overvi…

…ew report.
  • Loading branch information...
1 parent 79dd326 commit 1e066cbf2948fde0d7ee2f29714e8753074894ef tjhunt committed Apr 12, 2007
Showing with 1 addition and 1 deletion.
  1. +1 −1 mod/quiz/report/overview/report.php
@@ -271,7 +271,7 @@ function display($quiz, $cm, $course) {
// We don't care about group, and we to do something funky with attempts
// So do a left join on attempts
$from = 'FROM '.$CFG->prefix.'user u JOIN '.$CFG->prefix.'role_assignments ra ON ra.userid = u.id LEFT JOIN '.$CFG->prefix.'quiz_attempts qa ON u.id = qa.userid AND qa.quiz = '.$quiz->id;
- $where = " WHERE ra.contextid $contextlists";
+ $where = " WHERE ra.contextid $contextlists AND qa.preview = 0";
if (empty($noattempts)) {
$where .= ' AND qa.userid IS NOT NULL'; // show ONLY students with attempts;
} else if ($noattempts == 1) {

0 comments on commit 1e066cb

Please sign in to comment.