Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
A Moodle report plugin that lets you easily create simple reports that can be expressed as a single SQL query

This branch is 39 commits behind moodleou:master


Ad-hoc database queries

This report plugin allows Administrators to set up arbitrary database queries
to act as ad-hoc reports. Reports can be of two types, either run on demand,
or scheduled to run automatically.

Other users with the right capability can go in and see a list of queries that
they have access to. Results can be viewed on-screen or downloaded as CSV.

Reports can contain placeholders, in which case, the user running the report is
presented with a form where they can enter the values to substitute for the
placeholders before running the report.

Scheduled reports can also be set to be send out be email whenever they are

See for more information.

Written by Tim Hunt and converted to Moodle 2.0 by Derek Woolhead, both from
The Open University ( There have also been contibutions
but many others.

To install using git, type this command in the root of your Moodle install
    git clone git:// report/customsql

This version of the report is compatible with Moodle 2.2 or later. (Tested on
Moodle 2.3+.)
Something went wrong with that request. Please try again.