Moodle Plugins directory: Ad-hoc database queries | Moodle.org
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:
4572 sites
1k downloads
177 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 quickly 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
Thank you for building this plugin. It really is a great tool and it's easy to use. In an attempt to contribute what little I can to the ongoing development of this project - I found a little update to one of the reports I can share.
As written on https://docs.moodle.org/403/en/ad-hoc_contributed_reports - There is outdated table name reference in the report "User activity completions with dates"
Moodle used to have a module called 'assignment' which has since been replaced by 'assign'. Once that table reference is renamed everything else works fine
Apologies if if this isnt the appropriate place to share this, but I couldnt find anywhere else to put this. I hope this helps keep the project fresh, and once again thanks for your effort here. Cheers!
Could you please advise if this plugin will be compatible with 4.1, 4.2 and 4.3?
Best,
Hoda
Sorry to bother, but I see the plugin it compatible only up to Moodle 4.0. Is it compatible with Moodle 4.3?
Is there anyway to use the same variable multiple times with one input?
Thanks.
The reports get data based on the current user %%USERID%%. Most of the time the reports work fine, however if two users run the same report at the same time, it displays both users data to one of the users.
I have tested this by creating a basic SQL query then have two users access it at the same time.
This is the query used for testing:
SELECT u.firstname
FROM {user} u
WHERE u.id = %%USERID%%
This results in one of the users getting two names, and the other just getting their name.
Is there any thing I can do to prevent this, anything I am doing wrong, or is this a bug?
Best,
Just upgraded to Moodle 4.5 and noticed a cosmetic error with this plugin. Looks like Moodle use to use small little diamond arrows next to each category that could be expanded. With this upgrade, these diamonds are now black arrows. However, on this plugin the arrows are way to large and it looks terrible. If anyone is still maintaining this app, please take a look at this when you have time. thank you.
I updated the plugin to the latest version and I have this error, already displayed in the past
PHP deprecated: the strftime() function is deprecated in /var/www/vhosts/sedex.formazionelavoratori.online/httpdocs/report/customsql/locallib.php at line 611
Versionephp 8.1.30
Moodle 4.5+
Just a super minor cosmetic issue in the category list of queries.