diff --git a/colourpicker.php b/colourpicker.php index 40d1c00..a05506f 100644 --- a/colourpicker.php +++ b/colourpicker.php @@ -15,7 +15,7 @@ // You should have received a copy of the GNU General Public License // along with Moodle. If not, see . -defined('MOODLE_INTERNAL') || die(); +defined('MOODLE_INTERNAL') || die('Direct access to this script is forbidden.'); require_once("HTML/QuickForm/text.php"); diff --git a/edit_form.php b/edit_form.php index 56e2091..0a0cd22 100644 --- a/edit_form.php +++ b/edit_form.php @@ -15,9 +15,7 @@ // You should have received a copy of the GNU General Public License // along with Moodle. If not, see . -if (!defined('MOODLE_INTERNAL')) { - die('Direct access to this script is forbidden.'); /// It must be included from a Moodle page -} +defined('MOODLE_INTERNAL') || die('Direct access to this script is forbidden.'); require_once($CFG->dirroot . '/course/moodleform_mod.php'); require_once($CFG->dirroot . '/mod/customcert/lib.php'); diff --git a/elements/date/lib.php b/elements/date/lib.php index 280ca9d..3fd8948 100644 --- a/elements/date/lib.php +++ b/elements/date/lib.php @@ -23,7 +23,7 @@ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -defined('MOODLE_INTERNAL') || die(); +defined('MOODLE_INTERNAL') || die('Direct access to this script is forbidden.'); require_once($CFG->dirroot . '/mod/customcert/elements/element.class.php'); diff --git a/elements/date/version.php b/elements/date/version.php index a12ad42..efce348 100644 --- a/elements/date/version.php +++ b/elements/date/version.php @@ -23,7 +23,7 @@ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -defined('MOODLE_INTERNAL') || die(); +defined('MOODLE_INTERNAL') || die('Direct access to this script is forbidden.'); $plugin->version = 2013031300; $plugin->requires = 2012112900; diff --git a/elements/element.class.php b/elements/element.class.php index 3ccbd43..8c7a287 100644 --- a/elements/element.class.php +++ b/elements/element.class.php @@ -24,7 +24,7 @@ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -defined('MOODLE_INTERNAL') || die(); +defined('MOODLE_INTERNAL') || die('Direct access to this script is forbidden.'); class customcert_element_base { diff --git a/elements/grade/lib.php b/elements/grade/lib.php index d9eca0c..097b78f 100644 --- a/elements/grade/lib.php +++ b/elements/grade/lib.php @@ -23,7 +23,7 @@ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -defined('MOODLE_INTERNAL') || die(); +defined('MOODLE_INTERNAL') || die('Direct access to this script is forbidden.'); require_once($CFG->dirroot . '/mod/customcert/elements/element.class.php'); require_once($CFG->dirroot . '/grade/lib.php'); diff --git a/elements/grade/version.php b/elements/grade/version.php index c82252e..c9cb902 100644 --- a/elements/grade/version.php +++ b/elements/grade/version.php @@ -23,7 +23,7 @@ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -defined('MOODLE_INTERNAL') || die(); +defined('MOODLE_INTERNAL') || die('Direct access to this script is forbidden.'); $plugin->version = 2013031300; $plugin->requires = 2012112900; diff --git a/elements/studentname/lib.php b/elements/studentname/lib.php index 748ab48..21a107b 100644 --- a/elements/studentname/lib.php +++ b/elements/studentname/lib.php @@ -23,7 +23,7 @@ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -defined('MOODLE_INTERNAL') || die(); +defined('MOODLE_INTERNAL') || die('Direct access to this script is forbidden.'); require_once($CFG->dirroot . '/mod/customcert/elements/element.class.php'); diff --git a/elements/studentname/version.php b/elements/studentname/version.php index 9c2cea4..418ef5b 100644 --- a/elements/studentname/version.php +++ b/elements/studentname/version.php @@ -23,7 +23,7 @@ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -defined('MOODLE_INTERNAL') || die(); +defined('MOODLE_INTERNAL') || die('Direct access to this script is forbidden.'); $plugin->version = 2013022901; $plugin->requires = 2012112900; diff --git a/lib.php b/lib.php index 80f40f2..772fd38 100644 --- a/lib.php +++ b/lib.php @@ -24,6 +24,8 @@ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ +defined('MOODLE_INTERNAL') || die('Direct access to this script is forbidden.'); + /** * Add customcert instance. * diff --git a/mod_form.php b/mod_form.php index a735c30..b51d8f5 100644 --- a/mod_form.php +++ b/mod_form.php @@ -15,9 +15,7 @@ // You should have received a copy of the GNU General Public License // along with Moodle. If not, see . -if (!defined('MOODLE_INTERNAL')) { - die('Direct access to this script is forbidden.'); /// It must be included from a Moodle page -} +defined('MOODLE_INTERNAL') || die('Direct access to this script is forbidden.'); require_once($CFG->dirroot.'/course/moodleform_mod.php'); require_once($CFG->dirroot.'/mod/customcert/lib.php'); diff --git a/version.php b/version.php index dbfc508..bda15f6 100644 --- a/version.php +++ b/version.php @@ -24,6 +24,8 @@ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or late */ +defined('MOODLE_INTERNAL') || die('Direct access to this script is forbidden.'); + $module->version = 2013022101; // The current module version (Date: YYYYMMDDXX) $module->requires = 2012062500; // Requires this Moodle version $module->cron = 0; // Period for cron to check this module (secs)