Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

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

…ew report.
  • Loading branch information...
commit 1e066cbf2948fde0d7ee2f29714e8753074894ef 1 parent 79dd326
tjhunt authored

Showing 1 changed file with 1 addition and 1 deletion. Show diff stats Hide diff stats

  1. +1 1  mod/quiz/report/overview/report.php
2  mod/quiz/report/overview/report.php
@@ -271,7 +271,7 @@ function display($quiz, $cm, $course) {
271 271 // We don't care about group, and we to do something funky with attempts
272 272 // So do a left join on attempts
273 273 $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;
274   - $where = " WHERE ra.contextid $contextlists";
  274 + $where = " WHERE ra.contextid $contextlists AND qa.preview = 0";
275 275 if (empty($noattempts)) {
276 276 $where .= ' AND qa.userid IS NOT NULL'; // show ONLY students with attempts;
277 277 } else if ($noattempts == 1) {

0 comments on commit 1e066cb

Please sign in to comment.
Something went wrong with that request. Please try again.