Permalink
Browse files

MDL-12550, wrong user count in role assignment

  • Loading branch information...
toyomoyo
toyomoyo committed Dec 12, 2007
1 parent b2744af commit a5c1df9bcf274be22c2fb60e64c571e4998d5a11
Showing with 7 additions and 5 deletions.
  1. +1 −1 admin/roles/assign.html
  2. +6 −4 admin/roles/assign.php
View
@@ -58,7 +58,7 @@
<?php
$i=0;
if (!empty($searchtext)) {
echo "<optgroup label=\"$strsearchresults (" . $availableusers->_numOfRows . ")\">\n";
echo "<optgroup label=\"$strsearchresults (" . $usercount . ")\">\n";
while ($user = rs_fetch_next_record($availableusers)) {
$fullname = fullname($user, true);
echo "<option value=\"$user->id\">".$fullname.", ".$user->email."</option>\n";
View
@@ -300,8 +300,9 @@
$availableusers = get_recordset_sql($select . $from . $where . $selectsql . $excsql);
}
$usercount = count_records_sql($countselect . $from . $where) - count($contextusers);
$usercount = $availableusers->_numOfRows;
}
} else {
@@ -327,8 +328,9 @@
AND r.roleid = '.$roleid.'
'.$selectsql.')
ORDER BY lastname ASC, firstname ASC');
$usercount = count_records_select('user', $select) - count($contextusers);
$usercount = $availableusers->_numOfRows;
}
echo '<div style="text-align:center">'.$strcurrentcontext.': '.print_context_name($context).'<br/>';

0 comments on commit a5c1df9

Please sign in to comment.