Skip to content

Commit

Permalink
MDL-9040: Enabled disabling of any buttons that always lead to errors…
Browse files Browse the repository at this point in the history
…. Javascript dynamically displays/hides buttons depending on which groupings/groups are selected. This required a number of extensive modifications, but degrades nicely without JS.
  • Loading branch information
nicolasconnault committed Mar 27, 2007
1 parent bd52a01 commit 8d5e99f
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion group/lib/utillib.php
Expand Up @@ -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);
Expand Down Expand Up @@ -414,4 +419,4 @@ function groups_param_action($prefix = 'act_') {
return $action;
}

?>
?>

0 comments on commit 8d5e99f

Please sign in to comment.