Moodle vr 1.9 Maintenance Mode PDF Print E-mail
User Rating: / 0
PoorBest 
Written by Ken Task   
Thursday, 26 January 2012 15:36
AddThis Social Bookmark Button

Most of this from Moodle Docs with my own additions:
http://docs.moodle.org/19/en/Maintenance_mode

Might be a step needed IF one is migrating a site to a version 2 in place (something I wouldn't really recommend just yet).

Create a file called maintenance.html in /moodledata/1/
As long as that file resides there and is available users will be able to login, but their first click on any course presents them with a "Site is undergoing Maintenance." with whatever you've put into the html file you created.  Users cannot get into courses.

Administrators can login but they too will see a "Maintenance" link in the bread crumb bar.

After the upgrade/update/maintenance is completed (and tested), make the site available again by hiding the html file.
As root user in moodledata/1/ folder
mv maintenance.html .maintenance.html
This hides the html file from Apache but it's still there for Administrator to use next time.

Users should be able to login in now and go about their business.

With open source software it is not unusual to have to do such things often so rather than have to re-create the page, use this script after creating the page the first time:

nano maintmode
cp .maintenance.html maintenance.html

That copies the hidden 'dot'maintenance.html file to a visible maintenance.html file.

After upgrading BE SURE TO ERASE THE maintenance.html file in the 1 folder of the Moodle.

cd moodledata/1/
rm maintenance.html

If one is really good at scripting, the script could be improved with an 'on' or 'off' parameter passed to the script which would then make the html file visible or hidden.

There is a similar process for Moodle 2 and for command line server admins, might be worth checking out.

http://docs.moodle.org/20/en/Maintenance_mode

 

 
 
Total Views: 185