Moodle  2.2.1
http://www.collinsharper.com
C:/xampp/htdocs/moodle/mod/workshop/backup/moodle2/backup_workshop_activity_task.class.php
Go to the documentation of this file.
00001 <?php
00002 
00003 // This file is part of Moodle - http://moodle.org/
00004 //
00005 // Moodle is free software: you can redistribute it and/or modify
00006 // it under the terms of the GNU General Public License as published by
00007 // the Free Software Foundation, either version 3 of the License, or
00008 // (at your option) any later version.
00009 //
00010 // Moodle is distributed in the hope that it will be useful,
00011 // but WITHOUT ANY WARRANTY; without even the implied warranty of
00012 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00013 // GNU General Public License for more details.
00014 //
00015 // You should have received a copy of the GNU General Public License
00016 // along with Moodle.  If not, see <http://www.gnu.org/licenses/>.
00017 
00027 defined('MOODLE_INTERNAL') || die();
00028 
00029 require_once($CFG->dirroot . '/mod/workshop/backup/moodle2/backup_workshop_settingslib.php');
00030 require_once($CFG->dirroot . '/mod/workshop/backup/moodle2/backup_workshop_stepslib.php');
00031 
00035 class backup_workshop_activity_task extends backup_activity_task {
00036 
00040     protected function define_my_settings() {
00041         // No particular settings for this activity
00042     }
00043 
00047     protected function define_my_steps() {
00048         $this->add_step(new backup_workshop_activity_structure_step('workshop_structure', 'workshop.xml'));
00049     }
00050 
00055     static public function encode_content_links($content) {
00056         global $CFG;
00057 
00058         $base = preg_quote($CFG->wwwroot,"/");
00059 
00060         // Link to the list of workshops
00061         $search = "/(" . $base . "\/mod\/workshop\/index.php\?id\=)([0-9]+)/";
00062         $content = preg_replace($search, '$@WORKSHOPINDEX*$2@$', $content);
00063 
00064         //Link to workshop view by moduleid
00065         $search = "/(" . $base . "\/mod\/workshop\/view.php\?id\=)([0-9]+)/";
00066         $content= preg_replace($search, '$@WORKSHOPVIEWBYID*$2@$', $content);
00067 
00068         return $content;
00069     }
00070 }
 All Data Structures Namespaces Files Functions Variables Enumerations