From e695cd3f36d6aa96fcd2f2580a4a122d7d3da188 Mon Sep 17 00:00:00 2001 From: stronk7 Date: Thu, 22 Jan 2004 20:27:17 +0000 Subject: [PATCH] Now groupmode in course_modules is supported too. --- backup/backuplib.php | 1 + backup/restorelib.php | 6 ++++++ backup/version.php | 2 +- 3 files changed, 8 insertions(+), 1 deletion(-) diff --git a/backup/backuplib.php b/backup/backuplib.php index 94bc93b530..cbc99b3625 100644 --- a/backup/backuplib.php +++ b/backup/backuplib.php @@ -661,6 +661,7 @@ fwrite ($bf,full_tag("SCORE",6,false,$course_module[$tok]->score)); fwrite ($bf,full_tag("INDENT",6,false,$course_module[$tok]->indent)); fwrite ($bf,full_tag("VISIBLE",6,false,$course_module[$tok]->visible)); + fwrite ($bf,full_tag("GROUPMODE",6,false,$course_module[$tok]->groupmode)); fwrite ($bf,end_tag("MOD",5,true)); } //check for next diff --git a/backup/restorelib.php b/backup/restorelib.php index b281da810c..affa785e57 100644 --- a/backup/restorelib.php +++ b/backup/restorelib.php @@ -424,6 +424,7 @@ $course_module->score = $mod->score; $course_module->indent = $mod->indent; $course_module->visible = $mod->visible; + $course_module->groupmode = $mod->groupmode; $course_module->instance = null; //NOTE: The instance (new) is calculated and updated in db in the // final step of the restore. We don't know it yet. @@ -1366,6 +1367,8 @@ $this->info->tempmod->indent; $this->info->tempsection->mods[$this->info->tempmod->id]->visible = $this->info->tempmod->visible; + $this->info->tempsection->mods[$this->info->tempmod->id]->groupmode = + $this->info->tempmod->groupmode; unset($this->info->tempmod); } } @@ -1395,6 +1398,9 @@ case "VISIBLE": $this->info->tempmod->visible = $this->getContents(); break; + case "GROUPMODE": + $this->info->tempmod->groupmode = $this->getContents(); + break; } } } diff --git a/backup/version.php b/backup/version.php index 25f8f3e678..1f4b87339b 100644 --- a/backup/version.php +++ b/backup/version.php @@ -5,6 +5,6 @@ // database (backup_version) to determine whether upgrades should // be performed (see db/backup_*.php) -$backup_version = 2003122900; // The current version is a date (YYYYMMDDXX) +$backup_version = 2004012200; // The current version is a date (YYYYMMDDXX) $backup_release = "1.2 development"; // User-friendly version number -- 2.39.5