Permalink
Browse files

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.
  • Loading branch information...
danpoltawski committed Aug 22, 2012
1 parent 29beeef commit ccce6a7e3343f999b89a86a5c83d97866c4e973d
Showing with 5 additions and 3 deletions.
  1. +5 −3 course/format/renderer.php
@@ -291,9 +291,11 @@ protected function section_summary($section, $course, $mods) {
$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);

0 comments on commit ccce6a7

Please sign in to comment.