Skip to content
Permalink
Browse files

MDL-21432 backup - minor improvements to builders

  • Loading branch information...
stronk7 committed Jul 27, 2010
1 parent aae0d2f commit ca2ba065ddf12ee923cbae83fad5272fd797e20d
Showing with 9 additions and 2 deletions.
  1. +6 −1 backup/moodle2/backup_plan_builder.class.php
  2. +3 −1 backup/moodle2/restore_plan_builder.class.php
@@ -22,6 +22,8 @@
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
defined('MOODLE_INTERNAL') || die();
require_once($CFG->dirroot . '/backup/moodle2/backup_root_task.class.php');
require_once($CFG->dirroot . '/backup/moodle2/backup_activity_task.class.php');
require_once($CFG->dirroot . '/backup/moodle2/backup_section_task.class.php');
@@ -38,8 +40,11 @@
// Load all the activity tasks for moodle2 format
$mods = get_plugin_list('mod');
foreach ($mods as $mod => $moddir) {
$taskpath = $moddir . '/backup/moodle2/backup_' . $mod . '_activity_task.class.php';
if (plugin_supports('mod', $mod, FEATURE_BACKUP_MOODLE2)) {
require_once($moddir . '/backup/moodle2/backup_' . $mod . '_activity_task.class.php');
if (file_exists($taskpath)) {
require_once($taskpath);
}
}
}
@@ -22,6 +22,8 @@
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
defined('MOODLE_INTERNAL') || die();
require_once($CFG->dirroot . '/backup/moodle2/restore_root_task.class.php');
require_once($CFG->dirroot . '/backup/moodle2/restore_course_task.class.php');
require_once($CFG->dirroot . '/backup/moodle2/restore_section_task.class.php');
@@ -117,7 +119,7 @@ static protected function build_activity_plan($controller, $activityid) {
$blocks = backup_general_helper::get_blocks_from_path($task->get_taskbasepath());
foreach ($blocks as $basepath => $name) {
if ($task = restore_factory::get_restore_block_task($name, $basepath)) {
//$plan->add_task($task);
$plan->add_task($task);
} else {
// TODO: Debug information about block not supported
}

0 comments on commit ca2ba06

Please sign in to comment.
You can’t perform that action at this time.