Skip to content

Commit

Permalink
MDL-57412 navigationlib: Respect linkcoursesections again
Browse files Browse the repository at this point in the history
  • Loading branch information
xow committed Aug 21, 2017
1 parent 27466d7 commit 1832b68
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
3 changes: 3 additions & 0 deletions course/format/topics/lib.php
Expand Up @@ -121,6 +121,9 @@ public function get_view_url($section, $options = array()) {
if ($sectionno != 0 && $usercoursedisplay == COURSE_DISPLAY_MULTIPAGE) {
$url->param('section', $sectionno);
} else {
if (empty($CFG->linkcoursesections) && !empty($options['navigation'])) {
return null;
}
$url->set_anchor('section-'.$sectionno);
}
}
Expand Down
3 changes: 3 additions & 0 deletions course/format/weeks/lib.php
Expand Up @@ -124,6 +124,9 @@ public function get_view_url($section, $options = array()) {
if ($sectionno != 0 && $usercoursedisplay == COURSE_DISPLAY_MULTIPAGE) {
$url->param('section', $sectionno);
} else {
if (empty($CFG->linkcoursesections) && !empty($options['navigation'])) {
return null;
}
$url->set_anchor('section-'.$sectionno);
}
}
Expand Down

0 comments on commit 1832b68

Please sign in to comment.