From 87808d0a013c3ec1b1937dbbdef4c7dd169c4283 Mon Sep 17 00:00:00 2001 From: stronk7 Date: Tue, 27 Apr 2004 16:37:53 +0000 Subject: [PATCH] Now, in topics format, every course can decide about how to display hidden topics (collapsed or invisible) Added support for course->hiddentopics in backup & restore --- backup/backuplib.php | 1 + backup/restorelib.php | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/backup/backuplib.php b/backup/backuplib.php index 6f42d620c0..19dd0dc17f 100644 --- a/backup/backuplib.php +++ b/backup/backuplib.php @@ -568,6 +568,7 @@ fwrite ($bf,full_tag("LANG",3,false,$course->lang)); fwrite ($bf,full_tag("MARKER",3,false,$course->marker)); fwrite ($bf,full_tag("VISIBLE",3,false,$course->visible)); + fwrite ($bf,full_tag("HIDDENTOPICS",3,false,$course->hiddentopics)); fwrite ($bf,full_tag("TIMECREATED",3,false,$course->timecreated)); $status = fwrite ($bf,full_tag("TIMEMODIFIED",3,false,$course->timemodified)); //Print header end diff --git a/backup/restorelib.php b/backup/restorelib.php index 6893af36bd..7a68725244 100644 --- a/backup/restorelib.php +++ b/backup/restorelib.php @@ -407,6 +407,7 @@ $course->lang = addslashes($course_header->course_lang); $course->marker = addslashes($course_header->course_marker); $course->visible = addslashes($course_header->course_visible); + $course->hiddentopics = addslashes($course_header->course_hiddentopics); $course->timecreated = addslashes($course_header->course_timecreated); $course->timemodified = addslashes($course_header->course_timemodified); //Adjust blockinfo field. @@ -2073,6 +2074,9 @@ case "VISIBLE": $this->info->course_visible = $this->getContents(); break; + case "HIDDENTOPICS": + $this->info->course_hiddentopics = $this->getContents(); + break; case "TIMECREATED": $this->info->course_timecreated = $this->getContents(); break; -- 2.39.5