Skip to content

Commit

Permalink
Forum - Mark post read displays an error popup on shared forum #173587
Browse files Browse the repository at this point in the history
  • Loading branch information
jason-platts authored and sammarshallou committed Nov 18, 2016
1 parent a295acb commit 07b1898
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion renderer.php
Original file line number Diff line number Diff line change
Expand Up @@ -1497,8 +1497,12 @@ public function render_post($post, $html, $options) {
// Mark post read.
if ($CFG->forumng_trackreadposts && !isguestuser() && $post->is_unread()
&& !mod_forumng::mark_read_automatically()) {
$params = array('p' => $post->get_id());
if ($post->get_forum()->is_shared()) {
$params['clone'] = $post->get_forum()->get_course_module_id();
}
$commandsarray['forumng-markread'] = html_writer::link(
new moodle_url('/mod/forumng/markread.php', array('p' => $post->get_id())),
new moodle_url('/mod/forumng/markread.php', $params),
get_string('markpostread', 'forumng'));
}

Expand Down

0 comments on commit 07b1898

Please sign in to comment.