Details
Description
This is a major show stopper.
Old groups were part of the course (courseid column in groups table). Our course backups are selfcontained - they handle only things INSIDE the course. Anything that is defined outside the course itself needs special UI to map those outside data - the first exception was roles.
The problem with groups and groupings is that they are not part of the course anymore - they live at the site level.
Current groups backup/restore code needs complete rewrite! It must handle both backup/restore on the same and different servers.
Patch for group/lib/, group/db/ and backup/ directories. After brief discussion with Eloy (Skype 18/1) this is a medium-term solution with 'group' and 'grouping' elements both children of the 'course' XML element, to achieve backwards compatibility. So we have this schema:
moodle_backup->course->groupings->grouping->groups->group->groupid - NEW,
AND
moodle_backup->course->groups->group->members->member->userid - EXISTING.
A longer term flexible solution might be to make 'groups' and 'groupings' children of 'moodle_backup', with only ID references in the 'course'.