Skip to content

Commit

Permalink
1. Fixed xhtml errors
Browse files Browse the repository at this point in the history
2. Added correct breadcrumb back to group/index page, preserving selections.
  • Loading branch information
nicolasconnault committed Mar 30, 2007
1 parent 293d2ce commit ef5a26d
Showing 1 changed file with 16 additions and 11 deletions.
27 changes: 16 additions & 11 deletions group/assign.php
Original file line number Diff line number Diff line change
Expand Up @@ -81,28 +81,29 @@
$course->fullname,
"<a href=\"$CFG->wwwroot/course/view.php?id=$courseid\">$course->shortname</a> ".
"-> <a href=\"$CFG->wwwroot/user/index.php?id=$courseid\">$strparticipants</a> ".
"-> $strgroups", '', '', true, '', user_login_string($course, $USER));
'-> <a href="' .format_string(groups_home_url($courseid, $groupid, $groupingid, false)) . "\">$strgroups</a>".
'-> '. get_string('adduserstogroup', 'group'), '', '', true, '', user_login_string($course, $USER));

?>
<div id="addmembersform">
<h3 class="main"><?php print_string('adduserstogroup', 'group'); echo " $groupname"; ?></h3>

<form name="assignform" id="assignform" method="post" action="">

<form id="assignform" method="post" action="">
<div>
<input type="hidden" name="sesskey" value="<?php p(sesskey()); ?>" />
<input type="hidden" name="courseid" value="<?php p($courseid); ?>" />
<input type="hidden" name="grouping" value="<?php echo $groupingid; ?>" />
<input type="hidden" name="group" value="<?php echo $groupid; ?>" />

<table summary="" align="center" cellpadding="5" cellspacing="0">
<table summary="" cellpadding="5" cellspacing="0">
<tr>
<td valign="top">
<label for="removeselect"><?php print_string('existingusers', 'role'); //count($contextusers) ?></label>
<br />
<select name="removeselect[]" size="20" id="removeselect" multiple="multiple"
onfocus="document.assignform.add.disabled=true;
document.assignform.remove.disabled=false;
document.assignform.addselect.selectedIndex=-1;">
onfocus="document.getElementById('assignform').add.disabled=true;
document.getElementById('assignform').remove.disabled=false;
document.getElementById('assignform').addselect.selectedIndex=-1;">
<?php
$userids = groups_get_members($groupid);

Expand All @@ -117,6 +118,8 @@
foreach($listmembers as $id => $name) {
echo "<option value=\"$id\">$name</option>\n";
}
} else {
echo '<option>&nbsp;</option>';
}
?>
</select></td>
Expand All @@ -134,9 +137,9 @@
<label for="addselect"><?php print_string('potentialusers', 'role'); //$usercount ?></label>
<br />
<select name="addselect[]" size="20" id="addselect" multiple="multiple"
onfocus="document.assignform.add.disabled=false;
document.assignform.remove.disabled=true;
document.assignform.removeselect.selectedIndex=-1;">
onfocus="document.getElementById('assignform').add.disabled=false;
document.getElementById('assignform').remove.disabled=true;
document.getElementById('assignform').removeselect.selectedIndex=-1;">
<?php
//TODO: If no 'showall' button, then set true.
$showall = true;
Expand All @@ -158,6 +161,8 @@
foreach($nonmembers as $id => $name) {
echo "<option value=\"$id\">$name</option>\n";
}
} else {
echo '<option>&nbsp;</option>';
}
?>
</select>
Expand All @@ -174,7 +179,7 @@
<input type="submit" name="cancel" value="<?php print_string('return', 'group'); ?>" />
</td></tr>
</table>

</div>
</form>
</div>

Expand Down

0 comments on commit ef5a26d

Please sign in to comment.