/
var
/
www
/
html
/
cetesb
/
mod
/
videoaula
/
backup
/
moodle2
/
Upload File
HOME
<?php /** * @package moodlecore * @subpackage backup-moodle2 */ /** * Define all the restore steps that will be used by the restore_videoaula_activity_task */ /** * Structure step to restore one videoaula activity */ class restore_videoaula_activity_structure_step extends restore_activity_structure_step { protected function define_structure() { $paths = array(); $paths[] = new restore_path_element('videoaula', '/activity/videoaula'); // Return the paths wrapped into standard activity structure return $this->prepare_activity_structure($paths); } protected function process_videoaula($data) { global $DB; $data = (object)$data; $oldid = $data->id; $data->course = $this->get_courseid(); // insert the videoaula record $newitemid = $DB->insert_record('videoaula', $data); // immediately after inserting "activity" record, call this $this->apply_activity_instance($newitemid); } protected function after_execute() { // Add videoaula related files, no need to match by itemname (just internally handled context) $this->add_related_files('mod_videoaula', 'intro', null); $this->add_related_files('mod_videoaula', 'content', null); } }