From 63baccbc544460192a309fb1cb8d5edaaf02499a Mon Sep 17 00:00:00 2001 From: David Mudrak Date: Thu, 12 Jan 2012 18:32:26 +0100 Subject: [PATCH] MDL-30982 Improving phpDocs for the classes that extend backup_activity_task --- .../backup_assignment_activity_task.class.php | 29 +++++++----- .../backup_chat_activity_task.class.php | 45 ++++++------------ .../backup_choice_activity_task.class.php | 31 ++++++------ .../backup_data_activity_task.class.php | 29 +++++++----- .../backup_feedback_activity_task.class.php | 31 +++++++----- .../backup_folder_activity_task.class.php | 27 ++++++----- .../backup_forum_activity_task.class.php | 31 ++++++------ .../backup_glossary_activity_task.class.php | 29 +++++++----- .../backup_imscp_activity_task.class.php | 27 ++++++----- .../backup_label_activity_task.class.php | 27 ++++++----- .../backup_lesson_activity_task.class.php | 31 ++++++------ .../backup_lti_activity_task.class.php | 34 +++++++------- .../backup_page_activity_task.class.php | 27 ++++++----- .../backup_quiz_activity_task.class.php | 26 +++++----- .../backup_resource_activity_task.class.php | 27 ++++++----- .../backup_scorm_activity_task.class.php | 29 +++++++----- .../backup_survey_activity_task.class.php | 29 +++++++----- .../backup_url_activity_task.class.php | 30 ++++++------ .../backup_wiki_activity_task.class.php | 47 ++++++++++++++----- .../backup_workshop_activity_task.class.php | 21 +++++---- 20 files changed, 324 insertions(+), 283 deletions(-) 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;