Skip to content

Commit

Permalink
Slight rearrangement
Browse files Browse the repository at this point in the history
  • Loading branch information
martin committed Aug 1, 2002
1 parent 07e1f18 commit ae642af
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions user/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,20 +26,17 @@
}


$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);
}
}

Expand All @@ -48,7 +45,7 @@

/// FUNCTIONS //////////////////

function print_user($user, $course, $teacherlinks) {
function print_user($user, $course) {

global $USER, $COUNTRIES;

Expand All @@ -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>";
Expand Down

0 comments on commit ae642af

Please sign in to comment.