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:33:52 +0000 (12:33 +0800)
commitbea3c273a3afd705e22963b85d5bf67f50c9b167
tree8ecba9935ac1997b17e84fd3729363b0ebe5e63f
parent98f4a31ce05b864481132222b292a6388d3d5b46
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