mirror of
https://github.com/moodle/moodle.git
synced 2025-08-05 00:46:50 +02:00
Merge branch 'MDL-37161-moodle23' of https://github.com/StudiUM/moodle into MOODLE_23_STABLE
This commit is contained in:
commit
fc77cb3d85
1 changed files with 7 additions and 2 deletions
|
@ -297,8 +297,13 @@ class restore_gradebook_structure_step extends restore_structure_step {
|
|||
|
||||
$data->courseid = $this->get_courseid();
|
||||
|
||||
$newitemid = $DB->insert_record('grade_settings', $data);
|
||||
//$this->set_mapping('grade_setting', $oldid, $newitemid);
|
||||
if (!$DB->record_exists('grade_settings', array('courseid' => $data->courseid, 'name' => $data->name))) {
|
||||
$newitemid = $DB->insert_record('grade_settings', $data);
|
||||
} else {
|
||||
$newitemid = $data->id;
|
||||
}
|
||||
|
||||
$this->set_mapping('grade_setting', $oldid, $newitemid);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue