Skip to content

Commit

Permalink
MDL-21249 improved php docs and adding copyright blocks in mod/resource
Browse files Browse the repository at this point in the history
  • Loading branch information
skodak committed Jul 25, 2010
1 parent 2b641d1 commit 702ab58
Show file tree
Hide file tree
Showing 14 changed files with 75 additions and 50 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,14 @@
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.

/**
* @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)

/**
Expand Down
14 changes: 7 additions & 7 deletions mod/resource/backup/moodle2/backup_resource_stepslib.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,17 +15,17 @@
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.

/**
* @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
*/

defined('MOODLE_INTERNAL') || die;

/**
* Define the complete resource structure for backup, with file and id annotations
*/
Expand Down
9 changes: 6 additions & 3 deletions mod/resource/db/access.php
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down
9 changes: 6 additions & 3 deletions mod/resource/db/install.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
8 changes: 5 additions & 3 deletions mod/resource/db/upgrade.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
9 changes: 6 additions & 3 deletions mod/resource/db/upgradelib.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
7 changes: 4 additions & 3 deletions mod/resource/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -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');
Expand Down
7 changes: 4 additions & 3 deletions mod/resource/lang/en/resource.php
Original file line number Diff line number Diff line change
Expand Up @@ -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.';
Expand Down
9 changes: 6 additions & 3 deletions mod/resource/lib.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,14 @@
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.

/**
* @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
Expand Down
9 changes: 6 additions & 3 deletions mod/resource/locallib.php
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand Down
11 changes: 5 additions & 6 deletions mod/resource/mod_form.php
Original file line number Diff line number Diff line change
Expand Up @@ -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');
Expand Down
7 changes: 4 additions & 3 deletions mod/resource/settings.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
9 changes: 6 additions & 3 deletions mod/resource/version.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
7 changes: 4 additions & 3 deletions mod/resource/view.php
Original file line number Diff line number Diff line change
Expand Up @@ -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');
Expand Down

0 comments on commit 702ab58

Please sign in to comment.