ebc09cc3ad
While restoring course/activity, restore will blindly insert grade_item sortorder. Which cause dulicate sortorder and lead to unpredicatble sorting results. Now we will call grade_item::fix_duplicate_sortorder() after restore is finished to fix duplicate sortorder and order grade items to the closest order possible