diff --git a/footer.php b/footer.php index 98b4b98..3094155 100644 --- a/footer.php +++ b/footer.php @@ -105,7 +105,7 @@ function draw_navbuttons() { if ($mod->sectionnum > 0 && $sectionnum != $mod->sectionnum) { $thissection = $sections[$mod->sectionnum]; - if ($thissection->visible || !$COURSE->hiddensections || + if ($thissection->visible || (property_exists($COURSE, "hiddensections") && !$COURSE->hiddensections) || has_capability('moodle/course:viewhiddensections', $context) ) { $sectionnum = $mod->sectionnum;