Permalink
Browse files

Little modification. Speed up a bit.

  • Loading branch information...
1 parent 304084d commit 1552d8b4e145a0577fcee0bf2d3d4a5ea65d5aa7 stronk7 committed Jun 1, 2003
Showing with 11 additions and 11 deletions.
  1. +2 −2 backup/mod/assignment/restorelib.php
  2. +7 −7 backup/mod/choice/restorelib.php
  3. +2 −2 backup/mod/resource/restorelib.php
View
4 backup/mod/assignment/restorelib.php
@@ -57,8 +57,8 @@ function assignment_restore_mods($mod,$restore) {
$newid = insert_record ("assignment",$assignment);
if ($newid) {
//We have the newid, update backup_ids
- backup_putid($restore->backup_unique_code,$mod->modtype,$mod->id,
- $newid,$data->info);
+ backup_putid($restore->backup_unique_code,$mod->modtype,
+ $mod->id, $newid);
//Now check if want to restore user data and do it.
if ($restore->mods[assignment]->userinfo) {
//Restore assignmet_submissions
View
14 backup/mod/choice/restorelib.php
@@ -59,8 +59,8 @@ function choice_restore_mods($mod,$restore) {
$newid = insert_record ("choice",$choice);
if ($newid) {
//We have the newid, update backup_ids
- backup_putid($restore->backup_unique_code,$mod->modtype,$mod->id,
- $newid,$data->info);
+ backup_putid($restore->backup_unique_code,$mod->modtype,
+ $mod->id, $newid);
//Now check if want to restore user data and do it.
if ($restore->mods[choice]->userinfo) {
//Restore choice_answers
@@ -84,15 +84,15 @@ function choice_answers_restore_mods($choice_id,$info,$restore) {
$status = true;
- //Get the submissions array
+ //Get the answers array
$answers = $info['MOD']['#']['ANSWERS']['0']['#']['ANSWER'];
- //Iterate over submissions
+ //Iterate over answers
for($i = 0; $i < sizeof($answers); $i++) {
$sub_info = $answers[$i];
- traverse_xmlize($sub_info); //Debug
- print_object ($GLOBALS['traverse_array']); //Debug
- $GLOBALS['traverse_array']=""; //Debug
+ //traverse_xmlize($sub_info); //Debug
+ //print_object ($GLOBALS['traverse_array']); //Debug
+ //$GLOBALS['traverse_array']=""; //Debug
//We'll need this later!!
$oldid = backup_todb($sub_info['#']['ID']['0']['#']);
View
4 backup/mod/resource/restorelib.php
@@ -49,8 +49,8 @@ function resource_restore_mods($mod,$restore) {
$newid = insert_record ("resource",$resource);
if ($newid) {
//We have the newid, update backup_ids
- backup_putid($restore->backup_unique_code,$mod->modtype,$mod->id,
- $newid,$data->info);
+ backup_putid($restore->backup_unique_code,$mod->modtype,
+ $mod->id, $newid);
} else {
$status = false;

0 comments on commit 1552d8b

Please sign in to comment.