diff --git a/backup/moodle2/restore_stepslib.php b/backup/moodle2/restore_stepslib.php index 78de7b50695..895118316a5 100644 --- a/backup/moodle2/restore_stepslib.php +++ b/backup/moodle2/restore_stepslib.php @@ -148,7 +148,7 @@ class restore_gradebook_structure_step extends restore_structure_step { if ($target == backup::TARGET_CURRENT_DELETING || $target == backup::TARGET_EXISTING_DELETING) { set_config('gradebook_calculations_freeze_' . $this->get_courseid(), null); } - if (!empty($data['calculations_freeze']) && $this->get_task()->get_target() == backup::TARGET_NEW_COURSE) { + if (!empty($data['calculations_freeze'])) { if ($target == backup::TARGET_NEW_COURSE || $target == backup::TARGET_CURRENT_DELETING || $target == backup::TARGET_EXISTING_DELETING) { set_config('gradebook_calculations_freeze_' . $this->get_courseid(), $data['calculations_freeze']);