From 398ed46942537d605922da294b2a8bde860338f1 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Luca=20B=C3=B6sch?= Date: Tue, 1 May 2018 21:43:11 +0200 Subject: [PATCH] MDL-61015 course: consistently display hidden sections This commit moves the availability info on top. --- 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 4d065217ce2..b12e4c6cbc1 100644 --- a/course/format/renderer.php +++ b/course/format/renderer.php @@ -448,7 +448,9 @@ abstract class format_section_renderer_base extends plugin_renderer_base { } $o .= $this->output->heading($title, 3, 'section-title'); + $o .= $this->section_availability($section); $o.= html_writer::start_tag('div', array('class' => 'summarytext')); + if ($section->uservisible || $section->visible) { // Show summary if section is available or has availability restriction information. // Do not show summary if section is hidden but we still display it because of course setting @@ -458,8 +460,6 @@ abstract class format_section_renderer_base extends plugin_renderer_base { $o.= html_writer::end_tag('div'); $o.= $this->section_activity_summary($section, $course, null); - $o .= $this->section_availability($section); - $o .= html_writer::end_tag('div'); $o .= html_writer::end_tag('li'); -- 2.11.4.GIT