18 declare(strict_types=1);
    20 declare(strict_types=1);
    52         $this->
lng->loadLanguageModule(
'lso');
    53         $this->
lng->loadLanguageModule(
'trac');
    54         $this->
lng->loadLanguageModule(
'rbac');
    55         $this->
lng->loadLanguageModule(
'mmbr');
    56         $this->
lng->loadLanguageModule(
'user');
    57         $this->
lng->loadLanguageModule(
'ps');
    74         $this->
setRowTemplate(
"tpl.show_participants_row.html", 
"Modules/LearningSequence");
    79         $this->
addColumn($this->
lng->txt(
'name'), 
'lastname', 
'20%');
    84             $this->
addColumn($all_cols[$col][
'txt'], $col);
    92             $this->
addColumn($this->
lng->txt(
'first_access'), 
"first_access");
    93             $this->
addColumn($this->
lng->txt(
'last_access'), 
"last_access");
    95         $this->
addColumn($this->
lng->txt(
'completed_steps'), 
"completed_steps");
    96         $this->
addColumn($this->
lng->txt(
'last_visited_step'), 
"last_visited_step");
    97         $this->
addColumn($this->
lng->txt(
'lso_notification'), 
'notification');
   103         $this->
enable(
'select_all');
   109         $this->
addMultiCommand(
'sendMailToSelectedUsers', $this->
lng->txt(
'mmbr_btn_mail_selected_users'));
   114     protected function fillRow(array $a_set): void
   116         $this->tpl->setVariable(
'VAL_ID', $a_set[
'usr_id']);
   117         $this->tpl->setVariable(
'VAL_NAME', $a_set[
'lastname'] . 
', ' . $a_set[
'firstname']);
   118         $this->tpl->setVariable(
'VAL_LOGIN', $a_set[
'login']);
   121             !$this->
