Added new fields to backup/restore
authorstronk7 <stronk7>
Sun, 5 Sep 2004 09:47:05 +0000 (09:47 +0000)
committerstronk7 <stronk7>
Sun, 5 Sep 2004 09:47:05 +0000 (09:47 +0000)
mod/exercise/backuplib.php
mod/exercise/restorelib.php

index 3a97ffbca60a5941add5d0777776c3e6c4f10867..041ec50e1452f9aaa26eb5cc40bf2493deb7a219 100644 (file)
@@ -65,6 +65,8 @@
                 fwrite ($bf,full_tag("GRADE",4,false,$exercise->grade));
                 fwrite ($bf,full_tag("GRADINGGRADE",4,false,$exercise->gradinggrade));
                 fwrite ($bf,full_tag("SHOWLEAGUETABLE",4,false,$exercise->showleaguetable));
+                fwrite ($bf,full_tag("USEPASSWORD",4,false,$exercise->usepassword));
+                fwrite ($bf,full_tag("PASSWORD",4,false,$exercise->password));
                 //Now we backup exercise elements
                 $status = backup_exercise_elements($bf,$preferences,$exercise->id);
                 //Now we backup any teacher submissions (these are an integral part of the exercise)
index d6e45c49d8b4691e2861b09561bb024c8596330b..e791d8773c329bc0871405c9781a124102c5760f 100644 (file)
@@ -68,6 +68,8 @@
             $exercise->grade = backup_todb($info['MOD']['#']['GRADE']['0']['#']);
             $exercise->gradinggrade = backup_todb($info['MOD']['#']['GRADINGGRADE']['0']['#']);
             $exercise->showleaguetable = backup_todb($info['MOD']['#']['SHOWLEAGUETABLE']['0']['#']);
+            $exercise->usepassword = backup_todb($info['MOD']['#']['USEPASSWORD']['0']['#']);
+            $exercise->password = backup_todb($info['MOD']['#']['PASSWORD']['0']['#']);
 
             //The structure is equal to the db, so insert the exercise
             $newid = insert_record ("exercise",$exercise);