MDL-61015 course: consistently display hidden sections
authorLuca Bösch <luca.boesch@bfh.ch>
Tue, 1 May 2018 19:43:11 +0000 (21:43 +0200)
committerLuca Bösch <luca.boesch@bfh.ch>
Mon, 21 May 2018 09:33:35 +0000 (11:33 +0200)
This commit moves the availability info on top.

course/format/renderer.php

index 4d06521..b12e4c6 100644 (file)
@@ -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');