ILIAS  release_8 Revision v8.24
ilMemberExport Class Reference

Class for generation of member export files. More...

+ Collaboration diagram for ilMemberExport:

Public Member Functions

 __construct (int $a_ref_id, int $a_type=self::EXPORT_CSV)
 
 filterUsers (array $a_usr_ids)
 
 setFilename (string $a_file)
 
 getFilename ()
 
 getRefId ()
 
 getType ()
 
 getExportType ()
 
 getObjId ()
 
 create ()
 
 getCSVString ()
 
 createExcel ()
 
 createCSV ()
 

Data Fields

const EXPORT_CSV = 1
 
const EXPORT_EXCEL = 2
 

Protected Member Functions

 addCol (string $a_value, int $a_row, int $a_col)
 Write one column. More...
 
 addRow ()
 
 getOrderedExportableFields ()
 
 write ()
 
 initMembers ()
 Init member object. More...
 
 initGroups ()
 

Protected Attributes

ilLanguage $lng
 
ilTree $tree
 
ilAccessHandler $access
 
array $agreement = []
 
ilUserFormSettings $settings
 
ilPrivacySettings $privacy
 
ilCSVWriter $csv = null
 
ilExcel $worksheet = null
 

Private Member Functions

 fetchUsers ()
 
 readCourseData (array $a_user_ids)
 Read All User related course data. More...
 
 readCourseSpecificFieldsData ()
 
 addCourseField (int $a_usr_id, string $a_field, int $row, int $col)
 Fill course specific fields. More...
 
 addUserDefinedField (ilUserDefinedData $udf_data, string $a_field, int $row, int $col)
 Add user defined fields. More...
 

Private Attributes

int $ref_id
 
int $obj_id
 
string $type
 
int $export_type
 
ilParticipants $members
 
array $groups = []
 
array $groups_participants = []
 
array $groups_rights = []
 
string $filename = null
 
array $user_ids = array()
 
array $user_course_data = array()
 
array $user_course_fields = array()
 
array $user_profile_data = array()
 

Detailed Description

Class for generation of member export files.

Author
Stefan Meyer meyer.nosp@m.@lei.nosp@m.fos.c.nosp@m.om
Version
$Id$ /

Definition at line 26 of file class.ilMemberExport.php.

Constructor & Destructor Documentation

◆ __construct()

ilMemberExport::__construct ( int  $a_ref_id,
int  $a_type = self::EXPORT_CSV 
)

Definition at line 56 of file class.ilMemberExport.php.

57 {
58 global $DIC;
59
60 $ilObjDataCache = $DIC['ilObjDataCache'];
61
62 $this->lng = $DIC->language();
63 $this->tree = $DIC->repositoryTree();
64 $this->access = $DIC->access();
65
66 $this->export_type = $a_type;
67 $this->ref_id = $a_ref_id;
68 $this->obj_id = $ilObjDataCache->lookupObjId($this->ref_id);
69 $this->type = ilObject::_lookupType($this->obj_id);
70
71 $this->initMembers();
72 $this->initGroups();
73
74 $this->agreement = ilMemberAgreement::_readByObjId($this->obj_id);
75 $this->settings = new ilUserFormSettings('memexp');
76 $this->privacy = ilPrivacySettings::getInstance();
77 }
static _readByObjId(int $a_obj_id)
Read user data by object id.
initMembers()
Init member object.
static _lookupType(int $id, bool $reference=false)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
global $DIC
Definition: feed.php:28

References $DIC, ilObject\_lookupType(), ilMemberAgreement\_readByObjId(), ILIAS\Repository\access(), ilPrivacySettings\getInstance(), initGroups(), initMembers(), ILIAS\Repository\lng(), and ILIAS\Repository\settings().

+ Here is the call graph for this function:

Member Function Documentation

◆ addCol()

ilMemberExport::addCol ( string  $a_value,
int  $a_row,
int  $a_col 
)
protected

Write one column.

Definition at line 163 of file class.ilMemberExport.php.

163 : void
164 {
165 switch ($this->getExportType()) {
166 case self::EXPORT_CSV:
167 $this->csv->addColumn($a_value);
168 break;
169
171 $this->worksheet->setCell($a_row + 1, $a_col, $a_value);
172 break;
173 }
174 }

