Skip to content

Commit

Permalink
MDL-61015 course: consistently display hidden sections
Browse files Browse the repository at this point in the history
This commit moves the availability info on top.
  • Loading branch information
lucaboesch committed May 21, 2018
1 parent c8663da commit 2d69b0f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions course/format/renderer.php
Expand Up @@ -448,7 +448,9 @@ protected function section_summary($section, $course, $mods) {
}
$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
Expand All @@ -458,8 +460,6 @@ protected function section_summary($section, $course, $mods) {
$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');

Expand Down

0 comments on commit 2d69b0f

Please sign in to comment.