Hi,
i add these filters to my Configurable report (Filter categories, Courses, Start / End date filter, Search text) but it doesn't reflect anything the report result, which code shall i add to the custom SQL Query?
the main code i have till now in the SQL Query is:
- SELECT u.firstname AS 'First' , u.lastname AS 'Last', CONCAT(u.firstname , ' ' , u.lastname) AS 'Display Name',
- c.fullname AS 'Course',
- cc.name AS 'Category',
- CASE
- WHEN gi.itemtype = 'course'
- THEN CONCAT(c.fullname, ' - Total')
- ELSE gi.itemname
- END AS 'Item Name',
-
- ROUND(gg.finalgrade,2) AS Grade,
- FROM_UNIXTIME(gg.timemodified) AS TIME
-
- FROM prefix_course AS c
- JOIN prefix_context AS ctx ON c.id = ctx.instanceid
- JOIN prefix_role_assignments AS ra ON ra.contextid = ctx.id
- JOIN prefix_user AS u ON u.id = ra.userid
- JOIN prefix_grade_grades AS gg ON gg.userid = u.id
- JOIN prefix_grade_items AS gi ON gi.id = gg.itemid
- JOIN prefix_course_categories AS cc ON cc.id = c.category
-
- WHERE gi.courseid = c.id
- and gi.itemtype = 'course'
- ORDER BY lastname