Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Merge branch 'MDL-34444' of git://github.com/danpoltawski/moodle into…

… MOODLE_23_STABLE
  • Loading branch information...
commit a701525345e8273a3b6d65ca962254ed3b6effaf 2 parents 6c47584 + ccce6a7
@stronk7 stronk7 authored
Showing with 6 additions and 4 deletions.
  1. +5 −3 course/format/renderer.php
  2. +1 −1  course/view.php
View
8 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);
View
2  course/view.php
@@ -105,7 +105,7 @@
$coursesections = $modinfo->get_section_info($section, MUST_EXIST);
// Check user is allowed to see it.
- if (!$coursesections->uservisible && !empty($section->availableinfo)) {
+ if (!$coursesections->uservisible) {
// Note: We actually already know they don't have this capability
// or uservisible would have been true; this is just to get the
// correct error message shown.
Please sign in to comment.
Something went wrong with that request. Please try again.