References EXPORT_CSV, EXPORT_EXCEL, and getExportType().

Referenced by addCourseField(), addUserDefinedField(), and write().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ addCourseField()

ilMemberExport::addCourseField ( int  $a_usr_id,
string  $a_field,
int  $row,
int  $col 
)
private

Fill course specific fields.

Definition at line 463 of file class.ilMemberExport.php.

463 : bool
464 {
465 if (strpos($a_field, 'cdf_') !== 0) {
466 return false;
467 }
468 if (
469 !$this->privacy->courseConfirmationRequired() ||
470 ($this->agreement[$a_usr_id]['accepted'] ?? false)
471 ) {
472 $field_info = explode('_', $a_field);
473 $field_id = $field_info[1] ?? 0;
474 $value = '';
475 if (isset($this->user_course_fields[$a_usr_id][$field_id])) {
476 $value = $this->user_course_fields[$a_usr_id][$field_id];
477 }
478 $this->addCol((string) $value, $row, $col);
479 return true;
480 }
481 #$this->csv->addColumn('');
482 $this->addCol('', $row, $col);
483 return true;
484 }
addCol(string $a_value, int $a_row, int $a_col)
Write one column.

References addCol().

Referenced by write().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ addRow()

ilMemberExport::addRow ( )
protected

Definition at line 176 of file class.ilMemberExport.php.

176 : void
177 {
178 switch ($this->getExportType()) {
179 case self::EXPORT_CSV:
180 $this->csv->addRow();
181 break;
182
184 break;
185 }
186 }

References EXPORT_CSV, EXPORT_EXCEL, and getExportType().

Referenced by write().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ addUserDefinedField()

ilMemberExport::addUserDefinedField ( ilUserDefinedData  $udf_data,
string  $a_field,
int  $row,
int  $col 
)
private

Add user defined fields.

Definition at line 489 of file class.ilMemberExport.php.

489 : bool
490 {
491 if (strpos($a_field, 'udf_') !== 0) {
492 return false;
493 }
494
495 if (
496 !$this->privacy->courseConfirmationRequired() ||
497 (isset($this->agreement[$udf_data->getUserId()]['accepted']) &&
498 $this->agreement[$udf_data->getUserId()]['accepted'])
499 ) {
500 $field_info = explode('_', $a_field);
501 $field_id = $field_info[1];
502 $value = $udf_data->get('f_' . $field_id);
503 #$this->csv->addColumn($value);
504 $this->addCol($value, $row, $col);
505 return true;
506 }
507
508 $this->addCol('', $row, $col);
509 return true;
510 }

References addCol(), ilUserDefinedData\get(), and ilUserDefinedData\getUserId().

Referenced by write().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ create()

ilMemberExport::create ( )

Definition at line 123 of file class.ilMemberExport.php.

123 : void
124 {
125 $this->fetchUsers();
126 switch ($this->getExportType()) {
127 case self::EXPORT_CSV:
128 $this->createCSV();
129 break;
130
132 $this->createExcel();
133 break;
134 }
135 }

References createCSV(), createExcel(), EXPORT_CSV, EXPORT_EXCEL, fetchUsers(), and getExportType().

+ Here is the call graph for this function:

◆ createCSV()

ilMemberExport::createCSV ( )

Definition at line 154 of file class.ilMemberExport.php.

154 : void
155 {
156 $this->csv = new ilCSVWriter();
157 $this->write();
158 }

References write().

Referenced by create().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ createExcel()

ilMemberExport::createExcel ( )

Definition at line 145 of file class.ilMemberExport.php.

145 : void
146 {
147 $this->worksheet = new ilExcel();
148 $this->worksheet->addSheet($this->lng->txt("members"));
149 $this->write();
150
151 $this->worksheet->writeToFile($this->getFilename());
152 }

References getFilename(), ILIAS\Repository\lng(), and write().

Referenced by create().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ fetchUsers()

ilMemberExport::fetchUsers ( )
private

Definition at line 401 of file class.ilMemberExport.php.

