mirror of
https://github.com/moodle/moodle.git
synced 2025-01-19 06:18:28 +01:00
MDL-12350 do not set parent cat when updating; merged from MOODLE_19_STABLE
This commit is contained in:
parent
8263f8024d
commit
c267a2886a
@ -125,15 +125,15 @@ if ($data = $mform->get_data(false)) {
|
||||
$grade_item->itemtype = 'manual'; // all new items to be manual only
|
||||
$grade_item->insert();
|
||||
|
||||
// set parent if needed
|
||||
if (isset($data->parentcategory)) {
|
||||
$grade_item->set_parent($data->parentcategory, 'gradebook');
|
||||
}
|
||||
|
||||
} else {
|
||||
$grade_item->update();
|
||||
}
|
||||
|
||||
// set parent if needed
|
||||
if (isset($data->parentcategory)) {
|
||||
$grade_item->set_parent($data->parentcategory, 'gradebook');
|
||||
}
|
||||
|
||||
// update hiding flag
|
||||
if ($hiddenuntil) {
|
||||
$grade_item->set_hidden($hiddenuntil, false);
|
||||
|
@ -186,10 +186,6 @@ if ($data = $mform->get_data(false)) {
|
||||
|
||||
} else {
|
||||
$grade_item->update();
|
||||
// set parent if needed
|
||||
if (isset($data->parentcategory)) {
|
||||
$grade_item->set_parent($data->parentcategory, 'gradebook');
|
||||
}
|
||||
}
|
||||
|
||||
// update hiding flag
|
||||
|
Loading…
x
Reference in New Issue
Block a user