mirror of
https://github.com/moodle/moodle.git
synced 2025-01-19 14:27:22 +01:00
MDL-62618 forum: Made full names displayed consistent
This commit is contained in:
parent
f61ee4e857
commit
26cee43786
@ -3819,6 +3819,7 @@ function forum_print_discussion_header(&$post, $forum, $group = -1, $datestring
|
||||
|
||||
$post->subject = format_string($post->subject,true);
|
||||
|
||||
$canviewfullnames = has_capability('moodle/site:viewfullnames', $modcontext);
|
||||
$timeddiscussion = !empty($CFG->forum_enabletimedposts) && ($post->timestart || $post->timeend);
|
||||
$timedoutsidewindow = '';
|
||||
if ($timeddiscussion && ($post->timestart > time() || ($post->timeend != 0 && $post->timeend < time()))) {
|
||||
@ -3856,7 +3857,7 @@ function forum_print_discussion_header(&$post, $forum, $group = -1, $datestring
|
||||
echo '</span>';
|
||||
// User name
|
||||
echo '<div class="media-body">';
|
||||
$fullname = fullname($postuser, has_capability('moodle/site:viewfullnames', $modcontext));
|
||||
$fullname = fullname($postuser, $canviewfullnames);
|
||||
echo '<a href="'.$CFG->wwwroot.'/user/view.php?id='.$post->userid.'&course='.$forum->course.'">'.$fullname.'</a>';
|
||||
echo '</div>';
|
||||
echo '</div>';
|
||||
@ -3924,7 +3925,7 @@ function forum_print_discussion_header(&$post, $forum, $group = -1, $datestring
|
||||
// In QA forums we check that the user can view participants.
|
||||
if ($forum->type !== 'qanda' || $canviewparticipants) {
|
||||
echo '<a href="'.$CFG->wwwroot.'/user/view.php?id='.$post->usermodified.'&course='.$forum->course.'">'.
|
||||
fullname($usermodified).'</a><br />';
|
||||
fullname($usermodified, $canviewfullnames).'</a><br />';
|
||||
$parenturl = (empty($post->lastpostid)) ? '' : '&parent='.$post->lastpostid;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user