[ 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 * Defines classes used to handle restore settings 20 * 21 * @package core_backup 22 * @subpackage moodle2 23 * @category backup 24 * @copyright 2010 onwards Eloy Lafuente (stronk7) {@link http://stronk7.com} 25 * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later 26 */ 27 28 defined('MOODLE_INTERNAL') || die(); 29 30 // TODO: Reduce these to the minimum because ui/dependencies are 100% separated 31 32 // Root restore settings 33 34 /** 35 * root generic setting to store different things without dependencies 36 */ 37 class restore_generic_setting extends root_backup_setting {} 38 39 /** 40 * root setting to control if restore will create user information 41 * A lot of other settings are dependent of this (module's user info, 42 * grades user info, messages, blogs... 43 */ 44 class restore_users_setting extends restore_generic_setting {} 45 46 /** 47 * root setting to control if restore will create role assignments 48 * or no (any level), depends of @restore_users_setting 49 */ 50 class restore_role_assignments_setting extends root_backup_setting {} 51 52 /** 53 * root setting to control if restore will create activities 54 * A lot of other settings (_included at activity levels) 55 * are dependent of this setting 56 */ 57 class restore_activities_setting extends restore_generic_setting {} 58 59 /** 60 * root setting to control if restore will create 61 * comments or no, depends of @restore_users_setting 62 * exactly in the same way than @restore_role_assignments_setting so we extend from it 63 */ 64 class restore_comments_setting extends restore_role_assignments_setting {} 65 66 /** 67 * root setting to control if restore will create badges or not, 68 * depends on @restore_activities_setting 69 */ 70 class restore_badges_setting extends restore_generic_setting {} 71 72 /** 73 * root setting to control if restore will create 74 * events or no, depends of @restore_users_setting 75 * exactly in the same way than @restore_role_assignments_setting so we extend from it 76 */ 77 class restore_calendarevents_setting extends restore_role_assignments_setting {} 78 79 /** 80 * root setting to control if restore will create 81 * completion info or no, depends of @restore_users_setting 82 * exactly in the same way than @restore_role_assignments_setting so we extend from it 83 */ 84 class restore_userscompletion_setting extends restore_role_assignments_setting {} 85 86 /** 87 * root setting to control if restore will create 88 * logs or no, depends of @restore_users_setting 89 * exactly in the same way than @restore_role_assignments_setting so we extend from it 90 */ 91 class restore_logs_setting extends restore_role_assignments_setting {} 92 93 /** 94 * root setting to control if restore will create 95 * grade_histories or no, depends of @restore_users_setting 96 * exactly in the same way than @restore_role_assignments_setting so we extend from it 97 */ 98 class restore_grade_histories_setting extends restore_role_assignments_setting {} 99 100 101 // Course restore settings 102 103 /** 104 * generic course setting to pass various settings between tasks and steps 105 */ 106 class restore_course_generic_setting extends course_backup_setting {} 107 108 /** 109 * Setting to define is we are going to overwrite course configuration 110 */ 111 class restore_course_overwrite_conf_setting extends restore_course_generic_setting {} 112 113 114 class restore_course_generic_text_setting extends restore_course_generic_setting { 115 116 public function __construct($name, $vtype, $value = null, $visibility = self::VISIBLE, $status = self::NOT_LOCKED) { 117 parent::__construct($name, $vtype, $value, $visibility, $status); 118 $this->set_ui(new backup_setting_ui_text($this, $name)); 119 } 120 121 } 122 123 // Section restore settings 124 125 /** 126 * generic section setting to pass various settings between tasks and steps 127 */ 128 class restore_section_generic_setting extends section_backup_setting {} 129 130 /** 131 * Setting to define if one section is included or no. Activities _included 132 * settings depend of them if available 133 */ 134 class restore_section_included_setting extends restore_section_generic_setting {} 135 136 /** 137 * section backup setting to control if section will include 138 * user information or no, depends of @restore_users_setting 139 */ 140 class restore_section_userinfo_setting extends restore_section_generic_setting {} 141 142 143 // Activity backup settings 144 145 /** 146 * generic activity setting to pass various settings between tasks and steps 147 */ 148 class restore_activity_generic_setting extends activity_backup_setting {} 149 150 /** 151 * activity backup setting to control if activity will 152 * be included or no, depends of @restore_activities_setting and 153 * optionally parent section included setting 154 */ 155 class restore_activity_included_setting extends restore_activity_generic_setting {} 156 157 /** 158 * activity backup setting to control if activity will include 159 * user information or no, depends of @restore_users_setting 160 */ 161 class restore_activity_userinfo_setting extends restore_activity_generic_setting {}
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 |