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!

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s