-
Bug
-
Resolution: Fixed
-
Blocker
-
3.9
-
MOODLE_39_STABLE
-
MOODLE_39_STABLE
-
MDL-68829-master -
There are some phpunit/behat fails in Oracle/MSSQL due to the use of GROUP BY in the participants filtering SQL which need to be addressed.
After some discussions with Eloy, it appears that avoiding GROUP BY via joining on all users in the course will be the most performant approach, similar to the example below:
SELECT u.id, u.picture, u.firstname, targetusers.lastname,.....,
|
COALESCE(ul.timeaccess, 0) AS lastaccess, |
ctx.id AS ctxid, ctx.path AS ctxpath, ....
|
FROM
|
(SELECT DISTINCT tu.id
|
FROM b1user tu
|
JOIN b1user_enrolments ue ON ue.userid = tu.id
|
JOIN b1enrol e ON e.id = ue.enrolid AND e.courseid = :o_courseid1
|
) targetusers
|
JOIN b1user u ON u.id = targetusers.id
|
LEFT JOIN b1user_lastaccess ul ON (ul.userid = targetusers.id AND ul.courseid = :o_courseid2)
|
LEFT JOIN b1context ctx ON (ctx.instanceid = targetusers.id AND ctx.contextlevel = :o_contextlevel)
|
<<OTHER FILTERS GO HERE>>
|
ORDER BY xxxxxxx ASC
|
- Discovered while testing
-
MDL-68348 Update the participants filter to support filtering with additional logic operators
- Closed