Proyectos de Subversion Moodle

Rev

Rev 1 | Mostrar el archivo completo | | | Autoría | Ultima modificación | Ver Log |

Rev 1 Rev 1441
Línea 74... Línea 74...
74
        // Create the course.xml file with course & category information
74
        // Create the course.xml file with course & category information
75
        // annotating some bits, tags and module restrictions
75
        // annotating some bits, tags and module restrictions
76
        $this->add_step(new backup_course_structure_step('course_info', 'course.xml'));
76
        $this->add_step(new backup_course_structure_step('course_info', 'course.xml'));
Línea 77... Línea 77...
77
 
77
 
78
        // Generate the enrolment file (conditionally, prevent it in any IMPORT/HUB operation)
78
        // Generate the enrolment file (conditionally, prevent it in any IMPORT/HUB operation)
79
        if ($this->plan->get_mode() != backup::MODE_IMPORT && $this->plan->get_mode() != backup::MODE_HUB) {
79
        if ($this->plan->get_mode() != backup::MODE_IMPORT) {
80
            $this->add_step(new backup_enrolments_structure_step('course_enrolments', 'enrolments.xml'));
80
            $this->add_step(new backup_enrolments_structure_step('course_enrolments', 'enrolments.xml'));
Línea 81... Línea 81...
81
        }
81
        }
82
 
82
 
Línea 94... Línea 94...
94
        // This may not be required to annotate if groups are not being backed up.
94
        // This may not be required to annotate if groups are not being backed up.
95
        if ($this->get_setting_value('groups')) {
95
        if ($this->get_setting_value('groups')) {
96
            $this->add_step(new backup_annotate_groups_from_groupings('annotate_groups_from_groupings'));
96
            $this->add_step(new backup_annotate_groups_from_groupings('annotate_groups_from_groupings'));
97
        }
97
        }
Línea 98... Línea -...
98
 
-
 
99
        // Annotate the question_categories belonging to the course context (conditionally).
-
 
100
        if ($this->get_setting_value('questionbank')) {
-
 
101
            $this->add_step(new backup_calculate_question_categories('course_question_categories'));
-
 
Línea 102... Línea 98...
102
        }
98
 
103
 
99
 
Línea 104... Línea 100...
104
        // Generate the roles file (optionally role assignments and always role overrides)
100
        // Generate the roles file (optionally role assignments and always role overrides)
Línea 159... Línea 155...
159
    public static function encode_content_links($content) {
155
    public static function encode_content_links($content) {
Línea 160... Línea 156...
160
 
156
 
161
        // Link to the course main page (it also covers "&topic=xx" and "&week=xx"
157
        // Link to the course main page (it also covers "&topic=xx" and "&week=xx"
162
        // because they don't become transformed (section number) in backup/restore.
158
        // because they don't become transformed (section number) in backup/restore.
-
 
159
        $content = self::encode_links_helper($content, 'COURSEVIEWBYID',       '/course/view.php?id=');
Línea 163... Línea 160...
163
        $content = self::encode_links_helper($content, 'COURSEVIEWBYID',       '/course/view.php?id=');
160
        $content = self::encode_links_helper($content, 'COURSESECTIONBYID',    '/course/section.php?id=');
164
 
161
 
165
        // A few other key course links.
162
        // A few other key course links.
166
        $content = self::encode_links_helper($content, 'GRADEINDEXBYID',       '/grade/index.php?id=');
163
        $content = self::encode_links_helper($content, 'GRADEINDEXBYID',       '/grade/index.php?id=');
167
        $content = self::encode_links_helper($content, 'GRADEREPORTINDEXBYID', '/grade/report/index.php?id=');
164
        $content = self::encode_links_helper($content, 'GRADEREPORTINDEXBYID', '/grade/report/index.php?id=');
168
        $content = self::encode_links_helper($content, 'BADGESVIEWBYID',       '/badges/view.php?type=2&id=');
165
        $content = self::encode_links_helper($content, 'BADGESVIEWBYID',       '/badges/index.php?type=2&id=');
169
        $content = self::encode_links_helper($content, 'USERINDEXVIEWBYID',    '/user/index.php?id=');
166
        $content = self::encode_links_helper($content, 'USERINDEXVIEWBYID',    '/user/index.php?id=');
Línea 170... Línea 167...
170
        $content = self::encode_links_helper($content, 'PLUGINFILEBYCONTEXT',  '/pluginfile.php/');
167
        $content = self::encode_links_helper($content, 'PLUGINFILEBYCONTEXT',  '/pluginfile.php/');