MDL-15490 "Create a new Quiz: warning message in Result tab" problem was when there were no students in a course - fixed.

This commit is contained in:
jamiesensei
2008-07-01 11:39:09 +00:00
parent 680c8b87e9
commit 696d84554d
+3 -1
View File
@@ -116,9 +116,11 @@ class quiz_report extends quiz_default_report {
if (!$students = get_users_by_capability($context, 'mod/quiz:attempt','','','','','','',false)){
notify(get_string('nostudentsyet'));
$nostudents = true;
$studentslist = '';
} else {
$studentslist = join(',',array_keys($students));
}
$studentslist = join(',',array_keys($students));
if (empty($currentgroup)) {
// all users who can attempt quizzes
$groupstudentslist = '';