Databases: Creating Graphical Reports from Moodle

Databases: Creating Graphical Reports from Moodle

by Nathan Cobb -
Number of replies: 7
Hi

I'm an admin on the Moodle at my College and I run various sql queries on a monthly basis to provide information to department heads etc. I end up doing this on the database using MySQL Query Browser in most cases (I prefer it to phpMyAdmin). It all feels quite time consuming though.

My experience of managing MS Access databases previously was that I used to create the queries, generate a graphical report and then just be able to run the report each time I needed it (or set it up as a scheduled process to export it).

Am I missing something really obvious here? I know I can link MS Access to the tables to use the tools in access but I'd rather use another open source product if there's one available.

If anyone has any suggestions, I will be very grateful.

Many thanks

Nathan
Average of ratings: -
In reply to Nathan Cobb

Re: Databases: Creating Graphical Reports from Moodle

by Deleted user -
I created a module to run execute a jrxml (jasper reports)

But you can also just connect from Jasper Reports to MySQl and run your report like that.

WE are using Jasper Reports for all our reports nowdays, and teh good thing is that they are easy to make, and can look professional.

RIes
In reply to Deleted user

Re: Databases: Creating Graphical Reports from Moodle

by Nathan Cobb -

Thanks Ries

Jasper looks interesting but I don't think we could afford to implement it in our institutution as it appears to be Enterprise only?

Nathan

In reply to Nathan Cobb

Re: Databases: Creating Graphical Reports from Moodle

by Tim Hunt -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers

There is a simple plugin I made: http://moodle.org/mod/data/view.php?d=13&rid=2884. That lets you easily set up reports to run again in the future, but only tables, no graphics.

 

And recently, someone else made an block that had similar capabilities, but which could also do graphs. However, I have completely forgotten who that was or what it was called, and I can't find it again now.

In reply to Tim Hunt

Re: Databases: Creating Graphical Reports from Moodle

by Nathan Cobb -

Thanks Tim

I will look at this more closely although it's a shame about the graphics as I know management expectations are for graphical reports as that is what they get from other systems.

Many thanks

Nathan

In reply to Nathan Cobb

Re: Databases: Creating Graphical Reports from Moodle

by Tim Hunt -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers

I have now re-found the link for the block I was talking about:

http://docs.moodle.org/en/blocks/custom_reports/

http://tracker.moodle.org/browse/CONTRIB-2386

If anyone has the time and inclination to steal the graphing code from there, and add it to my CustomSQL report, I would be delighted.

Average of ratings: Useful (1)
In reply to Nathan Cobb

Re: Databases: Creating Graphical Reports from Moodle

by Paul Vaughan -

I have written a couple of standard PHP scripts which query Moodle's database directly and uses the Google Chart API to make pretty charts/graphs of the results. It wasn't too hard, once I created some functions to deal with the API's requirements.

This is an example graph (notice all the data is in the image's URL (below)):

http://chart.apis.google.com/chart?cht=p&chs=400x175&chco=00cc00|eeee00|ff9600|dd0000&chl=Outstanding|Good|Satisfactory|Inadequate&chd=t:20,3,2,1&chtt=Tutorial|(Tutorial)&chdl=20%20(76.9%)|3%20(11.5%)|2%20(7.7%)|1%20(3.8%)&chp=4.71&chf=bg,lg,270,ffffff,0,eeeeee,1&chma=10,10,10,10|90,0&chof=png

Hope that helps. Sometimes a script running outside of Moodle is the best way.

My 2p. smile

Vaughany.