]> git.mjollnir.org Git - moodle.git/commitdiff
Fixed user display with less than 20 students
authormoodler <moodler>
Sat, 20 Sep 2003 05:19:02 +0000 (05:19 +0000)
committermoodler <moodler>
Sat, 20 Sep 2003 05:19:02 +0000 (05:19 +0000)
user/index.php

index a72fbd79a09d6e87b7da72452100f1ce6ed52a7a..185b540e61818489b6d2801a18fd5105dc0bd95a 100644 (file)
 
     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)) {