@ -298,7 +297,10 @@ function get_number_of_users() {
LEFT JOIN $course_user_table cu on u.user_id = cu.user_id and course_code='".$_SESSION['_course']['id']."'";
// we change the SQL when we have a filter
if (isset($_GET['subscribe_user_filter_value']) AND !empty($_GET['subscribe_user_filter_value']) AND api_get_setting('ProfilingFilterAddingUsers') == 'true'){
if (isset($_GET['subscribe_user_filter_value']) AND
@ -356,26 +358,14 @@ function get_number_of_users() {
$row = Database::fetch_row($res);
$count_user = $row[0];
}
/* @todo seems not to be used
// we add 1 for every additional user (a user where the keyword matches one of the additional profile fields)
// that is not yet in the course and not yet in the search result
if (isset ($_REQUEST['keyword']) AND api_get_setting('ProfilingFilterAddingUsers') == 'true') {
foreach($additional_users as $additional_user_key=>$additional_user_value){
if (!in_array($additional_user_key,$users) AND !in_array($additional_user_key,$users_of_course)){
$result++;
}
}
}
*/
return $count_user;
}
/**
* Get the users to display on the current page.
*/
function get_user_data($from, $number_of_items, $column, $direction) {
global $_course, $_configuration;
function get_user_data($from, $number_of_items, $column, $direction)
{
global $_configuration;
$url_access_id = api_get_current_access_url_id();
$course_code = api_get_course_id();
@ -628,7 +618,6 @@ function reg_filter($user_id) {
return $result;
}
/**
* Build the active-column of the table to lock or unlock a certain user
* lock = the user can no longer use this account
@ -650,6 +639,7 @@ function active_filter($active, $url_params, $row) {
$action='AccountInactive';
$image='error';
}
$result = null;
if ($row['0']<>$_user['user_id']) { // you cannot lock yourself out otherwise you could disable all the accounts including your own => everybody is locked out and nobody can change it anymore.