$indexList['firstname'] = $header_nr; $table->set_header($header_nr++, get_lang('FirstName')); } $indexList['username'] = $header_nr; $table->set_header($header_nr++, get_lang('LoginName')); $indexList['groups'] = $header_nr; $table->set_header($header_nr++, get_lang('GroupSingle'), false); if (api_is_allowed_to_edit(null, true) && api_get_setting('allow_user_course_subscription_by_course_admin') == 'true') { } else { $table->set_column_filter(0, 'hide_field'); } $hideFields = api_get_configuration_value('hide_user_field_from_list'); if (!empty($hideFields)) { foreach ($hideFields as $fieldToHide) { if (isset($indexList[$fieldToHide])) { $table->setHideColumn($indexList[$fieldToHide]); } } } if (api_is_allowed_to_edit(null, true)) { $table->set_header($header_nr++, get_lang('Status'), false); $table->set_header($header_nr++, get_lang('Active'), false); if (api_get_setting('allow_user_course_subscription_by_course_admin') == 'true') { $table->set_column_filter(9, 'active_filter'); } else { $table->set_column_filter(9, 'active_filter'); } foreach ($extraFields as $extraField) { $table->set_header($header_nr++, $extraField['display_text'], false); } // Actions column