From: martin Date: Thu, 1 Aug 2002 06:15:43 +0000 (+0000) Subject: Slight rearrangement X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=ae642af6c50d4c6bf963a1cac36d05bfaae45788;p=moodle.git Slight rearrangement --- diff --git a/user/index.php b/user/index.php index d8e6535ebd..eabeed9d13 100644 --- a/user/index.php +++ b/user/index.php @@ -26,20 +26,17 @@ } - $teacherlinks = isteacher($course->id); - - if ( $teachers = get_course_teachers($course->id)) { echo "

".$course->teacher."s

"; foreach ($teachers as $teacher) { - print_user($teacher, $course, $teacherlinks); + print_user($teacher, $course); } } if ($students = get_course_students($course->id)) { echo "

".$course->student."s

"; 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 ""; echo ""; - if ($teacherlinks) { + if (isteacher($course->id)) { $timemidnight = usergetmidnight(time()); echo "id&user=$user->id\">".get_string("activity")."
"; echo "id&user=$user->id\">".get_string("unenrol")."
";