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.
Price option: Free

Supports Moodle 1.9-5.1 See all versions
Latest release: 2 weeks ago
Installations: 4762
Downloads (last 90 days): 674

Frankenstyle name: report_customsql
Reports

Comments

Comments are no longer open for new posts. Existing comments remain available to read.

Hi, how to make a visible border table in email? The output table is without bordered lines.
Hi everyone,
Is anyone who knows how I can get the students results for all courses?
I was wondering if I could create a report where I can see the students results for all courses the student is enrolled.
The student has the OVERVIEW REPORT, where they can access the results of all courses they are enrolled.
However, the teacher does not have this option to see the results of all courses the student is enrolled.
Mostly cases, the student is enrolled in the same course as their trainer.
If someone could help me with that I would be eternally grateful.
Thank
We don't track timemodified in the report_customsql_queries database table. That is probably bad practice. If anyone wants to code that addition, I would happily merge a pull request. I'm afraid I don't have time to do it myself just now.
Thanks for a great plugin (use it ALL the time). Quick question - any way to tell when a report was last edited (changed)? Thanks again.
Hi Tim! We will do it and we will back to you. Thanks smile
If you are able to test it yourself (download the zip for 3.1, and install it manually), then let me know. That would be very helpful. Thanks.
You mean for Moodle 3.2? I am afraid the answer is "when I get around to testing it". I am sure it works, but I don't like to mark it as compatible until I have acutally tested.
Hi Tim,
Do you know when the plugin will be updated? Thanks!
Cheers,
RD
I have problem to figure out how to get teacher/teachers name for each course. can anyone give a clue.. here is my simple coding to get list courses..
SELECT prefix_course.id,prefix_course.shortname,prefix_course.fullname, prefix_course_categories.id,prefix_course_categories.name
FROM prefix_course, prefix_course_categories
WHERE prefix_course.category = prefix_course_categories.id
AND prefix_course_categories.parent=0
order by prefix_course_categories.name, prefix_course.fullname
thanks in advance
We were able to replicate this functionality (emailing specific reports) by setting up a cron job using mutt. If you look in the moodledata directory the report filenames are named in a predictable way. Thought I would share in case it was useful for others, in this example we are emailing a report created at 3:00 AM everyday at 5:00 AM:
00 05 * * * root mutt -s "Subject of Email" -a /var/www/moodledata/admin_report_customsql/2/`date +\%Y\%m\%d`-030000.csv -- email@email.org < /var/www/moodledata/admin_report_customsql/2/message.txt email2@email2.edu < /var/www/moodledata/admin_report_customsql/2/message.txt
No plans for us to implement that. If anyone else implemented it, we would probably be happy to merge the functionality in.
Are there any plans to email the results in a scheduled reports as an attachment rather than in the body of the email? I have created a report with questionnaire results but am having problems automating the process of saving the data which I need to load into another system. Thanks Ben
You can link directly to any report. Just copy and paste the URL when you are viewing the report.
Nice plugin! Is it possible to see just a report in a block on-screen without showing the list of reports first? (I'm trying to make a "High Scores" display on the page which will be a report of grade table data.)
I just ran the automated tests with 3.1.0 and didn't see any behat/phpunit problems. We're doing some manual testing at the CLAMP Hack/Doc now and we'll report back if there are problems.