MDL-2674 backup always backsup/restores groups regardless of user settings; remerged from MOODLE_19_STABLE

This commit is contained in:
skodak 2008-03-17 21:33:12 +00:00
parent 7f9bd1499b
commit e807e47354
2 changed files with 5 additions and 2 deletions

View File

@ -430,14 +430,15 @@ function selectItemInCheckboxByName(formId, checkName, checked ) {
echo "<td align=\"right\" colspan=\"2\"><b>";
$helplink = helpbutton('grouprestore', get_string('groups'), '', true, false, '', true);
if (empty($CFG->enablegroupings)) {
echo get_string('groups').$helplink.":";
echo '<label for="menurestore_groups">'.get_string ("groups").'</label>'.$helplink;
echo "</b></td><td colspan=\"2\">";
$group_options[RESTORE_GROUPS_NONE] = get_string('no');
$group_options[RESTORE_GROUPS_ONLY] = get_string('yes');
} else {
echo get_string('groupsgroupings', 'group').$helplink.":";
echo '<label for="menurestore_groups">'.get_string ("groupsgroupings").'</label>'.$helplink;
echo "</b></td><td colspan=\"2\">";
$group_options[RESTORE_GROUPS_NONE] = get_string('none');
$group_options[RESTORE_GROUPS_ONLY] = get_string('groups');
$group_options[RESTORE_GROUPINGS_ONLY] = get_string('groupingsonly', 'group');
$group_options[RESTORE_GROUPS_GROUPINGS] = get_string('groupsgroupings', 'group'); //all.

View File

@ -1,6 +1,8 @@
<?php //$Id$
//Functions used in restore
require_once($CFG->libdir.'/gradelib.php');
/**
* Group backup/restore constants, 0.
*/