MDL-20628 section backup - add new field and missing alias
authorEloy Lafuente <stronk7@moodle.org>
Fri, 23 Apr 2010 12:35:40 +0000 (12:35 +0000)
committerEloy Lafuente <stronk7@moodle.org>
Fri, 23 Apr 2010 12:35:40 +0000 (12:35 +0000)
backup/moodle2/backup_stepslib.php

index 0092b16..75937b9 100644 (file)
@@ -160,12 +160,15 @@ class backup_section_structure_step extends backup_structure_step {
         // Define each element separated
 
         $section = new backup_nested_element('section', array('id'), array(
         // Define each element separated
 
         $section = new backup_nested_element('section', array('id'), array(
-            'number', 'summary', 'sequence', 'visible'));
+            'number', 'name', 'summary', 'sequence', 'visible'));
 
         // Define sources
 
         $section->set_source_table('course_sections', array('id' => backup::VAR_SECTIONID));
 
 
         // Define sources
 
         $section->set_source_table('course_sections', array('id' => backup::VAR_SECTIONID));
 
+        // Aliases
+        $section->set_source_alias('section', 'number');
+
         // Set annotations
         $section->annotate_files(array('course_section'), 'id');
 
         // Set annotations
         $section->annotate_files(array('course_section'), 'id');