From e0f8b50da7107054f071eb89f7a1d99f01503f73 Mon Sep 17 00:00:00 2001 From: stronk7 Date: Thu, 24 Jun 2004 22:41:00 +0000 Subject: [PATCH] Added support for timestart and timeend (user_teachers table) and idnumber (course table). :-) --- backup/backuplib.php | 3 +++ backup/restorelib.php | 10 ++++++++++ 2 files changed, 13 insertions(+) diff --git a/backup/backuplib.php b/backup/backuplib.php index 93e2d1b9f1..dd3f4783da 100644 --- a/backup/backuplib.php +++ b/backup/backuplib.php @@ -557,6 +557,7 @@ fwrite ($bf,full_tag("PASSWORD",3,false,$course->password)); fwrite ($bf,full_tag("FULLNAME",3,false,$course->fullname)); fwrite ($bf,full_tag("SHORTNAME",3,false,$course->shortname)); + fwrite ($bf,full_tag("IDNUMBER",3,false,$course->idnumber)); fwrite ($bf,full_tag("SUMMARY",3,false,$course->summary)); fwrite ($bf,full_tag("FORMAT",3,false,$course->format)); fwrite ($bf,full_tag("SHOWGRADES",3,false,$course->showgrades)); @@ -794,6 +795,8 @@ fwrite ($bf,full_tag("AUTHORITY",6,false,$tea->authority)); fwrite ($bf,full_tag("TEA_ROLE",6,false,$tea->role)); fwrite ($bf,full_tag("EDITALL",6,false,$tea->editall)); + fwrite ($bf,full_tag("TIMESTART",6,false,$tea->timestart)); + fwrite ($bf,full_tag("TIMEEND",6,false,$tea->timeend)); fwrite ($bf,full_tag("TIMEMODIFIED",6,false,$tea->timemodified)); fwrite ($bf,full_tag("TIMEACCESS",6,false,$tea->timeaccess)); //Print ROLE end diff --git a/backup/restorelib.php b/backup/restorelib.php index 4f5ea37205..8bb2b9b8ea 100644 --- a/backup/restorelib.php +++ b/backup/restorelib.php @@ -528,6 +528,7 @@ $course->password = addslashes($course_header->course_password); $course->fullname = addslashes($course_header->course_fullname); $course->shortname = addslashes($course_header->course_shortname); + $course->idnumber = addslashes($course_header->course_idnumber); $course->summary = addslashes($course_header->course_summary); $course->format = addslashes($course_header->course_format); $course->showgrades = addslashes($course_header->course_showgrades); @@ -2160,6 +2161,9 @@ case "SHORTNAME": $this->info->course_shortname = $this->getContents(); break; + case "IDNUMBER": + $this->info->course_idnumber = $this->getContents(); + break; case "SUMMARY": $this->info->course_summary = $this->getContents(); break; @@ -2522,6 +2526,12 @@ case "EDITALL": $this->info->temprole->editall = $this->getContents(); break; + case "TIMESTART": + $this->info->temprole->timestart = $this->getContents(); + break; + case "TIMEEND": + $this->info->temprole->timeend = $this->getContents(); + break; case "TIMEMODIFIED": $this->info->temprole->timemodified = $this->getContents(); break; -- 2.39.5