mirror of
https://github.com/moodle/moodle.git
synced 2025-08-04 16:36:37 +02:00
Fixes bug MDL-9221 "new group admin - can't view full group name".
This commit is contained in:
parent
370c7b7d15
commit
eb674f8b21
4 changed files with 41 additions and 14 deletions
|
@ -199,12 +199,14 @@ if ($success) {
|
||||||
<input type="hidden" name="sesskey" value="<?php p($sesskey) ?>" />
|
<input type="hidden" name="sesskey" value="<?php p($sesskey) ?>" />
|
||||||
<input type="hidden" name="roleid" value="<?php p($roleid) ?>" />
|
<input type="hidden" name="roleid" value="<?php p($roleid) ?>" />
|
||||||
*/
|
*/
|
||||||
echo '<table cellpadding="10" class="generaltable generalbox groupmanagementtable boxaligncenter" summary="">'."\n";
|
echo '<table cellpadding="6" class="generaltable generalbox groupmanagementtable boxaligncenter" summary="">'."\n";
|
||||||
echo '<tr>'."\n";
|
echo '<tr>'."\n";
|
||||||
echo '<td class="generalboxcontent">'."\n";
|
echo '<td class="generalboxcontent">'."\n";
|
||||||
echo '<p><label for="groupings">' . get_string('groupings', 'group') . '</label></p>'."\n";
|
echo '<p><label for="groupings">' . get_string('groupings', 'group') . '<span id="dummygrouping"> </span></label></p>'."\n";
|
||||||
echo '<select name="grouping" id="groupings" size="15" class="select"';
|
echo '<select name="grouping" id="groupings" size="15" class="select"';
|
||||||
echo ' onchange="groupsCombo.refreshGroups(this.options[this.selectedIndex].value);">';
|
echo ' onchange="groupsCombo.refreshGroups(this.options[this.selectedIndex].value);"';
|
||||||
|
//NOTE: onclick/onmouseout is for long names in IE6 (Firefox/IE7 display OPTION title).
|
||||||
|
echo ' onclick="window.status=this.options[this.selectedIndex].title;" onmouseout="window.status=\'\';">'."\n";
|
||||||
|
|
||||||
$groupingids = groups_get_groupings($courseid);
|
$groupingids = groups_get_groupings($courseid);
|
||||||
if (groups_count_groups_in_grouping(GROUP_NOT_IN_GROUPING, $courseid) > 0) {
|
if (groups_count_groups_in_grouping(GROUP_NOT_IN_GROUPING, $courseid) > 0) {
|
||||||
|
@ -229,7 +231,7 @@ if ($success) {
|
||||||
$select = ' selected="selected"';
|
$select = ' selected="selected"';
|
||||||
$sel_groupingid = $id;
|
$sel_groupingid = $id;
|
||||||
}
|
}
|
||||||
echo "<option value=\"$id\"$select>$name</option>\n";
|
echo "<option value=\"$id\"$select title=\"$name\">$name</option>\n";
|
||||||
$count++;
|
$count++;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
@ -264,8 +266,9 @@ if ($success) {
|
||||||
echo '<p><input type="submit" ' . $printerfriendly_disabled . ' name="act_printerfriendly" id="printerfriendly" value="'
|
echo '<p><input type="submit" ' . $printerfriendly_disabled . ' name="act_printerfriendly" id="printerfriendly" value="'
|
||||||
. get_string('printerfriendly', 'group') . '" /></p>'."\n";
|
. get_string('printerfriendly', 'group') . '" /></p>'."\n";
|
||||||
echo "</td>\n<td>\n";
|
echo "</td>\n<td>\n";
|
||||||
echo '<p><label for="groups" id="groupslabel">' .get_string('groupsinselectedgrouping', 'group') . '</label></p>'."\n";
|
echo '<p><label for="groups"><span id="groupslabel">'.get_string('groupsinselectedgrouping', 'group').' </span><span id="thegrouping">'.get_string('grouping', 'group').'</span></label></p>'."\n";
|
||||||
echo '<select name="group" id="groups" size="15" class="select" onchange="membersCombo.refreshMembers(this.options[this.selectedIndex].value);">'."\n";
|
echo '<select name="group" id="groups" size="15" class="select" onchange="membersCombo.refreshMembers(this.options[this.selectedIndex].value);"'."\n";
|
||||||
|
echo ' onclick="window.status=this.options[this.selectedIndex].title;" onmouseout="window.status=\'\';">'."\n";
|
||||||
|
|
||||||
if (GROUP_NOT_IN_GROUPING == $sel_groupingid) {
|
if (GROUP_NOT_IN_GROUPING == $sel_groupingid) {
|
||||||
$groupids = groups_get_groups_not_in_any_grouping($courseid); //$sel_groupingid
|
$groupids = groups_get_groups_not_in_any_grouping($courseid); //$sel_groupingid
|
||||||
|
@ -284,7 +287,7 @@ if ($success) {
|
||||||
$select = ' selected="selected"';
|
$select = ' selected="selected"';
|
||||||
$sel_groupid = $group->id;
|
$sel_groupid = $group->id;
|
||||||
}
|
}
|
||||||
echo "<option value=\"{$group->id}\"$select>{$group->name}</option>\n";
|
echo "<option value=\"{$group->id}\"$select title=\"{$group->name}\">{$group->name}</option>\n";
|
||||||
$count++;
|
$count++;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
@ -318,8 +321,10 @@ if ($success) {
|
||||||
|
|
||||||
echo '</td>'."\n";
|
echo '</td>'."\n";
|
||||||
echo '<td>'."\n";
|
echo '<td>'."\n";
|
||||||
echo '<p><label for="members" id="memberslabel">' . get_string('membersofselectedgroup', 'group') . '</label></p>'."\n";
|
echo '<p><label for="members"><span id="memberslabel">'.get_string('membersofselectedgroup', 'group').' </span><span id="thegroup">'.get_string('group', 'group').'</span></label></p>'."\n";
|
||||||
echo '<select name="user[]" id="members" size="15" multiple="multiple" class="select">'."\n";
|
//NOTE: the SELECT was, multiple="multiple" name="user[]" - not used and breaks onclick.
|
||||||
|
echo '<select name="user" id="members" size="15" class="select"'."\n";
|
||||||
|
echo ' onclick="window.status=this.options[this.selectedIndex].title;" onmouseout="window.status=\'\';">'."\n";
|
||||||
|
|
||||||
if (isset($sel_groupid)) {
|
if (isset($sel_groupid)) {
|
||||||
$userids = groups_get_members($sel_groupid);
|
$userids = groups_get_members($sel_groupid);
|
||||||
|
@ -331,7 +336,7 @@ if ($success) {
|
||||||
echo '<option> </option>';
|
echo '<option> </option>';
|
||||||
} else {
|
} else {
|
||||||
foreach ($user_names as $user) {
|
foreach ($user_names as $user) {
|
||||||
echo "<option value=\"{$user->id}\">{$user->name}</option>\n";
|
echo "<option value=\"{$user->id}\" title=\"{$user->name}\">{$user->name}</option>\n";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -34,6 +34,7 @@ function UpdatableGroupsCombo(wwwRoot, courseId) {
|
||||||
for (var i=0; i<groups.length; i++) {
|
for (var i=0; i<groups.length; i++) {
|
||||||
var optionEl = document.createElement("option");
|
var optionEl = document.createElement("option");
|
||||||
optionEl.setAttribute("value", groups[i].id);
|
optionEl.setAttribute("value", groups[i].id);
|
||||||
|
optionEl.title = groups[i].name;
|
||||||
optionEl.innerHTML = groups[i].name;
|
optionEl.innerHTML = groups[i].name;
|
||||||
groupsComboEl.appendChild(optionEl);
|
groupsComboEl.appendChild(optionEl);
|
||||||
}
|
}
|
||||||
|
@ -71,9 +72,16 @@ function UpdatableGroupsCombo(wwwRoot, courseId) {
|
||||||
UpdatableGroupsCombo.prototype.refreshGroups = function (groupingId) {
|
UpdatableGroupsCombo.prototype.refreshGroups = function (groupingId) {
|
||||||
// Add the loader gif image.
|
// Add the loader gif image.
|
||||||
createLoaderImg("groupsloader", "groupslabel", this.wwwRoot);
|
createLoaderImg("groupsloader", "groupslabel", this.wwwRoot);
|
||||||
|
|
||||||
|
// Update the label.
|
||||||
|
var selectEl = document.getElementById("groupings");
|
||||||
|
var spanEl = document.getElementById("thegrouping");
|
||||||
|
if (selectEl && selectEl.selectedIndex >= 0) {
|
||||||
|
spanEl.innerHTML = selectEl.options[selectEl.selectedIndex].title;
|
||||||
|
}
|
||||||
|
|
||||||
// Clear the groups combo box.
|
// Clear the groups combo box.
|
||||||
var selectEl = document.getElementById("groups");
|
selectEl = document.getElementById("groups");
|
||||||
if (selectEl) {
|
if (selectEl) {
|
||||||
while (selectEl.firstChild) {
|
while (selectEl.firstChild) {
|
||||||
selectEl.removeChild(selectEl.firstChild);
|
selectEl.removeChild(selectEl.firstChild);
|
||||||
|
@ -129,6 +137,7 @@ function UpdatableMembersCombo(wwwRoot, courseId) {
|
||||||
for (var i=0; i<members.length; i++) {
|
for (var i=0; i<members.length; i++) {
|
||||||
var optionEl = document.createElement("option");
|
var optionEl = document.createElement("option");
|
||||||
optionEl.setAttribute("value", members[i].id);
|
optionEl.setAttribute("value", members[i].id);
|
||||||
|
optionEl.title = members[i].name;
|
||||||
optionEl.innerHTML = members[i].name;
|
optionEl.innerHTML = members[i].name;
|
||||||
selectEl.appendChild(optionEl);
|
selectEl.appendChild(optionEl);
|
||||||
}
|
}
|
||||||
|
@ -156,9 +165,16 @@ function UpdatableMembersCombo(wwwRoot, courseId) {
|
||||||
UpdatableMembersCombo.prototype.refreshMembers = function (groupId) {
|
UpdatableMembersCombo.prototype.refreshMembers = function (groupId) {
|
||||||
// Add the loader gif image.
|
// Add the loader gif image.
|
||||||
createLoaderImg("membersloader", "memberslabel", this.wwwRoot);
|
createLoaderImg("membersloader", "memberslabel", this.wwwRoot);
|
||||||
var selectEl = document.getElementById("members");
|
|
||||||
|
// Update the label.
|
||||||
|
var selectEl = document.getElementById("groups");
|
||||||
|
var spanEl = document.getElementById("thegroup");
|
||||||
|
if (selectEl && selectEl.selectedIndex >= 0) {
|
||||||
|
spanEl.innerHTML = selectEl.options[selectEl.selectedIndex].title;
|
||||||
|
}
|
||||||
|
|
||||||
// Clear the members combo box.
|
// Clear the members combo box.
|
||||||
|
selectEl = document.getElementById("members");
|
||||||
if (selectEl) {
|
if (selectEl) {
|
||||||
while (selectEl.firstChild) {
|
while (selectEl.firstChild) {
|
||||||
selectEl.removeChild(selectEl.firstChild);
|
selectEl.removeChild(selectEl.firstChild);
|
||||||
|
|
|
@ -835,6 +835,13 @@ body#mod-forum-index .generalbox .cell {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
#thegroup, #thegrouping, #dummygrouping {
|
||||||
|
font-size: 0.8em;
|
||||||
|
letter-spacing: -0.01em;
|
||||||
|
display: block;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/***
|
/***
|
||||||
*** Phpinfo display
|
*** Phpinfo display
|
||||||
***/
|
***/
|
||||||
|
|
|
@ -400,7 +400,7 @@ form.popupform label {
|
||||||
}
|
}
|
||||||
|
|
||||||
.groupmanagementtable select {
|
.groupmanagementtable select {
|
||||||
width:200px;
|
width: 18em;
|
||||||
}
|
}
|
||||||
|
|
||||||
img.icon {
|
img.icon {
|
||||||
|
@ -3354,4 +3354,3 @@ wikiadminactions {
|
||||||
.workshopkey {
|
.workshopkey {
|
||||||
text-align:center;
|
text-align:center;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue