Generating custom Reports

Generating custom Reports

by Marius Pretorius -
Number of replies: 6
Hello

I am considering proposing to our school to use the Moodle Gradebook to take over the function of our current School Administration database for printing school reports.

I like the way that the categories can be weighted and the flexibility that the grade book has built in for calculating a final mark. At present teachers have to calculate their final mark using a spreadsheet which they (or a colleague) has designed - and then read it into the School Administration database. This method is so susceptible to errors. Teachers can so easily get it wrong - not applying formulas consistently, not using absolute referencing etc. Another problem is the exceptions - when a learner does not have a mark for a particular assessment.

By using the Moodle Gradebook, Heads of Departments can ensure that the final mark is calculated using the correct categories and the correct weighting. The Gradebook also deals very well with exceptions.

I have two requirements concerning which I am not so sure how the Gradebook can be used:
  • A student's grades accross courses should be accessed and combined for an overall grade.
  • The grade of each course as well as the overall grade should be displayed in a custom report to be printed for each student.
Can this be done? Should one access the main Moodle database and draw the information out of that? Can another database frontend be used to achieve this? I am aware that one can export the gradebook for each course to a spreadsheet and then process that data further to achieve this - but I would like to have a little less manual intervention.

I am not familiar with PHP (although I have done some programming in other languages). I understand databases to a fair extent and have worked quite extensively with Microsoft Access.

Thank you
Marius
In reply to Marius Pretorius

Re: Generating custom Reports

by Barry Oosthuizen -
Hi Marius,

There is an plugin activity module called 'subcourse'. You can use this to pull the overall grade of another course into the current course's gradebook. So then it would be possible to have a 'Final Grades' course containing all the final grades of relevant courses which would also produce it's own course total / overall grade of all courses. It comes with a manual 'fetch grades' button to update the grades for each course.

You can then print the user reports without headers and footers by adding some CSS rules for printer friendly pages to your theme (see this post and the docs page) or try the certificate plugin.

Cheers,

Barry
In reply to Barry Oosthuizen

Re: Generating custom Reports

by Marius Pretorius -
Thanks, Barry, for informing me of this option. This might be a partial solution. I could possibly have a metacourse for this purpose only - to combine all the grades from related courses - as you have indicated.

For printing purposes I need more control. I could then possibly export the results to Excel and take it from there.

However, I then lose out on the possibility of accessing the marks that have made up the final mark of each course. I will also have to do this exporting and further processing for each class in the school, therefore 13 classes. That is why I am wondering if the best approach would not be to hook onto the underlying MySQL database with a frontend such as Microsoft Access.

Having said that, I think it is quite a plausible solution. Any other ideas?
In reply to Marius Pretorius

Re: Generating custom Reports

by Barry Oosthuizen -
Hi Marius,

Depending on what kind of control do you need for printing purposes, I think the certificate module has more options (don't use it myself).

There is a patch in the tracker which is supposed to allow you to export grades from all courses in one go. Maybe you can get it to work.

Some time ago I hooked Access (2003) to Moodle and it was horrible. The connection drops the whole time. Maybe Access 2007 is better with this. There are some workarounds though (create a form with script to reconnect to mysql). I find MS Visual Studio and iReports are much better with this and you can make nice reports with iReports just like in Access.

I consider it much less of a hassle to keep everything in Moodle though. Also, with your background in programming and databases it shouldn't be too hard to make a grade report plugin in PHP. There are some docs on how to get started here and you can download an empty grade report template here. We had to decide between using our existing MS Access based attendance system, develop a new one with Filemaker, or modify the Moodle Attendance plugin. We chose the Moodle way and I'm so glad we did. It took much less time than I expected and was not so difficult after all. It took me much less time than making the original Access solution.

Cheers,

Barry
In reply to Barry Oosthuizen

Re: Generating custom Reports

by Allan Porras -
Hi. You can help me to generate a custom report. I need the grade of a category for students.

Do you understand me?