diff --git a/blocks/moodleblock.class.php b/blocks/moodleblock.class.php index 10e14633ab5..201435443f2 100644 --- a/blocks/moodleblock.class.php +++ b/blocks/moodleblock.class.php @@ -725,11 +725,26 @@ class block_base { throw new coding_exception('config_print() can no longer be used. Blocks should use a settings.php file.'); } + /** + * Can be overridden by the block to prevent the block from being dockable. + * + * @return bool + */ public function instance_can_be_docked() { global $CFG; return (!empty($CFG->allowblockstodock) && $this->page->theme->enable_dock); } + /** + * If overridden and set to true by the block it will not be hidable when + * editing is turned on. + * + * @return bool + */ + public function instance_can_be_hidden() { + return true; + } + /** @callback callback functions for comments api */ public static function comment_template($options) { $ret = <<