Skip to content

Commit

Permalink
Merge branch 'MDL-45721_m27' of https://github.com/markn86/moodle int…
Browse files Browse the repository at this point in the history
…o MOODLE_27_STABLE
  • Loading branch information
stronk7 committed Jun 23, 2014
2 parents e5b111f + 469e7dd commit 5510381
Showing 1 changed file with 15 additions and 12 deletions.
27 changes: 15 additions & 12 deletions backup/util/plan/restore_plan.class.php
Expand Up @@ -167,18 +167,21 @@ public function execute() {
parent::execute();
$this->controller->set_status(backup::STATUS_FINISHED_OK);

// Trigger a course restored event.
$event = \core\event\course_restored::create(array(
'objectid' => $this->get_courseid(),
'userid' => $this->get_userid(),
'context' => context_course::instance($this->get_courseid()),
'other' => array('type' => $this->controller->get_type(),
'target' => $this->controller->get_target(),
'mode' => $this->controller->get_mode(),
'operation' => $this->controller->get_operation(),
'samesite' => $this->controller->is_samesite())
));
$event->trigger();
// Check if we are restoring a course.
if ($this->controller->get_type() === backup::TYPE_1COURSE) {
// Trigger a course restored event.
$event = \core\event\course_restored::create(array(
'objectid' => $this->get_courseid(),
'userid' => $this->get_userid(),
'context' => context_course::instance($this->get_courseid()),
'other' => array('type' => $this->controller->get_type(),
'target' => $this->controller->get_target(),
'mode' => $this->controller->get_mode(),
'operation' => $this->controller->get_operation(),
'samesite' => $this->controller->is_samesite())
));
$event->trigger();
}
}

/**
Expand Down

0 comments on commit 5510381

Please sign in to comment.