]> git.mjollnir.org Git - moodle.git/commitdiff
Slight rearrangement
authormartin <martin>
Thu, 1 Aug 2002 06:15:43 +0000 (06:15 +0000)
committermartin <martin>
Thu, 1 Aug 2002 06:15:43 +0000 (06:15 +0000)
user/index.php

index d8e6535ebd5443e54ee15897bb85765a741646fa..eabeed9d13d3a051dd30d30ae2730a3da28c1dab 100644 (file)
     }
 
 
-    $teacherlinks = isteacher($course->id);
-
-
     if ( $teachers = get_course_teachers($course->id)) {
         echo "<H2 align=center>".$course->teacher."s</H2>";
         foreach ($teachers as $teacher) {
-            print_user($teacher, $course, $teacherlinks);
+            print_user($teacher, $course);
         }
     }
 
     if ($students = get_course_students($course->id)) {
         echo "<H2 align=center>".$course->student."s</H2>";
         foreach ($students as $student) {
-            print_user($student, $course, $teacherlinks);
+            print_user($student, $course);
         }
     } 
 
@@ -48,7 +45,7 @@
  
 /// FUNCTIONS //////////////////
 
-function print_user($user, $course, $teacherlinks) {
+function print_user($user, $course) {
 
     global $USER, $COUNTRIES;
     
@@ -73,7 +70,7 @@ function print_user($user, $course, $teacherlinks) {
     echo "</TD><TD VALIGN=bottom BGCOLOR=#FFFFFF NOWRAP>";
 
     echo "<FONT SIZE=1>";
-    if ($teacherlinks) {
+    if (isteacher($course->id)) {
         $timemidnight = usergetmidnight(time());
         echo "<A HREF=\"../course/user.php?id=$course->id&user=$user->id\">".get_string("activity")."</A><BR>";
         echo "<A HREF=\"../course/unenrol.php?id=$course->id&user=$user->id\">".get_string("unenrol")."</A><BR>";