Permalink
Browse files

MDL-34444 course: Dont display links to hidden sections

This is what happens when you dont use the navigation api
  • Loading branch information...
1 parent 87a31bb commit 4486aa99be864407bf75a0ceac87ebb36fc07638 @danpoltawski danpoltawski committed Aug 1, 2012
Showing with 2 additions and 2 deletions.
  1. +2 −2 course/format/renderer.php
@@ -448,7 +448,7 @@ protected function get_nav_links($course, $sections, $sectionno) {
$links = array('previous' => '', 'next' => '');
$back = $sectionno - 1;
while ($back > 0 and empty($links['previous'])) {
- if ($canviewhidden || $sections[$back]->visible) {
+ if ($canviewhidden || $sections[$back]->uservisible) {
$params = array();
if (!$sections[$back]->visible) {
$params = array('class' => 'dimmed_text');
@@ -462,7 +462,7 @@ protected function get_nav_links($course, $sections, $sectionno) {
$forward = $sectionno + 1;
while ($forward <= $course->numsections and empty($links['next'])) {
- if ($canviewhidden || $sections[$forward]->visible) {
+ if ($canviewhidden || $sections[$forward]->uservisible) {
$params = array();
if (!$sections[$forward]->visible) {
$params = array('class' => 'dimmed_text');

0 comments on commit 4486aa9

Please sign in to comment.