Search moodle.org's
Developer Documentation

See Release Notes
Long Term Support Release

  • Bug fixes for general core bugs in 4.1.x will end 13 November 2023 (12 months).
  • Bug fixes for security issues in 4.1.x will end 10 November 2025 (36 months).
  • PHP version: minimum PHP 7.4.0 Note: minimum PHP version has increased since Moodle 4.0. PHP 8.0.x is supported too.

Differences Between: [Versions 310 and 401] [Versions 39 and 401]

   1  <?php
   2  
   3  // This file is part of Moodle - http://moodle.org/
   4  //
   5  // Moodle is free software: you can redistribute it and/or modify
   6  // it under the terms of the GNU General Public License as published by
   7  // the Free Software Foundation, either version 3 of the License, or
   8  // (at your option) any later version.
   9  //
  10  // Moodle is distributed in the hope that it will be useful,
  11  // but WITHOUT ANY WARRANTY; without even the implied warranty of
  12  // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  13  // GNU General Public License for more details.
  14  //
  15  // You should have received a copy of the GNU General Public License
  16  // along with Moodle.  If not, see <http://www.gnu.org/licenses/>.
  17  
  18  /**
  19   * @package moodlecore
  20   * @subpackage backup-includes
  21   * @copyright 2010 onwards Eloy Lafuente (stronk7) {@link http://stronk7.com}
  22   * @license   http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
  23   */
  24  
  25  // Prevent direct access to this file
  26  if (!defined('MOODLE_INTERNAL')) {
  27      die('Direct access to this script is forbidden.');
  28  }
  29  
  30  // Include all the backup needed stuff
  31  require_once($CFG->dirroot . '/backup/util/interfaces/checksumable.class.php');
  32  require_once($CFG->dirroot . '/backup/util/interfaces/executable.class.php');
  33  require_once($CFG->dirroot . '/backup/util/interfaces/processable.class.php');
  34  require_once($CFG->dirroot . '/backup/util/interfaces/annotable.class.php');
  35  require_once($CFG->dirroot . '/backup/util/interfaces/loggable.class.php');
  36  require_once($CFG->dirroot . '/backup/backup.class.php');
  37  require_once($CFG->dirroot . '/backup/util/output/output_controller.class.php');
  38  require_once($CFG->dirroot . '/backup/util/factories/backup_factory.class.php');
  39  require_once($CFG->dirroot . '/backup/util/dbops/backup_dbops.class.php');
  40  require_once($CFG->dirroot . '/backup/util/dbops/backup_structure_dbops.class.php');
  41  require_once($CFG->dirroot . '/backup/util/dbops/backup_controller_dbops.class.php');
  42  require_once($CFG->dirroot . '/backup/util/dbops/backup_plan_dbops.class.php');
  43  require_once($CFG->dirroot . '/backup/util/dbops/backup_question_dbops.class.php');
  44  require_once($CFG->dirroot . '/backup/util/checks/backup_check.class.php');
  45  require_once($CFG->dirroot . '/backup/util/structure/base_atom.class.php');
  46  require_once($CFG->dirroot . '/backup/util/structure/base_attribute.class.php');
  47  require_once($CFG->dirroot . '/backup/util/structure/base_final_element.class.php');
  48  require_once($CFG->dirroot . '/backup/util/structure/base_nested_element.class.php');
  49  require_once($CFG->dirroot . '/backup/util/structure/base_optigroup.class.php');
  50  require_once($CFG->dirroot . '/backup/util/structure/base_processor.class.php');
  51  require_once($CFG->dirroot . '/backup/util/structure/backup_attribute.class.php');
  52  require_once($CFG->dirroot . '/backup/util/structure/backup_final_element.class.php');
  53  require_once($CFG->dirroot . '/backup/util/structure/backup_nested_element.class.php');
  54  require_once($CFG->dirroot . '/backup/util/structure/backup_optigroup.class.php');
  55  require_once($CFG->dirroot . '/backup/util/structure/backup_optigroup_element.class.php');
  56  require_once($CFG->dirroot . '/backup/util/structure/backup_structure_processor.class.php');
  57  require_once($CFG->dirroot . '/backup/util/helper/async_helper.class.php');
  58  require_once($CFG->dirroot . '/backup/util/helper/backup_helper.class.php');
  59  require_once($CFG->dirroot . '/backup/util/helper/backup_general_helper.class.php');
  60  require_once($CFG->dirroot . '/backup/util/helper/backup_null_iterator.class.php');
  61  require_once($CFG->dirroot . '/backup/util/helper/backup_array_iterator.class.php');
  62  require_once($CFG->dirroot . '/backup/util/helper/backup_anonymizer_helper.class.php');
  63  require_once($CFG->dirroot . '/backup/util/helper/backup_file_manager.class.php');
  64  require_once($CFG->dirroot . '/backup/util/helper/copy_helper.class.php');
  65  require_once($CFG->dirroot . '/backup/util/helper/restore_moodlexml_parser_processor.class.php'); // Required by backup_general_helper::get_backup_information().
  66  require_once($CFG->dirroot . '/backup/util/xml/xml_writer.class.php');
  67  require_once($CFG->dirroot . '/backup/util/xml/output/xml_output.class.php');
  68  require_once($CFG->dirroot . '/backup/util/xml/output/file_xml_output.class.php');
  69  require_once($CFG->dirroot . '/backup/util/xml/contenttransformer/xml_contenttransformer.class.php');
  70  require_once($CFG->dirroot . '/backup/util/xml/parser/progressive_parser.class.php');
  71  require_once($CFG->dirroot . '/backup/util/loggers/base_logger.class.php');
  72  require_once($CFG->dirroot . '/backup/util/loggers/error_log_logger.class.php');
  73  require_once($CFG->dirroot . '/backup/util/loggers/file_logger.class.php');
  74  require_once($CFG->dirroot . '/backup/util/loggers/core_backup_html_logger.class.php');
  75  require_once($CFG->dirroot . '/backup/util/loggers/database_logger.class.php');
  76  require_once($CFG->dirroot . '/backup/util/loggers/output_indented_logger.class.php');
  77  require_once($CFG->dirroot . '/backup/util/settings/setting_dependency.class.php');
  78  require_once($CFG->dirroot . '/backup/util/settings/base_setting.class.php');
  79  require_once($CFG->dirroot . '/backup/util/settings/backup_setting.class.php');
  80  require_once($CFG->dirroot . '/backup/util/settings/root/root_backup_setting.class.php');
  81  require_once($CFG->dirroot . '/backup/util/settings/activity/activity_backup_setting.class.php');
  82  require_once($CFG->dirroot . '/backup/util/settings/section/section_backup_setting.class.php');
  83  require_once($CFG->dirroot . '/backup/util/settings/course/course_backup_setting.class.php');
  84  require_once($CFG->dirroot . '/backup/util/plan/base_plan.class.php');
  85  require_once($CFG->dirroot . '/backup/util/plan/backup_plan.class.php');
  86  require_once($CFG->dirroot . '/backup/util/plan/base_task.class.php');
  87  require_once($CFG->dirroot . '/backup/util/plan/backup_task.class.php');
  88  require_once($CFG->dirroot . '/backup/util/plan/base_step.class.php');
  89  require_once($CFG->dirroot . '/backup/util/plan/backup_step.class.php');
  90  require_once($CFG->dirroot . '/backup/util/plan/backup_structure_step.class.php');
  91  require_once($CFG->dirroot . '/backup/util/plan/backup_execution_step.class.php');
  92  require_once($CFG->dirroot . '/backup/controller/base_controller.class.php');
  93  require_once($CFG->dirroot . '/backup/controller/backup_controller.class.php');
  94  require_once($CFG->dirroot . '/backup/util/ui/base_moodleform.class.php');
  95  require_once($CFG->dirroot . '/backup/util/ui/base_ui.class.php');
  96  require_once($CFG->dirroot . '/backup/util/ui/base_ui_stage.class.php');
  97  require_once($CFG->dirroot . '/backup/util/ui/backup_moodleform.class.php');
  98  require_once($CFG->dirroot . '/backup/util/ui/backup_ui.class.php');
  99  require_once($CFG->dirroot . '/backup/util/ui/backup_ui_stage.class.php');
 100  require_once($CFG->dirroot . '/backup/util/ui/backup_ui_setting.class.php');
 101  
 102  // And some moodle stuff too
 103  require_once($CFG->dirroot.'/course/lib.php');
 104  require_once($CFG->libdir.'/gradelib.php');