From 414e7276761a770efcf2ee1fd12a29b352dd3e7f Mon Sep 17 00:00:00 2001 From: Tim Hunt Date: Wed, 11 Aug 2010 18:34:42 +0000 Subject: [PATCH] quiz reports MDL-23161 notify(get_string('nostudentsyet')) breaking downloads. --- mod/quiz/report/overview/report.php | 10 +++++++--- mod/quiz/report/responses/report.php | 10 +++++++--- 2 files changed, 14 insertions(+), 6 deletions(-) diff --git a/mod/quiz/report/overview/report.php b/mod/quiz/report/overview/report.php index b32b3d5bf5d..9a17fa6f706 100644 --- a/mod/quiz/report/overview/report.php +++ b/mod/quiz/report/overview/report.php @@ -178,10 +178,14 @@ class quiz_overview_report extends quiz_default_report { $nostudents = false; if (!$students) { - echo $OUTPUT->notification(get_string('nostudentsyet')); + if (!$table->is_downloading()) { + echo $OUTPUT->notification(get_string('nostudentsyet')); + } $nostudents = true; - }else if ($currentgroup && !$groupstudents) { - echo $OUTPUT->notification(get_string('nostudentsingroup')); + } else if ($currentgroup && !$groupstudents) { + if (!$table->is_downloading()) { + echo $OUTPUT->notification(get_string('nostudentsingroup')); + } $nostudents = true; } if (!$table->is_downloading()) { diff --git a/mod/quiz/report/responses/report.php b/mod/quiz/report/responses/report.php index 72d367ef7ad..d74b52b8fcd 100644 --- a/mod/quiz/report/responses/report.php +++ b/mod/quiz/report/responses/report.php @@ -149,10 +149,14 @@ class quiz_responses_report extends quiz_default_report { $nostudents = false; if (!$students) { - echo $OUTPUT->notification(get_string('nostudentsyet')); + if (!$table->is_downloading()) { + echo $OUTPUT->notification(get_string('nostudentsyet')); + } $nostudents = true; - }else if ($currentgroup && !$groupstudents) { - echo $OUTPUT->notification(get_string('nostudentsingroup')); + } else if ($currentgroup && !$groupstudents) { + if (!$table->is_downloading()) { + echo $OUTPUT->notification(get_string('nostudentsingroup')); + } $nostudents = true; } if (!$table->is_downloading()) {