Updated the code responsible for preventing internal access to certain files
This commit is contained in:
parent
31168708bb
commit
8b3954cea7
12 changed files with 14 additions and 14 deletions
|
@ -15,7 +15,7 @@
|
|||
// You should have received a copy of the GNU General Public License
|
||||
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
defined('MOODLE_INTERNAL') || die();
|
||||
defined('MOODLE_INTERNAL') || die('Direct access to this script is forbidden.');
|
||||
|
||||
require_once("HTML/QuickForm/text.php");
|
||||
|
||||
|
|
|
@ -15,9 +15,7 @@
|
|||
// You should have received a copy of the GNU General Public License
|
||||
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
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');
|
||||
|
|
|
@ -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');
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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 {
|
||||
|
||||
|
|
|
@ -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');
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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');
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
|
2
lib.php
2
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.
|
||||
*
|
||||
|
|
|
@ -15,9 +15,7 @@
|
|||
// You should have received a copy of the GNU General Public License
|
||||
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
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');
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue