]> git.mjollnir.org Git - moodle.git/commitdiff
backup/restore Support for 4 new fields in data module
authormoodler <moodler>
Tue, 14 Aug 2007 04:21:16 +0000 (04:21 +0000)
committermoodler <moodler>
Tue, 14 Aug 2007 04:21:16 +0000 (04:21 +0000)
mod/data/backuplib.php
mod/data/restorelib.php

index 2af71ff064be6f0c9570028af5d76aa70c75c225..12d9fbe4b06936051c9ff3aed1113e1e243b698e 100644 (file)
@@ -98,6 +98,10 @@ function data_backup_one_mod($bf,$preferences,$data) {
     fwrite ($bf,full_tag("APPROVAL",4,false,$data->approval));
     fwrite ($bf,full_tag("SCALE",4,false,$data->scale));
     fwrite ($bf,full_tag("ASSESSED",4,false,$data->assessed));
+    fwrite ($bf,full_tag("DEFAULTSORT",4,false,$data->defaultsort));
+    fwrite ($bf,full_tag("DEFAULTSORTDIR",4,false,$data->defaultsortdir));
+    fwrite ($bf,full_tag("EDITANY",4,false,$data->editany));
+    fwrite ($bf,full_tag("NOTIFICATION",4,false,$data->notification));
 
     // if we've selected to backup users info, then call any other functions we need
     // including backing up individual files
index 60789b15248f61ad354c547282708b0040a4d5d3..fcbfe38161d5ddbcefd3b5b227384e8f3d994f05 100644 (file)
@@ -92,6 +92,10 @@ function data_restore_mods($mod,$restore) {
         if (isset($info['MOD']['#']['ASSESSPUBLIC']['0']['#'])) {
             $database->assesspublic = backup_todb($info['MOD']['#']['ASSESSPUBLIC']['0']['#']);
         }
+        $database->defaultsort = backup_todb($info['MOD']['#']['DEFAULTSORT']['0']['#']);
+        $database->defaultsortdir = backup_todb($info['MOD']['#']['DEFAULTSORTDIR']['0']['#']);
+        $database->editany = backup_todb($info['MOD']['#']['EDITANY']['0']['#']);
+        $database->notification = backup_todb($info['MOD']['#']['NOTIFICATION']['0']['#']);
 
         $newid = insert_record ('data', $database);