Skip to content

Commit

Permalink
MDL-49257 grades: apply freeze when restoring with contents deleting
Browse files Browse the repository at this point in the history
  • Loading branch information
marinaglancy committed Jun 25, 2015
1 parent d783a8f commit a8646c7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion backup/moodle2/restore_stepslib.php
Expand Up @@ -148,7 +148,7 @@ protected function process_gradebook($data) {
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']);
Expand Down

0 comments on commit a8646c7

Please sign in to comment.