From 874a2eaf550a4b4eda57774b45f0250e8251e71d Mon Sep 17 00:00:00 2001 From: Tim Hunt Date: Wed, 11 Aug 2010 18:34:44 +0000 Subject: [PATCH] quiz reports MDL-23161 notify(get_string('nostudentsyet')) breaking downloads. --- mod/quiz/report/overview/report.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/mod/quiz/report/overview/report.php b/mod/quiz/report/overview/report.php index c0fca7ddf7c..9592806faf7 100644 --- a/mod/quiz/report/overview/report.php +++ b/mod/quiz/report/overview/report.php @@ -103,7 +103,9 @@ class quiz_report extends quiz_default_report { } $nostudents = false; if (!$students = get_users_by_capability($context, array('mod/quiz:reviewmyattempts', 'mod/quiz:attempt'),'u.id,1','','','','','',false)) { - notify(get_string('nostudentsyet')); + if (!$download) { + notify(get_string('nostudentsyet')); + } $nostudents = true; $studentslist = 0; } else { @@ -118,7 +120,9 @@ class quiz_report extends quiz_default_report { } else { // all users who can attempt quizzes and who are in the currently selected group if (!$groupstudents = get_users_by_capability($context, array('mod/quiz:reviewmyattempts', 'mod/quiz:attempt'),'u.id,1','','','',$currentgroup,'',false)) { - notify(get_string('nostudentsingroup')); + if (!$download) { + notify(get_string('nostudentsingroup')); + } $nostudents = true; $groupstudents = array(); }