Changes to work with data from fs instead of db.

Show progress info
Output data to the browser to avoid timeouts.
This commit is contained in:
stronk7 2003-06-20 19:46:01 +00:00
parent adc8b0c7fe
commit 8328766280
4 changed files with 16 additions and 28 deletions

View File

@ -32,11 +32,8 @@
$data = backup_getid($restore->backup_unique_code,$mod->modtype,$mod->id);
if ($data) {
//We have info, get and unserialize info
//First strip slashes
$temp = stripslashes($data->info);
//Now get completed xmlized object
$info = unserialize($temp);
$info = $data->info;
//traverse_xmlize($info); //Debug
//print_object ($GLOBALS['traverse_array']); //Debug
//$GLOBALS['traverse_array']=""; //Debug
@ -57,7 +54,7 @@
$newid = insert_record ("assignment",$assignment);
//Do some output
echo "<ul><li>Assignment ".$assignment->name."<br>";
echo "<ul><li>Assignment \"".$assignment->name."\"<br>";
backup_flush(300);
if ($newid) {
@ -132,9 +129,9 @@
$newid = insert_record ("assignment_submissions",$submission);
//Do some output
if ($newid % 50 == 0) {
if (($i+1) % 50 == 0) {
echo ".";
if ($newid % 1000 == 0) {
if (($i+1) % 1000 == 0) {
echo "<br>";
}
backup_flush(300);

View File

@ -32,11 +32,8 @@
$data = backup_getid($restore->backup_unique_code,$mod->modtype,$mod->id);
if ($data) {
//We have info, get and unserialize info
//First strip slashes
$temp = stripslashes($data->info);
//Now get completed xmlized object
$info = unserialize($temp);
$info = $data->info;
//traverse_xmlize($info); //Debug
//print_object ($GLOBALS['traverse_array']); //Debug
//$GLOBALS['traverse_array']=""; //Debug
@ -59,7 +56,7 @@
$newid = insert_record ("choice",$choice);
//Do some output
echo "<ul><li>Choice ".$choice->name."<br>";
echo "<ul><li>Choice \"".$choice->name."\"<br>";
backup_flush(300);
if ($newid) {
@ -122,9 +119,9 @@
$newid = insert_record ("choice_answers",$answer);
//Do some output
if ($newid % 50 == 0) {
if (($i+1) % 50 == 0) {
echo ".";
if ($newid % 1000 == 0) {
if (($i+1) % 1000 == 0) {
echo "<br>";
}
backup_flush(300);

View File

@ -27,11 +27,8 @@
$data = backup_getid($restore->backup_unique_code,$mod->modtype,$mod->id);
if ($data) {
//We have info, get and unserialize info
//First strip slashes
$temp = stripslashes($data->info);
//Now get completed xmlized object
$info = unserialize($temp);
$info = $data->info;
//traverse_xmlize($info); //Debug
//print_object ($GLOBALS['traverse_array']); //Debug
//$GLOBALS['traverse_array']=""; //Debug
@ -49,7 +46,7 @@
$newid = insert_record ("resource",$resource);
//Do some output
echo "<ul><li>Resource ".$resource->name."<br>";
echo "<ul><li>Resource \"".$resource->name."\"<br>";
backup_flush(300);
if ($newid) {

View File

@ -33,11 +33,8 @@
$data = backup_getid($restore->backup_unique_code,$mod->modtype,$mod->id);
if ($data) {
//We have info, get and unserialize info
//First strip slashes
$temp = stripslashes($data->info);
//Now get completed xmlized object
$info = unserialize($temp);
$info = $data->info;
//traverse_xmlize($info); //Debug
//print_object ($GLOBALS['traverse_array']); //Debug
//$GLOBALS['traverse_array']=""; //Debug
@ -56,7 +53,7 @@
$newid = insert_record ("survey",$survey);
//Do some output
echo "<ul><li>Survey ".$survey->name."<br>";
echo "<ul><li>Survey \"".$survey->name."\"<br>";
backup_flush(300);
if ($newid) {
@ -125,9 +122,9 @@
$newid = insert_record ("survey_answers",$answer);
//Do some output
if ($newid % 50 == 0) {
if (($i+1) % 50 == 0) {
echo ".";
if ($newid % 1000 == 0) {
if (($i+1) % 1000 == 0) {
echo "<br>";
}
backup_flush(300);
@ -181,9 +178,9 @@
$newid = insert_record ("survey_analysis",$analys);
//Do some output
if ($newid % 50 == 0) {
if (($i+1) % 50 == 0) {
echo ".";
if ($newid % 1000 == 0) {
if (($i+1) % 1000 == 0) {
echo "<br>";
}
backup_flush(300);