The course element "enrolment" shows a list of groups and users can select one or many groups for enrolment. The available groups are displayed in a table. The problem for admin is that they can not pre-set a specific sort order for the groups. E.g. when they have a date in the group name representing some physical events, the order of the groups should be in the order of the dates.
To solve this problem the group list must have an order that can be manipulated in the course editor. We try not modifying the datamodel but only apply a sort UI on the string that stores the course ID's.
In the table sort dropdown a new sort by "manual order" is added.
Special care must be taken for legacy course imports where there exists also a config string with the group names instead of the group ID's.
The sorting is only applied to specific selected groups. Groups from learning areas are sorted as it was before (by name?).