Ad-hoc database queries
Reports ::: report_customsql
Maintained by
Tim Hunt,
Mahmoud Kassaei,
Anupama Sarjoshi
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.
Latest release:
3836 sites
1k downloads
147 fans
Current versions available: 10
This report, created by The Open University, lets Administrators set up arbitrary SQL select queries that anyone with the appropriate permissions can then run. Reports can be set to be runnable on-demand, or automatically run weekly or monthly.
The results are displayed as a fairly plain HTML table, and can also be downloaded as CSV.
The idea is that this lets you quicly set up ad-hoc reports, without having to create a whole new admin report plugin.
Contributors
Tim Hunt (Lead maintainer)
Mahmoud Kassaei: Developer
Anupama Sarjoshi: Tester & Developer
Please login to view contributors details and/or to contact them
We are using this tool to collect daily attendance to be imported to our SIS. Ideally I would like to have the csv file automatically dropped to ftp. The few extra steps we take daily to download the report and place it in a file is mildly annoying. BUT that being said is still 1000 times better than collecting and posting attendance by hand. Not complaining, I am very grateful for this tool. Just a suggestion regarding the ftp drop.
Hi,
I'm wondering if anyone has written AN SQL query for generating an attendance report for all students for all courses?
Love the power of this!
When I schedule a run of a sql query it never runs. The command crontab -l shows nothing scheduled and I see no cron.php in the report/customsql directory
Is there something I need to do to have a query run at a specific time?
Thanks
Tim
So maybe someone knows what to add for the sql database query?
Tim
Starting admin reports
Processing cron function for report_customsql...
... started 12:00:02. Current memory use 59.9MB.
... Looking for old temp CSV files to delete.
done. (2 dbqueries, 0 seconds)
I know the query is good since the exact same one can be run on-demand
Any ideas?
Thanks
1) single entry for cron in crontab, not in cron.hourly
2) it will only run once a day, so if the custom query ran at 8:00 today and you reschedule it for 10:00 it will not run again today (unless you set lastrun to 0 in mdl_report_customsql_queries)
Stumbled across this..
I just added a few pull requests.
Any idea when a Moodle 3.0 compatible version might become available?
Best regards,
Michael Milette
Just added one more pull request. This one puts the list of reports in a table to make it easier to read the list of reports, especially when combined with the expandable/collapsible list feature I added last week.
Let me know if you have any questions or concerns.
Best regards,
Michael
I am looking at the available report options but don't see one that counts currently enrolled users within a time period e.g. How many users were enrolled between 1 month or some other time period (1 week, 30 days). I am just looking for the number of enrolled users across the whole site that are enrolled between dates and not course specific. Could someone point me to which one would carry that out please? Or perhaps help with the query that I would need to use or change?
Thanks
Al