I'm still having trouble getting to grips with SQL!
There is a contributed report for this block that lists all ungraded assignments for a site. It looks like this...
SELECT
u.firstname AS "First",
u.lastname AS "Last",
c.fullname AS "Course",
a.name AS "Assignment",
FROM_UNIXTIME (asb.timemodified, '%D %M %Y - %h %i') AS "Date Submitted"
FROM prefix_assignment_submissions AS asb
JOIN prefix_assignment AS a ON a.id = asb.assignment
JOIN prefix_user AS u ON u.id = asb.userid
JOIN prefix_course AS c ON c.id = a.course
JOIN prefix_course_modules AS cm ON c.id = cm.course
WHERE asb.grade < 0 AND cm.instance = a.id
AND cm.module = 1
ORDER BY c.fullname, a.name, u.lastname
Problem is, it is reading from the table for the OLD assignment type, not the new one. Does anybody have any ideas how to modify this to pull results from the NEW moodle assignments?
I have already tried changing "prefix_assignment_submissions" to "prefix_assign_submission", but it doen't like that!
Any help greatly appreciated...
Mike