From faaa97b4156de0d3dbeabf6a6c7bb977a735172e Mon Sep 17 00:00:00 2001 From: Rajesh Taneja Date: Thu, 4 Oct 2012 17:25:45 +0800 Subject: [PATCH] MDL-32218 Blocks: allowblockstodock is also checked for region dock status --- lib/blocklib.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/blocklib.php b/lib/blocklib.php index 0dad6f632cd..ceb63afb515 100644 --- a/lib/blocklib.php +++ b/lib/blocklib.php @@ -451,7 +451,9 @@ class block_manager { * @return bool True if all of the blocks within that region are docked */ public function region_completely_docked($region, $output) { - if (!$this->page->theme->enable_dock) { + global $CFG; + // If theme doesn't allow docking or allowblockstodock is not set, then return. + if (!$this->page->theme->enable_dock || empty($CFG->allowblockstodock)) { return false; }