From 533b7ea6d9dfcaf351758932f6fac6abf5cb4353 Mon Sep 17 00:00:00 2001 From: moodler Date: Fri, 28 Nov 2003 10:40:04 +0000 Subject: [PATCH] Use fullname function. Sorting is still wrong though and the selection mechanism sucks. --- course/student.php | 6 ++++-- course/teacher.php | 4 ++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/course/student.php b/course/student.php index bdb9812e07..1fa5d28c08 100644 --- a/course/student.php +++ b/course/student.php @@ -98,7 +98,8 @@ $studentarray = array(); foreach ($students as $student) { $studentarray[] = $student->id; - echo "

$student->firstname $student->lastname, $student->email    id&remove=$student->id\" title=\"$strremovestudent\">

"; + $fullname = fullname($student, true); + echo "

$fullname, $student->email    id&remove=$student->id\" title=\"$strremovestudent\">

"; } $studentlist = implode(",",$studentarray); unset($studentarray); @@ -128,9 +129,10 @@ } foreach ($users as $user) { + $fullname = fullname($user, true); echo "

id&add=$user->id\"". "title=\"$straddstudent\">  $user->firstname $user->lastname, $user->email"; + "border=0>  $fullname, $user->email"; } } diff --git a/course/teacher.php b/course/teacher.php index 5011035d64..1c617496b1 100644 --- a/course/teacher.php +++ b/course/teacher.php @@ -156,7 +156,7 @@ $teacher->role = $course->teacher; } - $table->data[] = array ($picture, "$teacher->firstname $teacher->lastname", $authority, + $table->data[] = array ($picture, fullname($teacher, true), $authority, "id\" value=\"$teacher->role\" size=30>", $editall, $removelink); } @@ -203,7 +203,7 @@ foreach ($users as $user) { $addlink = "id&add=$user->id\">$straddteacher"; $picture = print_user_picture($user->id, $course->id, $user->picture, false, true); - $table->data[] = array ($picture, "$user->firstname $user->lastname", $user->email, $addlink); + $table->data[] = array ($picture, fullname($user, true), $user->email, $addlink); } print_table($table); } -- 2.39.5