/** * Parse data * @return * * @global ilRbacReview $rbacreview */ public function parse() { global $rbacreview; $this->determineOffsetAndOrder(); include_once './Services/User/classes/class.ilUserQuery.php'; $additional_fields = $this->getSelectedColumns(); unset($additional_fields["firstname"]); unset($additional_fields["lastname"]); unset($additional_fields["last_login"]); unset($additional_fields["access_until"]); $udf_ids = $usr_data_fields = $odf_ids = array(); foreach ($additional_fields as $field) { if (substr($field, 0, 3) == 'udf') { $udf_ids[] = substr($field, 4); continue; } if (substr($field, 0, 3) == 'odf') { $odf_ids[] = substr($field, 4); continue; } $usr_data_fields[] = $field; } $usr_data = ilUserQuery::getUserListData($this->getOrderField(), $this->getOrderDirection(), $this->getOffset(), $this->getLimit(), '', '', null, false, false, 0, $this->getRoleId(), null, $usr_data_fields, $part); foreach ((array) $usr_data['set'] as $user) { $usr_ids[] = $user['usr_id']; } // merge course data $course_user_data = $this->getParentObject()->readMemberData($usr_ids, $this->type == 'admin'); $a_user_data = array(); foreach ((array) $usr_data['set'] as $ud) { $a_user_data[$ud['usr_id']] = array_merge($ud, $course_user_data[$ud['usr_id']]); if ($this->show_lp_status_sync) { // #9912 $passed_info = ""; if ($a_user_data[$ud['usr_id']]["passed_info"]["user_id"]) { $pinfo = $a_user_data[$ud['usr_id']]["passed_info"]; if ($pinfo["user_id"] < 0) { $passed_info = "LP"; } else { $name = ilObjUser::_lookupName($pinfo["user_id"]); $passed_info = $name["login"]; $passed_info .= "<br />" . ilDatePresentation::formatDate($pinfo["timestamp"]); } } $a_user_data[$ud['usr_id']]["passed_info"] = $passed_info; } } // Custom user data fields if ($udf_ids) { include_once './Services/User/classes/class.ilUserDefinedData.php'; $data = ilUserDefinedData::lookupData($usr_ids, $udf_ids); foreach ($data as $usr_id => $fields) { if (!$this->checkAcceptance($usr_id)) { continue; } foreach ($fields as $field_id => $value) { $a_user_data[$usr_id]['udf_' . $field_id] = $value; } } } // Object specific user data fields if ($odf_ids) { include_once './Modules/Course/classes/Export/class.ilCourseUserData.php'; $data = ilCourseUserData::_getValuesByObjId($this->getParentObject()->object->getId()); foreach ($data as $usr_id => $fields) { // #7264: as we get data for all course members filter against user data if (!$this->checkAcceptance($usr_id) || !in_array($usr_id, $usr_ids)) { continue; } foreach ($fields as $field_id => $value) { $a_user_data[$usr_id]['odf_' . $field_id] = $value; } } } foreach ($usr_data['set'] as $user) { // Check acceptance if (!$this->checkAcceptance($user['usr_id'])) { continue; } // DONE: accepted foreach ($usr_data_fields as $field) { $a_user_data[$user['usr_id']][$field] = $user[$field] ? $user[$field] : ''; } } $this->setMaxCount($usr_data['cnt'] ? $usr_data['cnt'] : 0); return $this->setData($a_user_data); }
/** * Parse data * @return * * @global ilRbacReview $rbacreview */ public function parse() { global $rbacreview; $this->determineOffsetAndOrder(); include_once './Services/User/classes/class.ilUserQuery.php'; $additional_fields = $this->getSelectedColumns(); unset($additional_fields["firstname"]); unset($additional_fields["lastname"]); unset($additional_fields["last_login"]); unset($additional_fields["access_until"]); unset($additional_fields['consultation_hour']); unset($additional_fields['prtf']); $udf_ids = $usr_data_fields = $odf_ids = array(); foreach ($additional_fields as $field) { if (substr($field, 0, 3) == 'udf') { $udf_ids[] = substr($field, 4); continue; } if (substr($field, 0, 3) == 'odf') { $odf_ids[] = substr($field, 4); continue; } $usr_data_fields[] = $field; } $usr_data = ilUserQuery::getUserListData($this->getOrderField(), $this->getOrderDirection(), $this->getOffset(), $this->getLimit(), '', '', null, false, false, 0, $this->getRoleId(), null, $usr_data_fields, $part); foreach ((array) $usr_data['set'] as $user) { $usr_ids[] = $user['usr_id']; } // merge course data $course_user_data = $this->getParentObject()->readMemberData($usr_ids, $this->type == 'admin', $this->getSelectedColumns()); $a_user_data = array(); foreach ((array) $usr_data['set'] as $ud) { $a_user_data[$ud['usr_id']] = array_merge($ud, $course_user_data[$ud['usr_id']]); if ($this->show_lp_status_sync) { // #9912 / #13208 $passed_info = ""; if ($a_user_data[$ud['usr_id']]["passed_info"]) { $pinfo = $a_user_data[$ud['usr_id']]["passed_info"]; if ($pinfo["user_id"]) { if ($pinfo["user_id"] < 0) { $passed_info = $this->lng->txt("crs_passed_status_system"); } else { if ($pinfo["user_id"] > 0) { $name = ilObjUser::_lookupName($pinfo["user_id"]); $passed_info = $this->lng->txt("crs_passed_status_manual_by") . ": " . $name["login"]; } } } if ($pinfo["timestamp"]) { $passed_info .= "<br />" . ilDatePresentation::formatDate($pinfo["timestamp"]); } } $a_user_data[$ud['usr_id']]["passed_info"] = $passed_info; } } // Custom user data fields if ($udf_ids) { include_once './Services/User/classes/class.ilUserDefinedData.php'; $data = ilUserDefinedData::lookupData($usr_ids, $udf_ids); foreach ($data as $usr_id => $fields) { if (!$this->checkAcceptance($usr_id)) { continue; } foreach ($fields as $field_id => $value) { $a_user_data[$usr_id]['udf_' . $field_id] = $value; } } } // Object specific user data fields if ($odf_ids) { include_once './Modules/Course/classes/Export/class.ilCourseUserData.php'; $data = ilCourseUserData::_getValuesByObjId($this->getParentObject()->object->getId()); foreach ($data as $usr_id => $fields) { // #7264: as we get data for all course members filter against user data if (!$this->checkAcceptance($usr_id) || !in_array($usr_id, $usr_ids)) { continue; } foreach ($fields as $field_id => $value) { $a_user_data[$usr_id]['odf_' . $field_id] = $value; } } // add last edit date include_once './Services/Membership/classes/class.ilObjectCustomUserFieldHistory.php'; foreach (ilObjectCustomUserFieldHistory::lookupEntriesByObjectId($this->getParentObject()->object->getId()) as $usr_id => $edit_info) { if (!isset($a_user_data[$usr_id])) { continue; } include_once './Services/PrivacySecurity/classes/class.ilPrivacySettings.php'; if ($usr_id == $edit_info['update_user']) { $a_user_data[$usr_id]['odf_last_update'] = ''; $a_user_data[$usr_id]['odf_info_txt'] = $GLOBALS['lng']->txt('cdf_edited_by_self'); if (ilPrivacySettings::_getInstance()->enabledAccessTimesByType($this->getParentObject()->object->getType())) { $a_user_data[$usr_id]['odf_last_update'] .= '_' . $edit_info['editing_time']->get(IL_CAL_UNIX); $a_user_data[$usr_id]['odf_info_txt'] .= ', ' . ilDatePresentation::formatDate($edit_info['editing_time']); } } else { $a_user_data[$usr_id]['odf_last_update'] = $edit_info['update_user']; $a_user_data[$usr_id]['odf_last_update'] .= '_' . $edit_info['editing_time']->get(IL_CAL_UNIX); $name = ilObjUser::_lookupName($edit_info['update_user']); $a_user_data[$usr_id]['odf_info_txt'] = $name['firstname'] . ' ' . $name['lastname'] . ', ' . ilDatePresentation::formatDate($edit_info['editing_time']); } } } foreach ($usr_data['set'] as $user) { // Check acceptance if (!$this->checkAcceptance($user['usr_id'])) { continue; } // DONE: accepted foreach ($usr_data_fields as $field) { $a_user_data[$user['usr_id']][$field] = $user[$field] ? $user[$field] : ''; } } // consultation hours if ($this->isColumnSelected('consultation_hour')) { include_once './Services/Booking/classes/class.ilBookingEntry.php'; foreach (ilBookingEntry::lookupManagedBookingsForObject($this->getParentObject()->object->getId(), $GLOBALS['ilUser']->getId()) as $buser => $booking) { if (isset($a_user_data[$buser])) { $a_user_data[$buser]['consultation_hour'] = $booking[0]['dt']; $a_user_data[$buser]['consultation_hour_end'] = $booking[0]['dtend']; $a_user_data[$buser]['consultation_hours'] = $booking; } } } $this->setMaxCount($usr_data['cnt'] ? $usr_data['cnt'] : 0); return $this->setData($a_user_data); }
/** * read data * * @access protected * @param * @return */ public function readSubscriberData() { include_once './Services/Membership/classes/class.ilParticipants.php'; $sub_data = ilParticipants::lookupSubscribersData($this->getParentObject()->object->getId()); $sub_ids = array(); foreach ($sub_data as $usr_id => $usr_data) { $sub_ids[] = $usr_id; } $this->determineOffsetAndOrder(); include_once './Services/User/classes/class.ilUserQuery.php'; $additional_fields = $this->getSelectedColumns(); unset($additional_fields["firstname"]); unset($additional_fields["lastname"]); unset($additional_fields["last_login"]); unset($additional_fields["access_until"]); $udf_ids = $usr_data_fields = $odf_ids = array(); foreach ($additional_fields as $field) { if (substr($field, 0, 3) == 'udf') { $udf_ids[] = substr($field, 4); continue; } if (substr($field, 0, 3) == 'odf') { $odf_ids[] = substr($field, 4); continue; } $usr_data_fields[] = $field; } $usr_data = ilUserQuery::getUserListData($this->getOrderField(), $this->getOrderDirection(), $this->getOffset(), $this->getLimit(), '', '', null, false, false, 0, 0, null, $usr_data_fields, $sub_ids); foreach ((array) $usr_data['set'] as $user) { $usr_ids[] = $user['usr_id']; } // merge course data $course_user_data = $this->getParentObject()->readMemberData($usr_ids, $this->type == 'admin'); $a_user_data = array(); foreach ((array) $usr_data['set'] as $ud) { $a_user_data[$ud['usr_id']] = array_merge($ud, (array) $course_user_data[$ud['usr_id']]); } // Custom user data fields if ($udf_ids) { include_once './Services/User/classes/class.ilUserDefinedData.php'; $data = ilUserDefinedData::lookupData($usr_ids, $udf_ids); foreach ($data as $usr_id => $fields) { if (!$this->checkAcceptance($usr_id)) { continue; } foreach ($fields as $field_id => $value) { $a_user_data[$usr_id]['udf_' . $field_id] = $value; } } } // Object specific user data fields if ($odf_ids) { include_once './Modules/Course/classes/Export/class.ilCourseUserData.php'; $data = ilCourseUserData::_getValuesByObjId($this->getParentObject()->object->getId()); foreach ($data as $usr_id => $fields) { // #7264: as we get data for all course members filter against user data if (!$this->checkAcceptance($usr_id) || !in_array($usr_id, $usr_ids)) { continue; } foreach ($fields as $field_id => $value) { $a_user_data[$usr_id]['odf_' . $field_id] = $value; } } // add last edit date include_once './Services/Membership/classes/class.ilObjectCustomUserFieldHistory.php'; foreach (ilObjectCustomUserFieldHistory::lookupEntriesByObjectId($this->getParentObject()->object->getId()) as $usr_id => $edit_info) { if (!isset($a_user_data[$usr_id])) { continue; } include_once './Services/PrivacySecurity/classes/class.ilPrivacySettings.php'; if ($usr_id == $edit_info['update_user']) { $a_user_data[$usr_id]['odf_last_update'] = ''; $a_user_data[$usr_id]['odf_info_txt'] = $GLOBALS['lng']->txt('cdf_edited_by_self'); if (ilPrivacySettings::_getInstance()->enabledAccessTimesByType($this->getParentObject()->object->getType())) { $a_user_data[$usr_id]['odf_last_update'] .= '_' . $edit_info['editing_time']->get(IL_CAL_UNIX); $a_user_data[$usr_id]['odf_info_txt'] .= ', ' . ilDatePresentation::formatDate($edit_info['editing_time']); } } else { $a_user_data[$usr_id]['odf_last_update'] = $edit_info['update_user']; $a_user_data[$usr_id]['odf_last_update'] .= '_' . $edit_info['editing_time']->get(IL_CAL_UNIX); $name = ilObjUser::_lookupName($edit_info['update_user']); $a_user_data[$usr_id]['odf_info_txt'] = $name['firstname'] . ' ' . $name['lastname'] . ', ' . ilDatePresentation::formatDate($edit_info['editing_time']); } } } foreach ($usr_data['set'] as $user) { // Check acceptance if (!$this->checkAcceptance($user['usr_id'])) { continue; } // DONE: accepted foreach ($usr_data_fields as $field) { $a_user_data[$user['usr_id']][$field] = $user[$field] ? $user[$field] : ''; } } // Waiting list subscription foreach ($sub_data as $usr_id => $usr_data) { if (!in_array($usr_id, $usr_ids)) { continue; } $a_user_data[$usr_id]['sub_time'] = $usr_data['time']; $a_user_data[$usr_id]['subject'] = $usr_data['subject']; } $this->setMaxCount(count($sub_ids)); return $this->setData($a_user_data); }
/** * Parse user data * @param array $a_user_data * @return */ public function parse($a_user_data) { include_once './Services/User/classes/class.ilUserQuery.php'; $additional_fields = $this->getSelectedColumns(); unset($additional_fields["firstname"]); unset($additional_fields["lastname"]); unset($additional_fields["last_login"]); unset($additional_fields["access_until"]); switch ($this->type) { case 'admin': $part = ilGroupParticipants::_getInstanceByObjId($this->getParentObject()->object->getId())->getAdmins(); break; case 'member': $part = ilGroupParticipants::_getInstanceByObjId($this->getParentObject()->object->getId())->getMembers(); break; } $udf_ids = $usr_data_fields = $odf_ids = array(); foreach ($additional_fields as $field) { if (substr($field, 0, 3) == 'udf') { $udf_ids[] = substr($field, 4); continue; } if (substr($field, 0, 3) == 'odf') { $odf_ids[] = substr($field, 4); continue; } $usr_data_fields[] = $field; } $usr_data = ilUserQuery::getUserListData('login', 'ASC', 0, 9999, '', '', null, false, false, 0, 0, null, $usr_data_fields, $part); // Custom user data fields if ($udf_ids) { include_once './Services/User/classes/class.ilUserDefinedData.php'; $data = ilUserDefinedData::lookupData($part, $udf_ids); foreach ($data as $usr_id => $fields) { if (!$this->checkAcceptance($usr_id)) { continue; } foreach ($fields as $field_id => $value) { $a_user_data[$usr_id]['udf_' . $field_id] = $value; } } } // Object specific user data fields if ($odf_ids) { include_once './Modules/Course/classes/Export/class.ilCourseUserData.php'; $data = ilCourseUserData::_getValuesByObjId($this->getParentObject()->object->getId()); foreach ($data as $usr_id => $fields) { if (!$this->checkAcceptance($usr_id)) { continue; } foreach ($fields as $field_id => $value) { if ($a_user_data[$usr_id]) { $a_user_data[$usr_id]['odf_' . $field_id] = $value; } } } } foreach ($usr_data['set'] as $user) { // Check acceptance if (!$this->checkAcceptance($user['usr_id'])) { continue; } // DONE: accepted foreach ($usr_data_fields as $field) { $a_user_data[$user['usr_id']][$field] = $user[$field] ? $user[$field] : ''; } } return $this->setData($a_user_data); }
/** * Parse user data * @param array $a_user_data * @return */ public function parse($a_user_data) { include_once './Services/User/classes/class.ilUserQuery.php'; $additional_fields = $this->getSelectedColumns(); unset($additional_fields["firstname"]); unset($additional_fields["lastname"]); unset($additional_fields["last_login"]); unset($additional_fields["access_until"]); unset($additional_fields['consultation_hour']); unset($additional_fields['prtf']); switch ($this->type) { case 'admin': $part = ilGroupParticipants::_getInstanceByObjId($this->getParentObject()->object->getId())->getAdmins(); break; case 'member': $part = $GLOBALS['rbacreview']->assignedUsers($this->getRole()); break; case 'role': $part = $GLOBALS['rbacreview']->assignedUsers($this->getRole()); break; } $udf_ids = $usr_data_fields = $odf_ids = array(); foreach ($additional_fields as $field) { if (substr($field, 0, 3) == 'udf') { $udf_ids[] = substr($field, 4); continue; } if (substr($field, 0, 3) == 'odf') { $odf_ids[] = substr($field, 4); continue; } $usr_data_fields[] = $field; } $usr_data = ilUserQuery::getUserListData('login', 'ASC', 0, 9999, '', '', null, false, false, 0, 0, null, $usr_data_fields, $part); // Custom user data fields if ($udf_ids) { include_once './Services/User/classes/class.ilUserDefinedData.php'; $data = ilUserDefinedData::lookupData($part, $udf_ids); foreach ($data as $usr_id => $fields) { if (!$this->checkAcceptance($usr_id)) { continue; } foreach ($fields as $field_id => $value) { $a_user_data[$usr_id]['udf_' . $field_id] = $value; } } } // Object specific user data fields if ($odf_ids) { include_once './Modules/Course/classes/Export/class.ilCourseUserData.php'; $data = ilCourseUserData::_getValuesByObjId($this->getParentObject()->object->getId()); foreach ($data as $usr_id => $fields) { if (!$this->checkAcceptance($usr_id)) { continue; } foreach ($fields as $field_id => $value) { if ($a_user_data[$usr_id]) { $a_user_data[$usr_id]['odf_' . $field_id] = $value; } } } } foreach ($usr_data['set'] as $user) { // Check acceptance if (!$this->checkAcceptance($user['usr_id'])) { continue; } // DONE: accepted foreach ($usr_data_fields as $field) { $a_user_data[$user['usr_id']][$field] = $user[$field] ? $user[$field] : ''; } } // consultation hours if ($this->isColumnSelected('consultation_hour')) { include_once './Services/Booking/classes/class.ilBookingEntry.php'; foreach (ilBookingEntry::lookupManagedBookingsForObject($this->getParentObject()->object->getId(), $GLOBALS['ilUser']->getId()) as $buser => $booking) { if (isset($a_user_data[$buser])) { $a_user_data[$buser]['consultation_hour'] = $booking[0]['dt']; $a_user_data[$buser]['consultation_hour_end'] = $booking[0]['dtend']; $a_user_data[$buser]['consultation_hours'] = $booking; } } } return $this->setData($a_user_data); }
/** * Parse user data * @return * @param array $a_user_ids */ public function parseUserIds($a_user_ids) { if (!$a_user_ids) { $this->setData(array()); return true; } $additional_fields = $this->getSelectedColumns(); $parse_access = false; if (isset($additional_fields['access_until'])) { $parse_access = true; unset($additional_fields['access_until']); } $udf_ids = $usr_data_fields = $odf_ids = array(); foreach ($additional_fields as $field) { if (substr($field, 0, 3) == 'udf') { $udf_ids[] = substr($field, 4); continue; } $usr_data_fields[] = $field; } include_once './Services/User/classes/class.ilUserQuery.php'; $usr_data = ilUserQuery::getUserListData('login', 'ASC', 0, 999999, '', '', null, false, false, 0, 0, null, $usr_data_fields, $a_user_ids); if ($this->admin_mode && $parse_access) { // see ilUserTableGUI $current_time = time(); foreach ($usr_data['set'] as $k => $user) { if ($user['active']) { if ($user["time_limit_unlimited"]) { $txt_access = $this->lng->txt("access_unlimited"); $usr_data["set"][$k]["access_class"] = "smallgreen"; } elseif ($user["time_limit_until"] < $current_time) { $txt_access = $this->lng->txt("access_expired"); $usr_data["set"][$k]["access_class"] = "smallred"; } else { $txt_access = ilDatePresentation::formatDate(new ilDateTime($user["time_limit_until"], IL_CAL_UNIX)); $usr_data["set"][$k]["access_class"] = "small"; } } else { $txt_access = $this->lng->txt("inactive"); $usr_data["set"][$k]["access_class"] = "smallred"; } $usr_data["set"][$k]["access_until"] = $txt_access; } } // Custom user data fields if ($udf_ids) { include_once './Services/User/classes/class.ilUserDefinedData.php'; $data = ilUserDefinedData::lookupData($a_user_ids, $udf_ids); $users = array(); $counter = 0; foreach ($usr_data['set'] as $set) { $users[$counter] = $set; foreach ($udf_ids as $udf_field) { $users[$counter]['udf_' . $udf_field] = $data[$set['usr_id']][$udf_field]; } ++$counter; } } else { $users = $usr_data['set']; } if ($this->getType() == self::TYPE_GLOBAL_SEARCH) { if ($this->getLuceneResult() instanceof ilLuceneSearchResult) { foreach ($users as $counter => $ud) { $users[$counter]['relevance'] = $this->getLuceneResult()->getRelevance($ud['usr_id']); } } } $this->setData($users); }
/** * Parse user data * @param array $a_user_data * @return */ public function parse($a_user_data) { include_once './Services/User/classes/class.ilUserQuery.php'; $additional_fields = $this->getSelectedColumns(); unset($additional_fields["firstname"]); unset($additional_fields["lastname"]); unset($additional_fields["last_login"]); unset($additional_fields["access_until"]); unset($additional_fields['consultation_hour']); unset($additional_fields['prtf']); switch ($this->type) { case 'admin': $part = ilGroupParticipants::_getInstanceByObjId($this->getParentObject()->object->getId())->getAdmins(); break; case 'member': $part = $GLOBALS['rbacreview']->assignedUsers($this->getRole()); break; case 'role': $part = $GLOBALS['rbacreview']->assignedUsers($this->getRole()); break; } $udf_ids = $usr_data_fields = $odf_ids = array(); foreach ($additional_fields as $field) { if (substr($field, 0, 3) == 'udf') { $udf_ids[] = substr($field, 4); continue; } if (substr($field, 0, 3) == 'odf') { $odf_ids[] = substr($field, 4); continue; } $usr_data_fields[] = $field; } $usr_data = ilUserQuery::getUserListData('login', 'ASC', 0, 9999, '', '', null, false, false, 0, 0, null, $usr_data_fields, $part); // Custom user data fields if ($udf_ids) { include_once './Services/User/classes/class.ilUserDefinedData.php'; $data = ilUserDefinedData::lookupData($part, $udf_ids); foreach ($data as $usr_id => $fields) { if (!$this->checkAcceptance($usr_id)) { continue; } foreach ($fields as $field_id => $value) { $a_user_data[$usr_id]['udf_' . $field_id] = $value; } } } // Object specific user data fields if ($odf_ids) { include_once './Modules/Course/classes/Export/class.ilCourseUserData.php'; $data = ilCourseUserData::_getValuesByObjId($this->getParentObject()->object->getId()); foreach ($data as $usr_id => $fields) { if (!$this->checkAcceptance($usr_id)) { continue; } foreach ($fields as $field_id => $value) { if ($a_user_data[$usr_id]) { $a_user_data[$usr_id]['odf_' . $field_id] = $value; } } } // add last edit date include_once './Services/Membership/classes/class.ilObjectCustomUserFieldHistory.php'; foreach (ilObjectCustomUserFieldHistory::lookupEntriesByObjectId($this->getParentObject()->object->getId()) as $usr_id => $edit_info) { if (!isset($a_user_data[$usr_id])) { continue; } include_once './Services/PrivacySecurity/classes/class.ilPrivacySettings.php'; if ($usr_id == $edit_info['update_user']) { $a_user_data[$usr_id]['odf_last_update'] = ''; $a_user_data[$usr_id]['odf_info_txt'] = $GLOBALS['lng']->txt('cdf_edited_by_self'); if (ilPrivacySettings::_getInstance()->enabledAccessTimesByType($this->getParentObject()->object->getType())) { $a_user_data[$usr_id]['odf_last_update'] .= '_' . $edit_info['editing_time']->get(IL_CAL_UNIX); $a_user_data[$usr_id]['odf_info_txt'] .= ', ' . ilDatePresentation::formatDate($edit_info['editing_time']); } } else { $a_user_data[$usr_id]['odf_last_update'] = $edit_info['edit_user']; $a_user_data[$usr_id]['odf_last_update'] .= '_' . $edit_info['editing_time']->get(IL_CAL_UNIX); $name = ilObjUser::_lookupName($edit_info['update_user']); $a_user_data[$usr_id]['odf_info_txt'] = $name['firstname'] . ' ' . $name['lastname'] . ', ' . ilDatePresentation::formatDate($edit_info['editing_time']); } } } foreach ($usr_data['set'] as $user) { // Check acceptance if (!$this->checkAcceptance($user['usr_id'])) { continue; } // DONE: accepted foreach ($usr_data_fields as $field) { $a_user_data[$user['usr_id']][$field] = $user[$field] ? $user[$field] : ''; } } // consultation hours if ($this->isColumnSelected('consultation_hour')) { include_once './Services/Booking/classes/class.ilBookingEntry.php'; foreach (ilBookingEntry::lookupManagedBookingsForObject($this->getParentObject()->object->getId(), $GLOBALS['ilUser']->getId()) as $buser => $booking) { if (isset($a_user_data[$buser])) { $a_user_data[$buser]['consultation_hour'] = $booking[0]['dt']; $a_user_data[$buser]['consultation_hour_end'] = $booking[0]['dtend']; $a_user_data[$buser]['consultation_hours'] = $booking; } } } return $this->setData($a_user_data); }