General help

 
 
Picture of Steven Church
Customize Database Error Page
 

HEy all!

 

Is there a way of editing the Database Error Page on moodle? I can't find the file

 
Average of ratings: -
Tim at Lone Pine Koala Sanctuary
Re: Customize Database Error Page
Group DevelopersGroup Documentation writersGroup Particularly helpful Moodlers

If Moodle cannot connect to the database, then almost none of the standard Moodle libraries are available, and so it is very limited what you can do.

Therefore, I think the code to output that page is hard-coded somewhere. Yes, it is in lib/setup.php (http://cvs.moodle.org/moodle/lib/setup.php?view=markup&pathrev=MOODLE_19_STABLE)

 
Average of ratings: -
Picture of Leonard Houx
Re: Customize Database Error Page
 

Is this the same for 2x? I can't find it in lib/setup.php.

It would be great to be able to provide the user with something less robotic.

 
Average of ratings: -
Tim at Lone Pine Koala Sanctuary
Re: Customize Database Error Page
Group DevelopersGroup Documentation writersGroup Particularly helpful Moodlers

In 2.x it is slighly different. lib/setup.php does still exist.

The code you are looking for to customise is in lib/setuplib.php. The early_error_content method.

 
Average of ratings: -