//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,
} 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,
//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,
$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,
//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;
}
//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,
$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,