Permalink
Browse files

Excess sections that are not shown (because the course numsections

are set to less) are now also not shown on the navmenu.
  • Loading branch information...
1 parent d32ae93 commit 8a07a15029f644238aada009407ebc11680fb3d0 moodler committed Nov 21, 2004
Showing with 4 additions and 0 deletions.
  1. +4 −0 lib/weblib.php
View
@@ -2028,6 +2028,10 @@ function navmenu($course, $cm=NULL, $targetwindow="self") {
continue;
}
+ if ($mod->section > $course->numsections) { /// Don't show excess hidden sections
+ break;
+ }
+
if ($mod->section > 0 and $section <> $mod->section) {
$thissection = $sections[$mod->section];

0 comments on commit 8a07a15

Please sign in to comment.