access->checkAccessOfUser((
int) $a_set[
'usr_id'], 
'read', 
'', $this->getRepositoryObject()->getRefId()) &&
   122             is_array($info = $this->
access->getInfo())
   124             $this->tpl->setCurrentBlock(
'access_warning');
   125             $this->tpl->setVariable(
'PARENT_ACCESS', $info[0][
'text']);
   126             $this->tpl->parseCurrentBlock();
   130             $this->tpl->setCurrentBlock(
'access_warning');
   131             $this->tpl->setVariable(
'PARENT_ACCESS', $this->
lng->txt(
'usr_account_inactive'));
   132             $this->tpl->parseCurrentBlock();
   139                     if (array_key_exists(
'prtf', $a_set) && is_array($a_set[
'prtf'])) {
   140                         foreach ($a_set[
'prtf'] as $prtf_url => $prtf_txt) {
   141                             $tmp[] = 
'<a href="' . $prtf_url . 
'">' . $prtf_txt . 
'</a>';
   144                     $this->tpl->setCurrentBlock(
'custom_fields');
   145                     $this->tpl->setVariable(
'VAL_CUST', implode(
'<br />', $tmp));
   146                     $this->tpl->parseCurrentBlock();
   149                     $this->tpl->setCurrentBlock(
'custom_fields');
   150                     $this->tpl->setVariable(
'VAL_CUST', (
string) $a_set[
'roles_label']);
   151                     $this->tpl->parseCurrentBlock();
   154                     $this->tpl->setCurrentBlock(
'custom_fields');
   155                     $this->tpl->setVariable(
'VAL_CUST', ilOrgUnitPathStorage::getTextRepresentationOfUsersOrgUnits((
int) $a_set[
'usr_id']));
   156                     $this->tpl->parseCurrentBlock();
   159                     $this->tpl->setCurrentBlock(
'custom_fields');
   160                     $this->tpl->setVariable(
'VAL_CUST', isset($a_set[$field]) ? (
string) $a_set[$field] : 
'');
   161                     $this->tpl->parseCurrentBlock();
   166         $this->tpl->setVariable(
'VAL_POSTNAME', 
'participants');
   173             $this->tpl->setVariable(
'FIRST_ACCESS', $this->
getFirstAccess((
int) $a_set[
'usr_id']));
   174             $this->tpl->setVariable(
'LAST_ACCESS', $this->
getLastAccess((
int) $a_set[
'usr_id']));
   177         $this->tpl->setVariable(
'COMPLETED_STEPS', $this->
getCompletedSteps((
int) $a_set[
'usr_id']));
   178         $this->tpl->setVariable(
'LAST_VISITED_STEP', $this->
getLastVisitedStep((
int) $a_set[
'usr_id']));
   181             $this->tpl->setVariable(
'VAL_NOTIFICATION_ID', (
int) $a_set[
'usr_id']);
   182             $this->tpl->setVariable(
   183                 'VAL_NOTIFICATION_CHECKED',
   184                 $a_set[
'notification'] ? 
'checked="checked"' : 
''   189         $this->tpl->setVariable(
'VAL_LOGIN', $a_set[
'login']);
   199         if (
$data[$user_id] === 
'-1') {
   203         return $data[$user_id];
   213         if (
$data[$user_id] === 
'-1') {
   217         return $data[$user_id];
   228         $completion_states = $this->rep_object->getLPCompletionStates();
   230         foreach ($learner_items as $learner_item) {
   231             if (in_array($learner_item->getLearningProgressStatus(), $completion_states)) {
   236         return $passed . 
" / " . count($learner_items);
   251         if (
$data[$user_id] === -1) {
   267         $ls_participants = $this->participants->getParticipants();
   269         $ls_participants = $this->
access->filterUserIdsByRbacOrPositionOfCurrentUser(
   276         if (!$ls_participants) {
   281         $lso_user_data = $this->parent_gui->readMemberData(
   287         unset($additional_fields[
'prtf']);
   288         unset($additional_fields[
'roles']);
   289         unset($additional_fields[
'org_units']);
   291         $udf_ids = $usr_data_fields = $odf_ids = array();
   292         foreach ($additional_fields as $field) {
   293             if (substr($field, 0, 3) == 
'udf') {
   294                 $udf_ids[] = substr($field, 4);
   298             if (substr($field, 0, 3) == 
'odf') {
   299                 $odf_ids[] = substr($field, 4);
   303             $usr_data_fields[] = $field;
   311             $this->current_filter[
'login'],
   323         $user_data = array();
   324         $filtered_user_ids = array();
   325         $local_roles = $this->parent_gui->getLocalRoles();
   327         foreach ($usr_data[
'set'] as $ud) {
   328             $user_id = $ud[
'usr_id'];
   330             if ($this->current_filter[
'roles']) {
   331                 if (!$this->rbac_review->isAssigned($user_id, $this->current_filter[
'roles'])) {
   336             if (array_key_exists(
'org_units', $this->current_filter)
   337                 && $this->current_filter[
'org_units'] !== 
''   339                 $org_unit = $this->current_filter[
'org_units'];
   341                 $user_units = ilOrgUnitPathStorage::getTextRepresentationOfUsersOrgUnits((
int) $user_id);
   342                 if (strpos($user_units, 
$title) === 
false) {
   347             $filtered_user_ids[] = $user_id;
   348             $user_data[$user_id] = array_merge($ud, $lso_user_data[$user_id]);
   351             foreach ($local_roles as $role_id => $role_name) {
   352                 if ($this->rbac_review->isAssigned((
int) $user_id, $role_id)) {
   353                     $roles[] = $role_name;
   357             $user_data[$user_id][
'name'] = $user_data[$user_id][
'lastname'] . 
', ' . $user_data[$user_id][
'firstname'];
   358             $user_data[$user_id][
'roles_label'] = implode(
'<br />', $roles);
   359             $user_data[$user_id][
'roles'] = $this->participants->setRoleOrderPosition((
int) $user_id);
   363         if ($udf_ids !== []) {
   365             foreach (
$data as $usr_id => $fields) {
   370                 foreach ($fields as $field_id => $value) {
   371                     $user_data[$usr_id][
'udf_' . $field_id] = $value;
   388         $columns = $ef->getSelectableFieldsInfo(
   392         if ($this->
settings->get(
'user_portfolios')) {
   393             $columns[
'prtf'] = array(
   394                 'txt' => $this->
lng->txt(
'obj_prtf'),
   402                     'txt' => $this->
lng->txt(
'objs_role'),
   408                     'txt' => $this->
lng->txt(
"org_units"),
 
static lookupData(array $a_user_ids, array $a_field_ids)
Lookup data. 
 
ilPrivacySettings $privacy_settings
 
const EXTENDED_DATA_LAST_ACCESS
 
getLastAccess(int $user_id)
 
enable(string $a_module_name)
 
ilObjUserTracking $obj_user_tracking
 
addCommandButton(string $a_cmd, string $a_text, string $a_onclick='', string $a_id="", string $a_class="")
 
getCompletedSteps(int $user_id)
 
setSelectAllCheckbox(string $a_select_all_checkbox, bool $a_select_all_on_top=false)
 
checkAcceptance(int $a_usr_id)
 
setFormName(string $a_name="")
 
ilRbacReview $rbac_review
 
static _lookupObjId(int $ref_id)
 
initFilter()
Init table filter. 
 
static _enabledLearningProgress()
 
setShowRowsSelector(bool $a_value)
Toggle rows-per-page selector. 
 
static _lookupTitle(int $obj_id)
 
setDefaultOrderField(string $a_defaultorderfield)
 
Singleton class that stores all privacy settings. 
 
setRowTemplate(string $a_template, string $a_template_dir="")
Set row template. 
 
static getInstanceByRefId(int $ref_id, bool $stop_on_error=true)
get an instance of an Ilias object by reference id 
 
__construct(ilLearningSequenceMembershipGUI $parent_gui, ilObjLearningSequence $ls_object, ilObjUserTracking $obj_user_tracking, ilPrivacySettings $privacy_settings, ilLanguage $lng, ilAccess $access, ilRbacReview $rbac_review, ilSetting $settings)
 
getFirstAccess(int $user_id)
 
static _getInstanceByType(string $a_type)
Get Singleton Instance. 
 
addColumn(string $a_text, string $a_sort_field="", string $a_width="", bool $a_is_checkbox_action_column=false, string $a_class="", string $a_tooltip="", bool $a_tooltip_with_html=false)
 
static getUserListData(string $a_order_field, string $a_order_dir, int $a_offset, int $a_limit, string $a_string_filter="", string $a_activation_filter="", ?ilDateTime $a_last_login_filter=null, bool $a_limited_access_filter=false, bool $a_no_courses_filter=false, int $a_course_group_filter=0, int $a_role_filter=0, array $a_user_folder_filter=null, array $a_additional_fields=null, array $a_user_filter=null, string $a_first_letter="", string $a_authentication_filter="")
Get data for user administration list. 
 
ilLearningSequenceMembershipGUI $parent_gui
 
getLastVisitedStep(int $user_id)
Different to the concept we decide to use the title of the object instead of its actually number in t...
 
addMultiCommand(string $a_cmd, string $a_text)
 
determineOffsetAndOrder(bool $a_omit_offset=false)
 
GUI class for learning sequence membership features. 
 
static _lookupActive(int $a_usr_id)
 
static sortArray(array $array, string $a_array_sortby_key, string $a_array_sortorder="asc", bool $a_numeric=false, bool $a_keep_keys=false)
 
ilObjLearningSequence $ls_object
 
setPrefix(string $a_prefix)