Moodle – auto Dock Side Blocks

There is a small tweak in the code, open  blocks/moodleblock.class.php

function:  html_attributes

line no.: 407

change the 0 to 1:

if ($this->instance_can_be_docked() && get_user_preferences(‘docked_block_instance_’.$this->instance->id, 01)) {

This will dock all Moodle side blocks (not for admin user). If you want to skip any block from being docked just add the block name in the AND condition. For example LOGIN block should not be docked, in that case the code will be

if ($this->instance_can_be_docked() && get_user_preferences(‘docked_block_instance_’.$this->instance->id, 1) && $this->name() != ‘login’) {

Hope it will help you!