mirror of
https://github.com/moodle/moodle.git
synced 2025-03-14 20:50:21 +01:00
category grades and course grades should not be dependent on restore_userdata_selectee
This commit is contained in:
parent
7e09821038
commit
f9bb6a98d8
@ -1514,7 +1514,10 @@
|
||||
|
||||
// back up the other stuff here
|
||||
// mod grades should only be backed up if selected
|
||||
if ($grade_item->itemtype == 'mod' && backup_userdata_selected($preferences,$grade_item->itemmodule,$grade_item->iteminstance)) {
|
||||
if ($grade_item->itemtype == 'mod' && !backup_userdata_selected($preferences,$grade_item->itemmodule,$grade_item->iteminstance)) {
|
||||
// do not write grades if a mod grade_item is being restored
|
||||
// but userdata is not selected
|
||||
} else {
|
||||
$status = backup_gradebook_grades_info($bf,$preferences,$grade_item->id);
|
||||
$status = backup_gradebook_grades_text_info($bf,$preferences,$grade_item->id);
|
||||
}
|
||||
|
@ -1576,7 +1576,7 @@
|
||||
}
|
||||
|
||||
// no need to restore grades/grades_text if user data is not selected
|
||||
if (!restore_userdata_selected($restore, $dbrec->itemmodule, $iteminstance)) {
|
||||
if ($dbrec->itemtype == 'mod' && !restore_userdata_selected($restore, $dbrec->itemmodule, $iteminstance)) {
|
||||
// module instance not selected when restored using granular
|
||||
// skip this item
|
||||
$counteritems++;
|
||||
|
Loading…
x
Reference in New Issue
Block a user