mirror of
https://github.com/moodle/moodle.git
synced 2025-02-08 09:02:07 +01:00
Adding root and final tasks
This commit is contained in:
parent
bb2e1609c5
commit
970bc1f3e0
@ -31,12 +31,41 @@ class moodle1_converter extends plan_converter {
|
||||
$this->xmlprocessor = new convert_structure_parser_processor($this); // @todo Probably move this
|
||||
$this->xmlparser->set_processor($this->xmlprocessor);
|
||||
|
||||
$this->get_plan()->add_task(new moodle1_root_task('root_task'));
|
||||
$this->get_plan()->add_task(new moodle1_course_task('courseinfo'));
|
||||
$this->get_plan()->add_task(new moodle1_final_task('final_task'));
|
||||
}
|
||||
}
|
||||
|
||||
// @todo Where to store these classes?
|
||||
|
||||
class moodle1_root_task extends convert_task {
|
||||
/**
|
||||
* Function responsible for building the steps of any task
|
||||
* (must set the $built property to true)
|
||||
*/
|
||||
public function build() {
|
||||
$this->add_step(new convert_create_and_clean_temp_stuff('create_and_clean_temp_stuff'));
|
||||
|
||||
// At the end, mark it as built
|
||||
$this->built = true;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
class moodle1_final_task extends convert_task {
|
||||
/**
|
||||
* Function responsible for building the steps of any task
|
||||
* (must set the $built property to true)
|
||||
*/
|
||||
public function build() {
|
||||
$this->add_step(new convert_drop_and_clean_temp_stuff('drop_and_clean_temp_stuff'));
|
||||
|
||||
// At the end, mark it as built
|
||||
$this->built = true;
|
||||
}
|
||||
}
|
||||
|
||||
class moodle1_course_task extends convert_task {
|
||||
/**
|
||||
* Create all the steps that will be part of this task
|
||||
|
@ -13,6 +13,8 @@ require_once($CFG->dirroot.'/backup/backup.class.php');
|
||||
require_once($CFG->dirroot.'/backup/util/xml/xml_writer.class.php');
|
||||
require_once($CFG->dirroot.'/backup/util/xml/output/xml_output.class.php');
|
||||
require_once($CFG->dirroot.'/backup/util/xml/output/file_xml_output.class.php');
|
||||
require_once($CFG->dirroot.'/backup/util/dbops/backup_dbops.class.php');
|
||||
require_once($CFG->dirroot.'/backup/util/dbops/backup_controller_dbops.class.php');
|
||||
require_once($CFG->dirroot.'/backup/util/factories/convert_factory.class.php');
|
||||
require_once($CFG->dirroot.'/backup/util/converter/base_converter.class.php');
|
||||
require_once($CFG->dirroot.'/backup/util/converter/plan_converter.class.php');
|
||||
|
@ -8,7 +8,7 @@ abstract class convert_task extends base_task {
|
||||
}
|
||||
|
||||
public function get_convertid() {
|
||||
return $this->plan->get_backupid();
|
||||
return $this->plan->get_converterid();
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
x
Reference in New Issue
Block a user