Permalink
Browse files

Now group members are only included (backup and restore) if

we have selected to have users! Thanks to Etienne! Bug 2486
(http://moodle.org/bugs/bug.php?op=show&bugid=2486)

Merged from MOODLE_14_STABLE
  • Loading branch information...
stronk7
stronk7 committed Feb 4, 2005
1 parent 5722489 commit 1d9169d31245f227e3cb574486de1ff5b9ee0627
Showing with 9 additions and 4 deletions.
  1. +4 −2 backup/backuplib.php
  2. +5 −2 backup/restorelib.php
View
@@ -1187,8 +1187,10 @@ function backup_groups_info($bf,$preferences) {
fwrite ($bf,full_tag("TIMECREATED",4,false,$group->timecreated));
fwrite ($bf,full_tag("TIMEMODIFIED",4,false,$group->timemodified));
//Now, backup groups_members
$status2 = backup_groups_members_info($bf,$preferences,$group->id);
//Now, backup groups_members, only if users are included
if ($preferences->backup_users != 2) {
$status2 = backup_groups_members_info($bf,$preferences,$group->id);
}
//End group tag
fwrite ($bf,end_tag("GROUP",3,true));
View
@@ -1267,8 +1267,11 @@ function restore_create_groups($restore,$xml_file) {
backup_putid($restore->backup_unique_code,"group",
$group->id, $newid);
}
//Now restore members in the groups_members
$status2 = restore_create_groups_members($newid,$info,$restore);
//Now restore members in the groups_members, only if
//users are included
if ($restore->users != 2) {
$status2 = restore_create_groups_members($newid,$info,$restore);
}
}
}
}

0 comments on commit 1d9169d

Please sign in to comment.