mirror of
https://github.com/moodle/moodle.git
synced 2025-01-18 05:58:34 +01:00
UI now selects the relevant grouping and/or group when these are passed as GET parameters to the script.
Also fixed javascript for hiding view buttons. Was not working in IE [insert swear words here].
This commit is contained in:
parent
560b3acc85
commit
77ea333014
@ -24,6 +24,21 @@ $userid = optional_param('user', false, PARAM_INT);
|
||||
$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);
|
||||
@ -194,7 +209,7 @@ if ($success) {
|
||||
$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);
|
||||
}
|
||||
|
@ -62,8 +62,7 @@ function UpdatableGroupsCombo(wwwRoot, courseId) {
|
||||
*/
|
||||
|
||||
// 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");
|
||||
}
|
||||
|
||||
/**
|
||||
@ -123,8 +122,7 @@ function UpdatableMembersCombo(wwwRoot, courseId) {
|
||||
};
|
||||
|
||||
// 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");
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
x
Reference in New Issue
Block a user