DIsplay names using the fullname function

This commit is contained in:
moodler 2003-11-28 15:35:41 +00:00
parent 25d95b9763
commit 8f6ca087e9
3 changed files with 7 additions and 9 deletions

View File

@ -130,7 +130,8 @@ function chat_print_recent_activity($course, $isteacher, $timestart) {
}
$current = $chatuser->chatid;
}
echo "&nbsp;&nbsp;&nbsp;<font size=1>- $chatuser->firstname $chatuser->lastname</font><br />";
$fullname = fullname($chatuser);
echo "&nbsp;&nbsp;&nbsp;<font size=1>- $fullname</font><br />";
}
echo "<br />";
@ -494,8 +495,7 @@ function chat_format_message($message, $courseid=0) {
$text = $message->message;
if (!empty($message->system)) { /// It's a system message
$output->text = get_string("message$text", "chat",
"$user->firstname $user->lastname");
$output->text = get_string("message$text", "chat", fullname($user));
$output->text = "$strtime: $output->text";
$output->html = "<table><tr><td valign=top>$picture</td><td>";
$output->html .= "<font size=2 color=\"#CCAAAA\">$output->text</font>";
@ -510,15 +510,13 @@ function chat_format_message($message, $courseid=0) {
$beepwho = trim(substr($text, 5));
if ($beepwho == "all") { // everyone
$outinfo = "$strtime: ". get_string("messagebeepseveryone", "chat",
"$user->firstname $user->lastname");
$outinfo = "$strtime: ". get_string("messagebeepseveryone", "chat", fullname($user));
$outmain = "";
$output->beep = true; // (eventually this should be set to
// to a filename uploaded by the user)
} else if ($beepwho == $USER->id) { // current user
$outinfo = "$strtime: ". get_string("messagebeepsyou", "chat",
"$user->firstname $user->lastname");
$outinfo = "$strtime: ". get_string("messagebeepsyou", "chat", fullname($user));
$outmain = "";
$output->beep = true;

View File

@ -122,7 +122,7 @@
foreach ($sessionusers as $sessionuser => $usermessagecount) {
if ($user = get_record("user", "id", $sessionuser)) {
print_user_picture($user->id, $course->id, $user->picture);
echo "&nbsp;$user->firstname $user->lastname";
echo "&nbsp;".fullname($user);
echo "&nbsp;($usermessagecount)<br />";
}
}

View File

@ -94,7 +94,7 @@ foreach ($chatusers as $chatuser) {
print_user_picture($chatuser->id, 0, $chatuser->picture, false, false, false);
echo "</a></td><td valign=center>";
echo "<p><font size=1>";
echo "$chatuser->firstname $chatuser->lastname<br />";
echo fullname($chatuser)."<br />";
echo "<font color=\"#888888\">$stridle: ".format_time($lastping, $str)."</font>";
echo " <a href=\"users.php?chat_sid=$chat_sid&beep=$chatuser->id\">$strbeep</a>";
echo "</font></p>";