mirror of
https://github.com/moodle/moodle.git
synced 2025-04-21 00:12:56 +02:00
MDL-5799 - quiz previews were sometimes showing up in the quiz overview report. Merged from MOODLE_18_STABLE.
This commit is contained in:
parent
99ba746d29
commit
15aa9df958
@ -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) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user