From 36b5f1265b33c316d7d5003ef474a14e22e26646 Mon Sep 17 00:00:00 2001 From: Luc Gigon Date: Wed, 1 Jul 2020 14:57:08 +0200 Subject: [PATCH] Adding lines for moodle internal check --- backup/moodle2/backup_choicegroup_activity_task.class.php | 2 ++ backup/moodle2/backup_choicegroup_stepslib.php | 3 +++ backup/moodle2/restore_choicegroup_stepslib.php | 3 +++ db/access.php | 1 + db/mobile.php | 2 ++ db/upgrade.php | 2 ++ report.php | 1 - 7 files changed, 13 insertions(+), 1 deletion(-) diff --git a/backup/moodle2/backup_choicegroup_activity_task.class.php b/backup/moodle2/backup_choicegroup_activity_task.class.php index 2c1911e..754e2d3 100644 --- a/backup/moodle2/backup_choicegroup_activity_task.class.php +++ b/backup/moodle2/backup_choicegroup_activity_task.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 . '/mod/choicegroup/backup/moodle2/backup_choicegroup_stepslib.php'); // Because it exists (must) require_once($CFG->dirroot . '/mod/choicegroup/backup/moodle2/backup_choicegroup_settingslib.php'); // Because it exists (optional) diff --git a/backup/moodle2/backup_choicegroup_stepslib.php b/backup/moodle2/backup_choicegroup_stepslib.php index 295fcad..5686454 100644 --- a/backup/moodle2/backup_choicegroup_stepslib.php +++ b/backup/moodle2/backup_choicegroup_stepslib.php @@ -29,6 +29,9 @@ /** * Define the complete choicegroup structure for backup, with file and id annotations */ + +defined('MOODLE_INTERNAL') || die(); + class backup_choicegroup_activity_structure_step extends backup_activity_structure_step { protected function define_structure() { diff --git a/backup/moodle2/restore_choicegroup_stepslib.php b/backup/moodle2/restore_choicegroup_stepslib.php index b9864cc..4f8718c 100644 --- a/backup/moodle2/restore_choicegroup_stepslib.php +++ b/backup/moodle2/restore_choicegroup_stepslib.php @@ -29,6 +29,9 @@ /** * Structure step to restore one choicegroup activity */ + +defined('MOODLE_INTERNAL') || die(); + class restore_choicegroup_activity_structure_step extends restore_activity_structure_step { protected function define_structure() { diff --git a/db/access.php b/db/access.php index 30d6b93..4a2c835 100644 --- a/db/access.php +++ b/db/access.php @@ -27,6 +27,7 @@ // // The variable name for the capability definitions array is $capabilities +defined('MOODLE_INTERNAL') || die(); $capabilities = array( diff --git a/db/mobile.php b/db/mobile.php index 7619c28..714d484 100644 --- a/db/mobile.php +++ b/db/mobile.php @@ -22,6 +22,8 @@ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ +defined('MOODLE_INTERNAL') || die(); + $addons = array( "mod_choicegroup" => array( "handlers" => array( // Different places where the add-on will display content. diff --git a/db/upgrade.php b/db/upgrade.php index b0a2467..88c4c6a 100644 --- a/db/upgrade.php +++ b/db/upgrade.php @@ -20,6 +20,8 @@ // Please do not forget to use upgrade_set_timeout() // before any action that may take longer time to finish. +defined('MOODLE_INTERNAL') || die(); + function xmldb_choicegroup_upgrade($oldversion) { global $CFG, $DB; diff --git a/report.php b/report.php index 4b9bef4..d11e0e4 100644 --- a/report.php +++ b/report.php @@ -24,7 +24,6 @@ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ - require_once("../../config.php"); require_once("lib.php");