]> git.mjollnir.org Git - moodle.git/commitdiff
Better looking code
authormoodler <moodler>
Mon, 14 Apr 2003 05:44:47 +0000 (05:44 +0000)
committermoodler <moodler>
Mon, 14 Apr 2003 05:44:47 +0000 (05:44 +0000)
user/index.php

index 34975d5a5697ad7d7be56be95713027cb524fecd..eda612a762c4ee9ab26cd8714d2176572ae8be3f 100644 (file)
@@ -9,7 +9,7 @@
     require_variable($id);   //course
     optional_variable($sort, "lastaccess");  //how to sort students
     optional_variable($dir,"DESC");          //how to sort students
-    optional_variable($showall,"0");         //show all of the students?
+    optional_variable($showall,"");         //show all of the students?
 
     if (! $course = get_record("course", "id", $id)) {
         error("Course ID is incorrect");
             $count = 0;
             foreach ($students as $student) {
                 $count++;
-                if ($showall == "0" and $count > $USER_LARGE_CLASS) {
+                if (!$showall and $count > $USER_LARGE_CLASS) {
                     break;
                 }
                 if ($student->lastaccess) {
                     $lastaccess = $string->never;
                 }
 
-                if ($numstudents > $USER_LARGE_CLASS and $showall == "1") {  // Don't show pictures
+                if ($showall and $numstudents > $USER_LARGE_CLASS) {  // Don't show pictures
                     $picture = "";
                 } else {
                     $picture = print_user_picture($student->id, $course->id, $student->picture, false, true);
             }
             print_table($table);
 
-            if ($numstudents > $USER_LARGE_CLASS and $showall == "0") {
+            if ($numstudents > $USER_LARGE_CLASS and !$showall) {
                 $moreinfo->count  = $USER_LARGE_CLASS;
                 $moreinfo->things = strtolower($course->students);
                 echo "<center><p>".get_string("displayingfirst", "", $moreinfo);