MDL-9040: Enabled disabling of any buttons that always lead to errors. Javascript dynamically displays/hides buttons depending on which groupings/groups are selected. This required a number of extensive modifications, but degrades nicely without JS.
This commit is contained in:
@@ -39,6 +39,11 @@ function groups_count_group_members($groupid) {
|
||||
function groups_count_groups_in_grouping($groupingid, $courseid) {
|
||||
if (GROUP_NOT_IN_GROUPING == $groupingid) {
|
||||
$groupids = groups_get_groups_not_in_any_grouping($courseid);
|
||||
|
||||
if ($groupids === false) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return count($groupids);
|
||||
} elseif (GROUP_ANY_GROUPING == $groupingid) {
|
||||
return count_records('groups_courses_groups', 'courseid', $courseid);
|
||||
@@ -414,4 +419,4 @@ function groups_param_action($prefix = 'act_') {
|
||||
return $action;
|
||||
}
|
||||
|
||||
?>
|
||||
?>
|
||||
|
||||
Reference in New Issue
Block a user