MDL-43306 restore: fix grade item sortorder restoration
authorDan Poltawski <dan@moodle.com>
Tue, 10 Dec 2013 03:54:13 +0000 (11:54 +0800)
committerDan Poltawski <dan@moodle.com>
Tue, 10 Dec 2013 04:32:36 +0000 (12:32 +0800)
commite238b2cb928a1024b766032549168d04062a970c
treef24c3f40eab7a32438e1bab41dd73f3f3401bf42
parentc36a2401abdb4d842a3e1942c2645352585f26e9
MDL-43306 restore: fix grade item sortorder restoration

Previously, restore was blindly inserting the old sort order into the
database, causing duplicate sortorders which lead to unpredicatble
sorting results.

Now we will use the api function to add it after the original sortorder,
this means if a duplicate exists in the original location, this item
will appear after it.
backup/moodle2/restore_stepslib.php