mirror of
https://github.com/moodle/moodle.git
synced 2025-08-04 16:36:37 +02:00
Merge branch 'MDL-53537_m34v4' of https://github.com/sbourget/moodle
This commit is contained in:
commit
34cf57f1d0
5 changed files with 182 additions and 0 deletions
|
@ -119,6 +119,21 @@ class backup_plan extends base_plan implements loggable {
|
|||
$this->controller->set_status(backup::STATUS_EXECUTING);
|
||||
parent::execute();
|
||||
$this->controller->set_status(backup::STATUS_FINISHED_OK);
|
||||
|
||||
if ($this->controller->get_type() === backup::TYPE_1COURSE) {
|
||||
// Trigger a course_backup_created event.
|
||||
$otherarray = array('format' => $this->controller->get_format(),
|
||||
'mode' => $this->controller->get_mode(),
|
||||
'interactive' => $this->controller->get_interactive(),
|
||||
'type' => $this->controller->get_type(),
|
||||
);
|
||||
$event = \core\event\course_backup_created::create(array(
|
||||
'objectid' => $this->get_courseid(),
|
||||
'context' => context_course::instance($this->get_courseid()),
|
||||
'other' => $otherarray
|
||||
));
|
||||
$event->trigger();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue