mirror of
https://github.com/moodle/moodle.git
synced 2025-01-18 05:58:34 +01:00
MDL-46513 mod_chat: pass has_capability result to fullname function
This commit is contained in:
parent
dc71a8b50e
commit
88e16674b2
@ -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…
x
Reference in New Issue
Block a user