Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Revert "MDL-43306 restore: fix grade item sortorder restoration"

This reverts commit 6afd79d.
  • Loading branch information...
commit 2d2faf8087ea5b96c7738aed8d4f19af1ba1d599 1 parent 6acf61d
@stronk7 stronk7 authored
Showing with 3 additions and 3 deletions.
  1. +3 −3 backup/moodle2/restore_stepslib.php
6 backup/moodle2/restore_stepslib.php
@@ -2782,9 +2782,9 @@ protected function process_grade_item($data) {
$gradeitem = new grade_item($data, false);
- // Reinstate the grade item close to its original sortorder, if something already exists
- // in the original sortorer then it will be first.
- $gradeitem->move_after_sortorder($data->sortorder);
+ //sortorder is automatically assigned when inserting. Re-instate the previous sortorder
+ $gradeitem->sortorder = $data->sortorder;
+ $gradeitem->update('restore');
// Set mapping, saving the original category id into parentitemid
// gradebook restore (final task) will need it to reorganise items
Please sign in to comment.
Something went wrong with that request. Please try again.