Global - Quiz Attempts that are in progress - Abandoned Attempts

Re: Global - Quiz Attempts that are in progress - Abandoned Attempts

by Randy Thornton -
Number of replies: 0
Picture of Documentation writers
Shirley,

Probably the easiest way - that is the way of least disruption to the existing query - is to add and AND clause to the WHERE which would be a sub-select statement that limits the results to only students enrolled in the course. You already have the user and course, you just need to check for the enrollment exists. There's a number of examples with code you can borrow over the the contributed page, e.g. https://docs.moodle.org/311/en/ad-hoc_contributed_reports#Students_in_all_courses_of_some_institute