diff --git a/mod/forum/index.php b/mod/forum/index.php index 45fe3560b9c..26503994452 100644 --- a/mod/forum/index.php +++ b/mod/forum/index.php @@ -179,7 +179,10 @@ } if ($usetracking) { - if (($forum->trackingtype == FORUM_TRACKING_ON) || !isset($untracked[$forum->id])) { + if ($forum->trackingtype == FORUM_TRACKING_OFF) { + $unreadlink = '-'; + $trackedlink = '-'; + } else if (($forum->trackingtype == FORUM_TRACKING_ON) || !isset($untracked[$forum->id])) { $groupid = ($groupmode==SEPARATEGROUPS && !has_capability('moodle/site:accessallgroups', $context)) ? $currentgroup : false; $unread = forum_tp_count_forum_unread_posts($USER->id, $forum->id, $groupid); if ($unread > 0) { @@ -337,7 +340,11 @@ } if ($usetracking) { - if (($forum->trackingtype == FORUM_TRACKING_ON) || + if ($forum->trackingtype == FORUM_TRACKING_OFF) { + $unreadlink = '-'; + $trackedlink = '-'; + + } else if (($forum->trackingtype == FORUM_TRACKING_ON) || !isset($untracked[$forum->id])) { $groupid = ($groupmode==SEPARATEGROUPS && !has_capability('moodle/site:accessallgroups', $context)) @@ -353,6 +360,8 @@ if ($forum->trackingtype == FORUM_TRACKING_OPTIONAL) { $trackedlink = ''.$stryes.''; + } else { + $trackedlink = $stryes; } } else { $unreadlink = '-';