]> git.mjollnir.org Git - moodle.git/commitdiff
Added support to timelimit, password and subnet in backup & restore.
authorstronk7 <stronk7>
Mon, 19 Jul 2004 20:04:33 +0000 (20:04 +0000)
committerstronk7 <stronk7>
Mon, 19 Jul 2004 20:04:33 +0000 (20:04 +0000)
mod/quiz/backuplib.php
mod/quiz/restorelib.php

index e5c4811575f69096b75481d3acdc843fe9a5bcd2..3f3e97af5e03ec2cb40175726d638e7e3458ec9e 100644 (file)
                 fwrite ($bf,full_tag("GRADE",4,false,$quiz->grade));
                 fwrite ($bf,full_tag("TIMECREATED",4,false,$quiz->timecreated));
                 fwrite ($bf,full_tag("TIMEMODIFIED",4,false,$quiz->timemodified));
+                fwrite ($bf,full_tag("TIMELIMIT",4,false,$quiz->timelimit));
+                fwrite ($bf,full_tag("PASSWORD",4,false,$quiz->password));
+                fwrite ($bf,full_tag("SUBNET",4,false,$quiz->subnet));
                 //Now we print to xml question_grades (Course Level)
                 $status = backup_quiz_question_grades($bf,$preferences,$quiz->id);
                 //if we've selected to backup users info, then execute:
index 8339dba8a6346b98a1faeded326761d2841a671e..5483549c12734e86425efa54bc0d4f4b5ef54793 100644 (file)
             $quiz->grade = backup_todb($info['MOD']['#']['GRADE']['0']['#']);
             $quiz->timecreated = backup_todb($info['MOD']['#']['TIMECREATED']['0']['#']);
             $quiz->timemodified = backup_todb($info['MOD']['#']['TIMEMODIFIED']['0']['#']);
+            $quiz->timelimit = backup_todb($info['MOD']['#']['TIMELIMIT']['0']['#']);
+            $quiz->password = backup_todb($info['MOD']['#']['PASSWORD']['0']['#']);
+            $quiz->subnet = backup_todb($info['MOD']['#']['SUBNET']['0']['#']);
 
             //We have to recode the questions field (a list of questions id)          
             //Extracts question id from sequence