From: nicolasconnault Date: Fri, 30 Mar 2007 08:31:20 +0000 (+0000) Subject: MDL-9115 Added new strings to lang/en_utf8/group.php (where in roles.php before!... X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=27c69abeeaa47cd8aedc403342509a25f2616ec5;p=moodle.git MDL-9115 Added new strings to lang/en_utf8/group.php (where in roles.php before!). Also cleaned up page a little more so the backend code is at the top, with the HTML output at the bottom. We may be able to use mform with this page eventually. AJAX would also help. --- diff --git a/group/assign.php b/group/assign.php index 422eaeccd3..8e379c77c8 100644 --- a/group/assign.php +++ b/group/assign.php @@ -70,6 +70,53 @@ if ($success) { } } } + + $groupmembers = groups_get_members($groupid); + $groupmembersoptions = ''; + $groupmemberscount = 0; + if ($groupmembers != false) { + // Put the groupings into a hash and sorts them + foreach ($groupmembers as $userid) { + $listmembers[$userid] = groups_get_user_displayname($userid, $courseid); + $groupmemberscount ++; + } + natcasesort($listmembers); + + // Print out the HTML + foreach($listmembers as $id => $name) { + $groupmembersoptions .= "\n"; + } + } else { + $groupmembersoptions .= ''; + } + + //TODO: If no 'showall' button, then set true. + $showall = true; + + $potentialmembers = array(); + $potentialmembersoptions = ''; + $potentialmemberscount = 0; + if (!$showall && $groupingid != GROUP_NOT_IN_GROUPING) { + $potentialmembers = groups_get_users_not_in_any_group_in_grouping($courseid, $groupingid, $groupid); + } else { + $potentialmembers = groups_get_users_not_in_group($courseid, $groupid); + } + + if ($potentialmembers != false) { + // Put the groupings into a hash and sorts them + foreach ($potentialmembers as $userid) { + $nonmembers[$userid] = groups_get_user_displayname($userid, $courseid); + $potentialmemberscount++; + } + natcasesort($nonmembers); + + // Print out the HTML + foreach($nonmembers as $id => $name) { + $potentialmembersoptions .= "\n"; + } + } else { + $potentialmembersoptions .= ''; + } // Print the page and form $strgroups = get_string('groups'); @@ -98,30 +145,13 @@ if ($success) {
- +
@@ -134,37 +164,13 @@ if ($success) {

- +