Project: moodle
Issue MDL-51682: Fix all persistent sortorder handling to prevent "holes"
There are a few problems with the handling of sortorder in the models. Those points are all related to each other: # New sortorders are created based on the number of rows in a table # When an entry is deleted, the sortorder is left untouched perhaps causing holes #- E.g. sortorders 1, 2, 3, 4 and 3 is deleted leads to 1, 2, 4 # Reordering is substracting/adding 1 to the sortorder, which is the problem when holes already exist.
Story points: 2