94
94
return $this->controller->get_logger();
98
* Gets the progress reporter, which can be used to report progress within
99
* the backup or restore process.
101
* @return core_backup_progress Progress reporting object
103
public function get_progress() {
104
return $this->controller->get_progress();
97
107
public function get_info() {
98
108
return $this->controller->get_info();
157
167
parent::execute();
158
168
$this->controller->set_status(backup::STATUS_FINISHED_OK);
160
events_trigger('course_restored', (object) array(
161
'courseid' => $this->get_courseid(), // The new course
162
'userid' => $this->get_userid(), // User doing the restore
163
'type' => $this->controller->get_type(), // backup::TYPE_* constant
164
'target' => $this->controller->get_target(), // backup::TARGET_* constant
165
'mode' => $this->controller->get_mode(), // backup::MODE_* constant
166
'operation' => $this->controller->get_operation(), // backup::OPERATION_* constant
167
'samesite' => $this->controller->is_samesite(),
170
// Trigger a course restored event.
171
$event = \core\event\course_restored::create(array(
172
'objectid' => $this->get_courseid(),
173
'userid' => $this->get_userid(),
174
'context' => context_course::instance($this->get_courseid()),
175
'other' => array('type' => $this->controller->get_type(),
176
'target' => $this->controller->get_target(),
177
'mode' => $this->controller->get_mode(),
178
'operation' => $this->controller->get_operation(),
179
'samesite' => $this->controller->is_samesite())