]> git.mjollnir.org Git - moodle.git/commitdiff
MDL-10574 Backup and restore event table modulename column
authordwoolhead <dwoolhead>
Mon, 23 Jul 2007 10:20:15 +0000 (10:20 +0000)
committerdwoolhead <dwoolhead>
Mon, 23 Jul 2007 10:20:15 +0000 (10:20 +0000)
backup/backuplib.php
backup/restorelib.php

index 9dede40211de8cfe82107ee71a6cc67ec31c4265..4118cbf986cf7fd93f63f8aa5c274ecd2b4b4934 100644 (file)
                 fwrite ($bf,full_tag("USERID",4,false,$event->userid));
                 fwrite ($bf,full_tag("REPEATID",4,false,$event->repeatid));
                 fwrite ($bf,full_tag("EVENTTYPE",4,false,$event->eventtype));
+                fwrite ($bf,full_tag("MODULENAME",4,false,$event->modulename));
                 fwrite ($bf,full_tag("TIMESTART",4,false,$event->timestart));
                 fwrite ($bf,full_tag("TIMEDURATION",4,false,$event->timeduration));
                 fwrite ($bf,full_tag("VISIBLE",4,false,$event->visible));
index 8d85723e601127cd26a603195af161a3d6e942ac..a2c6c4795c0ab48b65a8d46cae084913d04b9423 100644 (file)
                         $eve->userid = backup_todb($info['EVENT']['#']['USERID']['0']['#']);
                         $eve->repeatid = backup_todb($info['EVENT']['#']['REPEATID']['0']['#']);
                         $eve->modulename = "";
+                        if (!empty($info['EVENT']['#']['MODULENAME'])) {
+                            $eve->modulename = backup_todb($info['EVENT']['#']['MODULENAME']['0']['#']);
+                        }  
                         $eve->instance = 0;
                         $eve->eventtype = backup_todb($info['EVENT']['#']['EVENTTYPE']['0']['#']);  
                         $eve->timestart = backup_todb($info['EVENT']['#']['TIMESTART']['0']['#']);