From bd43383d7e517bce1260e578423780e0903f6062 Mon Sep 17 00:00:00 2001 From: Dan Poltawski Date: Wed, 22 Aug 2012 16:38:15 +0800 Subject: [PATCH] MDL-34444 course - don't show to 'unavaibile' sections title Instead we just show the availability info in the index page, this makes the navigation etc much simpler. --- course/format/renderer.php | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/course/format/renderer.php b/course/format/renderer.php index 01f19a9ccfb..ed2db02eab2 100644 --- a/course/format/renderer.php +++ b/course/format/renderer.php @@ -291,9 +291,11 @@ abstract class format_section_renderer_base extends plugin_renderer_base { $o .= html_writer::tag('div', '', array('class' => 'right side')); $o .= html_writer::start_tag('div', array('class' => 'content')); - $title = html_writer::tag('a', get_section_name($course, $section), - array('href' => course_get_url($course, $section->section), 'class' => $linkclasses)); - $o .= $this->output->heading($title, 3, 'section-title'); + if ($section->uservisible) { + $title = html_writer::tag('a', get_section_name($course, $section), + array('href' => course_get_url($course, $section->section), 'class' => $linkclasses)); + $o .= $this->output->heading($title, 3, 'section-title'); + } $o.= html_writer::start_tag('div', array('class' => 'summarytext')); $o.= $this->format_summary_text($section); -- 2.43.0