MDL-12550, wrong user count in role assignment
This commit is contained in:
@@ -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";
|
||||
|
||||
@@ -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/>';
|
||||
|
||||
Reference in New Issue
Block a user