From: moodler Date: Wed, 19 Nov 2003 16:15:56 +0000 (+0000) Subject: Use the new fullname function X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=5fde0ca615aa8619262551390c175540b8e04bdd;p=moodle.git Use the new fullname function --- diff --git a/admin/admin.php b/admin/admin.php index 53e8a1a38f..dd2855d9e7 100644 --- a/admin/admin.php +++ b/admin/admin.php @@ -97,7 +97,7 @@ foreach ($admins as $admin) { $adminarray[] = $admin->id; - echo "

$admin->firstname $admin->lastname, + echo "

".fullname($admin, true).", $admin->email    "; if ($primaryadmin->id == $admin->id){ print_spacer(10, 9, false); @@ -138,7 +138,7 @@ foreach ($users as $user) { echo "

id\"". "title=\"$straddadmin\">  $user->firstname $user->lastname, $user->email"; + "border=0>  ".fullname($user).", $user->email"; } } diff --git a/admin/creators.php b/admin/creators.php index e288f20906..f7f93dc4ef 100755 --- a/admin/creators.php +++ b/admin/creators.php @@ -94,8 +94,7 @@ $creatorarray = array(); foreach ($creators as $creator) { $creatorarray[] = $creator->id; - echo "

$creator->firstname $creator->lastname, - $creator->email    "; + echo "

".fullname($creator, true).", $creator->email    "; echo "id\" title=\"$strremovecreator\">"; diff --git a/admin/cron.php b/admin/cron.php index 9e41abc860..cad92b3bbc 100644 --- a/admin/cron.php +++ b/admin/cron.php @@ -70,7 +70,7 @@ if ($users = get_users_unconfirmed($oneweek)) { foreach ($users as $user) { if (delete_records("user", "id", $user->id)) { - echo "Deleted unconfirmed user for $user->firstname $user->lastname ($user->id)\n"; + echo "Deleted unconfirmed user for ".fullname($user, true)." ($user->id)\n"; } } } diff --git a/admin/user.php b/admin/user.php index 1bd7f0c5c8..b176fb42f7 100644 --- a/admin/user.php +++ b/admin/user.php @@ -119,7 +119,8 @@ } if ($confirm != md5($delete)) { - notice_yesno(get_string("deletecheckfull", "", "'$user->firstname $user->lastname'"), + $fullname = fullname($user, true); + notice_yesno(get_string("deletecheckfull", "", "'$fullname'"), "user.php?delete=$delete&confirm=".md5($delete), "user.php"); exit; diff --git a/course/format/social.php b/course/format/social.php index 5aac35aeef..469a68e20f 100644 --- a/course/format/social.php +++ b/course/format/social.php @@ -14,7 +14,8 @@ id\">".get_string("participants").""; $modicon[]="pixpath/i/users.gif\" height=16 width=16 alt=\"\">"; - $editmyprofile = "firstname $USER->lastname\" href=\"../user/edit.php?id=$USER->id&course=$course->id\">". + $fullname = fullname($USER, true); + $editmyprofile = "id&course=$course->id\">". get_string("editmyprofile").""; if ($USER->description) { $moddata[]= $editmyprofile; diff --git a/course/format/topics.php b/course/format/topics.php index cd5ea8e27d..7b56ccb661 100644 --- a/course/format/topics.php +++ b/course/format/topics.php @@ -55,7 +55,8 @@ /// Links to people $moddata[]="id\">".get_string("participants").""; $modicon[]="pixpath/i/users.gif\" height=16 width=16 alt=\"\">"; - $editmyprofile = "firstname $USER->lastname\" href=\"../user/edit.php?id=$USER->id&course=$course->id\">".get_string("editmyprofile").""; + $fullname = fullname($USER, true); + $editmyprofile = "id&course=$course->id\">".get_string("editmyprofile").""; if ($USER->description) { $moddata[]= $editmyprofile; } else { diff --git a/course/format/weeks.php b/course/format/weeks.php index 2932a6318e..b6cd11a91f 100644 --- a/course/format/weeks.php +++ b/course/format/weeks.php @@ -43,7 +43,8 @@ /// Links to people $moddata[]="id\">".get_string("participants").""; $modicon[]="pixpath/i/users.gif\" height=16 width=16 alt=\"\">"; - $editmyprofile = "firstname $USER->lastname\" href=\"../user/edit.php?id=$USER->id&course=$course->id\">".get_string("editmyprofile").""; + $fullname = fullname($USER, true); + $editmyprofile = "id&course=$course->id\">".get_string("editmyprofile").""; if ($USER->description) { $moddata[]= $editmyprofile; } else { diff --git a/user/edit.php b/user/edit.php index b9c7fbc263..7cc890674e 100644 --- a/user/edit.php +++ b/user/edit.php @@ -116,7 +116,7 @@ if ($newaccount) { $userfullname = $strnewuser; } else { - $userfullname = "$user->firstname $user->lastname"; + $userfullname = fullname($user, isteacher($course->id)); } if ($course->category) { print_header("$course->shortname: $streditmyprofile", "$course->fullname: $streditmyprofile", diff --git a/user/lib.php b/user/lib.php index 2c376be0e6..9710e5a1f4 100644 --- a/user/lib.php +++ b/user/lib.php @@ -180,7 +180,7 @@ function print_user($user, $course, $string, $countries) { echo ""; echo ""; echo ""; - echo "$user->firstname $user->lastname"; + echo "".fullname($user, isteacher($course->id)).""; echo "

"; if (!empty($user->role) and ($user->role <> $course->teacher)) { echo "$string->role: $user->role
"; diff --git a/user/view.php b/user/view.php index dfb99f369a..f9e5b35228 100644 --- a/user/view.php +++ b/user/view.php @@ -30,7 +30,7 @@ $user->lastaccess = $teacher->timeaccess; } - $fullname = "$user->firstname $user->lastname"; + $fullname = fullname($user, isteacher($course->id)); $personalprofile = get_string("personalprofile"); $participants = get_string("participants");