mirror of
https://github.com/moodle/moodle.git
synced 2025-04-14 04:52:36 +02:00
MDL-30982 Improving phpDocs for the classes that extend backup_activity_task
This commit is contained in:
parent
cfab878c5d
commit
63baccbc54
@ -16,38 +16,41 @@
|
||||
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
/**
|
||||
* @package moodlecore
|
||||
* @subpackage backup-moodle2
|
||||
* @copyright 2010 onwards Eloy Lafuente (stronk7) {@link http://stronk7.com}
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
||||
* 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;
|
||||
|
@ -16,56 +16,41 @@
|
||||
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
/**
|
||||
* 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 <dongsheng@moodle.com>
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
||||
* @package mod_chat
|
||||
* @category backup
|
||||
* @copyright 2010 onwards Dongsheng Cai <dongsheng@moodle.com>
|
||||
* @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;
|
||||
|
@ -16,39 +16,42 @@
|
||||
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
/**
|
||||
* @package moodlecore
|
||||
* @subpackage backup-moodle2
|
||||
* @copyright 2010 onwards Eloy Lafuente (stronk7) {@link http://stronk7.com}
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
||||
* 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;
|
||||
|
@ -16,38 +16,41 @@
|
||||
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
/**
|
||||
* @package moodlecore
|
||||
* @subpackage backup-moodle2
|
||||
* @copyright 2010 onwards Eloy Lafuente (stronk7) {@link http://stronk7.com}
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
||||
* 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;
|
||||
|
@ -1,4 +1,5 @@
|
||||
<?php
|
||||
|
||||
// This file is part of Moodle - http://moodle.org/
|
||||
//
|
||||
// Moodle is free software: you can redistribute it and/or modify
|
||||
@ -15,30 +16,32 @@
|
||||
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
/**
|
||||
* @package moodlecore
|
||||
* @subpackage backup-moodle2
|
||||
* @copyright 2010 onwards Eloy Lafuente (stronk7) {@link http://stronk7.com}
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
||||
* 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;
|
||||
|
@ -16,40 +16,41 @@
|
||||
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
/**
|
||||
* @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;
|
||||
|
@ -16,39 +16,42 @@
|
||||
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
/**
|
||||
* @package moodlecore
|
||||
* @subpackage backup-moodle2
|
||||
* @copyright 2010 onwards Eloy Lafuente (stronk7) {@link http://stronk7.com}
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
||||
* 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;
|
||||
|
@ -16,38 +16,41 @@
|
||||
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
/**
|
||||
* @package moodlecore
|
||||
* @subpackage backup-moodle2
|
||||
* @copyright 2010 onwards Eloy Lafuente (stronk7) {@link http://stronk7.com}
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
||||
* 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;
|
||||
|
@ -16,40 +16,41 @@
|
||||
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
/**
|
||||
* @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;
|
||||
|
@ -16,40 +16,41 @@
|
||||
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
/**
|
||||
* @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;
|
||||
|
@ -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;
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -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 <marc.alier@upc.edu>, 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;
|
||||
|
@ -16,40 +16,41 @@
|
||||
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
/**
|
||||
* @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;
|
||||
|
@ -15,21 +15,20 @@
|
||||
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
/**
|
||||
* @package moodlecore
|
||||
* @subpackage backup-moodle2
|
||||
* @copyright 2010 onwards Eloy Lafuente (stronk7) {@link http://stronk7.com}
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
||||
* 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;
|
||||
|
@ -16,40 +16,41 @@
|
||||
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
/**
|
||||
* @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;
|
||||
|
@ -15,38 +15,41 @@
|
||||
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
/**
|
||||
* @package moodlecore
|
||||
* @subpackage backup-moodle2
|
||||
* @copyright 2010 onwards Eloy Lafuente (stronk7) {@link http://stronk7.com}
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
||||
* 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;
|
||||
|
@ -16,38 +16,41 @@
|
||||
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
/**
|
||||
* @package moodlecore
|
||||
* @subpackage backup-moodle2
|
||||
* @copyright 2010 onwards Eloy Lafuente (stronk7) {@link http://stronk7.com}
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
||||
* 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;
|
||||
|
@ -16,43 +16,41 @@
|
||||
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
/**
|
||||
* @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;
|
||||
|
@ -1,32 +1,57 @@
|
||||
<?php
|
||||
|
||||
require_once($CFG->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 <http://www.gnu.org/licenses/>.
|
||||
|
||||
/**
|
||||
* 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 <pigui0@hotmail.com>
|
||||
* @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;
|
||||
|
@ -16,12 +16,12 @@
|
||||
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
/**
|
||||
* Class {@link backup_workshop_activity_task} definition
|
||||
* Defines {@link backup_workshop_activity_task} class
|
||||
*
|
||||
* @package mod
|
||||
* @subpackage workshop
|
||||
* @copyright 2010 David Mudrak <david.mudrak@gmail.com>
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
||||
* @package mod_workshop
|
||||
* @category backup
|
||||
* @copyright 2010 David Mudrak <david.mudrak@gmail.com>
|
||||
* @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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user