diff --git a/backup/moodle2/backup_activity_task.class.php b/backup/moodle2/backup_activity_task.class.php
index f3a22b70b79..360dd63117b 100644
--- a/backup/moodle2/backup_activity_task.class.php
+++ b/backup/moodle2/backup_activity_task.class.php
@@ -16,17 +16,23 @@
// 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
+ * Defines backup_activity_task class
+ *
+ * @package core_backup
+ * @subpackage moodle2
+ * @category backup
+ * @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();
+
/**
- * abstract activity task that provides all the properties and common tasks to be performed
- * when one activity is being backup
+ * Provides all the settings and steps to perform one complete backup of the activity
*
- * TODO: Finish phpdocs
+ * Activities are supposed to provide the subclass of this class in their file
+ * mod/MODULENAME/backup/moodle2/backup_MODULENAME_activity_task.class.php
+ * The expected name of the subclass is backup_MODULENAME_activity_task
*/
abstract class backup_activity_task extends backup_task {
@@ -38,6 +44,10 @@ abstract class backup_activity_task extends backup_task {
/**
* Constructor - instantiates one object of this class
+ *
+ * @param string $name the task identifier
+ * @param int $moduleid course module id (id in course_modules table)
+ * @param backup_plan|null $plan the backup plan instance this task is part of
*/
public function __construct($name, $moduleid, $plan = null) {
@@ -59,28 +69,43 @@ abstract class backup_activity_task extends backup_task {
parent::__construct($name, $plan);
}
+ /**
+ * @return int the course module id (id in the course_modules table)
+ */
public function get_moduleid() {
return $this->moduleid;
}
+ /**
+ * @return int the course section id (id in the course_sections table)
+ */
public function get_sectionid() {
return $this->sectionid;
}
+ /**
+ * @return string the name of the module, eg 'workshop' (from the modules table)
+ */
public function get_modulename() {
return $this->modulename;
}
+ /**
+ * @return int the id of the activity instance (id in the activity's instances table)
+ */
public function get_activityid() {
return $this->activityid;
}
+ /**
+ * @return int the id of the associated CONTEXT_MODULE instance
+ */
public function get_contextid() {
return $this->contextid;
}
/**
- * Activity tasks have their own directory to write files
+ * @return string full path to the directory where this task writes its files
*/
public function get_taskbasepath() {
return $this->get_basepath() . '/activities/' . $this->modulename . '_' . $this->moduleid;
@@ -184,9 +209,11 @@ abstract class backup_activity_task extends backup_task {
/**
- * Specialisation that, first of all, looks for the setting within
- * the task with the the prefix added and later, delegates to parent
- * without adding anything
+ * Tries to look for the instance specific setting value, task specific setting value or the
+ * common plan setting value - in that order
+ *
+ * @param string $name the name of the setting
+ * @return mixed|null the value of the setting or null if not found
*/
public function get_setting($name) {
$namewithprefix = $this->modulename . '_' . $this->moduleid . '_' . $name;
@@ -211,7 +238,7 @@ abstract class backup_activity_task extends backup_task {
// Protected API starts here
/**
- * Define the common setting that any backup activity will have
+ * Defines the common setting that any backup activity will have
*/
protected function define_settings() {
@@ -264,21 +291,44 @@ abstract class backup_activity_task extends backup_task {
}
/**
- * Define (add) particular settings that each activity can have
+ * Defines activity specific settings to be added to the common ones
+ *
+ * This method is called from {@link self::define_settings()}. The activity module
+ * author may use it to define additional settings that influence the execution of
+ * the backup.
+ *
+ * Most activities just leave the method empty.
+ *
+ * @see self::define_settings() for the example how to define own settings
*/
abstract protected function define_my_settings();
/**
- * Define (add) particular steps that each activity can have
+ * Defines activity specific steps for this task
+ *
+ * This method is called from {@link self::build()}. Activities are supposed
+ * to call {self::add_step()} in it to include their specific steps in the
+ * backup plan.
*/
abstract protected function define_my_steps();
/**
- * Code the transformations to perform in the activity in
- * order to get transportable (encoded) links
+ * Encodes URLs to the activity instance's scripts into a site-independent form
+ *
+ * The current instance of the activity may be referenced from other places in
+ * the course by URLs like http://my.moodle.site/mod/workshop/view.php?id=42
+ * Obvisouly, such URLs are not valid any more once the course is restored elsewhere.
+ * For this reason the backup file does not store the original URLs but encodes them
+ * into a transportable form. During the restore, the reverse process is applied and
+ * the encoded URLs are replaced with the new ones valid for the target site.
+ *
+ * Every plugin must override this method in its subclass.
+ *
+ * @see backup_xml_transformer class that actually runs the transformation
+ * @param string $content some HTML text that eventually contains URLs to the activity instance scripts
+ * @return string the content with the URLs encoded
*/
static public function encode_content_links($content) {
throw new coding_exception('encode_content_links() method needs to be overridden in each subclass of backup_activity_task');
}
-
}
diff --git a/backup/moodle2/backup_block_task.class.php b/backup/moodle2/backup_block_task.class.php
index 7d3f26e54c7..903833fbee5 100644
--- a/backup/moodle2/backup_block_task.class.php
+++ b/backup/moodle2/backup_block_task.class.php
@@ -16,12 +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
+ * @package core_backup
+ * @subpackage moodle2
+ * @category backup
+ * @copyright 2010 onwards Eloy Lafuente (stronk7) {@link http://stronk7.com}
+ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
+define('MOODLE_INTERNAL') || die();
+
/**
* abstract block task that provides all the properties and common steps to be performed
* when one block is being backup
diff --git a/backup/moodle2/backup_course_task.class.php b/backup/moodle2/backup_course_task.class.php
index 070506cef7a..8c35274912c 100644
--- a/backup/moodle2/backup_course_task.class.php
+++ b/backup/moodle2/backup_course_task.class.php
@@ -16,10 +16,13 @@
// 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
+ * Defines backup_course_task
+ *
+ * @package core_backup
+ * @subpackage moodle2
+ * @category backup
+ * @copyright 2010 onwards Eloy Lafuente (stronk7) {@link http://stronk7.com}
+ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
/**
diff --git a/backup/moodle2/backup_coursereport_plugin.class.php b/backup/moodle2/backup_coursereport_plugin.class.php
index 8d89b31326c..ceab0838d4b 100644
--- a/backup/moodle2/backup_coursereport_plugin.class.php
+++ b/backup/moodle2/backup_coursereport_plugin.class.php
@@ -24,10 +24,11 @@ defined('MOODLE_INTERNAL') || die();
* backed up, a course report should make use of the second and third
* parameters in get_plugin_element().
*
- * @package moodlecore
- * @subpackage backup-moodle2
- * @copyright 2011 onwards The Open University
- * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ * @package core_backup
+ * @subpackage moodle2
+ * @category backup
+ * @copyright 2011 onwards The Open University
+ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
abstract class backup_coursereport_plugin extends backup_plugin {
// Use default parent behaviour
diff --git a/backup/moodle2/backup_custom_fields.php b/backup/moodle2/backup_custom_fields.php
index d899a65ef32..e0ceb334d95 100644
--- a/backup/moodle2/backup_custom_fields.php
+++ b/backup/moodle2/backup_custom_fields.php
@@ -16,12 +16,17 @@
// 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
+ * Defines various element classes used in specific areas
+ *
+ * @package core_backup
+ * @subpackage moodle2
+ * @category backup
+ * @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();
+
/**
* Implementation of backup_final_element that provides one interceptor for anonymization of data
*
diff --git a/backup/moodle2/backup_default_block_task.class.php b/backup/moodle2/backup_default_block_task.class.php
index b3f5eaeea60..4b12633690f 100644
--- a/backup/moodle2/backup_default_block_task.class.php
+++ b/backup/moodle2/backup_default_block_task.class.php
@@ -16,12 +16,17 @@
// 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
+ * Defines backup_default_block_task class
+ *
+ * @package core_backup
+ * @subpackage moodle2
+ * @category backup
+ * @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();
+
/**
* Default block task to backup blocks that haven't own DB structures to be added
* when one block is being backup
diff --git a/backup/moodle2/backup_final_task.class.php b/backup/moodle2/backup_final_task.class.php
index 78bab3ce630..b9f7251f78b 100644
--- a/backup/moodle2/backup_final_task.class.php
+++ b/backup/moodle2/backup_final_task.class.php
@@ -16,12 +16,17 @@
// 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
+ * Defines backup_final_task class
+ *
+ * @package core_backup
+ * @subpackage moodle2
+ * @category backup
+ * @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();
+
/**
* Final task that provides all the final steps necessary in order to finish one
* backup (mainly gathering references and creating the main xml) apart from
diff --git a/backup/moodle2/backup_format_plugin.class.php b/backup/moodle2/backup_format_plugin.class.php
index d1af1b923f4..978c69a5e92 100644
--- a/backup/moodle2/backup_format_plugin.class.php
+++ b/backup/moodle2/backup_format_plugin.class.php
@@ -16,12 +16,17 @@
// along with Moodle. If not, see .
/**
- * @package moodlecore
- * @subpackage backup-moodle2
- * @copyright 2011 onwards Eloy Lafuente (stronk7) {@link http://stronk7.com}
- * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ * Defines backup_format_plugin class
+ *
+ * @package core_backup
+ * @subpackage moodle2
+ * @category backup
+ * @copyright 2011 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();
+
/**
* Class extending standard backup_plugin in order to implement some
* helper methods related with the course formats (format plugin)
diff --git a/backup/moodle2/backup_gradingform_plugin.class.php b/backup/moodle2/backup_gradingform_plugin.class.php
index a06412a5466..7fd4029681d 100644
--- a/backup/moodle2/backup_gradingform_plugin.class.php
+++ b/backup/moodle2/backup_gradingform_plugin.class.php
@@ -16,10 +16,13 @@
// along with Moodle. If not, see .
/**
- * @package core
- * @subpackage backup-moodle2
- * @copyright 2011 David Mudrak
- * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ * Defines backup_gradingform_plugin class
+ *
+ * @package core_backup
+ * @subpackage moodle2
+ * @category backup
+ * @copyright 2011 David Mudrak
+ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
defined('MOODLE_INTERNAL') || die();
@@ -28,5 +31,4 @@ defined('MOODLE_INTERNAL') || die();
* Base class for all advanced grading form plugins
*/
abstract class backup_gradingform_plugin extends backup_plugin {
-
}
diff --git a/backup/moodle2/backup_plagiarism_plugin.class.php b/backup/moodle2/backup_plagiarism_plugin.class.php
index 17a1d23adc3..86b3cc2aa1a 100644
--- a/backup/moodle2/backup_plagiarism_plugin.class.php
+++ b/backup/moodle2/backup_plagiarism_plugin.class.php
@@ -16,12 +16,17 @@
// along with Moodle. If not, see .
/**
- * @package moodlecore
- * @subpackage backup-moodle2
- * @copyright 2011 onwards Eloy Lafuente (stronk7) {@link http://stronk7.com}
- * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ * Defines backup_plagiarism_plugin class
+ *
+ * @package core_backup
+ * @subpackage moodle2
+ * @category backup
+ * @copyright 2011 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();
+
/**
* Class extending standard backup_plugin in order to implement some
* helper methods related with the plagiarism plugins (plagiarism plugin)
diff --git a/backup/moodle2/backup_plan_builder.class.php b/backup/moodle2/backup_plan_builder.class.php
index 0342462ffe0..d7a1f0aed75 100644
--- a/backup/moodle2/backup_plan_builder.class.php
+++ b/backup/moodle2/backup_plan_builder.class.php
@@ -16,10 +16,13 @@
// 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
+ * Defines backup_plan_builder class
+ *
+ * @package core_backup
+ * @subpackage moodle2
+ * @category backup
+ * @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();
diff --git a/backup/moodle2/backup_plugin.class.php b/backup/moodle2/backup_plugin.class.php
index da0abfa0cac..6a060abf8fb 100644
--- a/backup/moodle2/backup_plugin.class.php
+++ b/backup/moodle2/backup_plugin.class.php
@@ -16,12 +16,17 @@
// 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
+ * Defines backup_plugin class
+ *
+ * @package core_backup
+ * @subpackage moodle2
+ * @category backup
+ * @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();
+
/**
* Class implementing the plugins support for moodle2 backups
*
diff --git a/backup/moodle2/backup_qtype_plugin.class.php b/backup/moodle2/backup_qtype_plugin.class.php
index 5d940c55f87..c6839a7094c 100644
--- a/backup/moodle2/backup_qtype_plugin.class.php
+++ b/backup/moodle2/backup_qtype_plugin.class.php
@@ -16,12 +16,17 @@
// 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
+ * Defines backup_qtype_plugin class
+ *
+ * @package core_backup
+ * @subpackage moodle2
+ * @category backup
+ * @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();
+
/**
* Class extending standard backup_plugin in order to implement some
* helper methods related with the questions (qtype plugin)
diff --git a/backup/moodle2/backup_report_plugin.class.php b/backup/moodle2/backup_report_plugin.class.php
index fbc2174744e..8f2b34fe504 100644
--- a/backup/moodle2/backup_report_plugin.class.php
+++ b/backup/moodle2/backup_report_plugin.class.php
@@ -24,10 +24,11 @@ defined('MOODLE_INTERNAL') || die();
* backed up, a report should make use of the second and third
* parameters in get_plugin_element().
*
- * @package moodlecore
- * @subpackage backup-moodle2
- * @copyright 2011 Petr Skoda
- * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ * @package core_backup
+ * @subpackage moodle2
+ * @category backup
+ * @copyright 2011 Petr Skoda
+ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
abstract class backup_report_plugin extends backup_plugin {
// Use default parent behaviour
diff --git a/backup/moodle2/backup_root_task.class.php b/backup/moodle2/backup_root_task.class.php
index af710e1dd22..fc65242647a 100644
--- a/backup/moodle2/backup_root_task.class.php
+++ b/backup/moodle2/backup_root_task.class.php
@@ -16,12 +16,17 @@
// 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
+ * Defines backup_root_task class
+ *
+ * @package core_backup
+ * @subpackage moodle2
+ * @category backup
+ * @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();
+
/**
* Start task that provides all the settings common to all backups and some initialization steps
*
diff --git a/backup/moodle2/backup_section_task.class.php b/backup/moodle2/backup_section_task.class.php
index 8986d8c5f95..ab4b4c8a10d 100644
--- a/backup/moodle2/backup_section_task.class.php
+++ b/backup/moodle2/backup_section_task.class.php
@@ -16,12 +16,17 @@
// 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
+ * Defines backup_section_task class
+ *
+ * @package core_backup
+ * @subpackage moodle2
+ * @category backup
+ * @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();
+
/**
* section task that provides all the properties and common steps to be performed
* when one section is being backup
diff --git a/backup/moodle2/backup_settingslib.php b/backup/moodle2/backup_settingslib.php
index 6614aee4e14..fe39f2cf9a2 100644
--- a/backup/moodle2/backup_settingslib.php
+++ b/backup/moodle2/backup_settingslib.php
@@ -16,10 +16,13 @@
// 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
+ * Defines classes used to handle backup settings
+ *
+ * @package core_backup
+ * @subpackage moodle2
+ * @category backup
+ * @copyright 2010 onwards Eloy Lafuente (stronk7) {@link http://stronk7.com}
+ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
// TODO: Reduce these to the minimum because ui/dependencies are 100% separated
@@ -36,6 +39,15 @@ class backup_generic_setting extends root_backup_setting {}
*/
class backup_filename_setting extends backup_generic_setting {
+ /**
+ * Instantiates a setting object
+ *
+ * @param string $name Name of the setting
+ * @param string $vtype Type of the setting, eg {@link base_setting::IS_TEXT}
+ * @param mixed $value Value of the setting
+ * @param bool $visibility Is the setting visible in the UI, eg {@link base_setting::VISIBLE}
+ * @param int $status Status of the setting with regards to the locking, eg {@link base_setting::NOT_LOCKED}
+ */
public function __construct($name, $vtype, $value = null, $visibility = self::VISIBLE, $status = self::NOT_LOCKED) {
parent::__construct($name, $vtype, $value, $visibility, $status);
}
diff --git a/backup/moodle2/backup_stepslib.php b/backup/moodle2/backup_stepslib.php
index 8454934ba08..b87e3cc4117 100644
--- a/backup/moodle2/backup_stepslib.php
+++ b/backup/moodle2/backup_stepslib.php
@@ -16,15 +16,16 @@
// 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
+ * Defines various backup steps that will be used by common tasks in backup
+ *
+ * @package core_backup
+ * @subpackage moodle2
+ * @category backup
+ * @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 common tasks in backup
- */
+defined('MOODLE_INTERNAL') || die();
/**
* create the temp dir where backup/restore will happen,
@@ -98,6 +99,7 @@ abstract class backup_activity_structure_step extends backup_structure_step {
* we are going to add subplugin information to
* @param bool $multiple to define if multiple subplugins can produce information
* for each instance of $element (true) or no (false)
+ * @return void
*/
protected function add_subplugin_structure($subplugintype, $element, $multiple) {
@@ -135,6 +137,8 @@ abstract class backup_activity_structure_step extends backup_structure_step {
/**
* As far as activity backup steps are implementing backup_subplugin stuff, they need to
* have the parent task available for wrapping purposes (get course/context....)
+ *
+ * @return backup_activity_task
*/
public function get_task() {
return $this->task;
@@ -143,6 +147,9 @@ abstract class backup_activity_structure_step extends backup_structure_step {
/**
* Wraps any activity backup structure within the common 'activity' element
* that will include common to all activities information like id, context...
+ *
+ * @param backup_nested_element $activitystructure the element to wrap
+ * @return backup_nested_element the $activitystructure wrapped by the common 'activity' element
*/
protected function prepare_activity_structure($activitystructure) {
diff --git a/backup/moodle2/backup_subplugin.class.php b/backup/moodle2/backup_subplugin.class.php
index ca3e953d3fc..7cb30e3896c 100644
--- a/backup/moodle2/backup_subplugin.class.php
+++ b/backup/moodle2/backup_subplugin.class.php
@@ -16,12 +16,16 @@
// 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
+ * Defines backup_subplugin class
+ * @package core_backup
+ * @subpackage moodle2
+ * @category backup
+ * @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();
+
/**
* Class implementing the subplugins support for moodle2 backups
*
diff --git a/backup/moodle2/backup_theme_plugin.class.php b/backup/moodle2/backup_theme_plugin.class.php
index d4a3a098f3c..7978c527fbe 100644
--- a/backup/moodle2/backup_theme_plugin.class.php
+++ b/backup/moodle2/backup_theme_plugin.class.php
@@ -16,12 +16,17 @@
// along with Moodle. If not, see .
/**
- * @package moodlecore
- * @subpackage backup-moodle2
- * @copyright 2011 onwards The Open University
- * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ * Defines backup_theme_plugin class
+ *
+ * @package core_backup
+ * @subpackage moodle2
+ * @category backup
+ * @copyright 2011 onwards The Open University
+ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
+defined('MOODLE_INTERNAL') || die();
+
/**
* Base class for theme backup plugins.
*
diff --git a/backup/moodle2/backup_xml_transformer.class.php b/backup/moodle2/backup_xml_transformer.class.php
index f0be3cd6e38..a3770d03528 100644
--- a/backup/moodle2/backup_xml_transformer.class.php
+++ b/backup/moodle2/backup_xml_transformer.class.php
@@ -16,12 +16,17 @@
// 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
+ * Defines backup_xml_transformer class
+ *
+ * @package core_backup
+ * @subpackage moodle2
+ * @category backup
+ * @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();
+
/**
* Class implementing the @xml_contenttrasnformed logic to be applied in moodle2 backups
*
diff --git a/backup/moodle2/restore_activity_task.class.php b/backup/moodle2/restore_activity_task.class.php
index 50f305dbdc2..4872fc09262 100644
--- a/backup/moodle2/restore_activity_task.class.php
+++ b/backup/moodle2/restore_activity_task.class.php
@@ -16,12 +16,17 @@
// 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
+ * Defines restore_activity_task class
+ *
+ * @package core_backup
+ * @subpackage moodle2
+ * @category backup
+ * @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();
+
/**
* abstract activity task that provides all the properties and common tasks to be performed
* when one activity is being restored
diff --git a/backup/moodle2/restore_block_task.class.php b/backup/moodle2/restore_block_task.class.php
index d4715d7bffa..64e5b994698 100644
--- a/backup/moodle2/restore_block_task.class.php
+++ b/backup/moodle2/restore_block_task.class.php
@@ -16,12 +16,17 @@
// 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
+ * Defines restore_block_task class
+ *
+ * @package core_backup
+ * @subpackage moodle2
+ * @category backup
+ * @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();
+
/**
* abstract block task that provides all the properties and common steps to be performed
* when one block is being restored
diff --git a/backup/moodle2/restore_course_task.class.php b/backup/moodle2/restore_course_task.class.php
index 1ab98bf3306..87828b4cbb8 100644
--- a/backup/moodle2/restore_course_task.class.php
+++ b/backup/moodle2/restore_course_task.class.php
@@ -16,12 +16,17 @@
// 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
+ * Defines restore_course_task class
+ *
+ * @package core_backup
+ * @subpackage moodle2
+ * @category backup
+ * @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();
+
/**
* course task that provides all the properties and common steps to be performed
* when one course is being restored
diff --git a/backup/moodle2/restore_coursereport_plugin.class.php b/backup/moodle2/restore_coursereport_plugin.class.php
index 9a94e234d17..af0ebb048b6 100644
--- a/backup/moodle2/restore_coursereport_plugin.class.php
+++ b/backup/moodle2/restore_coursereport_plugin.class.php
@@ -19,10 +19,11 @@ defined('MOODLE_INTERNAL') || die();
/**
* Restore for course plugin: course report.
*
- * @package moodlecore
- * @subpackage backup-moodle2
- * @copyright 2011 The Open University
- * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ * @package core_backup
+ * @subpackage moodle2
+ * @category backup
+ * @copyright 2011 The Open University
+ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
abstract class restore_coursereport_plugin extends restore_plugin {
// Use default parent behaviour
diff --git a/backup/moodle2/restore_default_block_task.class.php b/backup/moodle2/restore_default_block_task.class.php
index c3267a2d0d0..78c35770410 100644
--- a/backup/moodle2/restore_default_block_task.class.php
+++ b/backup/moodle2/restore_default_block_task.class.php
@@ -16,12 +16,17 @@
// 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
+ * Defines restore_default_block_task class
+ *
+ * @package core_backup
+ * @subpackage moodle2
+ * @category backup
+ * @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();
+
/**
* Default block task to restore blocks not having own DB structures to be added
*
diff --git a/backup/moodle2/restore_final_task.class.php b/backup/moodle2/restore_final_task.class.php
index cebf2ea9e11..09a9db32031 100644
--- a/backup/moodle2/restore_final_task.class.php
+++ b/backup/moodle2/restore_final_task.class.php
@@ -16,12 +16,17 @@
// 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
+ * Defines restore_final_task class
+ *
+ * @package core_backup
+ * @subpackage moodle2
+ * @category backup
+ * @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();
+
/**
* Final task that provides all the final steps necessary in order to finish one
* restore like gradebook, interlinks... apart from some final cleaning
diff --git a/backup/moodle2/restore_format_plugin.class.php b/backup/moodle2/restore_format_plugin.class.php
index 454d3a80d74..ce7f030f110 100644
--- a/backup/moodle2/restore_format_plugin.class.php
+++ b/backup/moodle2/restore_format_plugin.class.php
@@ -16,12 +16,17 @@
// along with Moodle. If not, see .
/**
- * @package moodlecore
- * @subpackage backup-moodle2
- * @copyright 2011 onwards Eloy Lafuente (stronk7) {@link http://stronk7.com}
- * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ * Defines restore_format_plugin class
+ *
+ * @package core_backup
+ * @subpackage moodle2
+ * @category backup
+ * @copyright 2011 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();
+
/**
* Class extending standard restore_plugin in order to implement some
* helper methods related with the course formats (format plugin)
diff --git a/backup/moodle2/restore_gradingform_plugin.class.php b/backup/moodle2/restore_gradingform_plugin.class.php
index ff7f9985a34..6caa7dcd3b1 100644
--- a/backup/moodle2/restore_gradingform_plugin.class.php
+++ b/backup/moodle2/restore_gradingform_plugin.class.php
@@ -16,10 +16,12 @@
// along with Moodle. If not, see .
/**
- * @package core
- * @subpackage backup-moodle2
- * @copyright 2011 David Mudrak
- * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ * Defines restore_gradingform_plugin class
+ * @package core_backup
+ * @subpackage moodle2
+ * @category backup
+ * @copyright 2011 David Mudrak
+ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
defined('MOODLE_INTERNAL') || die();
diff --git a/backup/moodle2/restore_plagiarism_plugin.class.php b/backup/moodle2/restore_plagiarism_plugin.class.php
index 039d117b783..6b80a41e7df 100644
--- a/backup/moodle2/restore_plagiarism_plugin.class.php
+++ b/backup/moodle2/restore_plagiarism_plugin.class.php
@@ -16,12 +16,17 @@
// along with Moodle. If not, see .
/**
- * @package moodlecore
- * @subpackage backup-moodle2
- * @copyright 2011 onwards Eloy Lafuente (stronk7) {@link http://stronk7.com}
- * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ * Defines restore_plagiarism_plugin class
+ *
+ * @package core_backup
+ * @subpackage moodle2
+ * @category backup
+ * @copyright 2011 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();
+
/**
* Class extending standard restore_plugin in order to implement some
* helper methods related with the plagiarism plugins
diff --git a/backup/moodle2/restore_plan_builder.class.php b/backup/moodle2/restore_plan_builder.class.php
index 22511ceb703..faf4a1271f2 100644
--- a/backup/moodle2/restore_plan_builder.class.php
+++ b/backup/moodle2/restore_plan_builder.class.php
@@ -16,10 +16,13 @@
// 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
+ * Defines restore_plan_builder class
+ *
+ * @package core_backup
+ * @subpackage moodle2
+ * @category backup
+ * @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();
diff --git a/backup/moodle2/restore_plugin.class.php b/backup/moodle2/restore_plugin.class.php
index 5ed177ea5f5..d85790b6bd0 100644
--- a/backup/moodle2/restore_plugin.class.php
+++ b/backup/moodle2/restore_plugin.class.php
@@ -16,12 +16,17 @@
// 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
+ * Defines restore_plugin class
+ *
+ * @package core_backup
+ * @subpackage moodle2
+ * @category backup
+ * @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();
+
/**
* Class implementing the plugins support for moodle2 restore
*
diff --git a/backup/moodle2/restore_qtype_plugin.class.php b/backup/moodle2/restore_qtype_plugin.class.php
index 42c6c1d9910..40b06ac51a2 100644
--- a/backup/moodle2/restore_qtype_plugin.class.php
+++ b/backup/moodle2/restore_qtype_plugin.class.php
@@ -16,12 +16,17 @@
// 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
+ * Defines restore_qtype_plugin class
+ *
+ * @package core_backup
+ * @subpackage moodle2
+ * @category backup
+ * @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();
+
/**
* Class extending standard restore_plugin in order to implement some
* helper methods related with the questions (qtype plugin)
diff --git a/backup/moodle2/restore_report_plugin.class.php b/backup/moodle2/restore_report_plugin.class.php
index 7db2151b159..bc42c89655f 100644
--- a/backup/moodle2/restore_report_plugin.class.php
+++ b/backup/moodle2/restore_report_plugin.class.php
@@ -19,10 +19,11 @@ defined('MOODLE_INTERNAL') || die();
/**
* Restore for plugin report.
*
- * @package moodlecore
- * @subpackage backup-moodle2
- * @copyright 2011 Petr Skoda
- * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ * @package core_backup
+ * @subpackage moodle2
+ * @category backup
+ * @copyright 2011 Petr Skoda
+ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
abstract class restore_report_plugin extends restore_plugin {
// Use default parent behaviour
diff --git a/backup/moodle2/restore_root_task.class.php b/backup/moodle2/restore_root_task.class.php
index a5163e969a7..ac3f81d823f 100644
--- a/backup/moodle2/restore_root_task.class.php
+++ b/backup/moodle2/restore_root_task.class.php
@@ -16,12 +16,16 @@
// 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
+ * Defines restore_root_task class
+ * @package core_backup
+ * @subpackage moodle2
+ * @category backup
+ * @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();
+
/**
* Start task that provides all the settings common to all restores and other initial steps
*
diff --git a/backup/moodle2/restore_section_task.class.php b/backup/moodle2/restore_section_task.class.php
index 5c03bcb7b85..4efd4e82987 100644
--- a/backup/moodle2/restore_section_task.class.php
+++ b/backup/moodle2/restore_section_task.class.php
@@ -16,12 +16,17 @@
// 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
+ * Defines restore_section_task class
+ *
+ * @package core_backup
+ * @subpackage moodle2
+ * @category backup
+ * @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();
+
/**
* section task that provides all the properties and common steps to be performed
* when one section is being restored
diff --git a/backup/moodle2/restore_settingslib.php b/backup/moodle2/restore_settingslib.php
index 6d8b162609a..6be3cc21830 100644
--- a/backup/moodle2/restore_settingslib.php
+++ b/backup/moodle2/restore_settingslib.php
@@ -16,12 +16,17 @@
// 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
+ * Defines classes used to handle restore settings
+ *
+ * @package core_backup
+ * @subpackage moodle2
+ * @category backup
+ * @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();
+
// TODO: Reduce these to the minimum because ui/dependencies are 100% separated
// Root restore settings
diff --git a/backup/moodle2/restore_stepslib.php b/backup/moodle2/restore_stepslib.php
index acf17be39b0..e62129bf76b 100644
--- a/backup/moodle2/restore_stepslib.php
+++ b/backup/moodle2/restore_stepslib.php
@@ -16,15 +16,16 @@
// 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
+ * Defines various restore steps that will be used by common tasks in restore
+ *
+ * @package core_backup
+ * @subpackage moodle2
+ * @category backup
+ * @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 restore steps that will be used by common tasks in restore
- */
+defined('MOODLE_INTERNAL') || die();
/**
* delete old directories and conditionally create backup_temp_ids table
diff --git a/backup/moodle2/restore_subplugin.class.php b/backup/moodle2/restore_subplugin.class.php
index 8972e358405..bf21779f4fe 100644
--- a/backup/moodle2/restore_subplugin.class.php
+++ b/backup/moodle2/restore_subplugin.class.php
@@ -16,12 +16,17 @@
// 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
+ * Defines restore_subplugin class
+ *
+ * @package core_backup
+ * @subpackage moodle2
+ * @category backup
+ * @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();
+
/**
* Class implementing the subplugins support for moodle2 restore
*
diff --git a/backup/moodle2/restore_theme_plugin.class.php b/backup/moodle2/restore_theme_plugin.class.php
index 84931947dd5..1935d448488 100644
--- a/backup/moodle2/restore_theme_plugin.class.php
+++ b/backup/moodle2/restore_theme_plugin.class.php
@@ -19,10 +19,11 @@ defined('MOODLE_INTERNAL') || die();
/**
* Restore for course plugin: theme.
*
- * @package moodlecore
- * @subpackage backup-moodle2
- * @copyright 2011 The Open University
- * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ * @package core_backup
+ * @subpackage moodle2
+ * @category backup
+ * @copyright 2011 The Open University
+ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
abstract class restore_theme_plugin extends restore_plugin {
// Use default parent behaviour
diff --git a/backup/util/settings/backup_setting.class.php b/backup/util/settings/backup_setting.class.php
index 2d19245fda7..8b6c3f07964 100644
--- a/backup/util/settings/backup_setting.class.php
+++ b/backup/util/settings/backup_setting.class.php
@@ -16,16 +16,18 @@
// along with Moodle. If not, see .
/**
- * @package moodlecore
- * @subpackage backup-settings
- * @copyright 2010 onwards Eloy Lafuente (stronk7) {@link http://stronk7.com}
- * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ * Defines backup_setting class
+ *
+ * @package core_backup
+ * @category backup
+ * @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();
+
/**
- * This abstract class defines one backup_setting
- *
- * TODO: Finish phpdocs
+ * Parent class for all backup settings
*/
abstract class backup_setting extends base_setting implements checksumable {
@@ -35,12 +37,12 @@ abstract class backup_setting extends base_setting implements checksumable {
const SECTION_LEVEL = 9;
const ACTIVITY_LEVEL = 13;
- /**
- * One of the above constants
- * @var {int}
- */
- protected $level; // level of the setting
+ /** @var int Level of the setting, eg {@link self::ROOT_LEVEL} */
+ protected $level;
+ /**
+ * {@inheritdoc}
+ */
public function __construct($name, $vtype, $value = null, $visibility = self::VISIBLE, $status = self::NOT_LOCKED) {
parent::__construct($name, $vtype, $value, $visibility, $status);
// Generate a default ui
@@ -48,9 +50,7 @@ abstract class backup_setting extends base_setting implements checksumable {
}
/**
- * Returns the level of the setting
- *
- * @return {int} One of the above constants
+ * @return int Level of the setting, eg {@link self::ROOT_LEVEL}
*/
public function get_level() {
return $this->level;
@@ -112,7 +112,7 @@ abstract class backup_setting extends base_setting implements checksumable {
}
}
-/*
+/**
* Exception class used by all the @backup_setting stuff
*/
class backup_setting_exception extends base_setting_exception {
diff --git a/backup/util/settings/base_setting.class.php b/backup/util/settings/base_setting.class.php
index 82e6eb1b1d9..558b0c27b90 100644
--- a/backup/util/settings/base_setting.class.php
+++ b/backup/util/settings/base_setting.class.php
@@ -86,6 +86,15 @@ abstract class base_setting {
*/
protected $help = array();
+ /**
+ * Instantiates a setting object
+ *
+ * @param string $name Name of the setting
+ * @param string $vtype Type of the setting, eg {@link self::IS_TEXT}
+ * @param mixed $value Value of the setting
+ * @param bool $visibility Is the setting visible in the UI, eg {@link self::VISIBLE}
+ * @param int $status Status of the setting with regards to the locking, eg {@link self::NOT_LOCKED}
+ */
public function __construct($name, $vtype, $value = null, $visibility = self::VISIBLE, $status = self::NOT_LOCKED) {
// Check vtype
if ($vtype !== self::IS_BOOLEAN && $vtype !== self::IS_INTEGER &&
diff --git a/backup/util/settings/root/root_backup_setting.class.php b/backup/util/settings/root/root_backup_setting.class.php
index 62a0f1740bf..7b459e6f305 100644
--- a/backup/util/settings/root/root_backup_setting.class.php
+++ b/backup/util/settings/root/root_backup_setting.class.php
@@ -16,19 +16,24 @@
// along with Moodle. If not, see .
/**
- * @package moodlecore
- * @subpackage backup-settings
- * @copyright 2010 onwards Eloy Lafuente (stronk7) {@link http://stronk7.com}
- * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ * Defines root_backup_setting class
+ *
+ * @package core_backup
+ * @category backup
+ * @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();
+
/**
* Abstract class containing all the common stuff for root backup settings
- *
- * TODO: Finish phpdocs
*/
abstract class root_backup_setting extends backup_setting {
+ /**
+ * {@inheritdoc}
+ */
public function __construct($name, $vtype, $value = null, $visibility = self::VISIBLE, $status = self::NOT_LOCKED) {
$this->level = self::ROOT_LEVEL;
parent::__construct($name, $vtype, $value, $visibility, $status);
diff --git a/mod/assignment/backup/moodle2/backup_assignment_activity_task.class.php b/mod/assignment/backup/moodle2/backup_assignment_activity_task.class.php
index bbd5a62cf6f..f2e72686d84 100644
--- a/mod/assignment/backup/moodle2/backup_assignment_activity_task.class.php
+++ b/mod/assignment/backup/moodle2/backup_assignment_activity_task.class.php
@@ -16,38 +16,41 @@
// 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
+ * Defines backup_assignment_activity_task class
+ *
+ * @package mod_assignment
+ * @category backup
+ * @copyright 2010 onwards Eloy Lafuente (stronk7) {@link http://stronk7.com}
+ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
-require_once($CFG->dirroot . '/mod/assignment/backup/moodle2/backup_assignment_stepslib.php'); // Because it exists (must)
+defined('MOODLE_INTERNAL') || die();
+
+require_once($CFG->dirroot.'/mod/assignment/backup/moodle2/backup_assignment_stepslib.php');
/**
- * assignment backup task that provides all the settings and steps to perform one
- * complete backup of the activity
+ * Provides the steps to perform one complete backup of the Assignment instance
*/
class backup_assignment_activity_task extends backup_activity_task {
/**
- * Define (add) particular settings this activity can have
+ * No specific settings for this activity
*/
protected function define_my_settings() {
- // No particular settings for this activity
}
/**
- * Define (add) particular steps this activity can have
+ * Defines a backup step to store the instance data in the assignment.xml file
*/
protected function define_my_steps() {
- // Choice only has one structure step
$this->add_step(new backup_assignment_activity_structure_step('assignment_structure', 'assignment.xml'));
}
/**
- * Code the transformations to perform in the activity in
- * order to get transportable (encoded) links
+ * Encodes URLs to the index.php and view.php scripts
+ *
+ * @param string $content some HTML text that eventually contains URLs to the activity instance scripts
+ * @return string the content with the URLs encoded
*/
static public function encode_content_links($content) {
global $CFG;
diff --git a/mod/chat/backup/moodle2/backup_chat_activity_task.class.php b/mod/chat/backup/moodle2/backup_chat_activity_task.class.php
index 99703ce63f7..ca28c630da9 100644
--- a/mod/chat/backup/moodle2/backup_chat_activity_task.class.php
+++ b/mod/chat/backup/moodle2/backup_chat_activity_task.class.php
@@ -16,56 +16,41 @@
// along with Moodle. If not, see .
/**
- * This is the "graphical" structure of the chat mod:
+ * Defines backup_chat_activity_task class
*
- * chat
- * (CL,pk->id)
- * |
- * |
- * |
- * chat_messages
- * (UL,pk->id, fk->chatid)
- *
- * Meaning: pk->primary key field of the table
- * fk->foreign key to link with parent
- * nt->nested field (recursive data)
- * CL->course level info
- * UL->user level info
- *
- * @package moodlecore
- * @subpackage backup-moodle2
- * @copyright 2010 onwards Dongsheng Cai
- * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ * @package mod_chat
+ * @category backup
+ * @copyright 2010 onwards Dongsheng Cai
+ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
-require_once($CFG->dirroot . '/mod/chat/backup/moodle2/backup_chat_stepslib.php'); // Because it exists (must)
+
+defined('MOODLE_INTERNAL') || die();
+
+require_once($CFG->dirroot . '/mod/chat/backup/moodle2/backup_chat_stepslib.php');
/**
- * chat backup task that provides all the settings and steps to perform one
- * complete backup of the activity
+ * Provides the steps to perform one complete backup of the Chat instance
*/
class backup_chat_activity_task extends backup_activity_task {
/**
- * Define (add) particular settings this activity can have
+ * No specific settings for this activity
*/
protected function define_my_settings() {
- // No particular settings for this activity
}
/**
- * Define (add) particular steps this activity can have
+ * Defines a backup step to store the instance data in the chat.xml file
*/
protected function define_my_steps() {
- // chat only has one structure step
$this->add_step(new backup_chat_activity_structure_step('chat_structure', 'chat.xml'));
}
/**
- * Code the transformations to perform in the chat activity in
- * order to get transportable (encoded) links
+ * Encodes URLs to the index.php and view.php scripts
*
- * @param string $content
- * @return string
+ * @param string $content some HTML text that eventually contains URLs to the activity instance scripts
+ * @return string the content with the URLs encoded
*/
static public function encode_content_links($content) {
global $CFG;
diff --git a/mod/choice/backup/moodle2/backup_choice_activity_task.class.php b/mod/choice/backup/moodle2/backup_choice_activity_task.class.php
index b18f89cd647..5270fbfed0e 100644
--- a/mod/choice/backup/moodle2/backup_choice_activity_task.class.php
+++ b/mod/choice/backup/moodle2/backup_choice_activity_task.class.php
@@ -16,39 +16,42 @@
// 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
+ * Defines backup_choice_activity_task class
+ *
+ * @package mod_choice
+ * @category backup
+ * @copyright 2010 onwards Eloy Lafuente (stronk7) {@link http://stronk7.com}
+ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
-require_once($CFG->dirroot . '/mod/choice/backup/moodle2/backup_choice_stepslib.php'); // Because it exists (must)
-require_once($CFG->dirroot . '/mod/choice/backup/moodle2/backup_choice_settingslib.php'); // Because it exists (optional)
+defined('MOODLE_INTERNAL') || die();
+
+require_once($CFG->dirroot . '/mod/choice/backup/moodle2/backup_choice_stepslib.php');
+require_once($CFG->dirroot . '/mod/choice/backup/moodle2/backup_choice_settingslib.php');
/**
- * choice backup task that provides all the settings and steps to perform one
- * complete backup of the activity
+ * Provides the steps to perform one complete backup of the Choice instance
*/
class backup_choice_activity_task extends backup_activity_task {
/**
- * Define (add) particular settings this activity can have
+ * No specific settings for this activity
*/
protected function define_my_settings() {
- // No particular settings for this activity
}
/**
- * Define (add) particular steps this activity can have
+ * Defines a backup step to store the instance data in the choice.xml file
*/
protected function define_my_steps() {
- // Choice only has one structure step
$this->add_step(new backup_choice_activity_structure_step('choice_structure', 'choice.xml'));
}
/**
- * Code the transformations to perform in the activity in
- * order to get transportable (encoded) links
+ * Encodes URLs to the index.php and view.php scripts
+ *
+ * @param string $content some HTML text that eventually contains URLs to the activity instance scripts
+ * @return string the content with the URLs encoded
*/
static public function encode_content_links($content) {
global $CFG;
diff --git a/mod/data/backup/moodle2/backup_data_activity_task.class.php b/mod/data/backup/moodle2/backup_data_activity_task.class.php
index e0802e75b5d..f19222d64ac 100644
--- a/mod/data/backup/moodle2/backup_data_activity_task.class.php
+++ b/mod/data/backup/moodle2/backup_data_activity_task.class.php
@@ -16,38 +16,41 @@
// 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
+ * Defines backup_data_activity_task
+ *
+ * @package mod_data
+ * @category backup
+ * @copyright 2010 onwards Eloy Lafuente (stronk7) {@link http://stronk7.com}
+ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
-require_once($CFG->dirroot . '/mod/data/backup/moodle2/backup_data_stepslib.php'); // Because it exists (must)
+defined('MOODLE_INTERNAL') || die();
+
+require_once($CFG->dirroot . '/mod/data/backup/moodle2/backup_data_stepslib.php');
/**
- * data backup task that provides all the settings and steps to perform one
- * complete backup of the activity
+ * Provides the steps to perform one complete backup of the Database instance
*/
class backup_data_activity_task extends backup_activity_task {
/**
- * Define (add) particular settings this activity can have
+ * No specific settings for this activity
*/
protected function define_my_settings() {
- // No particular settings for this activity
}
/**
- * Define (add) particular steps this activity can have
+ * Defines a backup step to store the instance data in the data.xml file
*/
protected function define_my_steps() {
- // Data only has one structure step
$this->add_step(new backup_data_activity_structure_step('data_structure', 'data.xml'));
}
/**
- * Code the transformations to perform in the activity in
- * order to get transportable (encoded) links
+ * Encodes URLs to the index.php and view.php scripts
+ *
+ * @param string $content some HTML text that eventually contains URLs to the activity instance scripts
+ * @return string the content with the URLs encoded
*/
static public function encode_content_links($content) {
global $CFG;
diff --git a/mod/feedback/backup/moodle2/backup_feedback_activity_task.class.php b/mod/feedback/backup/moodle2/backup_feedback_activity_task.class.php
index 7fd8ceb82fc..3fd9bdaaeea 100644
--- a/mod/feedback/backup/moodle2/backup_feedback_activity_task.class.php
+++ b/mod/feedback/backup/moodle2/backup_feedback_activity_task.class.php
@@ -1,4 +1,5 @@
.
/**
- * @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
+ * Defines backup_feedback_activity_task class
+ *
+ * @package mod_feedback
+ * @category backup
+ * @copyright 2010 onwards Eloy Lafuente (stronk7) {@link http://stronk7.com}
+ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
-require_once($CFG->dirroot . '/mod/feedback/backup/moodle2/backup_feedback_stepslib.php'); // Because it exists (must)
-require_once($CFG->dirroot . '/mod/feedback/backup/moodle2/backup_feedback_settingslib.php'); // Because it exists (optional)
+defined('MOODLE_INTERNAL') || die();
+
+require_once($CFG->dirroot . '/mod/feedback/backup/moodle2/backup_feedback_stepslib.php');
+require_once($CFG->dirroot . '/mod/feedback/backup/moodle2/backup_feedback_settingslib.php');
/**
- * feedback backup task that provides all the settings and steps to perform one
- * complete backup of the activity
+ * Provides the steps to perform one complete backup of the Feedback instance
*/
class backup_feedback_activity_task extends backup_activity_task {
/**
- * Define (add) particular settings this activity can have
+ * No specific settings for this activity
*/
protected function define_my_settings() {
- // No particular settings for this activity
}
/**
- * Define (add) particular steps this activity can have
+ * Defines a backup step to store the instance data in the feedback.xml file
*/
protected function define_my_steps() {
// feedback only has one structure step
@@ -46,8 +49,10 @@ class backup_feedback_activity_task extends backup_activity_task {
}
/**
- * Code the transformations to perform in the activity in
- * order to get transportable (encoded) links
+ * Encodes URLs to the index.php and view.php scripts
+ *
+ * @param string $content some HTML text that eventually contains URLs to the activity instance scripts
+ * @return string the content with the URLs encoded
*/
static public function encode_content_links($content) {
global $CFG;
diff --git a/mod/folder/backup/moodle2/backup_folder_activity_task.class.php b/mod/folder/backup/moodle2/backup_folder_activity_task.class.php
index 004382e70cf..8c6e636055e 100644
--- a/mod/folder/backup/moodle2/backup_folder_activity_task.class.php
+++ b/mod/folder/backup/moodle2/backup_folder_activity_task.class.php
@@ -16,40 +16,41 @@
// along with Moodle. If not, see .
/**
- * @package mod
- * @subpackage folder
- * @copyright 2010 onwards Eloy Lafuente (stronk7) {@link http://stronk7.com}
- * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ * Defines backup_folder_activity_task class
+ *
+ * @package mod_folder
+ * @category backup
+ * @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/folder/backup/moodle2/backup_folder_stepslib.php'); // Because it exists (must)
+require_once($CFG->dirroot . '/mod/folder/backup/moodle2/backup_folder_stepslib.php');
/**
- * folder backup task that provides all the settings and steps to perform one
- * complete backup of the activity
+ * Provides the steps to perform one complete backup of the Folder instance
*/
class backup_folder_activity_task extends backup_activity_task {
/**
- * Define (add) particular settings this activity can have
+ * No specific settings for this activity
*/
protected function define_my_settings() {
- // No particular settings for this activity
}
/**
- * Define (add) particular steps this activity can have
+ * Defines a backup step to store the instance data in the folder.xml file
*/
protected function define_my_steps() {
- // Choice only has one structure step
$this->add_step(new backup_folder_activity_structure_step('folder_structure', 'folder.xml'));
}
/**
- * Code the transformations to perform in the activity in
- * order to get transportable (encoded) links
+ * Encodes URLs to the index.php and view.php scripts
+ *
+ * @param string $content some HTML text that eventually contains URLs to the activity instance scripts
+ * @return string the content with the URLs encoded
*/
static public function encode_content_links($content) {
global $CFG;
diff --git a/mod/forum/backup/moodle2/backup_forum_activity_task.class.php b/mod/forum/backup/moodle2/backup_forum_activity_task.class.php
index ab6c15b3f13..b9bca84c340 100644
--- a/mod/forum/backup/moodle2/backup_forum_activity_task.class.php
+++ b/mod/forum/backup/moodle2/backup_forum_activity_task.class.php
@@ -16,39 +16,42 @@
// 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
+ * Defines backup_forum_activity_task class
+ *
+ * @package mod_forum
+ * @category backup
+ * @copyright 2010 onwards Eloy Lafuente (stronk7) {@link http://stronk7.com}
+ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
-require_once($CFG->dirroot . '/mod/forum/backup/moodle2/backup_forum_stepslib.php'); // Because it exists (must)
-require_once($CFG->dirroot . '/mod/forum/backup/moodle2/backup_forum_settingslib.php'); // Because it exists (optional)
+defined('MOODLE_INTERNAL') || die();
+
+require_once($CFG->dirroot . '/mod/forum/backup/moodle2/backup_forum_stepslib.php');
+require_once($CFG->dirroot . '/mod/forum/backup/moodle2/backup_forum_settingslib.php');
/**
- * forum backup task that provides all the settings and steps to perform one
- * complete backup of the activity
+ * Provides the steps to perform one complete backup of the Forum instance
*/
class backup_forum_activity_task extends backup_activity_task {
/**
- * Define (add) particular settings this activity can have
+ * No specific settings for this activity
*/
protected function define_my_settings() {
- // No particular settings for this activity
}
/**
- * Define (add) particular steps this activity can have
+ * Defines a backup step to store the instance data in the forum.xml file
*/
protected function define_my_steps() {
- // Forum only has one structure step
$this->add_step(new backup_forum_activity_structure_step('forum structure', 'forum.xml'));
}
/**
- * Code the transformations to perform in the activity in
- * order to get transportable (encoded) links
+ * Encodes URLs to the index.php, view.php and discuss.php scripts
+ *
+ * @param string $content some HTML text that eventually contains URLs to the activity instance scripts
+ * @return string the content with the URLs encoded
*/
static public function encode_content_links($content) {
global $CFG;
diff --git a/mod/glossary/backup/moodle2/backup_glossary_activity_task.class.php b/mod/glossary/backup/moodle2/backup_glossary_activity_task.class.php
index b57fbb8593a..89e0ce000b3 100644
--- a/mod/glossary/backup/moodle2/backup_glossary_activity_task.class.php
+++ b/mod/glossary/backup/moodle2/backup_glossary_activity_task.class.php
@@ -16,38 +16,41 @@
// 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
+ * Defines backup_glossary_activity_task class
+ *
+ * @package mod_glossary
+ * @category backup
+ * @copyright 2010 onwards Eloy Lafuente (stronk7) {@link http://stronk7.com}
+ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
-require_once($CFG->dirroot . '/mod/glossary/backup/moodle2/backup_glossary_stepslib.php'); // Because it exists (must)
+defined('MOODLE_INTERNAL') || die();
+
+require_once($CFG->dirroot . '/mod/glossary/backup/moodle2/backup_glossary_stepslib.php');
/**
- * glossary backup task that provides all the settings and steps to perform one
- * complete backup of the activity
+ * Provides the steps to perform one complete backup of the Glossary instance
*/
class backup_glossary_activity_task extends backup_activity_task {
/**
- * Define (add) particular settings this activity can have
+ * No specific settings for this activity
*/
protected function define_my_settings() {
- // No particular settings for this activity
}
/**
- * Define (add) particular steps this activity can have
+ * Defines a backup step to store the instance data in the glossary.xml file
*/
protected function define_my_steps() {
- // Choice only has one structure step
$this->add_step(new backup_glossary_activity_structure_step('glossary_structure', 'glossary.xml'));
}
/**
- * Code the transformations to perform in the activity in
- * order to get transportable (encoded) links
+ * Encodes URLs to the index.php and view.php scripts
+ *
+ * @param string $content some HTML text that eventually contains URLs to the activity instance scripts
+ * @return string the content with the URLs encoded
*/
static public function encode_content_links($content) {
global $CFG;
diff --git a/mod/imscp/backup/moodle2/backup_imscp_activity_task.class.php b/mod/imscp/backup/moodle2/backup_imscp_activity_task.class.php
index 05a5905068d..a19fc0a331a 100644
--- a/mod/imscp/backup/moodle2/backup_imscp_activity_task.class.php
+++ b/mod/imscp/backup/moodle2/backup_imscp_activity_task.class.php
@@ -16,40 +16,41 @@
// along with Moodle. If not, see .
/**
- * @package mod
- * @subpackage imscp
- * @copyright 2010 onwards Eloy Lafuente (stronk7) {@link http://stronk7.com}
- * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ * Defines backup_imscp_activity_task class
+ *
+ * @package mod_imscp
+ * @category backup
+ * @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/imscp/backup/moodle2/backup_imscp_stepslib.php'); // Because it exists (must)
+require_once($CFG->dirroot . '/mod/imscp/backup/moodle2/backup_imscp_stepslib.php');
/**
- * imscp backup task that provides all the settings and steps to perform one
- * complete backup of the activity
+ * Provides the steps to perform one complete backup of the IMSCP instance
*/
class backup_imscp_activity_task extends backup_activity_task {
/**
- * Define (add) particular settings this activity can have
+ * No specific settings for this activity
*/
protected function define_my_settings() {
- // No particular settings for this activity
}
/**
- * Define (add) particular steps this activity can have
+ * Defines a backup step to store the instance data in the imscp.xml file
*/
protected function define_my_steps() {
- // Choice only has one structure step
$this->add_step(new backup_imscp_activity_structure_step('imscp_structure', 'imscp.xml'));
}
/**
- * Code the transformations to perform in the activity in
- * order to get transportable (encoded) links
+ * Encodes URLs to the index.php and view.php scripts
+ *
+ * @param string $content some HTML text that eventually contains URLs to the activity instance scripts
+ * @return string the content with the URLs encoded
*/
static public function encode_content_links($content) {
global $CFG;
diff --git a/mod/label/backup/moodle2/backup_label_activity_task.class.php b/mod/label/backup/moodle2/backup_label_activity_task.class.php
index d13506551d6..5e7533bc84c 100644
--- a/mod/label/backup/moodle2/backup_label_activity_task.class.php
+++ b/mod/label/backup/moodle2/backup_label_activity_task.class.php
@@ -16,40 +16,41 @@
// along with Moodle. If not, see .
/**
- * @package mod
- * @subpackage label
- * @copyright 2010 onwards Eloy Lafuente (stronk7) {@link http://stronk7.com}
- * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ * Defines backup_label_activity_task class
+ *
+ * @package mod_label
+ * @category backup
+ * @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/label/backup/moodle2/backup_label_stepslib.php'); // Because it exists (must)
+require_once($CFG->dirroot . '/mod/label/backup/moodle2/backup_label_stepslib.php');
/**
- * label backup task that provides all the settings and steps to perform one
- * complete backup of the activity
+ * Provides the steps to perform one complete backup of the Label instance
*/
class backup_label_activity_task extends backup_activity_task {
/**
- * Define (add) particular settings this activity can have
+ * No specific settings for this activity
*/
protected function define_my_settings() {
- // No particular settings for this activity
}
/**
- * Define (add) particular steps this activity can have
+ * Defines a backup step to store the instance data in the label.xml file
*/
protected function define_my_steps() {
- // Choice only has one structure step
$this->add_step(new backup_label_activity_structure_step('label_structure', 'label.xml'));
}
/**
- * Code the transformations to perform in the activity in
- * order to get transportable (encoded) links
+ * No content encoding needed for this activity
+ *
+ * @param string $content some HTML text that eventually contains URLs to the activity instance scripts
+ * @return string the same content with no changes
*/
static public function encode_content_links($content) {
return $content;
diff --git a/mod/lesson/backup/moodle2/backup_lesson_activity_task.class.php b/mod/lesson/backup/moodle2/backup_lesson_activity_task.class.php
index 0d8d9dd3189..40d0dbdae8e 100644
--- a/mod/lesson/backup/moodle2/backup_lesson_activity_task.class.php
+++ b/mod/lesson/backup/moodle2/backup_lesson_activity_task.class.php
@@ -18,38 +18,42 @@
/**
* This file contains the backup task for the lesson module
*
- * @package mod
- * @subpackage lesson
- * @copyright 2010 Sam Hemelryk
- * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ * @package mod_lesson
+ * @category backup
+ * @copyright 2010 Sam Hemelryk
+ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
-/**
- * Require the backup lesson steps lib
- */
+defined('MOODLE_INTERNAL') || die();
+
require_once($CFG->dirroot . '/mod/lesson/backup/moodle2/backup_lesson_stepslib.php');
/**
- * The backup task class for the lesson module
+ * Provides the steps to perform one complete backup of the Lesson instance
+ *
* @copyright 2010 Sam Hemelryk
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class backup_lesson_activity_task extends backup_activity_task {
+ /**
+ * No specific settings for this activity
+ */
protected function define_my_settings() {
- // There are no settings
}
+ /**
+ * Defines a backup step to store the instance data in the lesson.xml file
+ */
protected function define_my_steps() {
$this->add_step(new backup_lesson_activity_structure_step('lesson structure', 'lesson.xml'));
}
/**
- * Replaces links within the content with links that can be corrected during
- * restore
+ * Encodes URLs to various Lesson scripts
*
- * @param string $content
- * @return string
+ * @param string $content some HTML text that eventually contains URLs to the activity instance scripts
+ * @return string the content with the URLs encoded
*/
static public function encode_content_links($content) {
global $CFG;
@@ -104,5 +108,4 @@ class backup_lesson_activity_task extends backup_activity_task {
// Return the now encoded content
return $content;
}
-
}
diff --git a/mod/lti/backup/moodle2/backup_lti_activity_task.class.php b/mod/lti/backup/moodle2/backup_lti_activity_task.class.php
index d4b6803ac0a..1c00c4e6692 100644
--- a/mod/lti/backup/moodle2/backup_lti_activity_task.class.php
+++ b/mod/lti/backup/moodle2/backup_lti_activity_task.class.php
@@ -33,17 +33,16 @@
// Contact info: Marc Alier Forment granludo @ gmail.com or marc.alier @ upc.edu
/**
- * This file contains the lti module backup class
+ * Defines backup_lti_activity_task class
*
- * @package mod
- * @subpackage lti
- * @copyright 2009 Marc Alier, Jordi Piguillem, Nikolas Galanis
- * marc.alier@upc.edu
- * @copyright 2009 Universitat Politecnica de Catalunya http://www.upc.edu
- * @author Marc Alier
- * @author Jordi Piguillem
- * @author Nikolas Galanis
- * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ * @package mod_lti
+ * @category backup
+ * @copyright 2009 Marc Alier , Jordi Piguillem, Nikolas Galanis
+ * @copyright 2009 Universitat Politecnica de Catalunya http://www.upc.edu
+ * @author Marc Alier
+ * @author Jordi Piguillem
+ * @author Nikolas Galanis
+ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
defined('MOODLE_INTERNAL') || die;
@@ -51,29 +50,28 @@ defined('MOODLE_INTERNAL') || die;
require_once($CFG->dirroot . '/mod/lti/backup/moodle2/backup_lti_stepslib.php');
/**
- * lti backup task that provides all the settings and steps to perform one
- * complete backup of the module
+ * Provides the steps to perform one complete backup of the LTI instance
*/
class backup_lti_activity_task extends backup_activity_task {
/**
- * Define (add) particular settings this activity can have
+ * No specific settings for this activity
*/
protected function define_my_settings() {
- // No particular settings for this activity
}
/**
- * Define (add) particular steps this activity can have
+ * Defines a backup step to store the instance data in the lti.xml file
*/
protected function define_my_steps() {
- // Choice only has one structure step
$this->add_step(new backup_lti_activity_structure_step('lti_structure', 'lti.xml'));
}
/**
- * Code the transformations to perform in the activity in
- * order to get transportable (encoded) links
+ * Encodes URLs to the index.php and view.php scripts
+ *
+ * @param string $content some HTML text that eventually contains URLs to the activity instance scripts
+ * @return string the content with the URLs encoded
*/
static public function encode_content_links($content) {
global $CFG;
diff --git a/mod/page/backup/moodle2/backup_page_activity_task.class.php b/mod/page/backup/moodle2/backup_page_activity_task.class.php
index 16637b61268..3ad67485f31 100644
--- a/mod/page/backup/moodle2/backup_page_activity_task.class.php
+++ b/mod/page/backup/moodle2/backup_page_activity_task.class.php
@@ -16,40 +16,41 @@
// along with Moodle. If not, see .
/**
- * @package mod
- * @subpackage page
- * @copyright 2010 onwards Eloy Lafuente (stronk7) {@link http://stronk7.com}
- * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ * Defines backup_page_activity_task class
+ *
+ * @package mod_page
+ * @category backup
+ * @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/page/backup/moodle2/backup_page_stepslib.php'); // Because it exists (must)
+require_once($CFG->dirroot . '/mod/page/backup/moodle2/backup_page_stepslib.php');
/**
- * page backup task that provides all the settings and steps to perform one
- * complete backup of the activity
+ * Provides the steps to perform one complete backup of the Page instance
*/
class backup_page_activity_task extends backup_activity_task {
/**
- * Define (add) particular settings this activity can have
+ * No specific settings for this activity
*/
protected function define_my_settings() {
- // No particular settings for this activity
}
/**
- * Define (add) particular steps this activity can have
+ * Defines a backup step to store the instance data in the page.xml file
*/
protected function define_my_steps() {
- // Choice only has one structure step
$this->add_step(new backup_page_activity_structure_step('page_structure', 'page.xml'));
}
/**
- * Code the transformations to perform in the activity in
- * order to get transportable (encoded) links
+ * Encodes URLs to the index.php and view.php scripts
+ *
+ * @param string $content some HTML text that eventually contains URLs to the activity instance scripts
+ * @return string the content with the URLs encoded
*/
static public function encode_content_links($content) {
global $CFG;
diff --git a/mod/quiz/backup/moodle2/backup_quiz_activity_task.class.php b/mod/quiz/backup/moodle2/backup_quiz_activity_task.class.php
index e5092f4b42f..0acf1be07a6 100644
--- a/mod/quiz/backup/moodle2/backup_quiz_activity_task.class.php
+++ b/mod/quiz/backup/moodle2/backup_quiz_activity_task.class.php
@@ -15,21 +15,20 @@
// 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
+ * Defines backup_quiz_activity_task class
+ *
+ * @package mod_quiz
+ * @category backup
+ * @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/quiz/backup/moodle2/backup_quiz_stepslib.php');
-
/**
- * quiz backup task that provides all the settings and steps to perform one
- * complete backup of the activity
+ * Provides the steps to perform one complete backup of the Quiz instance
*
* @copyright 2010 onwards Eloy Lafuente (stronk7) {@link http://stronk7.com}
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
@@ -37,14 +36,13 @@ require_once($CFG->dirroot . '/mod/quiz/backup/moodle2/backup_quiz_stepslib.php'
class backup_quiz_activity_task extends backup_activity_task {
/**
- * Define (add) particular settings this activity can have
+ * No specific settings for this activity
*/
protected function define_my_settings() {
- // No particular settings for this activity
}
/**
- * Define (add) particular steps this activity can have
+ * Defines backup steps to store the instance data and required questions
*/
protected function define_my_steps() {
// Generate the quiz.xml file containing all the quiz information
@@ -67,8 +65,10 @@ class backup_quiz_activity_task extends backup_activity_task {
}
/**
- * Code the transformations to perform in the activity in
- * order to get transportable (encoded) links
+ * Encodes URLs to the index.php and view.php scripts
+ *
+ * @param string $content some HTML text that eventually contains URLs to the activity instance scripts
+ * @return string the content with the URLs encoded
*/
public static function encode_content_links($content) {
global $CFG;
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 d92ff642e59..4a28b44e40d 100644
--- a/mod/resource/backup/moodle2/backup_resource_activity_task.class.php
+++ b/mod/resource/backup/moodle2/backup_resource_activity_task.class.php
@@ -16,40 +16,41 @@
// along with Moodle. If not, see .
/**
- * @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
+ * Defines backup_resource_activity_task class
+ *
+ * @package mod_resource
+ * @category backup
+ * @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)
+require_once($CFG->dirroot . '/mod/resource/backup/moodle2/backup_resource_stepslib.php');
/**
- * resource backup task that provides all the settings and steps to perform one
- * complete backup of the activity
+ * Provides the steps to perform one complete backup of the Resource instance
*/
class backup_resource_activity_task extends backup_activity_task {
/**
- * Define (add) particular settings this activity can have
+ * No specific settings for this activity
*/
protected function define_my_settings() {
- // No particular settings for this activity
}
/**
- * Define (add) particular steps this activity can have
+ * Defines a backup step to store the instance data in the resource.xml file
*/
protected function define_my_steps() {
- // Choice only has one structure step
$this->add_step(new backup_resource_activity_structure_step('resource_structure', 'resource.xml'));
}
/**
- * Code the transformations to perform in the activity in
- * order to get transportable (encoded) links
+ * Encodes URLs to the index.php and view.php scripts
+ *
+ * @param string $content some HTML text that eventually contains URLs to the activity instance scripts
+ * @return string the content with the URLs encoded
*/
static public function encode_content_links($content) {
global $CFG;
diff --git a/mod/scorm/backup/moodle2/backup_scorm_activity_task.class.php b/mod/scorm/backup/moodle2/backup_scorm_activity_task.class.php
index da537f8bcd4..e6e8c022ca2 100644
--- a/mod/scorm/backup/moodle2/backup_scorm_activity_task.class.php
+++ b/mod/scorm/backup/moodle2/backup_scorm_activity_task.class.php
@@ -15,38 +15,41 @@
// 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
+ * Defines backup_scorm_activity_task class
+ *
+ * @package mod_scorm
+ * @category backup
+ * @copyright 2010 onwards Eloy Lafuente (stronk7) {@link http://stronk7.com}
+ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
-require_once($CFG->dirroot . '/mod/scorm/backup/moodle2/backup_scorm_stepslib.php'); // Because it exists (must)
+defined('MOODLE_INTERNAL') || die();
+
+require_once($CFG->dirroot . '/mod/scorm/backup/moodle2/backup_scorm_stepslib.php');
/**
- * scorm backup task that provides all the settings and steps to perform one
- * complete backup of the activity
+ * Provides the steps to perform one complete backup of the SCORM instance
*/
class backup_scorm_activity_task extends backup_activity_task {
/**
- * Define (add) particular settings this activity can have
+ * No specific settings for this activity
*/
protected function define_my_settings() {
- // No particular settings for this activity
}
/**
- * Define (add) particular steps this activity can have
+ * Defines a backup step to store the instance data in the scorm.xml file
*/
protected function define_my_steps() {
- // SCORM only has one structure step
$this->add_step(new backup_scorm_activity_structure_step('scorm_structure', 'scorm.xml'));
}
/**
- * Code the transformations to perform in the activity in
- * order to get transportable (encoded) links
+ * Encodes URLs to the index.php and view.php scripts
+ *
+ * @param string $content some HTML text that eventually contains URLs to the activity instance scripts
+ * @return string the content with the URLs encoded
*/
static public function encode_content_links($content) {
global $CFG;
diff --git a/mod/survey/backup/moodle2/backup_survey_activity_task.class.php b/mod/survey/backup/moodle2/backup_survey_activity_task.class.php
index 6a8dd697dc3..8f66bd8e732 100644
--- a/mod/survey/backup/moodle2/backup_survey_activity_task.class.php
+++ b/mod/survey/backup/moodle2/backup_survey_activity_task.class.php
@@ -16,38 +16,41 @@
// 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
+ * Defines backup_survey_activity_task class
+ *
+ * @package mod_survey
+ * @category backup
+ * @copyright 2010 onwards Eloy Lafuente (stronk7) {@link http://stronk7.com}
+ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
-require_once($CFG->dirroot . '/mod/survey/backup/moodle2/backup_survey_stepslib.php'); // Because it exists (must)
+defined('MOODLE_INTERNAL') || die();
+
+require_once($CFG->dirroot . '/mod/survey/backup/moodle2/backup_survey_stepslib.php');
/**
- * survey backup task that provides all the settings and steps to perform one
- * complete backup of the activity
+ * Provides all the settings and steps to perform one complete backup of the activity
*/
class backup_survey_activity_task extends backup_activity_task {
/**
- * Define (add) particular settings this activity can have
+ * No specific settings for this activity
*/
protected function define_my_settings() {
- // No particular settings for this activity
}
/**
- * Define (add) particular steps this activity can have
+ * Defines a backup step to store the instance data in the survey.xml file
*/
protected function define_my_steps() {
- // Choice only has one structure step
$this->add_step(new backup_survey_activity_structure_step('survey_structure', 'survey.xml'));
}
/**
- * Code the transformations to perform in the activity in
- * order to get transportable (encoded) links
+ * Encodes URLs to the index.php and view.php scripts
+ *
+ * @param string $content some HTML text that eventually contains URLs to the activity instance scripts
+ * @return string the content with the URLs encoded
*/
static public function encode_content_links($content) {
global $CFG;
diff --git a/mod/url/backup/moodle2/backup_url_activity_task.class.php b/mod/url/backup/moodle2/backup_url_activity_task.class.php
index 8ebb801dbd2..de1ff7c110f 100644
--- a/mod/url/backup/moodle2/backup_url_activity_task.class.php
+++ b/mod/url/backup/moodle2/backup_url_activity_task.class.php
@@ -16,43 +16,41 @@
// along with Moodle. If not, see .
/**
- * @package mod
- * @subpackage url
- * @copyright 2010 onwards Andrew Davis
- * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ * Defines backup_url_activity_task class
+ *
+ * @package mod_url
+ * @category backup
+ * @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)
+require_once($CFG->dirroot . '/mod/url/backup/moodle2/backup_url_stepslib.php');
/**
- * URL backup task that provides all the settings and steps to perform one
- * complete backup of the activity
+ * 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
+ * No specific settings for this activity
*/
protected function define_my_settings() {
- // No particular settings for this activity
}
/**
- * Define (add) particular steps this activity can have
+ * Defines a backup step to store the instance data in the url.xml file
*/
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
+ * Encodes URLs to the index.php and view.php scripts
+ *
+ * @param string $content some HTML text that eventually contains URLs to the activity instance scripts
+ * @return string the content with the URLs encoded
*/
static public function encode_content_links($content) {
global $CFG;
diff --git a/mod/wiki/backup/moodle2/backup_wiki_activity_task.class.php b/mod/wiki/backup/moodle2/backup_wiki_activity_task.class.php
index 09062a9efd2..fd44b98c955 100644
--- a/mod/wiki/backup/moodle2/backup_wiki_activity_task.class.php
+++ b/mod/wiki/backup/moodle2/backup_wiki_activity_task.class.php
@@ -1,32 +1,57 @@
dirroot . '/mod/wiki/backup/moodle2/backup_wiki_stepslib.php'); // Because it exists (must)
-require_once($CFG->dirroot . '/mod/wiki/backup/moodle2/backup_wiki_settingslib.php'); // Because it exists (optional)
+// This file is part of Moodle - http://moodle.org/
+//
+// Moodle is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// Moodle is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with Moodle. If not, see .
/**
- * wiki backup task that provides all the settings and steps to perform one
- * complete backup of the activity
+ * Defines backup_wiki_activity_task class
+ *
+ * @package mod_wiki
+ * @category backup
+ * @copyright 2010 Jordi Piguillem
+ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ */
+
+defined('MOODLE_INTERNAL') || die();
+
+require_once($CFG->dirroot . '/mod/wiki/backup/moodle2/backup_wiki_stepslib.php');
+require_once($CFG->dirroot . '/mod/wiki/backup/moodle2/backup_wiki_settingslib.php');
+
+/**
+ * Provides all the settings and steps to perform one complete backup of the activity
*/
class backup_wiki_activity_task extends backup_activity_task {
/**
- * Define (add) particular settings this activity can have
+ * No specific settings for this activity
*/
protected function define_my_settings() {
- // No particular settings for this activity
- }
+ }
/**
- * Define (add) particular steps this activity can have
+ * Defines a backup step to store the instance data in the wiki.xml file
*/
protected function define_my_steps() {
- // Wiki only has one structure step
$this->add_step(new backup_wiki_activity_structure_step('wiki_structure', 'wiki.xml'));
}
/**
- * Code the transformations to perform in the activity in
- * order to get transportable (encoded) links
+ * Encodes URLs to the index.php and view.php scripts
+ *
+ * @param string $content some HTML text that eventually contains URLs to the activity instance scripts
+ * @return string the content with the URLs encoded
*/
static public function encode_content_links($content) {
global $CFG;
diff --git a/mod/workshop/backup/moodle2/backup_workshop_activity_task.class.php b/mod/workshop/backup/moodle2/backup_workshop_activity_task.class.php
index 7f6398c365b..c9edbe76c54 100644
--- a/mod/workshop/backup/moodle2/backup_workshop_activity_task.class.php
+++ b/mod/workshop/backup/moodle2/backup_workshop_activity_task.class.php
@@ -16,12 +16,12 @@
// along with Moodle. If not, see .
/**
- * Class {@link backup_workshop_activity_task} definition
+ * Defines {@link backup_workshop_activity_task} class
*
- * @package mod
- * @subpackage workshop
- * @copyright 2010 David Mudrak
- * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ * @package mod_workshop
+ * @category backup
+ * @copyright 2010 David Mudrak
+ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
defined('MOODLE_INTERNAL') || die();
@@ -35,22 +35,23 @@ require_once($CFG->dirroot . '/mod/workshop/backup/moodle2/backup_workshop_steps
class backup_workshop_activity_task extends backup_activity_task {
/**
- * Define (add) particular settings this activity can have
+ * No specific settings for this activity
*/
protected function define_my_settings() {
- // No particular settings for this activity
}
/**
- * Define (add) particular steps this activity can have
+ * Defines a backup step to store the instance data in the workshop.xml file
*/
protected function define_my_steps() {
$this->add_step(new backup_workshop_activity_structure_step('workshop_structure', 'workshop.xml'));
}
/**
- * Code the transformations to perform in the activity in
- * order to get transportable (encoded) links
+ * Encodes URLs to the index.php and view.php scripts
+ *
+ * @param string $content some HTML text that eventually contains URLs to the activity instance scripts
+ * @return string the content with the URLs encoded
*/
static public function encode_content_links($content) {
global $CFG;
diff --git a/mod/workshop/backup/moodle2/backup_workshop_settingslib.php b/mod/workshop/backup/moodle2/backup_workshop_settingslib.php
index 5214e82d851..87689fb1bea 100644
--- a/mod/workshop/backup/moodle2/backup_workshop_settingslib.php
+++ b/mod/workshop/backup/moodle2/backup_workshop_settingslib.php
@@ -21,10 +21,10 @@
* Workshop has no particular settings but the inherited from the generic
* {@link backup_activity_task}.
*
- * @package mod
- * @subpackage workshop
- * @copyright 2010 David Mudrak
- * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ * @package mod_workshop
+ * @category backup
+ * @copyright 2010 David Mudrak
+ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
defined('MOODLE_INTERNAL') || die();
diff --git a/mod/workshop/backup/moodle2/backup_workshop_stepslib.php b/mod/workshop/backup/moodle2/backup_workshop_stepslib.php
index f2a6273bd80..26e6adf84cc 100644
--- a/mod/workshop/backup/moodle2/backup_workshop_stepslib.php
+++ b/mod/workshop/backup/moodle2/backup_workshop_stepslib.php
@@ -18,10 +18,10 @@
/**
* Defines all the backup steps that will be used by {@link backup_workshop_activity_task}
*
- * @package mod
- * @subpackage workshop
- * @copyright 2010 David Mudrak
- * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ * @package mod_workshop
+ * @category backup
+ * @copyright 2010 David Mudrak
+ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
defined('MOODLE_INTERNAL') || die();
@@ -29,10 +29,15 @@ defined('MOODLE_INTERNAL') || die();
/**
* Defines the complete workshop structure for backup, with file and id annotations
*
- * @see http://docs.moodle.org/dev/Workshop for XML structure diagram
+ * @link http://docs.moodle.org/dev/Workshop for XML structure diagram
*/
class backup_workshop_activity_structure_step extends backup_activity_structure_step {
+ /**
+ * Defines the structure of the 'workshop' element inside the workshop.xml file
+ *
+ * @return backup_nested_element
+ */
protected function define_structure() {
// are we including userinfo?