mirror of
https://github.com/moodle/moodle.git
synced 2025-08-07 18:06:51 +02:00
MDL-46513 mod_chat: pass has_capability result to fullname function
This commit is contained in:
parent
9c607c0b8c
commit
8bc2ee1a4a
1 changed files with 2 additions and 1 deletions
|
@ -82,6 +82,7 @@ $strdeletesession = get_string('deletesession', 'chat');
|
|||
$navlinks = array();
|
||||
|
||||
$canexportsess = has_capability('mod/chat:exportsession', $context);
|
||||
$canviewfullnames = has_capability('moodle/site:viewfullnames', $context);
|
||||
|
||||
// Print a session if one has been specified.
|
||||
|
||||
|
@ -213,7 +214,7 @@ foreach ($sessions as $session) {
|
|||
foreach ($session->sessionusers as $sessionuser => $usermessagecount) {
|
||||
if ($user = $DB->get_record('user', array('id' => $sessionuser))) {
|
||||
$OUTPUT->user_picture($user, array('courseid' => $course->id));
|
||||
echo ' '.fullname($user, true); // XXX TODO use capability instead of true.
|
||||
echo ' ' . fullname($user, $canviewfullnames);
|
||||
echo " ($usermessagecount)<br />";
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue