mirror of
https://github.com/moodle/moodle.git
synced 2025-01-19 14:27:22 +01:00
MDL-46619 Forum: link to the discussion only if users cannot see posts.
This commit is contained in:
parent
b53b69c134
commit
8f2e80600b
@ -3703,14 +3703,18 @@ 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)) ? '' : '&parent='.$post->lastpostid;
|
||||
$parenturl = '';
|
||||
$usermodified = new stdClass();
|
||||
$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) {
|
||||
echo '<a href="'.$CFG->wwwroot.'/user/view.php?id='.$post->usermodified.'&course='.$forum->course.'">'.
|
||||
fullname($usermodified).'</a><br />';
|
||||
$parenturl = (empty($post->lastpostid)) ? '' : '&parent='.$post->lastpostid;
|
||||
}
|
||||
|
||||
echo '<a href="'.$CFG->wwwroot.'/mod/forum/discuss.php?d='.$post->discussion.$parenturl.'">'.
|
||||
userdate($usedate, $datestring).'</a>';
|
||||
echo "</td>\n";
|
||||
|
Loading…
x
Reference in New Issue
Block a user