Is your Moodle installation healthy?

Moodle Health Check

[pulledquote]I have been trying to get Moodle 2 (and 2.1) working properly on a GoDaddy Linux server for the past week so far to no avail. This has seriously been winding me up and many times have I pictured myself throwing my computer out of the window. Considering my poor computer isn’t at fault, I decided it would be more constructive to share the tools I’ve used to help me solve my problem. [/pulledquote] 

Moodle forums

This should really be your first step. If you found my website using Google and have never used the moodle.org forums, please do yourself a favour and go there. If you have already visited the forums and have not found the answer you were looking for, maybe you’ll be lucky and find it here (make sure you check the comments at the bottom of the page). I cannot stress this enough – the Moodle community really is fantastic.

 

Debugging mode

Turning on debugging really comes in handy. Basically it will display extra messages usually at the top of your Moodle pages. You can turn it on in the Administration> Development> Debugging.

There are different levels of  debugging – choosing ‘ALL’ is usually enough and will be useful if you need to report an issue in the Moodle forums.

Moodle Debugging

 

XMLDB Editor

This tool can be found in Administration>Miscellaneous>XMLDB editor

Although it has a scary name, this tool is very easy to use and can return some useful messages. I recently upgraded our Moodle installation at school and noticed a few errors with indexes using the ‘Check indexes’ tool. It was nothing that stopped the installation working, but it’s always good to have everything working properly.

 Moodle XMLDB Editor

 

Moodle health check

One useful tool that I have come across is the ‘health-check’ built-in function. I only found out about this function a few days ago whilst doing some digging in the code. It is worth noting that it is ‘Unsupported’ but you can access it using http://www.yourmoodleaddress.com/admin/health.php (changing ‘www.yourmoodleaddress’ with the site you want to diagnose). It’s not really a one-stop shop to get your Moodle installation working great but it’s a nice start. Each problem is given a level of severity i.e. notice, annoyance, significant, critical.

As it stands, it will return the following problems with suggested solutions for each:

  • Extra characters at the end of config.php or other library function
  • $CFG->dataroot does not exist or does not have write permissions
  • cron.php is not set up to run automatically
  • PHP: session.auto_start is enabled
  • PHP: magic_quotes_runtime is enabled
  • PHP: file_uploads is disabled
  • PHP: memory_limit cannot be controlled by Moodle
  • SQL: using account without password
  • Random questions data consistency
  • Multi-answer questions data consistency
  • Only multianswer and random questions should be the parent of another question
  • Question categories should belong to a valid context
  • Question categories should belong to the same context as their parent
  • Question categories tree structure

Moodle Health Check 

Unit tests

You can find this in Administration>Reports>Unit tests

This has never returned anything useful for me, but it could be for you. It only takes a few seconds to run and you cannot break anything, so I say go for it!

 Moodle Unit Tests

 

Has all this worked for me?

Mainly but I’m still getting an error with the ‘slasharguments’, off to the Moodle forums now…

 

There are many other things that can be done to check if Moodle is working properly e.g. Server performance, optimize/repair tables in the database etc. but I thought I’d keep this posts simple and accessible to everyone as it uses only tools available in Moodle. If you have anymore tools you’d like to share when you are trying to work out what is wrong with your Moodle installation, please share here. 

3 comments

  1. Thank you for sharing this, I am newish to moodle and have done everything but the one thing that drives me mad is understanding the cron jobs. I have tried to set these up but each time I think they are working something happens like I stop getting mail!

    Have you anything, tutorial on this subject?

    Sarah x

    1. Hi Sarah,
      glad it helped. What server are you running? Linux I presume if you’re struggling with cron. If Windows, then use the cron.exe package – very easy to setup
      Do you have access to cPanel or Webmin? If you do, these tools should make it easy for you to get cron going. If not, I don’t have a magic recipe but I’m happy to help.
      Cheers,
      Fred

Leave a Reply

Your email address will not be published.