401 : void
402 {
404
405 if ($this->settings->enabled('admin')) {
406 $this->user_ids = $tmp_ids = $this->members->getAdmins();
407 $this->readCourseData($tmp_ids);
408 }
409 if ($this->settings->enabled('tutor')) {
410 $this->user_ids = array_merge($tmp_ids = $this->members->getTutors(), $this->user_ids);
411 $this->readCourseData($tmp_ids);
412 }
413 if ($this->settings->enabled('member')) {
414 $this->user_ids = array_merge($tmp_ids = $this->members->getMembers(), $this->user_ids);
415 $this->readCourseData($tmp_ids);
416 }
417 if ($this->settings->enabled('subscribers')) {
418 $this->user_ids = array_merge($tmp_ids = $this->members->getSubscribers(), $this->user_ids);
419 $this->readCourseData($tmp_ids);
420 }
421 if ($this->settings->enabled('waiting_list')) {
422 $waiting_list = new ilCourseWaitingList($this->obj_id);
423 $this->user_ids = array_merge($waiting_list->getUserIds(), $this->user_ids);
424 }
425 $this->user_ids = $this->filterUsers($this->user_ids);
426
427 // Sort by lastname
428 $this->user_ids = ilUtil::_sortIds($this->user_ids, 'usr_data', 'lastname', 'usr_id');
429
430 // Finally read user profile data
431 $this->user_profile_data = ilObjUser::_readUsersProfileData($this->user_ids);
432 }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
filterUsers(array $a_usr_ids)
readCourseData(array $a_user_ids)
Read All User related course data.
static _readUsersProfileData(array $a_user_ids)
static _sortIds(array $a_ids, string $a_table, string $a_field, string $a_id_name)
Function that sorts ids by a given table field using WHERE IN E.g: __sort(array(6,...

References ilObjUser\_readUsersProfileData(), ilUtil\_sortIds(), filterUsers(), readCourseData(), readCourseSpecificFieldsData(), and ILIAS\Repository\settings().

Referenced by create().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ filterUsers()

ilMemberExport::filterUsers ( array  $a_usr_ids)
Parameters
int[]$a_usr_ids
Returns
int[]

Definition at line 83 of file class.ilMemberExport.php.

83 : array
84 {
85 return $this->access->filterUserIdsByRbacOrPositionOfCurrentUser(
86 'manage_members',
87 'manage_members',
88 $this->ref_id,
89 $a_usr_ids
90 );
91 }

References ILIAS\Repository\access().

Referenced by fetchUsers().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getCSVString()

ilMemberExport::getCSVString ( )

Definition at line 137 of file class.ilMemberExport.php.

137 : ?string
138 {
139 if ($this->csv instanceof ilCSVWriter) {
140 return $this->csv->getCSVString();
141 }
142 return null;
143 }

◆ getExportType()

ilMemberExport::getExportType ( )

Definition at line 113 of file class.ilMemberExport.php.

113 : int
114 {
115 return $this->export_type;
116 }

References $export_type.

Referenced by addCol(), addRow(), and create().

+ Here is the caller graph for this function:

◆ getFilename()

ilMemberExport::getFilename ( )

Definition at line 98 of file class.ilMemberExport.php.

98 : ?string
99 {
100 return $this->filename;
101 }

References $filename.

Referenced by createExcel().

+ Here is the caller graph for this function:

◆ getObjId()

ilMemberExport::getObjId ( )

Definition at line 118 of file class.ilMemberExport.php.

118 : int
119 {
120 return $this->obj_id;
121 }

References $obj_id.

Referenced by initMembers().

+ Here is the caller graph for this function:

◆ getOrderedExportableFields()

ilMemberExport::getOrderedExportableFields ( )
protected

Definition at line 188 of file class.ilMemberExport.php.

188 : array
189 {
191 $field_info->sortExportFields();
192 $fields[] = 'role';
193 // Append agreement info
196 $fields[] = 'agreement';
197 }
198
199 foreach ($field_info->getExportableFields() as $field) {
200 if ($this->settings->enabled($field)) {
201 $fields[] = $field;
202 }
203 }
204
206 foreach ($udf->getCourseExportableFields() as $field_id => $udf_data) {
207 if ($this->settings->enabled('udf_' . $field_id)) {
208 $fields[] = 'udf_' . $field_id;
209 }
210 }
211
212 // Add course specific fields
213 foreach (ilCourseDefinedFieldDefinition::_getFields($this->obj_id) as $field_obj) {
214 if ($this->settings->enabled('cdf_' . $field_obj->getId())) {
215 $fields[] = 'cdf_' . $field_obj->getId();
216 }
217 }
218 if ($this->settings->enabled('group_memberships')) {
219 $fields[] = 'crs_members_groups';
220 }
221 return $fields;
222 }
static _getFields(int $a_container_id, $a_sort=self::IL_CDF_SORT_NAME)
Get all fields of a container.
static _getInstanceByType(string $a_type)
Get Singleton Instance.
ilPrivacySettings $privacy

References $privacy, ilCourseDefinedFieldDefinition\_getFields(), ilUserDefinedFields\_getInstance(), ilExportFieldsInfo\_getInstanceByType(), ilObject\_lookupType(), ilPrivacySettings\courseConfirmationRequired(), ilPrivacySettings\getInstance(), and ILIAS\Repository\settings().

Referenced by write().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getRefId()

ilMemberExport::getRefId ( )

Definition at line 103 of file class.ilMemberExport.php.

103 : int
104 {
105 return $this->ref_id;
106 }

References $ref_id.

◆ getType()

ilMemberExport::getType ( )

Definition at line 108 of file class.ilMemberExport.php.

108 : string
109 {
110 return $this->type;
111 }

References $type.

Referenced by initMembers(), and readCourseData().

+ Here is the caller graph for this function:

◆ initGroups()

ilMemberExport::initGroups ( )
protected

Definition at line 525 of file class.ilMemberExport.php.

525 : void
526 {
527 $parent_node = $this->tree->getNodeData($this->ref_id);
528 $groups = $this->tree->getSubTree($parent_node, true, ['grp']);
529 if (is_array($groups) && count($groups)) {
530 $this->groups_rights = [];
531 foreach ($groups as $idx => $group_data) {
532 // check for group in group
533 if (
534 $group_data["parent"] != $this->ref_id &&
535 $this->tree->checkForParentType((int) $group_data["ref_id"], "grp", true)
536 ) {
537 unset($groups[$idx]);
538 } else {
539 $this->groups[$group_data["ref_id"]] = $group_data["title"];
540 //TODO: change permissions from write to manage_members plus "|| ilObjGroup->getShowMembers()"----- uncomment below; testing required
541 $this->groups_rights[$group_data["ref_id"]] =
542 $this->access->checkAccess("write", "", (int) $group_data["ref_id"]);
543 $gobj = ilGroupParticipants::_getInstanceByObjId((int) $group_data["obj_id"]);
544 $this->groups_participants[$group_data["ref_id"]] = $gobj->getParticipants();
545 }
546 }
547 }
548 }
static _getInstanceByObjId(int $a_obj_id)
Get singleton instance.

References $groups, ilGroupParticipants\_getInstanceByObjId(), and ILIAS\Repository\access().

Referenced by __construct().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ initMembers()

ilMemberExport::initMembers ( )
protected

Init member object.

Definition at line 515 of file class.ilMemberExport.php.

515 : void
516 {
517 if ($this->getType() === 'crs') {
518 $this->members = ilCourseParticipants::_getInstanceByObjId($this->getObjId());
519 }
520 if ($this->getType() === 'grp') {
521 $this->members = ilGroupParticipants::_getInstanceByObjId($this->getObjId());
522 }
523 }
static _getInstanceByObjId(int $a_obj_id)

References ilCourseParticipants\_getInstanceByObjId(), ilGroupParticipants\_getInstanceByObjId(), getObjId(), and getType().

Referenced by __construct().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ readCourseData()

ilMemberExport::readCourseData ( array  $a_user_ids)
private

Read All User related course data.

Parameters
int[]
string

Definition at line 439 of file class.ilMemberExport.php.

439 : void
440 {
441 foreach ($a_user_ids as $user_id) {
442 // Read course related data
443 if ($this->members->isAdmin($user_id)) {
444 $this->user_course_data[$user_id]['role'] = $this->getType() === 'crs' ? ilParticipants::IL_CRS_ADMIN : ilParticipants::IL_GRP_ADMIN;
445 } elseif ($this->members->isTutor($user_id)) {
446 $this->user_course_data[$user_id]['role'] = ilParticipants::IL_CRS_TUTOR;
447 } elseif ($this->members->isMember($user_id)) {
448 $this->user_course_data[$user_id]['role'] = $this->getType() === 'crs' ? ilParticipants::IL_CRS_MEMBER : ilParticipants::IL_GRP_MEMBER;
449 } else {
450 $this->user_course_data[$user_id]['role'] = 'subscriber';
451 }
452 }
453 }

References getType(), ilParticipants\IL_CRS_ADMIN, ilParticipants\IL_CRS_MEMBER, ilParticipants\IL_CRS_TUTOR, ilParticipants\IL_GRP_ADMIN, and ilParticipants\IL_GRP_MEMBER.

Referenced by fetchUsers().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ readCourseSpecificFieldsData()

ilMemberExport::readCourseSpecificFieldsData ( )
private

Definition at line 455 of file class.ilMemberExport.php.

455 : void
456 {
457 $this->user_course_fields = ilCourseUserData::_getValuesByObjId($this->obj_id);
458 }
static _getValuesByObjId(int $a_obj_id)

References ilCourseUserData\_getValuesByObjId().

Referenced by fetchUsers().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setFilename()

ilMemberExport::setFilename ( string  $a_file)

Definition at line 93 of file class.ilMemberExport.php.

93 : void
94 {
95 $this->filename = $a_file;
96 }

◆ write()

ilMemberExport::write ( )
protected

Definition at line 224 of file class.ilMemberExport.php.

224 : void
225 {
226 // Add header line
227 $row = 0;
228 $col = 0;
229 foreach ($all_fields = $this->getOrderedExportableFields() as $field) {
230 switch ($field) {
231 case 'role':
232 $this->addCol($this->lng->txt($this->getType() . '_role_status'), $row, $col++);
233 break;
234 case 'agreement':
235 $this->addCol($this->lng->txt('ps_agreement_accepted'), $row, $col++);
236 break;
237 case 'consultation_hour':
238 $this->lng->loadLanguageModule('dateplaner');
239 $this->addCol($this->lng->txt('cal_ch_field_ch'), $row, $col++);
240 break;
241
242 case 'org_units':
243 $this->addCol($this->lng->txt('org_units'), $row, $col++);
244 break;
245
246 default:
247 if (strpos($field, 'udf_') === 0) {
248 $field_id = explode('_', $field);
250 $def = $udf->getDefinition((int) $field_id[1]);
251 #$this->csv->addColumn($def['field_name']);
252 $this->addCol($def['field_name'], $row, $col++);
253 } elseif (strpos($field, 'cdf_') === 0) {
254 $field_id = explode('_', $field);
255 #$this->csv->addColumn(ilCourseDefinedFieldDefinition::_lookupName($field_id[1]));
256 $this->addCol(ilCourseDefinedFieldDefinition::_lookupName((int) $field_id[1]), $row, $col++);
257 } elseif ($field === "username") {//User Name Presentation Guideline; username should be named login
258 $this->addCol($this->lng->txt("login"), $row, $col++);
259 } else {
260 #$this->csv->addColumn($this->lng->txt($field));
261 $this->addCol($this->lng->txt($field), $row, $col++);
262 }
263 break;
264 }
265 }
266 $this->addRow();
267 // Add user data
268 foreach ($this->user_ids as $usr_id) {
269 $row++;
270 $col = 0;
271 $usr_id = (int) $usr_id;
272
273 $udf_data = new ilUserDefinedData($usr_id);
274 foreach ($all_fields as $field) {
275 // Handle course defined fields
276 if ($this->addUserDefinedField($udf_data, $field, $row, $col)) {
277 $col++;
278 continue;
279 }
280
281 if ($this->addCourseField($usr_id, $field, $row, $col)) {
282 $col++;
283 continue;
284 }
285
286 switch ($field) {
287 case 'role':
288 switch ($this->user_course_data[$usr_id]['role'] ?? '') {
290 $this->addCol($this->lng->txt('crs_admin'), $row, $col++);
291 break;
292
294 $this->addCol($this->lng->txt('crs_tutor'), $row, $col++);
295 break;
296
298 $this->addCol($this->lng->txt('crs_member'), $row, $col++);
299 break;
300
302 $this->addCol($this->lng->txt('il_grp_admin'), $row, $col++);
303 break;
304
306 $this->addCol($this->lng->txt('il_grp_member'), $row, $col++);
307 break;
308
309 case 'subscriber':
310 $this->addCol($this->lng->txt($this->getType() . '_subscriber'), $row, $col++);
311 break;
312
313 default:
314 $this->addCol($this->lng->txt('crs_waiting_list'), $row, $col++);
315 break;
316
317 }
318 break;
319
320 case 'agreement':
321 if (isset($this->agreement[$usr_id])) {
322 if ($this->agreement[$usr_id]['accepted']) {
323 $dt = new ilDateTime($this->agreement[$usr_id]['acceptance_time'], IL_CAL_UNIX);
324 $this->addCol($dt->get(IL_CAL_DATETIME), $row, $col++);
325 } else {
326 $this->addCol($this->lng->txt('ps_not_accepted'), $row, $col++);
327 }
328 } else {
329 $this->addCol($this->lng->txt('ps_not_accepted'), $row, $col++);
330 }
331 break;
332
333 // These fields are always enabled
334 case 'username':
335 $this->addCol($this->user_profile_data[$usr_id]['login'], $row, $col++);
336 break;
337
338 case 'firstname':
339 case 'lastname':
340 $this->addCol($this->user_profile_data[$usr_id][$field], $row, $col++);
341 break;
342
343 case 'consultation_hour':
345 $this->obj_id,
346 $GLOBALS['DIC']['ilUser']->getId()
347 );
348
349 $uts = array();
350 foreach ((array) $bookings[$usr_id] as $ut) {
353 new ilDateTime($ut['dt'], IL_CAL_UNIX),
354 new ilDateTime($ut['dtend'], IL_CAL_UNIX)
355 );
356 if (strlen($ut['explanation'])) {
357 $tmp .= ' ' . $ut['explanation'];
358 }
359 $uts[] = $tmp;
360 }
361 $uts_str = implode(',', $uts);
362 $this->addCol($uts_str, $row, $col++);
363 break;
364 case 'crs_members_groups':
365 $groups = array();
366
367 foreach (array_keys($this->groups) as $grp_ref) {
368 if (in_array($usr_id, $this->groups_participants[$grp_ref])
369 && $this->groups_rights[$grp_ref]) {
370 $groups[] = $this->groups[$grp_ref];
371 }
372 }
373 $this->addCol(implode(", ", $groups), $row, $col++);
374 break;
375
376 case 'org_units':
377 $this->addCol(ilObjUser::lookupOrgUnitsRepresentation($usr_id), $row, $col++);
378 break;
379
380 default:
381 // Check aggreement
382 if (
383 !$this->privacy->courseConfirmationRequired() or
384 (isset($this->agreement[$usr_id]['accepted']) &&
385 $this->agreement[$usr_id]['accepted'])
386 ) {
387 #$this->csv->addColumn($this->user_profile_data[$usr_id][$field]);
388 $this->addCol($this->user_profile_data[$usr_id][$field] ?? '', $row, $col++);
389 } else {
390 #$this->csv->addColumn('');
391 $this->addCol('', $row, $col++);
392 }
393 break;
394
395 }
396 }
397 $this->addRow();
398 }
399 }
if(!defined('PATH_SEPARATOR')) $GLOBALS['_PEAR_default_error_mode']
Definition: PEAR.php:64
const IL_CAL_UNIX
const IL_CAL_DATETIME
static lookupManagedBookingsForObject(int $a_obj_id, int $a_usr_id)
Lookup bookings for own and managed consultation hours of an object.
static formatPeriod(ilDateTime $start, ilDateTime $end, bool $a_skip_starting_day=false)
Format a period of two dates Shows: 14.
static setUseRelativeDates(bool $a_status)
set use relative dates
@classDescription Date and time handling
addCourseField(int $a_usr_id, string $a_field, int $row, int $col)
Fill course specific fields.
addUserDefinedField(ilUserDefinedData $udf_data, string $a_field, int $row, int $col)
Add user defined fields.
static lookupOrgUnitsRepresentation(int $a_usr_id)
lookup org unit representation
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...

