Skip to content

Commit

Permalink
MDL-59011 restore: Check for userride only for activity events
Browse files Browse the repository at this point in the history
  • Loading branch information
ankitagarwal committed May 24, 2017
1 parent 17fb1d8 commit 23cef87
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions backup/moodle2/restore_stepslib.php
Original file line number Diff line number Diff line change
Expand Up @@ -2658,8 +2658,9 @@ public function process_calendarevents($data) {
$isuseroverride = !$data->courseid && $data->modulename && $data->instance;

// If we don't want to include user data and this record is a user override event
// for an activity then we should not create it.
if (!$this->task->get_setting_value('userinfo') && $isuseroverride) {
// for an activity then we should not create it. (Only activity events can be user override events - which must have this
// setting).
if ($isuseroverride && $this->task->setting_exists('userinfo') && !$this->task->get_setting_value('userinfo')) {
return;
}

Expand Down

0 comments on commit 23cef87

Please sign in to comment.