Old modules and plugins

Note: This database has been replaced by the Moodle Plugins Directory.

Small Hack: Maintenance Notice On Login Screen

Type: Small Hack
Requires: Moodle 1.7 or later

This hack enables the maintenance notice to also be shown on the login screen.

1) Modify moodle/login/index.php around line 278 with hack code (highlighted in blue) as follows:

print_header("$site->fullname: $loginsite", $site->fullname, $loginsite, $focus,
'', true, '<div class="langmenu" align="right">'.$langmenu.'</div>');


// GT Mod 2007/10/22 - Maintenance Notice on Login Screen
// If maintenance mode then also show notice on login screen
// This is useful if the maintenance work affects logins
$filename = $CFG->dataroot.'/'.SITEID.'/maintenance.html';
if (file_exists($filename)){
echo ('<div style=\'text-align:center\'><div style=\'margin:0px auto\'>');
include ($filename);
echo ('</div></div>');
// End of GT Mod

Record added by Guy Thomas - Friday, 18 January 2008, 8:14 PM
Last modified - Friday, 18 January 2008, 8:18 PM