diff --git a/lib/blocklib.php b/lib/blocklib.php index 66773d221a8..9b8d6790536 100644 --- a/lib/blocklib.php +++ b/lib/blocklib.php @@ -454,7 +454,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; }