From bf5eebe8f856b2f5820992aff438e6ff338147c2 Mon Sep 17 00:00:00 2001 From: Skylar Kelty <S.Kelty@kent.ac.uk> Date: Wed, 15 Apr 2015 15:07:22 +0100 Subject: [PATCH] MDL-49878 block_settings: Only count visible children --- blocks/settings/renderer.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/blocks/settings/renderer.php b/blocks/settings/renderer.php index 5f370bb8b56..4de8b83f350 100644 --- a/blocks/settings/renderer.php +++ b/blocks/settings/renderer.php @@ -28,7 +28,9 @@ class block_settings_renderer extends plugin_renderer_base { $count = 0; foreach ($navigation->children as &$child) { $child->preceedwithhr = ($count!==0); - $count++; + if ($child->display) { + $count++; + } } $content = $this->navigation_node($navigation, array('class'=>'block_tree list')); if (isset($navigation->id) && !is_numeric($navigation->id) && !empty($content)) { @@ -116,4 +118,4 @@ class block_settings_renderer extends plugin_renderer_base { return $content; } -} \ No newline at end of file +}