[ Index ] |
PHP Cross Reference of moodle-2.8 |
[Summary view] [Print] [Text view]
1 <?php 2 3 // This file is part of Moodle - http://moodle.org/ 4 // 5 // Moodle is free software: you can redistribute it and/or modify 6 // it under the terms of the GNU General Public License as published by 7 // the Free Software Foundation, either version 3 of the License, or 8 // (at your option) any later version. 9 // 10 // Moodle is distributed in the hope that it will be useful, 11 // but WITHOUT ANY WARRANTY; without even the implied warranty of 12 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 // GNU General Public License for more details. 14 // 15 // You should have received a copy of the GNU General Public License 16 // along with Moodle. If not, see <http://www.gnu.org/licenses/>. 17 18 /** 19 * Define all the backup steps that will be used by the backup_imscp_activity_task 20 * 21 * @package mod_imscp 22 * @copyright 2010 onwards Eloy Lafuente (stronk7) {@link http://stronk7.com} 23 * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later 24 */ 25 26 defined('MOODLE_INTERNAL') || die(); 27 28 /** 29 * Define the complete imscp structure for backup, with file and id annotations 30 */ 31 class backup_imscp_activity_structure_step extends backup_activity_structure_step { 32 33 protected function define_structure() { 34 35 // To know if we are including userinfo 36 $userinfo = $this->get_setting_value('userinfo'); 37 38 // Define each element separated 39 $imscp = new backup_nested_element('imscp', array('id'), array( 40 'name', 'intro', 'introformat', 'revision', 41 'keepold', 'structure', 'timemodified')); 42 43 // Build the tree 44 // (love this) 45 46 // Define sources 47 $imscp->set_source_table('imscp', array('id' => backup::VAR_ACTIVITYID)); 48 49 // Define id annotations 50 // (none) 51 52 // Define file annotations 53 $imscp->annotate_files('mod_imscp', 'intro', null); // This file area hasn't itemid 54 $imscp->annotate_files('mod_imscp', 'backup', null); // This file area hasn't itemid 55 /** 56 * I don't like itemid used for "imaginative" things like "revisions"! 57 * I don't like itemid used for "imaginative" things like "revisions"! 58 * I don't like itemid used for "imaginative" things like "revisions"! 59 */ 60 $imscp->annotate_files('mod_imscp', 'content', null); // Horrible use of itemid here. Ignoring for backup/restore purposes 61 62 // Return the root element (imscp), wrapped into standard activity structure 63 return $this->prepare_activity_structure($imscp); 64 } 65 }
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
Generated: Fri Nov 28 20:29:05 2014 | Cross-referenced by PHPXref 0.7.1 |