Skip to content

Commit

Permalink
quiz reports MDL-23161 notify(get_string('nostudentsyet')) breaking d…
Browse files Browse the repository at this point in the history
…ownloads.
  • Loading branch information
timhunt committed Aug 11, 2010
1 parent 9cb5d53 commit 874a2ea
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions mod/quiz/report/overview/report.php
Expand Up @@ -103,7 +103,9 @@ function display($quiz, $cm, $course) {
}
$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 {
Expand All @@ -118,7 +120,9 @@ function display($quiz, $cm, $course) {
} 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();
}
Expand Down

0 comments on commit 874a2ea

Please sign in to comment.