From cbebd40dfba711f473761aa187dc6bca749741de Mon Sep 17 00:00:00 2001 From: David Monllao Date: Fri, 5 Dec 2014 11:35:28 +0800 Subject: [PATCH] MDL-47246 mod_forum: Limit last post restriction to Q and A --- mod/forum/lib.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mod/forum/lib.php b/mod/forum/lib.php index e81994a5556..bef85967a28 100644 --- a/mod/forum/lib.php +++ b/mod/forum/lib.php @@ -3770,8 +3770,8 @@ function forum_print_discussion_header(&$post, $forum, $group=-1, $datestring="" $usermodified->id = $post->usermodified; $usermodified = username_load_fields_from_object($usermodified, $post, 'um'); - // Show link to last poster and their post if user can see them. - if ($canviewparticipants) { + // In QA forums we check that the user can view participants. + if ($forum->type !== 'qanda' || $canviewparticipants) { echo ''. fullname($usermodified).'
'; $parenturl = (empty($post->lastpostid)) ? '' : '&parent='.$post->lastpostid;