From: moodler Date: Sat, 20 Sep 2003 05:19:02 +0000 (+0000) Subject: Fixed user display with less than 20 students X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=30bacddc5965068edc933883d0d8b59f7cdea28d;p=moodle.git Fixed user display with less than 20 students --- diff --git a/user/index.php b/user/index.php index a72fbd79a0..185b540e61 100644 --- a/user/index.php +++ b/user/index.php @@ -85,8 +85,10 @@ if (0 < $totalcount and $totalcount < USER_SMALL_CLASS) { // Print simple listing - foreach ($students as $student) { - print_user($student, $course, $string); + if ($students = get_course_students($course->id, $dsort, $dir)) { + foreach ($students as $student) { + print_user($student, $course, $string); + } } } else if ($students = get_course_students($course->id, $dsort, $dir, $page*$perpage, $perpage)) {