]> git.mjollnir.org Git - moodle.git/commitdiff
Modified to flush data to browser...
authorstronk7 <stronk7>
Thu, 12 Jun 2003 17:41:52 +0000 (17:41 +0000)
committerstronk7 <stronk7>
Thu, 12 Jun 2003 17:41:52 +0000 (17:41 +0000)
backup/mod/assignment/restorelib.php
backup/mod/choice/restorelib.php
backup/mod/resource/restorelib.php
backup/mod/survey/restorelib.php

index 2c21ebcd52571d09c6d86158e086d3afa459c77e..14d82d5d4929cbf4ef024b0302af9bf44ff6bb49 100644 (file)
 
             //The structure is equal to the db, so insert the assignment
             $newid = insert_record ("assignment",$assignment);
+
+            //Do some output     
+            echo "<ul><li>Assignment ".$assignment->name."<br>";
+            backup_flush(300);
+
             if ($newid) {
                 //We have the newid, update backup_ids
                 backup_putid($restore->backup_unique_code,$mod->modtype,
@@ -67,6 +72,9 @@
             } else {
                 $status = false;
             }
+
+            //Finalize ul        
+            echo "</ul>";
         
         } else {
             $status = false;
 
             //The structure is equal to the db, so insert the assignment_submission
             $newid = insert_record ("assignment_submissions",$submission);
+
+            //Do some output
+            if ($newid % 50 == 0) {
+                echo ".";
+                if ($newid % 1000 == 0) {
+                    echo "<br>";
+                }
+                backup_flush(300);
+            }
+
             if ($newid) {
                 //We have the newid, update backup_ids
                 backup_putid($restore->backup_unique_code,"assignment_submission",$oldid,
index 736bfb5700fab6026892f225bbff0f5e9b4091a5..b49492c1f4edee0437e02e84c05dd2dce5899f63 100644 (file)
 
             //The structure is equal to the db, so insert the choice
             $newid = insert_record ("choice",$choice);
+
+            //Do some output     
+            echo "<ul><li>Choice ".$choice->name."<br>";
+            backup_flush(300);
+
             if ($newid) {
                 //We have the newid, update backup_ids
                 backup_putid($restore->backup_unique_code,$mod->modtype,
@@ -70,6 +75,9 @@
                 $status = false;
             }
 
+            //Finalize ul        
+            echo "</ul>";
+
         } else {
             $status = false;
         }
 
             //The structure is equal to the db, so insert the choice_answers
             $newid = insert_record ("choice_answers",$answer);
+
+            //Do some output
+            if ($newid % 50 == 0) {
+                echo ".";
+                if ($newid % 1000 == 0) {
+                    echo "<br>";
+                }
+                backup_flush(300);
+            }
+
             if ($newid) {
                 //We have the newid, update backup_ids
                 backup_putid($restore->backup_unique_code,"choice_answers",$oldid,
index fc1300e37c5d9fe05169eb8c3b34006cbbf505be..37779e356b334137a8a9fcca77524eb04673c502 100644 (file)
@@ -35,7 +35,7 @@
             //traverse_xmlize($info);                                                                     //Debug
             //print_object ($GLOBALS['traverse_array']);                                                  //Debug
             //$GLOBALS['traverse_array']="";                                                              //Debug
-           
+          
             //Now, build the RESOURCE record structure
             $resource->course = $restore->course_id;
             $resource->name = backup_todb($info['MOD']['#']['NAME']['0']['#']);
  
             //The structure is equal to the db, so insert the resource
             $newid = insert_record ("resource",$resource);
+
+            //Do some output     
+            echo "<ul><li>Resource ".$resource->name."<br>";
+            backup_flush(300);
+
             if ($newid) {
                 //We have the newid, update backup_ids
                 backup_putid($restore->backup_unique_code,$mod->modtype,
             } else {
                 $status = false;
             }
+
+            //Finalize ul        
+            echo "</ul>";
+
         } else {
             $status = false;
         }
index 2f94cabbc935df220d0799dcb5241fb9f5858d92..8f5a547feeef3fefbbb93234137dcaf39f5744c5 100644 (file)
 
             //The structure is equal to the db, so insert the survey
             $newid = insert_record ("survey",$survey);
+
+            //Do some output
+            echo "<ul><li>Survey ".$survey->name."<br>";
+            backup_flush(300);
+
             if ($newid) {
                 //We have the newid, update backup_ids
                 backup_putid($restore->backup_unique_code,$mod->modtype,
@@ -71,6 +76,9 @@
                 $status = false;
             }
 
+            //Finalize ul
+            echo "</ul>";
+
         } else {
             $status = false;
         }
 
             //The structure is equal to the db, so insert the survey_answers
             $newid = insert_record ("survey_answers",$answer);
+
+            //Do some output
+            if ($newid % 50 == 0) {
+                echo ".";
+                if ($newid % 1000 == 0) {
+                    echo "<br>";
+                }
+                backup_flush(300);
+            }
+
             if ($newid) {
                 //We have the newid, update backup_ids
                 backup_putid($restore->backup_unique_code,"survey_answers",$oldid,
 
             //The structure is equal to the db, so insert the survey_analysis
             $newid = insert_record ("survey_analysis",$analys);
+
+            //Do some output
+            if ($newid % 50 == 0) {
+                echo ".";       
+                if ($newid % 1000 == 0) {
+                    echo "<br>";
+                }
+                backup_flush(300);
+            }
+
             if ($newid) {
                 //We have the newid, update backup_ids
                 backup_putid($restore->backup_unique_code,"survey_analysis",$oldid,