From 279e2669eb9b5ae252eef5ba9221effedba5a862 Mon Sep 17 00:00:00 2001 From: Sam Hemelryk Date: Wed, 10 Feb 2010 01:28:17 +0000 Subject: [PATCH] navigation MDL-21564 Fixed regression whereby the last course section was not being shown on the navigation --- lib/navigationlib.php | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/lib/navigationlib.php b/lib/navigationlib.php index 3313f6fb7ce..5c97dc6a2c3 100644 --- a/lib/navigationlib.php +++ b/lib/navigationlib.php @@ -1754,11 +1754,8 @@ class global_navigation extends navigation_node { $selectedstructure = optional_param($activeparam,false,PARAM_INT); - // This is required to make sure that if people have reduced the number - // of sections after adding activities to sections that no longer exist - // we dont show them - // MDL-20242 - $sections = array_slice($sections, 0, $course->numsections, true); + // MDL-20242 + MDL-21564 + $sections = array_slice($sections, 0, $course->numsections+1, true); foreach ($sections as $section) { if ((!$viewhiddensections && !$section->visible) || (!$this->showemptybranches && !array_key_exists($section->section, $modinfo->sections))) {