Problem Description
With a recent upgrade to Moodle 2.7, a customer of ours is reporting their CustomSQL reports are failing. For example, [this query][1] used to report gradeable items, but fails now:
SELECT
u.firstname AS "First",
u.lastname AS "Last",
c.fullname AS "Course",
a.name AS "Assignment"
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
A quick query or two to the DB shows there are zero rows in prefix_assignment_submissions and prefix_assignment. Suggestions?
[1]: https://docs.moodle.org/27/en/ad-hoc_contributed_reports#All_Ungraded_Assignments
AI-Generated Solution
Powered by LMSouq AI · GPT-4.1-mini
Analyzing problem and generating solution…
Was this solution helpful?