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:
@@ -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)) {
|
||||
|
||||
Reference in New Issue
Block a user