From e44497f329bb7e50bcba7e3fae79d2f33f99b0d4 Mon Sep 17 00:00:00 2001 From: gustav_delius Date: Sat, 5 Jun 2004 12:04:02 +0000 Subject: [PATCH] Fixed bug 1531, section links to invisible sections now greyed out or hidden --- blocks/section_links/block_section_links.php | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/blocks/section_links/block_section_links.php b/blocks/section_links/block_section_links.php index 10abef16de..7a2fd4f68f 100644 --- a/blocks/section_links/block_section_links.php +++ b/blocks/section_links/block_section_links.php @@ -57,9 +57,6 @@ class CourseBlock_section_links extends MoodleBlock { for ($i = $inc; $i <= $this->course->numsections; $i += $inc) { $isvisible = get_field('course_sections', 'visible', 'course', $this->course->id, 'section', $i); if (!$isvisible and !isteacher($this->course->id)) { - if ($i == $highlight) { - $highlight = 0; - } continue; } $style = ($isvisible) ? '' : ' class="dimmed"'; @@ -71,8 +68,10 @@ class CourseBlock_section_links extends MoodleBlock { } if ($highlight) { $isvisible = get_field('course_sections', 'visible', 'course', $this->course->id, 'section', $highlight); - $style = ($isvisible) ? '' : ' class="dimmed"'; - $text .= "
$linktext"; + if ($isvisible or isteacher($this->course->id)) { + $style = ($isvisible) ? '' : ' class="dimmed"'; + $text .= "
$linktext"; + } } $this->content = New stdClass; -- 2.39.5