ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
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
 
Profile $profile
 
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 (ProfileData $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 31 of file class.ilMemberExport.php.

Constructor & Destructor Documentation

◆ __construct()

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

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

63 {
64 global $DIC;
65
66 $ilObjDataCache = $DIC['ilObjDataCache'];
67
68 $this->lng = $DIC->language();
69 $this->tree = $DIC->repositoryTree();
70 $this->access = $DIC->access();
71 $this->profile = $DIC['user']->getProfile();
72
73 $this->export_type = $a_type;
74 $this->ref_id = $a_ref_id;
75 $this->obj_id = $ilObjDataCache->lookupObjId($this->ref_id);
76 $this->type = ilObject::_lookupType($this->obj_id);
77
78 $this->initMembers();
79 $this->initGroups();
80
81 $this->agreement = ilMemberAgreement::_readByObjId($this->obj_id);
82 $this->settings = new ilUserFormSettings('memexp');
83 $this->privacy = ilPrivacySettings::getInstance();
84 }
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: shib_login.php:26

References $DIC, ilObject\_lookupType(), ilMemberAgreement\_readByObjId(), ILIAS\Repository\access(), ilPrivacySettings\getInstance(), initGroups(), initMembers(), ILIAS\Repository\lng(), ILIAS\Repository\profile(), 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 170 of file class.ilMemberExport.php.

170 : void
171 {
172 switch ($this->getExportType()) {
173 case self::EXPORT_CSV:
174 $this->csv->addColumn($a_value);
175 break;
176
178 $this->worksheet->setCell($a_row + 1, $a_col, $a_value);
179 break;
180 }
181 }

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 466 of file class.ilMemberExport.php.

466 : bool
467 {
468 if (strpos($a_field, 'cdf_') !== 0) {
469 return false;
470 }
471 if (
472 !$this->privacy->courseConfirmationRequired() ||
473 ($this->agreement[$a_usr_id]['accepted'] ?? false)
474 ) {
475 $field_info = explode('_', $a_field);
476 $field_id = $field_info[1] ?? 0;
477 $value = '';
478 if (isset($this->user_course_fields[$a_usr_id][$field_id])) {
479 $value = $this->user_course_fields[$a_usr_id][$field_id];
480 }
481 $this->addCol((string) $value, $row, $col);
482 return true;
483 }
484 #$this->csv->addColumn('');
485 $this->addCol('', $row, $col);
486 return true;
487 }
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 183 of file class.ilMemberExport.php.

183 : void
184 {
185 switch ($this->getExportType()) {
186 case self::EXPORT_CSV:
187 $this->csv->addRow();
188 break;
189
191 break;
192 }
193 }

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 ( ProfileData  $udf_data,
string  $a_field,
int  $row,
int  $col 
)
private

Add user defined fields.

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

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

References addCol().

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 130 of file class.ilMemberExport.php.

130 : void
131 {
132 $this->fetchUsers();
133 switch ($this->getExportType()) {
134 case self::EXPORT_CSV:
135 $this->createCSV();
136 break;
137
139 $this->createExcel();
140 break;
141 }
142 }

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

Referenced by ilPRGMembersExportGUI\exportAssignments().

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

◆ createCSV()

ilMemberExport::createCSV ( )

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

161 : void
162 {
163 $this->csv = new ilCSVWriter();
164 $this->write();
165 }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...

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 152 of file class.ilMemberExport.php.

152 : void
153 {
154 $this->worksheet = new ilExcel();
155 $this->worksheet->addSheet($this->lng->txt("members"));
156 $this->write();
157
158 $this->worksheet->writeToFile($this->getFilename());
159 }

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 404 of file class.ilMemberExport.php.

404 : void
405 {
407
408 if ($this->settings->enabled('admin')) {
409 $this->user_ids = $tmp_ids = $this->members->getAdmins();
410 $this->readCourseData($tmp_ids);
411 }
412 if ($this->settings->enabled('tutor')) {
413 $this->user_ids = array_merge($tmp_ids = $this->members->getTutors(), $this->user_ids);
414 $this->readCourseData($tmp_ids);
415 }
416 if ($this->settings->enabled('member')) {
417 $this->user_ids = array_merge($tmp_ids = $this->members->getMembers(), $this->user_ids);
418 $this->readCourseData($tmp_ids);
419 }
420 if ($this->settings->enabled('subscribers')) {
421 $this->user_ids = array_merge($tmp_ids = $this->members->getSubscribers(), $this->user_ids);
422 $this->readCourseData($tmp_ids);
423 }
424 if ($this->settings->enabled('waiting_list')) {
425 $waiting_list = new ilCourseWaitingList($this->obj_id);
426 $this->user_ids = array_merge($waiting_list->getUserIds(), $this->user_ids);
427 }
428 $this->user_ids = $this->filterUsers($this->user_ids);
429
430 // Sort by lastname
431 $this->user_ids = ilUtil::_sortIds($this->user_ids, 'usr_data', 'lastname', 'usr_id');
432
433 // Finally read user profile data
434 $this->user_profile_data = ilObjUser::_readUsersProfileData($this->user_ids);
435 }
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 90 of file class.ilMemberExport.php.

90 : array
91 {
92 return $this->access->filterUserIdsByRbacOrPositionOfCurrentUser(
93 'manage_members',
94 'manage_members',
95 $this->ref_id,
96 $a_usr_ids
97 );
98 }

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 144 of file class.ilMemberExport.php.

144 : ?string
145 {
146 if ($this->csv instanceof ilCSVWriter) {
147 return $this->csv->getCSVString();
148 }
149 return null;
150 }

Referenced by ilPRGMembersExportGUI\exportAssignments().

+ Here is the caller graph for this function:

◆ getExportType()

ilMemberExport::getExportType ( )

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

120 : int
121 {
122 return $this->export_type;
123 }

References $export_type.

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

+ Here is the caller graph for this function:

◆ getFilename()

ilMemberExport::getFilename ( )

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

105 : ?string
106 {
107 return $this->filename;
108 }

References $filename.

Referenced by createExcel().

+ Here is the caller graph for this function:

◆ getObjId()

ilMemberExport::getObjId ( )

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

125 : int
126 {
127 return $this->obj_id;
128 }

References $obj_id.

Referenced by initMembers().

+ Here is the caller graph for this function:

◆ getOrderedExportableFields()

ilMemberExport::getOrderedExportableFields ( )
protected

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

195 : array
196 {
198 $field_info->sortExportFields();
199 $fields[] = 'role';
200 // Append agreement info
203 $fields[] = 'agreement';
204 }
205
206 foreach ($field_info->getExportableFields() as $field) {
207 if ($this->settings->enabled($field)) {
208 $fields[] = $field;
209 }
210 }
211
212 foreach ($this->profile->getVisibleFields(Context::Course) as $field) {
213 if ($this->settings->enabled('udf_' . $field->getIdentifier())) {
214 $fields[] = 'udf_' . $field->getIdentifier();
215 }
216 }
217
218 // Add course specific fields
219 foreach (ilCourseDefinedFieldDefinition::_getFields($this->obj_id) as $field_obj) {
220 if ($this->settings->enabled('cdf_' . $field_obj->getId())) {
221 $fields[] = 'cdf_' . $field_obj->getId();
222 }
223 }
224 if ($this->settings->enabled('group_memberships')) {
225 $fields[] = 'crs_members_groups';
226 }
227 return $fields;
228 }
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(), ilExportFieldsInfo\_getInstanceByType(), ilObject\_lookupType(), ilPrivacySettings\courseConfirmationRequired(), ilPrivacySettings\getInstance(), ILIAS\Repository\profile(), 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 110 of file class.ilMemberExport.php.

