Moodle  2.2.1
http://www.collinsharper.com
C:/xampp/htdocs/moodle/mod/page/backup/moodle2/backup_page_stepslib.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 
00025 defined('MOODLE_INTERNAL') || die;
00026 
00034 class backup_page_activity_structure_step extends backup_activity_structure_step {
00035 
00036     protected function define_structure() {
00037 
00038         // To know if we are including userinfo
00039         $userinfo = $this->get_setting_value('userinfo');
00040 
00041         // Define each element separated
00042         $page = new backup_nested_element('page', array('id'), array(
00043             'name', 'intro', 'introformat', 'content', 'contentformat',
00044             'legacyfiles', 'legacyfileslast', 'display', 'displayoptions',
00045             'revision', 'timemodified'));
00046 
00047         // Build the tree
00048         // (love this)
00049 
00050         // Define sources
00051         $page->set_source_table('page', array('id' => backup::VAR_ACTIVITYID));
00052 
00053         // Define id annotations
00054         // (none)
00055 
00056         // Define file annotations
00057         $page->annotate_files('mod_page', 'intro', null); // This file areas haven't itemid
00058         $page->annotate_files('mod_page', 'content', null); // This file areas haven't itemid
00059 
00060         // Return the root element (page), wrapped into standard activity structure
00061         return $this->prepare_activity_structure($page);
00062     }
00063 }
 All Data Structures Namespaces Files Functions Variables Enumerations