diff --git a/mod/resource/backup/moodle2/backup_resource_activity_task.class.php b/mod/resource/backup/moodle2/backup_resource_activity_task.class.php index a51b0747423..d92ff642e59 100644 --- a/mod/resource/backup/moodle2/backup_resource_activity_task.class.php +++ b/mod/resource/backup/moodle2/backup_resource_activity_task.class.php @@ -16,12 +16,14 @@ // along with Moodle. If not, see . /** - * @package moodlecore - * @subpackage backup-moodle2 - * @copyright 2010 onwards Eloy Lafuente (stronk7) {@link http://stronk7.com} - * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later + * @package mod + * @subpackage resource + * @copyright 2010 onwards Eloy Lafuente (stronk7) {@link http://stronk7.com} + * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ +defined('MOODLE_INTERNAL') || die; + require_once($CFG->dirroot . '/mod/resource/backup/moodle2/backup_resource_stepslib.php'); // Because it exists (must) /** diff --git a/mod/resource/backup/moodle2/backup_resource_stepslib.php b/mod/resource/backup/moodle2/backup_resource_stepslib.php index 67b1fbc68bd..26fe9be46bf 100644 --- a/mod/resource/backup/moodle2/backup_resource_stepslib.php +++ b/mod/resource/backup/moodle2/backup_resource_stepslib.php @@ -16,15 +16,15 @@ // along with Moodle. If not, see . /** - * @package moodlecore - * @subpackage backup-moodle2 - * @copyright 2010 onwards Eloy Lafuente (stronk7) {@link http://stronk7.com} - * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later + * Define all the backup steps that will be used by the backup_resource_activity_task + * + * @package mod + * @subpackage resource + * @copyright 2010 onwards Eloy Lafuente (stronk7) {@link http://stronk7.com} + * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -/** - * Define all the backup steps that will be used by the backup_resource_activity_task - */ +defined('MOODLE_INTERNAL') || die; /** * Define the complete resource structure for backup, with file and id annotations diff --git a/mod/resource/db/access.php b/mod/resource/db/access.php index 509d5b784b0..8ad80439eea 100644 --- a/mod/resource/db/access.php +++ b/mod/resource/db/access.php @@ -18,11 +18,14 @@ /** * Resource module capability definition * - * @package mod-resource - * @copyright 2009 Petr Skoda (http://skodak.org) - * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later + * @package mod + * @subpackage resource + * @copyright 2009 Petr Skoda {@link http://skodak.org} + * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ +defined('MOODLE_INTERNAL') || die; + $capabilities = array( /* TODO: review public portfolio API first! 'mod/resource:portfolioexport' => array( diff --git a/mod/resource/db/install.php b/mod/resource/db/install.php index cabec481e0d..028882f5141 100644 --- a/mod/resource/db/install.php +++ b/mod/resource/db/install.php @@ -23,11 +23,14 @@ * - lib.php/modulename_install() post installation hook * - partially defaults.php * - * @package mod-resource - * @copyright 2009 Petr Skoda (http://skodak.org) - * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later + * @package mod + * @subpackage resource + * @copyright 2009 Petr Skoda {@link http://skodak.org} + * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ +defined('MOODLE_INTERNAL') || die; + function xmldb_resource_install() { global $DB; diff --git a/mod/resource/db/upgrade.php b/mod/resource/db/upgrade.php index 1edb5333023..f8859e49b9e 100644 --- a/mod/resource/db/upgrade.php +++ b/mod/resource/db/upgrade.php @@ -38,11 +38,13 @@ * Please do not forget to use upgrade_set_timeout() * before any action that may take longer time to finish. * - * @package mod-resource - * @copyright 2009 Petr Skoda (http://skodak.org) - * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later + * @package mod + * @subpackage resource + * @copyright 2009 Petr Skoda {@link http://skodak.org} + * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ +defined('MOODLE_INTERNAL') || die; function xmldb_resource_upgrade($oldversion) { global $CFG, $DB; diff --git a/mod/resource/db/upgradelib.php b/mod/resource/db/upgradelib.php index f36ca4716c1..877d8991f65 100644 --- a/mod/resource/db/upgradelib.php +++ b/mod/resource/db/upgradelib.php @@ -18,11 +18,14 @@ /** * Resource module upgrade related helper functions * - * @package mod-resource - * @copyright 2009 Petr Skoda (http://skodak.org) - * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later + * @package mod + * @subpackage resource + * @copyright 2009 Petr Skoda {@link http://skodak.org} + * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ +defined('MOODLE_INTERNAL') || die; + /** * Migrate resource module data from 1.9 resource_old table to new resource table * @return void diff --git a/mod/resource/index.php b/mod/resource/index.php index 28c43bedbb2..f3c516ca76d 100644 --- a/mod/resource/index.php +++ b/mod/resource/index.php @@ -18,9 +18,10 @@ /** * List of all resources in course * - * @package mod-resource - * @copyright 1999 onwards Martin Dougiamas (http://dougiamas.com) - * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later + * @package mod + * @subpackage resource + * @copyright 1999 onwards Martin Dougiamas (http://dougiamas.com) + * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ require('../../config.php'); diff --git a/mod/resource/lang/en/resource.php b/mod/resource/lang/en/resource.php index 6e6b771650c..bd2ccad5da8 100644 --- a/mod/resource/lang/en/resource.php +++ b/mod/resource/lang/en/resource.php @@ -18,9 +18,10 @@ /** * Strings for component 'resource', language 'en', branch 'MOODLE_20_STABLE' * - * @package resource - * @copyright 1999 onwards Martin Dougiamas {@link http://moodle.com} - * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later + * @package mod + * @subpackage resource + * @copyright 1999 onwards Martin Dougiamas {@link http://moodle.com} + * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ $string['clicktodownload'] = 'Click {$a} link to download the file.'; diff --git a/mod/resource/lib.php b/mod/resource/lib.php index 14fae27f465..59d85ea5f18 100644 --- a/mod/resource/lib.php +++ b/mod/resource/lib.php @@ -16,11 +16,14 @@ // along with Moodle. If not, see . /** - * @package mod-resource - * @copyright 2009 Petr Skoda (http://skodak.org) - * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later + * @package mod + * @subpackage resource + * @copyright 2009 Petr Skoda {@link http://skodak.org} + * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ +defined('MOODLE_INTERNAL') || die; + /** * List of features supported in Resource module * @param string $feature FEATURE_xx constant for requested feature diff --git a/mod/resource/locallib.php b/mod/resource/locallib.php index b2d4fb9c25c..8de90261222 100644 --- a/mod/resource/locallib.php +++ b/mod/resource/locallib.php @@ -18,11 +18,14 @@ /** * Private resource module utility functions * - * @package mod-resource - * @copyright 2009 Petr Skoda (http://skodak.org) - * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later + * @package mod + * @subpackage resource + * @copyright 2009 Petr Skoda {@link http://skodak.org} + * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ +defined('MOODLE_INTERNAL') || die; + require_once("$CFG->libdir/filelib.php"); require_once("$CFG->libdir/resourcelib.php"); require_once("$CFG->dirroot/mod/resource/lib.php"); diff --git a/mod/resource/mod_form.php b/mod/resource/mod_form.php index 4940be49cc5..0bd644c969f 100644 --- a/mod/resource/mod_form.php +++ b/mod/resource/mod_form.php @@ -18,14 +18,13 @@ /** * Resource configuration form * - * @package mod-resource - * @copyright 2009 Petr Skoda (http://skodak.org) - * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later + * @package mod + * @subpackage resource + * @copyright 2009 Petr Skoda {@link http://skodak.org} + * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -if (!defined('MOODLE_INTERNAL')) { - die('Direct access to this script is forbidden.'); /// It must be included from a Moodle page -} +defined('MOODLE_INTERNAL') || die; require_once($CFG->dirroot.'/course/moodleform_mod.php'); require_once($CFG->dirroot.'/mod/resource/locallib.php'); diff --git a/mod/resource/settings.php b/mod/resource/settings.php index 86237e26c65..bda2a111d75 100644 --- a/mod/resource/settings.php +++ b/mod/resource/settings.php @@ -18,9 +18,10 @@ /** * Resource module admin settings and defaults * - * @package mod-resource - * @copyright 2009 Petr Skoda (http://skodak.org) - * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later + * @package mod + * @subpackage resource + * @copyright 2009 Petr Skoda {@link http://skodak.org} + * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ defined('MOODLE_INTERNAL') || die; diff --git a/mod/resource/version.php b/mod/resource/version.php index beb9b389e4d..9311db671f8 100644 --- a/mod/resource/version.php +++ b/mod/resource/version.php @@ -18,11 +18,14 @@ /** * Resource module version information * - * @package mod-resource - * @copyright 2009 Petr Skoda (http://skodak.org) - * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later + * @package mod + * @subpackage resource + * @copyright 2009 Petr Skoda {@link http://skodak.org} + * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ +defined('MOODLE_INTERNAL') || die; + $module->version = 2009080501; $module->requires = 2009073101; // Requires this Moodle version $module->cron = 0; diff --git a/mod/resource/view.php b/mod/resource/view.php index ec5686d98f1..67d0551b36e 100644 --- a/mod/resource/view.php +++ b/mod/resource/view.php @@ -18,9 +18,10 @@ /** * Resource module version information * - * @package mod-resource - * @copyright 2009 Petr Skoda (http://skodak.org) - * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later + * @package mod + * @subpackage resource + * @copyright 2009 Petr Skoda {@link http://skodak.org} + * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ require('../../config.php');