110 : int
111 {
112 return $this->ref_id;
113 }

References $ref_id.

◆ getType()

ilMemberExport::getType ( )

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

115 : string
116 {
117 return $this->type;
118 }

References $type.

Referenced by initMembers(), and readCourseData().

+ Here is the caller graph for this function:

◆ initGroups()

ilMemberExport::initGroups ( )
protected

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

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

517 : void
518 {
519 if ($this->getType() === 'crs') {
520 $this->members = ilCourseParticipants::_getInstanceByObjId($this->getObjId());
521 }
522 if ($this->getType() === 'grp') {
523 $this->members = ilGroupParticipants::_getInstanceByObjId($this->getObjId());
524 }
525 }
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 442 of file class.ilMemberExport.php.

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

References $user_id, 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 458 of file class.ilMemberExport.php.

458 : void
459 {
460 $this->user_course_fields = ilCourseUserData::_getValuesByObjId($this->obj_id);
461 }
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 100 of file class.ilMemberExport.php.

100 : void
101 {
102 $this->filename = $a_file;
103 }

◆ write()

ilMemberExport::write ( )
protected

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

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

References $GLOBALS, $groups, 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(), ILIAS\Repository\profile(), 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 48 of file class.ilMemberExport.php.

◆ $agreement

array ilMemberExport::$agreement = []
protected

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

◆ $csv

ilCSVWriter ilMemberExport::$csv = null
protected

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

◆ $export_type

int ilMemberExport::$export_type
private

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

Referenced by getExportType().

◆ $filename

string ilMemberExport::$filename = null
private

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

Referenced by getFilename().

◆ $groups

array ilMemberExport::$groups = []
private

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

Referenced by initGroups(), and write().

◆ $groups_participants

array ilMemberExport::$groups_participants = []
private

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

◆ $groups_rights

array ilMemberExport::$groups_rights = []
private

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

◆ $lng

ilLanguage ilMemberExport::$lng
protected

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

◆ $members

ilParticipants ilMemberExport::$members
private

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

◆ $obj_id

int ilMemberExport::$obj_id
private

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

Referenced by getObjId().

◆ $privacy

ilPrivacySettings ilMemberExport::$privacy
protected

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

Referenced by getOrderedExportableFields().

◆ $profile

Profile ilMemberExport::$profile
protected

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

◆ $ref_id

int ilMemberExport::$ref_id
private

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

Referenced by getRefId().

◆ $settings

ilUserFormSettings ilMemberExport::$settings
protected

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

◆ $tree

ilTree ilMemberExport::$tree
protected

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

◆ $type

string ilMemberExport::$type
private

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

Referenced by getType().

◆ $user_course_data

array ilMemberExport::$user_course_data = array()
private

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

◆ $user_course_fields

array ilMemberExport::$user_course_fields = array()
private

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

◆ $user_ids

array ilMemberExport::$user_ids = array()
private

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

◆ $user_profile_data

array ilMemberExport::$user_profile_data = array()
private

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

◆ $worksheet

ilExcel ilMemberExport::$worksheet = null
protected

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

◆ EXPORT_CSV

const ilMemberExport::EXPORT_CSV = 1

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

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

◆ EXPORT_EXCEL

const ilMemberExport::EXPORT_EXCEL = 2

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

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


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