From 30bacddc5965068edc933883d0d8b59f7cdea28d Mon Sep 17 00:00:00 2001 From: moodler Date: Sat, 20 Sep 2003 05:19:02 +0000 Subject: [PATCH] Fixed user display with less than 20 students --- user/index.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) 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)) { -- 2.39.5