From: nfreear Date: Mon, 19 Feb 2007 16:38:18 +0000 (+0000) Subject: Followup fix for Bug MDL-8434 "...can't delete groups" - delete _groupings_. X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=5e4074b6aba2cff9192414d694e1925911934a9d;p=moodle.git Followup fix for Bug MDL-8434 "...can't delete groups" - delete _groupings_. --- diff --git a/group/index.php b/group/index.php index fd9bef51da..7c89781ddc 100644 --- a/group/index.php +++ b/group/index.php @@ -67,6 +67,9 @@ if ($success) { switch ($action) { + case false: //OK, display form. + break; + case 'ajax_getgroupsingrouping': if (GROUP_NOT_IN_GROUPING == $groupingid) { $groupids = groups_get_groups_not_in_any_grouping($courseid); @@ -94,6 +97,7 @@ if ($success) { case 'showgroupingpermsform': break; case 'deletegrouping': + redirect(groups_grouping_edit_url($courseid, $groupingid, $html=false, $param='delete=1')); break; case 'showcreategroupingform': redirect(groups_grouping_edit_url($courseid, null, false)); @@ -106,7 +110,7 @@ if ($success) { redirect(groups_group_edit_url($courseid, $groupid, $groupingid, false)); break; case 'deletegroup': - redirect(groups_group_edit_url($courseid, $groupid, $groupingid, false, 'delete=1')); + redirect(groups_group_edit_url($courseid, $groupid, $groupingid, $html=false, $param='delete=1')); break; case 'removegroup': break; @@ -128,12 +132,14 @@ if ($success) { break; case 'updatemembers': //Currently reloading. break; - default: - //print_error('Unknown action.'); + + default: //ERROR. + if (debugging()) { + error('Error, unknown button/action. Probably a user-interface bug!', groups_home_url($courseid)); break; + } } - // Print the page and form $strgroups = get_string('groups'); $strparticipants = get_string('participants'); @@ -198,8 +204,8 @@ if ($success) {

-

+

@@ -254,7 +260,7 @@ if ($success) { } if (isset($userids)) { //&& is_array($userids) // Put the groupings into a hash and sort them - $user_names = groups_userids_to_user_names($userids); + $user_names = groups_userids_to_user_names($userids, $courseid); foreach ($user_names as $user) { echo "\n"; @@ -271,7 +277,7 @@ if ($success) { - + ?>