public static function check_format_and_type($format, $type) { global $CFG; $file = $CFG->dirroot . '/backup/' . $format . '/backup_plan_builder.class.php'; if (!file_exists($file)) { throw new backup_controller_exception('backup_check_unsupported_format', $format); } require_once $file; if (!in_array($type, backup_plan_builder::supported_backup_types())) { throw new backup_controller_exception('backup_check_unsupported_type', $type); } require_once $CFG->dirroot . '/backup/moodle2/backup_plan_builder.class.php'; }
/** * Dispatches the creation of the @backup_plan to the proper format builder */ public static function build_plan($controller) { backup_plan_builder::build_plan($controller); }
/** * public static method to build_course_plan. * @param backup_controller $controller An instance of backup_controller class. * @param int $id course id. */ public static function build_course_plan($controller, $id) { parent::build_course_plan($controller, $id); }