Permalink
Browse files

Don't print pictures at all for very large lists

  • Loading branch information...
1 parent 25fa226 commit c69ce08b49d223045413b96c69bf856a52d3139f martin committed Sep 21, 2002
Showing with 10 additions and 3 deletions.
  1. +8 −2 user/index.php
  2. +2 −1 user/lib.php
View
@@ -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,
"<B><A HREF=\"$CFG->wwwroot/user/view.php?id=$student->id&course=$course->id\">$student->firstname $student->lastname</A></B>",
"<FONT SIZE=1>$student->city, ".$COUNTRIES["$student->country"]."</FONT>",
"<FONT SIZE=1>$lastaccess</FONT>");
View
@@ -1,6 +1,7 @@
<?PHP // $Id$
-$USER_SMALL_CLASS = 30; // Affects listing display
+$USER_SMALL_CLASS = 20; // Below this is considered small
+$USER_LARGE_CLASS = 200; // Above this is considered large
/// FUNCTIONS ///////////////////////////////////////////////////////////

0 comments on commit c69ce08

Please sign in to comment.