From: martin Date: Sat, 21 Sep 2002 06:39:28 +0000 (+0000) Subject: Don't print pictures at all for very large lists X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=c69ce08b49d223045413b96c69bf856a52d3139f;p=moodle.git Don't print pictures at all for very large lists --- diff --git a/user/index.php b/user/index.php index cf3527a7d0..88f649d1bf 100644 --- a/user/index.php +++ b/user/index.php @@ -70,7 +70,7 @@ } $table->head = array (" ", $name, $location, $lastaccess); $table->align = array ("LEFT", "LEFT", "LEFT", "LEFT"); - $table->size = array ("35", "*", "*", "*"); + $table->size = array ("10", "*", "*", "*"); foreach ($students as $student) { if ($student->lastaccess) { @@ -80,7 +80,13 @@ $lastaccess = $string->never; } - $table->data[] = array (print_user_picture($student->id, $course->id, $student->picture, false, true), + if ($numstudents > $USER_LARGE_CLASS) { // Don't show pictures + $picture = ""; + } else { + $picture = print_user_picture($student->id, $course->id, $student->picture, false, true); + } + + $table->data[] = array ($picture, "wwwroot/user/view.php?id=$student->id&course=$course->id\">$student->firstname $student->lastname", "$student->city, ".$COUNTRIES["$student->country"]."", "$lastaccess"); diff --git a/user/lib.php b/user/lib.php index 8a87860915..9af59db867 100644 --- a/user/lib.php +++ b/user/lib.php @@ -1,6 +1,7 @@