References $GLOBALS, $groups, ilUserDefinedFields\_getInstance(), ilCourseDefinedFieldDefinition\_lookupName(), addCol(), addCourseField(), addRow(), addUserDefinedField(), ilDatePresentation\formatPeriod(), ILIAS\Survey\Mode\getId(), getOrderedExportableFields(), IL_CAL_DATETIME, IL_CAL_UNIX, ilParticipants\IL_CRS_ADMIN, ilParticipants\IL_CRS_MEMBER, ilParticipants\IL_CRS_TUTOR, ilParticipants\IL_GRP_ADMIN, ilParticipants\IL_GRP_MEMBER, ILIAS\Repository\int(), ILIAS\Repository\lng(), ilBookingEntry\lookupManagedBookingsForObject(), ilObjUser\lookupOrgUnitsRepresentation(), and ilDatePresentation\setUseRelativeDates().

Referenced by createCSV(), and createExcel().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Field Documentation

◆ $access

ilAccessHandler ilMemberExport::$access
protected

Definition at line 43 of file class.ilMemberExport.php.

◆ $agreement

array ilMemberExport::$agreement = []
protected

Definition at line 44 of file class.ilMemberExport.php.

◆ $csv

ilCSVWriter ilMemberExport::$csv = null
protected

Definition at line 48 of file class.ilMemberExport.php.

