MDL-54729 mod_forum: Deep link highlighting works in IE.
This commit is contained in:
committed by
Dan Poltawski
parent
df4af29945
commit
09fec72819
+8
-1
@@ -3078,6 +3078,9 @@ function forum_print_post($post, $discussion, $forum, &$cm, $course, $ownpost=fa
|
||||
|
||||
// String cache
|
||||
static $str;
|
||||
// As we should only have one element with the id of unread we keep track of whether this post is the first
|
||||
// unread post.
|
||||
static $firstunread = true;
|
||||
|
||||
$modcontext = context_module::instance($cm->id);
|
||||
|
||||
@@ -3293,7 +3296,11 @@ function forum_print_post($post, $discussion, $forum, &$cm, $course, $ownpost=fa
|
||||
$forumpostclass = ' read';
|
||||
} else {
|
||||
$forumpostclass = ' unread';
|
||||
$output .= html_writer::tag('a', '', array('name'=>'unread'));
|
||||
// If this is the first unread post then give it an anchor and id of unread.
|
||||
if ($firstunread) {
|
||||
$output .= html_writer::tag('a', '', array('id' => 'unread'));
|
||||
$firstunread = false;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
// ignore trackign status if not tracked or tracked param missing
|
||||
|
||||
Reference in New Issue
Block a user