Merge branch 'MDL-43306-25' of git://github.com/danpoltawski/moodle into MOODLE_25_STABLE
This commit is contained in:
@@ -2769,9 +2769,9 @@ class restore_activity_grades_structure_step extends restore_structure_step {
|
||||
$gradeitem = new grade_item($data, false);
|
||||
$gradeitem->insert('restore');
|
||||
|
||||
//sortorder is automatically assigned when inserting. Re-instate the previous sortorder
|
||||
$gradeitem->sortorder = $data->sortorder;
|
||||
$gradeitem->update('restore');
|
||||
// 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);
|
||||
|
||||
// Set mapping, saving the original category id into parentitemid
|
||||
// gradebook restore (final task) will need it to reorganise items
|
||||
|
||||
Reference in New Issue
Block a user