◆ $export_type

int ilMemberExport::$export_type
private

Definition at line 34 of file class.ilMemberExport.php.

Referenced by getExportType().

◆ $filename

string ilMemberExport::$filename = null
private

Definition at line 39 of file class.ilMemberExport.php.

Referenced by getFilename().

◆ $groups

array ilMemberExport::$groups = []
private

Definition at line 36 of file class.ilMemberExport.php.

Referenced by initGroups(), and write().

◆ $groups_participants

array ilMemberExport::$groups_participants = []
private

Definition at line 37 of file class.ilMemberExport.php.

◆ $groups_rights

array ilMemberExport::$groups_rights = []
private

Definition at line 38 of file class.ilMemberExport.php.

◆ $lng

ilLanguage ilMemberExport::$lng
protected

Definition at line 41 of file class.ilMemberExport.php.

◆ $members

ilParticipants ilMemberExport::$members
private

Definition at line 35 of file class.ilMemberExport.php.

◆ $obj_id

int ilMemberExport::$obj_id
private

Definition at line 32 of file class.ilMemberExport.php.

Referenced by getObjId().

◆ $privacy

ilPrivacySettings ilMemberExport::$privacy
protected

Definition at line 47 of file class.ilMemberExport.php.

Referenced by getOrderedExportableFields().

