This is a must-have plugin that will make your life easier.

Install it on your staging and production servers if required.

The plugin allows you to run SQL queries on your database to check or report on data.

Site administration > Reports > Ad-hoc database queries

Once you have installed the plugin you can create your own SQL scripts.

These SQL scripts can read data from the Moodle database. 

Thee scripts look like this.

SELECT USER.firstname AS Firstname, USER.lastname AS Lastname, AS Email, AS City, course.fullname AS Course ,(SELECT name FROM prefix_role WHERE id=asg.roleid) FROM prefix_user AS USER, prefix_course AS course, prefix_role_assignments AS asg INNER JOIN prefix_context AS context ON WHERE context.contextlevel = 50 AND AND

This particular script reports a site global list of all users enrolled in each course

By learning about the database structure and learning how to crate SQL scripts, you can interrogate the Moodle database and produce your own custom reports. 

See for more details.

You may not need this straight away, but have it ready when the time comes.

Example SQL can be found here:

Because there is so much detail in what you need to do, I will put this all in a video for you. 

Also, If you download the Admin guide from below – I will send you an email as soon as the video is available.  

I will put together an example of how to use this plugin in the next few weeks. 

Please subscribe to the YouTube channel to be notified when it is made available or download the Admin Hints Guide below to receive an email when the video is released. 


Submit a Comment

Your email address will not be published. Required fields are marked *