Forums | Mahara Community
how to remove default dashboard block
19 July 2011, 2:38 AM
I have installed mahara 1.4 and use mysql.When we create new user account,each user's default dashboard page include "Latest pages, My pages, Recently Activity and Topic I,m Following 's block". We would like to remove all these blocks from dashboard page so that all user 's dashboard page have html content only.Please advice how to do it.
19 July 2011, 4:53 PM
There is no web interface for editing the default dashboard block yet, but if you like, you can go into the database and manually enter a command to delete all the blocks off every user's dashboard, I think this will do it:
DELETE FROM block_instance WHERE view IN (SELECT id FROM view WHERE type = 'dashboard');
19 July 2011, 8:17 PM
Thank for your information. On the other hand, how can i modified the code so that this default block will not be created when new user account is created and login to the mahara 1.4 system
19 July 2011, 10:59 PM
The blocks are copied from the "System dashboard" which is a view with the type 'dashboard', owned by user zero, and this system dashboard is installed in the database during installation.
If you run that command in the db, new users won't get the blocks either.
If you want to stop the system dashboard blocks from being installed when the site is first installed, modify the install_system_dashboard_view() function in htdocs/lib/user.php by changing the $blocktypes array to be empty.
20 July 2011, 12:41 AM
Thank, system is already installed and I cannot use "install_system_dashboard_view" to do so.Is it possible to change code only.If new account is created and login to the system, the system will create default dashboard template.I want each user 's default dashboard is not included this block