Skip to content

Commit

Permalink
Merge pull request #139 from KomodoDeveloper/addMoodleInternalCheck
Browse files Browse the repository at this point in the history
Adding lines for moodle internal check, ref. issue #136
  • Loading branch information
ndunand authored Jul 1, 2020
2 parents 4014226 + 36b5f12 commit e7d7b6a
Show file tree
Hide file tree
Showing 7 changed files with 13 additions and 1 deletion.
2 changes: 2 additions & 0 deletions backup/moodle2/backup_choicegroup_activity_task.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down
3 changes: 3 additions & 0 deletions backup/moodle2/backup_choicegroup_stepslib.php
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down
3 changes: 3 additions & 0 deletions backup/moodle2/restore_choicegroup_stepslib.php
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down
1 change: 1 addition & 0 deletions db/access.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
//
// The variable name for the capability definitions array is $capabilities

defined('MOODLE_INTERNAL') || die();

$capabilities = array(

Expand Down
2 changes: 2 additions & 0 deletions db/mobile.php
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 2 additions & 0 deletions db/upgrade.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
1 change: 0 additions & 1 deletion report.php
Original file line number Diff line number Diff line change
Expand Up @@ -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");

Expand Down

0 comments on commit e7d7b6a

Please sign in to comment.