From 15aa9df95811a2a153d99c5fef3aed5c763a6f9b Mon Sep 17 00:00:00 2001 From: tjhunt Date: Thu, 12 Apr 2007 20:11:27 +0000 Subject: [PATCH] MDL-5799 - quiz previews were sometimes showing up in the quiz overview report. Merged from MOODLE_18_STABLE. --- mod/quiz/report/overview/report.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mod/quiz/report/overview/report.php b/mod/quiz/report/overview/report.php index a8a7268276..56495957c3 100644 --- a/mod/quiz/report/overview/report.php +++ b/mod/quiz/report/overview/report.php @@ -345,7 +345,7 @@ class quiz_report extends quiz_default_report { // 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) { -- 2.39.5