◆ $ref_id

int ilMemberExport::$ref_id
private

Definition at line 31 of file class.ilMemberExport.php.

Referenced by getRefId().

◆ $settings

ilUserFormSettings ilMemberExport::$settings
protected

Definition at line 46 of file class.ilMemberExport.php.

◆ $tree

ilTree ilMemberExport::$tree
protected

Definition at line 42 of file class.ilMemberExport.php.

◆ $type

string ilMemberExport::$type
private

Definition at line 33 of file class.ilMemberExport.php.

Referenced by getType().

◆ $user_course_data

array ilMemberExport::$user_course_data = array()
private

Definition at line 52 of file class.ilMemberExport.php.

◆ $user_course_fields

array ilMemberExport::$user_course_fields = array()
private

Definition at line 53 of file class.ilMemberExport.php.

◆ $user_ids

array ilMemberExport::$user_ids = array()
private

Definition at line 51 of file class.ilMemberExport.php.

◆ $user_profile_data

array ilMemberExport::$user_profile_data = array()
private

Definition at line 54 of file class.ilMemberExport.php.

◆ $worksheet

ilExcel ilMemberExport::$worksheet = null
protected

Definition at line 49 of file class.ilMemberExport.php.

◆ EXPORT_CSV

const ilMemberExport::EXPORT_CSV = 1

Definition at line 28 of file class.ilMemberExport.php.

Referenced by addCol(), addRow(), and create().

◆ EXPORT_EXCEL

const ilMemberExport::EXPORT_EXCEL = 2

Definition at line 29 of file class.ilMemberExport.php.

Referenced by addCol(), addRow(), create(), and ilMemberExportGUI\exportExcel().


The documentation for this class was generated from the following file: