From 569747faec9bdfe66764c8ec7f6a622c9d72bf9f Mon Sep 17 00:00:00 2001 From: Dan Poltawski Date: Wed, 1 Aug 2012 10:29:44 +0800 Subject: [PATCH] MDL-34444 course: Dont display links to hidden sections This is what happens when you dont use the navigation api --- course/format/renderer.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/course/format/renderer.php b/course/format/renderer.php index fccf73dd7d7..01f19a9ccfb 100644 --- a/course/format/renderer.php +++ b/course/format/renderer.php @@ -448,7 +448,7 @@ abstract class format_section_renderer_base extends plugin_renderer_base { $links = array('previous' => '', 'next' => ''); $back = $sectionno - 1; while ($back > 0 and empty($links['previous'])) { - if ($canviewhidden || $sections[$back]->visible) { + if ($canviewhidden || $sections[$back]->uservisible) { $params = array(); if (!$sections[$back]->visible) { $params = array('class' => 'dimmed_text'); @@ -462,7 +462,7 @@ abstract class format_section_renderer_base extends plugin_renderer_base { $forward = $sectionno + 1; while ($forward <= $course->numsections and empty($links['next'])) { - if ($canviewhidden || $sections[$forward]->visible) { + if ($canviewhidden || $sections[$forward]->uservisible) { $params = array(); if (!$sections[$forward]->visible) { $params = array('class' => 'dimmed_text');