]> git.mjollnir.org Git - moodle.git/commitdiff
Added some flush
authorstronk7 <stronk7>
Mon, 7 Jul 2003 18:46:36 +0000 (18:46 +0000)
committerstronk7 <stronk7>
Mon, 7 Jul 2003 18:46:36 +0000 (18:46 +0000)
backup/restore_execute.html

index 860134ef0b8769ce556fbc186cb22a461cea7be4..0af87a5e6ebbad9af030b3a6568254cf38c165d4 100644 (file)
                 $coursecreator_count = 0;
                 $admin_count = 0;
                 $other_count = 0;
+                $counter = 0;
                 //Iterate, filling counters
                 foreach ($recs as $rec) {
                     //Get full record, using backup_getids
                     } else if ($record->info == "new" or $record->info == "exists") {
                         $other_count++;
                     }
+                    //Do some output
+                    $counter++;
+                    if ($counter % 10 == 0) {
+                        echo ".";
+                        if ($counter % 200 == 0) {
+                            echo "<br>";
+                        }
+                        backup_flush(300);
+                    }
                 }
                 //Now print information gathered
                 echo " (new: ".$new_count.", existing: ".$exists_count.")";
         error ("An error has ocurred");
     }
 
+    //Print final message
+    print_simple_box(get_string("restorefinished"),"CENTER");
+    print_continue($moodle_home."/course/view.php?id=".$restore->course_id);
+
 ?>