Skip to content
Permalink
Browse files

MDL-46619 Forum: link to the discussion only if users cannot see posts.

Conflicts:
	mod/forum/lib.php
  • Loading branch information...
Michael de Raadt Damyon Wiese
Michael de Raadt authored and Damyon Wiese committed Sep 2, 2014
1 parent b2b8d93 commit a80ed84ed37d24e564b0bb7b8d51c4206b1fcd54
Showing with 5 additions and 1 deletion.
  1. +5 −1 mod/forum/lib.php
@@ -3792,15 +3792,19 @@ function forum_print_discussion_header(&$post, $forum, $group=-1, $datestring=""
echo '<td class="lastpost">';
$usedate = (empty($post->timemodified)) ? $post->modified : $post->timemodified; // Just in case
$parenturl = (empty($post->lastpostid)) ? '' : '&amp;parent='.$post->lastpostid;
$parenturl = '';
$usermodified = new stdClass();
$usermodified->id = $post->usermodified;
$usermodified->firstname = $post->umfirstname;
$usermodified->lastname = $post->umlastname;
// Show link to last poster and their post if user can see them.
if ($canviewparticipants) {
echo '<a href="'.$CFG->wwwroot.'/user/view.php?id='.$post->usermodified.'&amp;course='.$forum->course.'">'.
fullname($usermodified).'</a><br />';
$parenturl = (empty($post->lastpostid)) ? '' : '&amp;parent='.$post->lastpostid;
}
echo '<a href="'.$CFG->wwwroot.'/mod/forum/discuss.php?d='.$post->discussion.$parenturl.'">'.
userdate($usedate, $datestring).'</a>';
echo "</td>\n";

0 comments on commit a80ed84

Please sign in to comment.
You can’t perform that action at this time.