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';
 }