mirror of
https://github.com/moodle/moodle.git
synced 2025-01-19 14:27:22 +01:00
c3d0157b0d
The $sql used in these methods may contain multiple parts glued together by the UNION operator. Simply appending the ORDER BY statement to the end of the query does not work in all DBs (failure reported at Oracle). Following the pattern already applied in MDL-30051, we wrap the SQL into yet another SELECT statement and perform ordering there. Credit goes to Sara Cenni for suggesting the fix.