Weekly email report containing list of students incomplete assignments

Weekly email report containing list of students incomplete assignments

by Bo Harris -
Number of replies: 1

I am building a training platform for a restaurant.

I am looking for a way to get an email sent to me every monday morning that contains a list of all the employees (students) that have any courses that are INCOMPLETE.  I think 'Configurable Reports Block' might be the answer to my needs but still trying to figure out how to make it to do it.

Because the LMS that I am building training program, I don't have due dates like a typical classroom.  Instead, I need to know any active employees that have outstanding assignments or courses so I can follow up with them to get it completed.  I have employees that start at all different times.

I am sure I can click into the courses and find this information but my training program will likely have 300 small courses before it is fully built.  I don't want to have to click through every course to figure out who is done and who still has work to do.

Any help would be much appreciated.

I am working with Moodle 3.10 installed on my own server.


Average of ratings: Useful (1)
In reply to Bo Harris

Re: Weekly email report containing list of students incomplete assignments

by Bo Harris -
I found this SQL statement, but it does the opposite. It pulls back completed courses. How do I change this to query incomplete courses that have been assigned to students.

SELECT u.firstname AS'Name', u.lastname AS'Surname', c.fullname AS'Course', cc.name AS'Category',
CASE WHEN gi.itemtype ='Course'
THEN c.fullname + 'Course Total'
ELSE gi.itemname
END AS 'Item Name', ROUND(gg.finalgrade,2)AS Score,ROUND(gg.rawgrademax,2)ASMAX, ROUND(gg.finalgrade / gg.rawgrademax *100,2)AS Percentage,

IF(ROUND(gg.finalgrade / gg.rawgrademax *100,2)>79,'Yes','No')AS Pass

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.itemname !='Attendance'
ORDER BY Name ASC