MDL-87433 course: Add sorting to get_nearest_editable_subcategory
Add ORDER BY to the query to ensure categories are returned in consistent order. This fixes random test failures, especially on PostgreSQL.
This commit is contained in:
@@ -3263,6 +3263,7 @@ class core_course_category implements renderable, cacheable_object, IteratorAggr
|
||||
ON uc.roleid = rc.roleid
|
||||
AND ( $eqpaths OR $likechild )
|
||||
WHERE (ra.id IS NOT NULL OR uc.upath IS NOT NULL)
|
||||
ORDER BY cc.sortorder, cc.id
|
||||
";
|
||||
|
||||
$params = [
|
||||
|
||||
Reference in New Issue
Block a user