]> git.mjollnir.org Git - moodle.git/commitdiff
Two missing parameters added
authorstronk7 <stronk7>
Thu, 27 Jan 2005 19:43:42 +0000 (19:43 +0000)
committerstronk7 <stronk7>
Thu, 27 Jan 2005 19:43:42 +0000 (19:43 +0000)
backup/restore_execute.html
backup/restorelib.php

index d3b844d8c7bf0540a44b4fbb3c267ab99d32f43f..0ba822003ba4a15a54d0d74da52b11c2b725cea7 100644 (file)
         //If we are deleting and bringing into a course or making a new course, same situation
         if($restore->restoreto == 0 || $restore->restoreto == 2) {
             echo '<li>'.get_string('creatingblocks');
-            if (!$status = restore_create_blocks($restore, $xml_file)) {
-                notify("Error while creating the course blocks");
+            if (!$status = restore_create_blocks($restore, $info->backup_block_format, $course_header->blockinfo, $xml_file)) {
+                notify('Error while creating the course blocks');
             }
         }
     }
index f107ac63191bcd891de97531f8423caedb821551..73bdc6266969fcc0413e99568072742ef7eb641c 100644 (file)
         delete_records('block_instance', 'pageid', $restore->course_id, 'pagetype', MOODLE_PAGE_COURSE);
         if (empty($backup_block_format)) {     // This is a backup from Moodle < 1.5
             if (empty($blockinfo)) {
-                echo " from pre 1.3";                                 //debug
+                echo ' (pre 1.3)';                                 //debug
                 // Looks like it's from Moodle < 1.3. Let's give the course default blocks...
                 $newpage = page_create_object(MOODLE_PAGE_COURSE, $restore->course_id);
                 blocks_repopulate_page($newpage);
             } else {
-                echo " from 1.3-1.4";                                 //debug
+                echo ' (1.3-1.4)';                                 //debug
                 // We just have a blockinfo field, this is a legacy 1.4 or 1.3 backup
                 $blockrecords = get_records_select('block', '', '', 'name, id');
                 $temp_blocks_l = array();
                     }
                 }
             }
-        } else if($info->backup_block_format == 'instances') {
-            echo " from 1.5";                                 //debug
-            if(!$status = restore_create_block_instances($restore,$xml_file)) {
-                $status = false;
-            }
+        } else if($backup_block_format == 'instances') {
+            echo ' (1.5)';                                 //debug
+            $status = restore_create_block_instances($restore,$xml_file);
         }
 
         return $status;