Project: moodle
Issue MDL-43306: Backup introduces duplicate gradeitem sortorders when restoring
As discovered in MDL-41062, restore creates duplciate sort orders when restoring grade items. This can result in inconsistent sorting of items. Steps to reproduce: Setup: # Create COURSE1 with default settings # Add an assignment ASSIGNCOURSE1 with default settings # Create COURSE2 with default settings # Add an assignment ASSIGNCOURSE2 with default settings Create duplicates: # Go to COURSE1 # Select import, choose COURSE2 and choose to import ASSIGNCOURSE2 Examine the database and look at the sort order of the grade items. Duplicates should not be seen in the same course.
Story points: 13