MDL-48865 core_block: Show regions with only hidden blocks when editing

Before this patch if all the blocks in a block region are set to hidden the region will be docked even when editing is enabled.
This meant that as a user I would need to add a new block to the page and move it to that region via the configuration
menu before I could manipulate the hidden blocks again.
This commit is contained in:
Neill Magill
2015-02-03 16:14:42 +08:00
committed by John Okely
parent 4d70a24d32
commit a2b22dd5df
2 changed files with 54 additions and 0 deletions
+5
View File
@@ -517,6 +517,11 @@ class block_manager {
return false;
}
// Block regions should not be docked during editing when all the blocks are hidden.
if ($this->page->user_is_editing() && $this->page->user_can_edit_blocks()) {
return false;
}
$this->check_is_loaded();
$this->ensure_content_created($region, $output);
if (!$this->region_has_content($region, $output)) {