diff --git a/group/index.php b/group/index.php
index ec806d379b..58cb20fd3e 100644
--- a/group/index.php
+++ b/group/index.php
@@ -120,7 +120,7 @@ if ($success) {
}
redirect(groups_group_edit_url($courseid, null, $groupingid, false));
break;
- case 'addgroupstogroupingsform':
+ case 'addgroupstogroupingform':
break;
case 'updategroups': //Currently reloading.
break;
@@ -176,7 +176,10 @@ if ($success) {
0) {
+ //NOTE, only show the pseudo-grouping if it has groups.
+ $groupingids[] = GROUP_NOT_IN_GROUPING;
+ }
if ($groupingids) {
// Put the groupings into a hash and sort them
@@ -248,7 +251,7 @@ if ($success) {
-
+
diff --git a/group/lib/modulelib.php b/group/lib/modulelib.php
index 730337f49c..98b692e466 100644
--- a/group/lib/modulelib.php
+++ b/group/lib/modulelib.php
@@ -157,7 +157,7 @@ function groups_m_get_selected_group($cmid, $permissiontype, $userid) {
function groups_m_get_groups_for_user($cm, $userid) {
//echo 'User'; print_object($cm);
$groupingid = groups_get_grouping_for_coursemodule($cm);
- if (!$groupingid) {
+ if (!$groupingid || GROUP_NOT_IN_GROUPING == $groupingid) {
return false;
}
if (!isset($cm->course) || !groupmode($cm->course, $cm)) {
@@ -166,9 +166,6 @@ function groups_m_get_groups_for_user($cm, $userid) {
elseif (GROUP_ANY_GROUPING == $groupingid) {
return groups_get_groups_for_user($userid, $cm->course);
}
- elseif (GROUP_NOT_IN_GROUPING == $groupingid) {
- return groups_get_groups_not_in_any_grouping($cm->course);
- }
return groups_get_groups_for_user_in_grouping($userid, $groupingid);
}
diff --git a/lang/en_utf8/group.php b/lang/en_utf8/group.php
index 243934ac2e..80517a80e4 100644
--- a/lang/en_utf8/group.php
+++ b/lang/en_utf8/group.php
@@ -48,8 +48,7 @@ $string['editgroupsettings'] = 'Edit group settings';
$string['deleteselectedgroup'] = 'Delete selected group';
$string['removegroupfromselectedgrouping'] = 'Remove group from grouping'; //'selected'
$string['creategroupinselectedgrouping'] = 'Create group in grouping';
-$string['addexistinggroupstogrouping'] = 'Add existing groups to grouping';
-$string['addgroupstogrouping'] = 'Add groups to grouping';
+$string['addgroupstogrouping'] = 'Add group to grouping'; //'groupS'
$string['removeselectedusers'] = 'Remove selected users';
$string['adduserstogroup'] = 'Add/remove users'; //'from group'
@@ -79,7 +78,6 @@ $string['newpicture'] = 'New picture';
$string['defaultgroupdescription'] = 'Default group description';
$string['displaygrouping'] = 'Display grouping';
-$string['addgroupstogrouping'] = 'Add groups to grouping';
$string['showusersalreadyingroup'] = 'Show users already in a group in the grouping';
$string['save'] = 'Save';
--
2.39.5