Permalink
Browse files

Modified to flush data to browser...

  • Loading branch information...
1 parent 10453b4 commit 59728e8d4a615994f50f338615a0c9d4b45c9702 stronk7 committed Jun 12, 2003
@@ -55,6 +55,11 @@ function assignment_restore_mods($mod,$restore) {
//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 @@ function assignment_restore_mods($mod,$restore) {
} else {
$status = false;
}
+
+ //Finalize ul
+ echo "</ul>";
} else {
$status = false;
@@ -122,6 +130,16 @@ function assignment_submissions_restore_mods($old_assignment_id, $new_assignment
//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,
@@ -57,6 +57,11 @@ function choice_restore_mods($mod,$restore) {
//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 @@ function choice_restore_mods($mod,$restore) {
$status = false;
}
+ //Finalize ul
+ echo "</ul>";
+
} else {
$status = false;
}
@@ -112,6 +120,16 @@ function choice_answers_restore_mods($choice_id,$info,$restore) {
//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,
@@ -35,7 +35,7 @@ function resource_restore_mods($mod,$restore) {
//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']['#']);
@@ -47,6 +47,11 @@ function resource_restore_mods($mod,$restore) {
//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,
@@ -55,6 +60,10 @@ function resource_restore_mods($mod,$restore) {
} else {
$status = false;
}
+
+ //Finalize ul
+ echo "</ul>";
+
} else {
$status = false;
}
@@ -54,6 +54,11 @@ function survey_restore_mods($mod,$restore) {
//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 @@ function survey_restore_mods($mod,$restore) {
$status = false;
}
+ //Finalize ul
+ echo "</ul>";
+
} else {
$status = false;
}
@@ -115,6 +123,16 @@ function survey_answers_restore_mods($survey_id,$info,$restore) {
//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,
@@ -161,6 +179,16 @@ function survey_analysis_restore_mods($survey_id,$info,$restore) {
//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,

0 comments on commit 59728e8

Please sign in to comment.