adding limits to get_role_users() to enable extracting specific users

This commit is contained in:
toyomoyo
2007-06-22 09:03:03 +00:00
parent 2cc4b0f90d
commit 2f2d4fb53f
+2 -2
View File
@@ -3684,7 +3684,7 @@ function get_users_by_capability($context, $capability, $fields='', $sort='',
* @param bool parent if true, get list of users assigned in higher context too
* @return array()
*/
function get_role_users($roleid, $context, $parent=false, $fields='', $sort='u.lastname ASC', $view=false) {
function get_role_users($roleid, $context, $parent=false, $fields='', $sort='u.lastname ASC', $view=false, $limitfrom='', $limitnum='') {
global $CFG;
if (empty($fields)) {
@@ -3721,7 +3721,7 @@ function get_role_users($roleid, $context, $parent=false, $fields='', $sort='u.l
ORDER BY $sort
"; // join now so that we can just use fullname() later
return get_records_sql($SQL);
return get_records_sql($SQL, $limitfrom, $limitnum);
}
/**