$action = groups_param_action();
+if ($groupid) {
+ $groupingsforgroup = groups_get_groupings_for_group($groupid);
+ if ($groupingsforgroup) {
+ // NOTE
+ // We currently assume that a group can only belong to one grouping.
+ // FIXME
+ // The UI will have to be fixed if we want to support more than one
+ // groupings per group in the future.
+ //
+ // vy-shane AT moodle DOT com
+ $groupingid = array_shift($groupingsforgroup);
+ }
+}
+
+
// Get the course information so we can print the header and
// check the course id is valid
$course = groups_get_course_info($courseid);
$groupids = groups_get_groups_in_grouping($sel_groupingid);
}
if ($groupids) {
- // Put the groupings into a hash and sort them
+ // Put the groups into a hash and sort them
foreach($groupids as $id) {
$listgroups[$id] = groups_get_group_displayname($id);
}
*/
// Hide the updategroups input since AJAX will take care of this.
- var updateGroupsButton = document.getElementById("updategroups");
- updateGroupsButton.setAttribute("style", "display:none;");
+ YAHOO.util.Dom.setStyle("updategroups", "display", "none");
}
/**
};
// Hide the updatemembers input since AJAX will take care of this.
- var updateMembersButton = document.getElementById("updatemembers");
- updateMembersButton.setAttribute("style", "display:none;");
+ YAHOO.util.Dom.setStyle("updatemembers", "display", "none");
}
/**