• News
    • En Español
  • The Tech
    • Sponsored by Moonami
    • Core software
    • Mobile
    • Plugins
    • Themes
  • How To
    • Sponsored by eCreators
    • Webinars
    • Training
    • Videos
    • Admin
    • Documentation
  • Outcomes
    • Sponsored by eThink Education
    • Analytics
    • Design
    • Business
  • Marketplace
    • Sponsored by Lingel Learning
    • Events
    • Service Providers
    • Proprietary LMS
    • Other EdTech
    • Contribute
  • Resources
    • Calendar
    • Books
    • Hosting
  • Webinars
Sign in
Welcome!Log into your account
Forgot your password?
Privacy Statement
Password recovery
Recover your password
Search
Wednesday, December 11, 2019
  • About
  • Advertise
  • Contact
  • Newsletter Sign Up
Sign in
Welcome! Log into your account
Forgot your password? Get help
Privacy Statement
Password recovery
Recover your password
A password will be e-mailed to you.
Moodle News Logo LMSPulse
Run of Site - Header Banner - IntelliBoard
Moodle News Logo Moodle News Logo
  • News
    • En Español
  • The Tech
    • Sponsored by Moonami
    • Core software
    • Mobile
    • Plugins
    • Themes
  • How To
    • Sponsored by eCreators
    • Webinars
    • Training
    • Videos
    • Admin
    • Documentation
  • Outcomes
    • Sponsored by eThink Education
    • Analytics
    • Design
    • Business
  • Marketplace
    • Sponsored by Lingel Learning
    • Events
    • Service Providers
    • Proprietary LMS
    • Other EdTech
    • Contribute
  • Resources
    • Calendar
    • Books
    • Hosting
  • Webinars
Marketplace
  • Marketplace
  • Training

Auto dock all side blocks in Moodle

By
Jaswinder Singh
-
April 7, 2015
1123

While searching on the internet, I came up to a solution to dock all the side blocks on your Moodle site by default which I thought to share with all of my readers as it is a very handy and useful tip. Thanks to Jaswant Tak, for sharing such a nice tip through his blog.
So, coming back to the point, to hide all the side blocks on your Moodle site you need to change one of the core files of Moodle, which is not recommended. If you still wants to continue with it then please keep a track of all the changes in core Moodle files before upgrading your Moodle site to a new version.

Post Pages - Post Inline - WIRIS
  • Open the file your_moodle_site/blocks/moodleblock.class.php in any text editor like Notepad++.
  • Find the function html_attributes (In my case it is on line number 411)
  • Change the line having the code:

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

with

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

(in my case it is line number 420)

  • Save changes.

This will dock all the side blocks except for the admin user.
If you want to skip any particular block from docking  then you can use the negated && (AND) condition in the statement as follows:
Let’s say you don’t want to dock the “Login” block then change the same line with this code:
if ($this->instance_can_be_docked() && get_user_preferences(‘docked_block_instance_’.$this->instance->id, 1) && $this->name() != ‘login’) {
And save changes.

Docked Blocks
All side blocks are docked by default

Thanks Jaswant Tak for sharing such a nice tips with whole Moodle community.
References:

  • https://jaswanttak.wordpress.com/2013/03/12/moodle-auto-dock-side-blocks/
  • TAGS
  • attribute
  • auto
  • block
  • blocks
  • code
  • core
  • dock
  • html
  • Jaswant
  • Jaswant Tak
  • login
  • Modules & Plugins
  • plugins
  • Tak
Facebook
Twitter
WhatsApp
Linkedin
ReddIt
Email
Telegram
LINE
    Previous articleMoodle 2.9 now in code freeze
    Next articleWhat’s coming in Moodle 2.9 that you should be aware of?
    Jaswinder Singh
    Post Pages - Sidebar 1 - Edwiser
    Post Pages - Sidebar 2 - eThink Education
    Post Pages - Sidebar 3 - eAbyas BizLMS
    Post Pages - Sidebar 4 - CourseMerchant
    Post Pages - Sidebar 5 - Edwiser
    Post Pages - Sidebar 6 - WizIQ
    Post Pages - Sidebar 7 - Titus Learning

    Watch Talking Moodle Season 1

    Run of Site - Footer Banner - CourseMerchant

    Community Comments

    • Cristian T. Duque on Check Out These ‘Ginux’-Based Instructional Design Secrets For Effective LMS
    • Richard Samson on A Re-Introduction To H5P: What You Need To Know About The Most Exciting LMS Integrator Yet
    • giselebrugger on Check Out These ‘Ginux’-Based Instructional Design Secrets For Effective LMS
    • What Is Growth? No Clear Winner In U.S. LMS Higher Ed Switches | LMSPulse on Moodle Is The Number Two LMS In North American Higher Education In 2017… And Climbing?

    Popular Categories

    • News5713
    • Marketplace2473
    • Technology2457
    • Outcomes2278
    • Plugins1494
    • Administration1172
    • Design1096

    Subscribe To Our Newsletter

    Join thousands (yes, thousands... like, almost 10,000) other LMS professionals who receive our weekly publication featuring the most popular posts, events and more about the LMS marketplace.

    Just enter your email address below:



    No Spam - Guaranteed!

    Moodle News Logo
    ABOUT US
    LMSPulse.com is an independently owned and operated resource for all things about learning management systems. Since 2009, we've been on the cutting edge of development, resources and community events.

    Click here to contact us
    FOLLOW US
    • Terms of Use
    • Privacy Statement
    • Cookie Policy
    • Advertise
    • Contact
    © Copyright 2009-19 MoodleNews LLC
    Hey, psssst... we just want to make sure you know that LMS Pulse uses cookies. Click here if you need more info.