MDL-21249 improved php docs and adding copyright blocks in mod/url
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
<?php
|
||||
|
||||
|
||||
// This file is part of Moodle - http://moodle.org/
|
||||
//
|
||||
// Moodle is free software: you can redistribute it and/or modify
|
||||
@@ -14,40 +14,42 @@
|
||||
//
|
||||
// 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 Andrew Davis
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
||||
* @package mod
|
||||
* @subpackage url
|
||||
* @copyright 2010 onwards Andrew Davis
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
||||
*/
|
||||
|
||||
|
||||
defined('MOODLE_INTERNAL') || die;
|
||||
|
||||
// This activity has not particular settings but the inherited from the generic
|
||||
// backup_activity_task so here there isn't any class definition, like the ones
|
||||
// existing in /backup/moodle2/backup_settingslib.php (activities section)
|
||||
|
||||
|
||||
require_once($CFG->dirroot . '/mod/url/backup/moodle2/backup_url_stepslib.php'); // Because it exists (must)
|
||||
|
||||
|
||||
/**
|
||||
* URL backup task that provides all the settings and steps to perform one
|
||||
* complete backup of the activity
|
||||
*/
|
||||
class backup_url_activity_task extends backup_activity_task {
|
||||
|
||||
|
||||
/**
|
||||
* Define (add) particular settings this activity can have
|
||||
*/
|
||||
protected function define_my_settings() {
|
||||
// No particular settings for this activity
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Define (add) particular steps this activity can have
|
||||
*/
|
||||
protected function define_my_steps() {
|
||||
$this->add_step(new backup_url_activity_structure_step('url_structure', 'url.xml'));
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Code the transformations to perform in the activity in
|
||||
* order to get transportable (encoded) links
|
||||
|
||||
@@ -16,15 +16,15 @@
|
||||
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
/**
|
||||
* @package moodlecore
|
||||
* @subpackage backup-moodle2
|
||||
* @copyright 2010 onwards Andrew Davis
|
||||
* @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_url_activity_task
|
||||
*
|
||||
* @package mod
|
||||
* @subpackage url
|
||||
* @copyright 2010 onwards Andrew Davis
|
||||
* @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_url_activity_task
|
||||
*/
|
||||
defined('MOODLE_INTERNAL') || die;
|
||||
|
||||
/**
|
||||
* Define the complete url structure for backup, with file and id annotations
|
||||
|
||||
@@ -18,11 +18,14 @@
|
||||
/**
|
||||
* Capability definitions for the url module.
|
||||
*
|
||||
* @package mod-url
|
||||
* @copyright 2009 Petr Skoda (http://skodak.org)
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
||||
* @package mod
|
||||
* @subpackage url
|
||||
* @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/url:portfolioexport' => array(
|
||||
|
||||
@@ -23,11 +23,14 @@
|
||||
* - lib.php/modulename_install() post installation hook
|
||||
* - partially defaults.php
|
||||
*
|
||||
* @package mod-url
|
||||
* @copyright 2009 Petr Skoda (http://skodak.org)
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
||||
* @package mod
|
||||
* @subpackage url
|
||||
* @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_url_install() {
|
||||
global $CFG;
|
||||
|
||||
|
||||
@@ -38,11 +38,14 @@
|
||||
* Please do not forget to use upgrade_set_timeout()
|
||||
* before any action that may take longer time to finish.
|
||||
*
|
||||
* @package mod-url
|
||||
* @copyright 2009 Petr Skoda (http://skodak.org)
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
||||
* @package mod
|
||||
* @subpackage url
|
||||
* @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_url_upgrade($oldversion) {
|
||||
global $CFG, $DB;
|
||||
|
||||
|
||||
@@ -18,11 +18,14 @@
|
||||
/**
|
||||
* URL module upgrade related helper functions
|
||||
*
|
||||
* @package url-resource
|
||||
* @copyright 2009 Petr Skoda (http://skodak.org)
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
||||
* @package mod
|
||||
* @subpackage url
|
||||
* @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 url module data from 1.9 resource_old table to new url table
|
||||
* @return void
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 371 B |
+4
-3
@@ -18,9 +18,10 @@
|
||||
/**
|
||||
* List of urls in course
|
||||
*
|
||||
* @package mod-url
|
||||
* @copyright 2009 onwards Martin Dougiamas (http://dougiamas.com)
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
||||
* @package mod
|
||||
* @subpackage url
|
||||
* @copyright 2009 onwards Martin Dougiamas (http://dougiamas.com)
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
||||
*/
|
||||
|
||||
require('../../config.php');
|
||||
|
||||
@@ -18,9 +18,10 @@
|
||||
/**
|
||||
* Strings for component 'url', language 'en', branch 'MOODLE_20_STABLE'
|
||||
*
|
||||
* @package url
|
||||
* @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 url
|
||||
* @copyright 1999 onwards Martin Dougiamas {@link http://moodle.com}
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
||||
*/
|
||||
|
||||
$string['clicktoopen'] = 'Click {$a} link to open URL.';
|
||||
|
||||
+6
-3
@@ -18,11 +18,14 @@
|
||||
/**
|
||||
* Mandatory public API of url module
|
||||
*
|
||||
* @package mod-url
|
||||
* @copyright 2009 Petr Skoda (http://skodak.org)
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
||||
* @package mod
|
||||
* @subpackage url
|
||||
* @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 URL module
|
||||
* @param string $feature FEATURE_xx constant for requested feature
|
||||
|
||||
@@ -18,11 +18,14 @@
|
||||
/**
|
||||
* Private url module utility functions
|
||||
*
|
||||
* @package mod-url
|
||||
* @copyright 2009 Petr Skoda (http://skodak.org)
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
||||
* @package mod
|
||||
* @subpackage url
|
||||
* @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/url/lib.php");
|
||||
|
||||
@@ -18,14 +18,13 @@
|
||||
/**
|
||||
* URL configuration form
|
||||
*
|
||||
* @package mod-url
|
||||
* @copyright 2009 Petr Skoda (http://skodak.org)
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
||||
* @package mod
|
||||
* @subpackage url
|
||||
* @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/url/locallib.php');
|
||||
|
||||
@@ -18,9 +18,10 @@
|
||||
/**
|
||||
* Url module admin settings and defaults
|
||||
*
|
||||
* @package mod-url
|
||||
* @copyright 2009 Petr Skoda (http://skodak.org)
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
||||
* @package mod
|
||||
* @subpackage url
|
||||
* @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;
|
||||
|
||||
+6
-3
@@ -18,11 +18,14 @@
|
||||
/**
|
||||
* Folder module version information
|
||||
*
|
||||
* @package mod-url
|
||||
* @copyright 2009 Petr Skoda (http://skodak.org)
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
||||
* @package mod
|
||||
* @subpackage url
|
||||
* @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 = 2009080500;
|
||||
$module->requires = 2009073101; // Requires this Moodle version
|
||||
$module->cron = 0;
|
||||
|
||||
+4
-3
@@ -18,9 +18,10 @@
|
||||
/**
|
||||
* URL module main user interface
|
||||
*
|
||||
* @package mod-url
|
||||
* @copyright 2009 Petr Skoda (http://skodak.org)
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
||||
* @package mod
|
||||
* @subpackage url
|
||||
* @copyright 2009 Petr Skoda {@link http://skodak.org}
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
||||
*/
|
||||
|
||||
require('../../config.php');
|
||||
|
||||
Reference in New Issue
Block a user