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:
nicolasconnault
2007-03-27 04:09:19 +00:00
parent bd52a0145e
commit 8d5e99f086
+6 -1
View File
@@ -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;
}
?>
?>