Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion footer.php
Original file line number Diff line number Diff line change
Expand Up @@ -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) ||

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm... I'll have to look at this in more detail, but I'd be wanting to use isset(), not property_exists (possibly also wanting to use empty(), but would have to figure out the logic of the line of code first anyway).

has_capability('moodle/course:viewhiddensections', $context)
) {
$sectionnum = $mod->sectionnum;
Expand Down