mirror of
https://github.com/moodle/moodle.git
synced 2025-04-15 13:33:52 +02:00
Merge branch 'MDL-33125' of git://github.com/aolley/moodle
This commit is contained in:
commit
13980de16b
@ -190,6 +190,15 @@ class restore_gradebook_structure_step extends restore_structure_step {
|
||||
$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)) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user