Comprehensive Report

Picture of Kyle Scallan
Comprehensive Report

My site consists of 13 courses and apporximately 500 users.  Most users are enrolled in all courses.  Is there a way to obtain a report that shows all courses, and all users indicating their quiz score?  Currently I have to download a grader report from each individual course.

Picture of Robert Russo
Re: Comprehensive Report
Plugin developers

Run this query.


SELECT c.shortname AS shortname, CONCAT(mu.firstname, ' ', mu.lastname) AS fullname, gg.finalgrade AS finalgrade
FROM mdl_grade_items AS gi
INNER JOIN mdl_course c ON = gi.courseid
LEFT JOIN mdl_grade_grades AS gg ON gg.itemid =
INNER JOIN mdl_user AS mu ON gg.userid =
WHERE gi.itemtype = 'course'

This will give you the short name of the course they're enrolled in, their fullname, and the associated final grade for everyone in your system.