mirror of
https://github.com/moodle/moodle.git
synced 2025-01-19 06:18:28 +01:00
DIsplay names using the fullname function
This commit is contained in:
parent
25d95b9763
commit
8f6ca087e9
@ -130,7 +130,8 @@ function chat_print_recent_activity($course, $isteacher, $timestart) {
|
||||
}
|
||||
$current = $chatuser->chatid;
|
||||
}
|
||||
echo " <font size=1>- $chatuser->firstname $chatuser->lastname</font><br />";
|
||||
$fullname = fullname($chatuser);
|
||||
echo " <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;
|
||||
|
||||
|
@ -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 " $user->firstname $user->lastname";
|
||||
echo " ".fullname($user);
|
||||
echo " ($usermessagecount)<br />";
|
||||
}
|
||||
}
|
||||
|
@ -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>";
|
||||
|
Loading…
x
Reference in New Issue
Block a user