From 8a07a15029f644238aada009407ebc11680fb3d0 Mon Sep 17 00:00:00 2001 From: moodler Date: Sun, 21 Nov 2004 06:27:01 +0000 Subject: [PATCH] Excess sections that are not shown (because the course numsections are set to less) are now also not shown on the navmenu. --- lib/weblib.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/weblib.php b/lib/weblib.php index 02db702f0e6..6762790e308 100644 --- a/lib/weblib.php +++ b/lib/weblib.php @@ -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];