Skip to content
Browse files

Merge branch 'MDL-33125_23' of git://github.com/aolley/moodle into MO…

…ODLE_23_STABLE
  • Loading branch information...
2 parents 5fa7d72 + 69b0d17 commit cf0451133fa4f668e763e5909747ac82a761c279 @samhemelryk samhemelryk committed
Showing with 9 additions and 0 deletions.
  1. +9 −0 backup/moodle2/restore_stepslib.php
View
9 backup/moodle2/restore_stepslib.php
@@ -190,6 +190,15 @@ protected function process_grade_item($data) {
$data->id = $newitemid = $existinggradeitem->id;
$DB->update_record('grade_items', $data);
}
+ } else if ($data->itemtype == 'manual') {
+ // Manual items aren't assigned to a cm, so don't go duplicating them in the target if one exists.
+ $gi = array(
+ 'itemtype' => $data->itemtype,
+ 'courseid' => $data->courseid,
+ 'itemname' => $data->itemname,
+ 'categoryid' => $data->categoryid,
+ );
+ $newitemid = $DB->get_field('grade_items', 'id', $gi);
}
if (empty($newitemid)) {

0 comments on commit cf04511

Please sign in to comment.
Something went wrong with that request. Please try again.