From f674ec86405a0ef8f5c4c59c3f686ee7062e6695 Mon Sep 17 00:00:00 2001 From: tjhunt Date: Tue, 14 Jul 2009 07:06:06 +0000 Subject: [PATCH] blocks: MDL-19010 show empty blocks if they have controls. --- blocks/moodleblock.class.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/blocks/moodleblock.class.php b/blocks/moodleblock.class.php index 8a4626f458..f6e03a3b7c 100644 --- a/blocks/moodleblock.class.php +++ b/blocks/moodleblock.class.php @@ -360,14 +360,14 @@ class block_base { $bc->footer = $this->content->footer; } - if ($this->is_empty() && !$bc->controls) { - return null; - } - if ($this->page->user_is_editing()) { $bc->controls = $this->get_edit_controls($output); } + if ($this->is_empty() && !$bc->controls) { + return null; + } + if (empty($CFG->allowuserblockhiding)) { $bc->collapsible = block_contents::NOT_HIDEABLE; } else if (get_user_preferences('block' . $bc->blockinstanceid . 'hidden', false)) { -- 2.39.5