ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
ilAttendanceList Class Reference

Base class for attendance lists. More...

+ Collaboration diagram for ilAttendanceList:

Public Member Functions

 __construct ($a_parent_gui, $a_parent_obj, ilParticipants $a_participants_object=null, ilWaitingList $a_waiting_list=null)
 Constructor. More...
 
 addPreset ($a_id, $a_caption, $a_selected=false)
 Add user field. More...
 
 addBlank ($a_caption)
 Add blank column preset. More...
 
 setTitle ($a_title, $a_description=null)
 Set titles. More...
 
 addUserFilter ($a_id, $a_caption, $a_checked=false)
 Add user filter. More...
 
 getNonMemberUserData (array &$a_res)
 Get user data for subscribers and waiting list. More...
 
 setBlankColumns (array $a_values)
 Add blank columns. More...
 
 setCallback ($a_callback)
 Set participant detail callback. More...
 
 setId ($a_value)
 Set id (used for user form settings) More...
 
 initForm ($a_cmd="")
 Init form. More...
 
 initFromForm ()
 Set list attributes from post values. More...
 
 getFullscreenHTML ()
 render list in fullscreen mode More...
 
 getHTML ()
 render attendance list More...
 

Protected Member Functions

 readOrderedExportableFields ()
 read object export fields More...
 
 addRole ($a_id, $a_caption, $a_type)
 Add role. More...
 
 setRoleSelection ($a_role_ids)
 Set role selection. More...
 

Protected Attributes

 $logger = null
 
 $parent_gui
 
 $parent_obj
 
 $participants
 
 $waiting_list
 
 $callback
 
 $presets
 
 $role_data
 
 $roles
 
 $has_local_role
 
 $blank_columns
 
 $title
 
 $description
 
 $pre_blanks
 
 $id
 
 $include_waiting_list
 
 $include_subscribers
 
 $user_filters
 

Detailed Description

Base class for attendance lists.

Author
Jörg Lützenkirchen luetz.nosp@m.enki.nosp@m.rchen.nosp@m.@lei.nosp@m.fos.c.nosp@m.om
Version
$Id$

Definition at line 13 of file class.ilAttendanceList.php.

Constructor & Destructor Documentation

◆ __construct()

ilAttendanceList::__construct (   $a_parent_gui,
  $a_parent_obj,
ilParticipants  $a_participants_object = null,
ilWaitingList  $a_waiting_list = null 
)

Constructor.

Parameters
ilObjectGUI$a_parent_obj
ilObject$a_parent_obj
ilParticipants$a_participants_object
ilWaitingList$a_waiting_list

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

47 {
48 global $DIC;
49
50 $this->logger = $DIC->logger()->mmbr();
51
52 $this->parent_gui = $a_parent_gui;
53 $this->parent_obj = $a_parent_obj;
54 $this->participants = $a_participants_object;
55 $this->waiting_list = $a_waiting_list;
56
57 // always available
58 $this->presets['name'] = array($DIC->language()->txt('name'), true);
59 $this->presets['login'] = array($DIC->language()->txt('login'), true);
60
61
62 // add exportable fields
64
65 $DIC->language()->loadLanguageModule('crs');
66
67 // roles
68 $roles = $this->participants->getRoles();
69
70 foreach ($roles as $role_id) {
72 switch (substr($title, 0, 8)) {
73 case 'il_crs_a':
74 case 'il_grp_a':
75 case 'il_lso_a':
76 $this->addRole($role_id, $DIC->language()->txt('event_tbl_admin'), 'admin');
77 break;
78
79 case 'il_crs_t':
80 $this->addRole($role_id, $DIC->language()->txt('event_tbl_tutor'), 'tutor');
81 break;
82
83 case 'il_crs_m':
84 case 'il_grp_m':
85 case 'il_lso_m':
86 $this->addRole($role_id, $DIC->language()->txt('event_tbl_member'), 'member');
87 break;
88
89 case 'il_sess_':
90 $this->addRole($role_id, $DIC->language()->txt('event_tbl_member'), 'member');
91 break;
92
93 // local
94 default:
95 $this->has_local_role = true;
96 $this->addRole($role_id, $title, 'local');
97 break;
98 }
99 }
100 }
addRole($a_id, $a_caption, $a_type)
Add role.
readOrderedExportableFields()
read object export fields
static _lookupTitle($a_id)
lookup object title
global $DIC
Definition: saml.php:7

References $DIC, $roles, $title, ilObject\_lookupTitle(), addRole(), and readOrderedExportableFields().

+ Here is the call graph for this function:

Member Function Documentation

◆ addBlank()

ilAttendanceList::addBlank (   $a_caption)

Add blank column preset.

Parameters
string$a_caption

Definition at line 169 of file class.ilAttendanceList.php.

170 {
171 $this->pre_blanks[] = $a_caption;
172 }

◆ addPreset()

ilAttendanceList::addPreset (   $a_id,
  $a_caption,
  $a_selected = false 
)

Add user field.

Parameters
string$a_id
string$a_caption
bool$a_selected

Definition at line 159 of file class.ilAttendanceList.php.

160 {
161 $this->presets[$a_id] = array($a_caption, $a_selected);
162 }

Referenced by initFromForm().

+ Here is the caller graph for this function:

◆ addRole()

ilAttendanceList::addRole (   $a_id,
  $a_caption,
  $a_type 
)
protected

Add role.

Parameters
int$a_id
string$a_caption
string$a_type

Definition at line 193 of file class.ilAttendanceList.php.

194 {
195 $this->role_data[$a_id] = array($a_caption, $a_type);
196 }
$a_type
Definition: workflow.php:92

References $a_type.

Referenced by __construct().

+ Here is the caller graph for this function:

◆ addUserFilter()

ilAttendanceList::addUserFilter (   $a_id,
  $a_caption,
  $a_checked = false 
)

Add user filter.

Parameters
int$a_id
string$a_caption
bool$a_checked

Definition at line 217 of file class.ilAttendanceList.php.

218 {
219 $this->user_filters[$a_id] = array($a_caption, $a_checked);
220 }

◆ getFullscreenHTML()

ilAttendanceList::getFullscreenHTML ( )

render list in fullscreen mode

Returns
string

Definition at line 521 of file class.ilAttendanceList.php.

522 {
523 $tpl = new ilTemplate('tpl.main.html', true, true);
524 $tpl->setBodyClass("ilBodyPrint");
525
526 // load style sheet depending on user's settings
527 $location_stylesheet = ilUtil::getStyleSheetLocation();
528 $tpl->setVariable("LOCATION_STYLESHEET", $location_stylesheet);
529
530 $tpl->setVariable("BODY_ATTRIBUTES", 'onload="window.print()"');
531 $tpl->setVariable("CONTENT", $this->getHTML());
532
533 return $tpl->show();
534 }
$tpl
Definition: ilias.php:10
getHTML()
render attendance list
special template class to simplify handling of ITX/PEAR
static getStyleSheetLocation($mode="output", $a_css_name="", $a_css_location="")
get full style sheet file name (path inclusive) of current user

References $tpl, getHTML(), and ilUtil\getStyleSheetLocation().

+ Here is the call graph for this function:

◆ getHTML()

ilAttendanceList::getHTML ( )

render attendance list

Returns
string

Definition at line 541 of file class.ilAttendanceList.php.

542 {
543 $tpl = new ilTemplate('tpl.attendance_list_print.html', true, true, 'Services/Membership');
544
545
546 // title
547
550
551 $tpl->setVariable('TXT_TITLE', $this->title);
552 if ($this->description) {
553 $tpl->setVariable('TXT_DESCRIPTION', $this->description . " (" . $time . ")");
554 } else {
555 $tpl->setVariable('TXT_DESCRIPTION', $time);
556 }
557
558 ilLoggerFactory::getLogger('mmbr')->dump($this->presets, ilLogLevel::DEBUG);
559 // header
560
561 $tpl->setCurrentBlock('head_item');
562 foreach ($this->presets as $id => $item) {
563 if ($item[1]) {
564 $tpl->setVariable('TXT_HEAD', $item[0]);
565 $tpl->parseCurrentBlock();
566 }
567 }
568
569 if ($this->blank_columns) {
570 foreach ($this->blank_columns as $blank) {
571 $tpl->setVariable('TXT_HEAD', $blank);
572 $tpl->parseCurrentBlock();
573 }
574 }
575
576
577 // handle members
578
579 $valid_user_ids = $filters = array();
580
581 if ($this->roles) {
582 if ($this->has_local_role) {
583 $members = array();
584 foreach ($this->participants->getMembers() as $member_id) {
585 foreach ($this->participants->getAssignedRoles($member_id) as $role_id) {
586 $members[$role_id][] = $member_id;
587 }
588 }
589 } else {
590 $members = $this->participants->getMembers();
591 }
592
593 foreach ($this->roles as $role_id) {
594 switch ($this->role_data[$role_id][1]) {
595 case "admin":
596 $valid_user_ids = array_merge($valid_user_ids, $this->participants->getAdmins());
597 break;
598
599 case "tutor":
600 $valid_user_ids = array_merge($valid_user_ids, $this->participants->getTutors());
601 break;
602
603 // member/local
604 default:
605 if (!$this->has_local_role) {
606 $valid_user_ids = array_merge($valid_user_ids, (array) $members);
607 } else {
608 $valid_user_ids = array_merge($valid_user_ids, (array) $members[$role_id]);
609 }
610 break;
611 }
612 }
613 }
614
615 if ($this->include_subscribers) {
616 $valid_user_ids = array_merge($valid_user_ids, $this->participants->getSubscribers());
617 }
618
619 if ($this->include_waiting_list) {
620 $valid_user_ids = array_merge($valid_user_ids, $this->waiting_list->getUserIds());
621 }
622
623 if ($this->user_filters) {
624 foreach ($this->user_filters as $sub_id => $sub_item) {
625 $filters[$sub_id] = (bool) $sub_item[2];
626 }
627 }
628
629 $valid_user_ids = ilUtil::_sortIds(array_unique($valid_user_ids), 'usr_data', 'lastname', 'usr_id');
630 foreach ($valid_user_ids as $user_id) {
631 if ($this->callback) {
632 $user_data = call_user_func_array($this->callback, array($user_id, $filters));
633 if (!$user_data) {
634 continue;
635 }
636
637 $tpl->setCurrentBlock("row_preset");
638 foreach ($this->presets as $id => $item) {
639 if ($item[1]) {
640 switch ($id) {
641 case 'org_units':
642 $value = (string) ilOrgUnitPathStorage::getTextRepresentationOfUsersOrgUnits($user_id);
643 break;
644
645 case "name":
646 if (!$user_data[$id]) {
647 $name = ilObjUser::_lookupName($user_id);
648 $value = $name["lastname"] . ", " . $name["firstname"];
649 break;
650 }
651
652
653 // no break
654 case "login":
655 if (!$user_data[$id]) {
656 $value = ilObjUser::_lookupLogin($user_id);
657 break;
658 }
659
660 // no break
661 default:
662 $value = (string) $user_data[$id];
663 break;
664 }
665 $tpl->setVariable("TXT_PRESET", (string) $value);
666 $tpl->parseCurrentBlock();
667 }
668 }
669 }
670
671 if ($this->blank_columns) {
672 for ($loop = 0; $loop < sizeof($this->blank_columns); $loop++) {
673 $tpl->touchBlock('row_blank');
674 }
675 }
676
677 $tpl->touchBlock("member_row");
678 }
679
680 return $tpl->get();
681 }
const IL_CAL_UNIX
static formatDate(ilDateTime $date, $a_skip_day=false, $a_include_wd=false, $include_seconds=false)
Format a date @access public.
static setUseRelativeDates($a_status)
set use relative dates
@classDescription Date and time handling
static getLogger($a_component_id)
Get component logger.
static _lookupLogin($a_user_id)
lookup login
static _lookupName($a_user_id)
lookup user name
static _sortIds($a_ids, $a_table, $a_field, $a_id_name)
Function that sorts ids by a given table field using WHERE IN E.g: __sort(array(6,...
$time
Definition: cron.php:21

References $blank_columns, $id, $name, $time, $tpl, ilObjUser\_lookupLogin(), ilObjUser\_lookupName(), ilUtil\_sortIds(), ilLogLevel\DEBUG, ilDatePresentation\formatDate(), ilLoggerFactory\getLogger(), IL_CAL_UNIX, and ilDatePresentation\setUseRelativeDates().

Referenced by getFullscreenHTML().

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

◆ getNonMemberUserData()

ilAttendanceList::getNonMemberUserData ( array &  $a_res)

Get user data for subscribers and waiting list.

Parameters
array&$a_res

Definition at line 227 of file class.ilAttendanceList.php.

228 {
229 global $DIC;
230
231 $lng = $DIC['lng'];
232
233 $subscriber_ids = $this->participants->getSubscribers();
234
235 $user_ids = $subscriber_ids;
236
237 if ($this->waiting_list) {
238 $user_ids = array_merge($user_ids, $this->waiting_list->getUserIds());
239 }
240
241 // Finally read user profile data
242 $profile_data = ilObjUser::_readUsersProfileData($user_ids);
243 foreach ($profile_data as $user_id => $fields) {
244 foreach ((array) $fields as $field => $value) {
245 $a_res[$user_id][$field] = $value;
246 }
247 }
248
249 include_once './Services/User/classes/class.ilUserDefinedFields.php';
251
252 foreach ($udf->getExportableFields($this->parent_obj->getId()) as $field_id => $udf_data) {
253 foreach ($profile_data as $user_id => $field) {
254 include_once './Services/User/classes/class.ilUserDefinedData.php';
255 $udf_data = new ilUserDefinedData($user_id);
256 $a_res[$user_id]['udf_' . $field_id] = (string) $udf_data->get('f_' . $field_id);
257 }
258 }
259
260 if (sizeof($user_ids)) {
261 // object specific user data
262 include_once 'Modules/Course/classes/Export/class.ilCourseUserData.php';
263 $cdfs = ilCourseUserData::_getValuesByObjId($this->parent_obj->getId());
264
265 foreach (array_unique($user_ids) as $user_id) {
266 if ($tmp_obj = ilObjectFactory::getInstanceByObjId($user_id, false)) {
267 $a_res[$user_id]['login'] = $tmp_obj->getLogin();
268 $a_res[$user_id]['name'] = $tmp_obj->getLastname() . ', ' . $tmp_obj->getFirstname();
269
270 if (in_array($user_id, $subscriber_ids)) {
271 $a_res[$user_id]['status'] = $lng->txt('crs_subscriber');
272 } else {
273 $a_res[$user_id]['status'] = $lng->txt('crs_waiting_list');
274 }
275
276 foreach ((array) $cdfs[$user_id] as $field_id => $value) {
277 $a_res[$user_id]['cdf_' . $field_id] = (string) $value;
278 }
279 }
280 }
281 }
282 }
static _getValuesByObjId($a_obj_id)
Get values by obj_id (for all users)
static _readUsersProfileData($a_user_ids)
STATIC METHOD get user data of selected users.
static getInstanceByObjId($a_obj_id, $stop_on_error=true)
get an instance of an Ilias object by object id
Class ilUserDefinedData.
static _getInstance()
Get instance.
$lng

References $DIC, $lng, ilUserDefinedFields\_getInstance(), ilCourseUserData\_getValuesByObjId(), ilObjUser\_readUsersProfileData(), and ilObjectFactory\getInstanceByObjId().

+ Here is the call graph for this function:

◆ initForm()

ilAttendanceList::initForm (   $a_cmd = "")

Init form.

Parameters
string$a_cmd
Returns
ilPropertyFormGUI

Definition at line 330 of file class.ilAttendanceList.php.

331 {
332 global $DIC;
333
334 $ilCtrl = $DIC['ilCtrl'];
335 $lng = $DIC['lng'];
336
337 $lng->loadLanguageModule('crs');
338
339 include_once('./Services/Form/classes/class.ilPropertyFormGUI.php');
340 $form = new ilPropertyFormGUI();
341 $form->setFormAction($ilCtrl->getFormAction($this->parent_gui, $a_cmd));
342 $form->setTarget('_blank');
343 $form->setPreventDoubleSubmission(false);
344 $form->setTitle($lng->txt('sess_gen_attendance_list'));
345
346 $title = new ilTextInputGUI($lng->txt('title'), 'title');
347 $title->setValue($this->title);
348 $form->addItem($title);
349
350 $desc = new ilTextInputGUI($lng->txt('description'), 'desc');
351 $desc->setValue($this->description);
352 $form->addItem($desc);
353
354 if (sizeof($this->presets)) {
355 $preset = new ilCheckboxGroupInputGUI($lng->txt('user_detail'), 'preset');
356 $preset_value = array();
357 foreach ($this->presets as $id => $item) {
358 $preset->addOption(new ilCheckboxOption($item[0], $id));
359 if ($item[1]) {
360 $preset_value[] = $id;
361 }
362 }
363 $preset->setValue($preset_value);
364 $form->addItem($preset);
365 }
366
367 $blank = new ilTextInputGUI($lng->txt('event_blank_columns'), 'blank');
368 $blank->setMulti(true);
369 $form->addItem($blank);
370
371 if ($this->pre_blanks) {
372 $blank->setValue($this->pre_blanks);
373 }
374
375 $checked = array();
376
377 $chk_grp = new ilCheckboxGroupInputGUI($lng->txt('event_user_selection'), 'selection_of_users');
378
379 // participants by roles
380 foreach ($this->role_data as $role_id => $role_data) {
381 $title = ilObject::_lookupTitle($role_id);
382
383 $role_name = $role_id;
384 if (substr($title, 0, 10) == 'il_' . $this->parent_obj->getType() . '_adm') {
385 $role_name = 'adm';
386 }
387 if (substr($title, 0, 10) == 'il_' . $this->parent_obj->getType() . '_mem') {
388 $role_name = 'mem';
389 }
390 if (substr($title, 0, 10) == 'il_' . $this->parent_obj->getType() . '_tut') {
391 $role_name = 'tut';
392 }
393
394 $chk = new ilCheckboxOption(sprintf($lng->txt('event_user_selection_include_role'), $role_data[0]), 'role_' . $role_name);
395 $checked[] = 'role_' . $role_name;
396 $chk_grp->addOption($chk);
397 }
398
399 if ($this->waiting_list) {
400 $chk = new ilCheckboxOption($lng->txt('event_user_selection_include_requests'), 'subscr');
401 $chk_grp->addOption($chk);
402
403 $chk = new ilCheckboxOption($lng->txt('event_user_selection_include_waiting_list'), 'wlist');
404 $chk_grp->addOption($chk);
405 }
406
407 if ($this->user_filters) {
408 foreach ($this->user_filters as $sub_id => $sub_item) {
409 $chk = new ilCheckboxOption(
410 sprintf($lng->txt('event_user_selection_include_filter'), $sub_item[0]),
411 'members_' . $sub_id
412 );
413 if ($sub_item[1]) {
414 $checked[] = 'members_' . $sub_id;
415 }
416 $chk_grp->addOption($chk);
417 }
418 }
419 $chk_grp->setValue($checked);
420 $form->addItem($chk_grp);
421
422 $form->addCommandButton($a_cmd, $lng->txt('sess_print_attendance_list'));
423
424 if ($this->id && $a_cmd) {
425 include_once "Services/User/classes/class.ilUserFormSettings.php";
426 $settings = new ilUserFormSettings($this->id);
427 if (!$settings->hasStoredEntry()) {
428 $settings = new ilUserFormSettings($this->parent_obj->getType() . 's_pview', -1);
429 }
430
431 $settings->deleteValue('desc'); // #11340
432 $settings->exportToForm($form);
433 } elseif ($a_cmd == 'printForMembersOutput') {
434 include_once "Services/User/classes/class.ilUserFormSettings.php";
435 $settings = new ilUserFormSettings($this->parent_obj->getType() . 's_pview_' . $this->parent_obj->getId(), -1);
436 if (!$settings->hasStoredEntry()) {
437 // init from global defaults
438 $settings = new ilUserFormSettings($this->parent_obj->getType() . 's_pview', -1);
439 }
440
441 $settings->deleteValue('desc'); // #11340
442 $settings->exportToForm($form, true);
443 }
444
445 return $form;
446 }
This class represents a property in a property form.
This class represents an option in a checkbox group.
This class represents a property form user interface.
This class represents a text property in a property form.
global $ilCtrl
Definition: ilias.php:18
if(isset($_POST['submit'])) $form

References $DIC, $form, $id, $ilCtrl, $lng, $role_data, $title, and ilObject\_lookupTitle().

Referenced by initFromForm().

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

◆ initFromForm()

ilAttendanceList::initFromForm ( )

Set list attributes from post values.

Definition at line 451 of file class.ilAttendanceList.php.

452 {
453 $form = $this->initForm();
454 if ($form->checkInput()) {
455 foreach (array_keys($this->presets) as $id) {
456 $this->presets[$id][1] = false;
457 }
458 foreach ((array) $form->getInput('preset') as $value) {
459 if (isset($this->presets[$value])) {
460 $this->presets[$value][1] = true;
461 } else {
462 $this->addPreset($value, $value, true);
463 }
464 }
465
466 $this->setTitle($form->getInput('title'), $form->getInput('desc'));
467 $this->setBlankColumns($form->getInput('blank'));
468
469 $selection_of_users = (array) $form->getInput('selection_of_users'); // #18238
470
471 $roles = array();
472 foreach (array_keys($this->role_data) as $role_id) {
473 $title = ilObject::_lookupTitle($role_id);
474 $role_name = $role_id;
475 if (substr($title, 0, 10) == 'il_' . $this->parent_obj->getType() . '_adm') {
476 $role_name = 'adm';
477 }
478 if (substr($title, 0, 10) == 'il_' . $this->parent_obj->getType() . '_mem') {
479 $role_name = 'mem';
480 }
481 if (substr($title, 0, 10) == 'il_' . $this->parent_obj->getType() . '_tut') {
482 $role_name = 'tut';
483 }
484
485
486 if (in_array('role_' . $role_name, (array) $selection_of_users)) {
487 $roles[] = $role_id;
488 }
489 }
490 $this->setRoleSelection($roles);
491
492 // not in sessions
493 if ($this->waiting_list) {
494 $this->include_subscribers = (bool) in_array('subscr', $selection_of_users);
495 $this->include_waiting_list = (bool) in_array('wlist', $selection_of_users);
496 }
497
498 if ($this->user_filters) {
499 foreach (array_keys($this->user_filters) as $msub_id) {
500 $this->user_filters[$msub_id][2] = (bool) in_array("members_" . $msub_id, $selection_of_users);
501 }
502 }
503
504 if ($this->id) {
505 #$form->setValuesByPost();
506
507 #include_once "Services/User/classes/class.ilUserFormSettings.php";
508 #$settings = new ilUserFormSettings($this->id);
509 #$settings->deleteValue('desc'); // #11340
510 #$settings->importFromForm($form);
511 #$settings->store();
512 }
513 }
514 }
initForm($a_cmd="")
Init form.
addPreset($a_id, $a_caption, $a_selected=false)
Add user field.
setRoleSelection($a_role_ids)
Set role selection.
setTitle($a_title, $a_description=null)
Set titles.
setBlankColumns(array $a_values)
Add blank columns.

References $form, $id, $roles, $title, ilObject\_lookupTitle(), addPreset(), initForm(), setBlankColumns(), setRoleSelection(), and setTitle().

+ Here is the call graph for this function:

◆ readOrderedExportableFields()

ilAttendanceList::readOrderedExportableFields ( )
protected

read object export fields

Returns
boolean

Definition at line 106 of file class.ilAttendanceList.php.

107 {
108 include_once('Services/PrivacySecurity/classes/class.ilPrivacySettings.php');
109 include_once('Services/PrivacySecurity/classes/class.ilExportFieldsInfo.php');
110 include_once('Modules/Course/classes/Export/class.ilCourseDefinedFieldDefinition.php');
111 include_once('Services/User/classes/class.ilUserDefinedFields.php');
112
113 $field_info = ilExportFieldsInfo::_getInstanceByType($this->parent_obj->getType());
114 $field_info->sortExportFields();
115
116 foreach ($field_info->getExportableFields() as $field) {
117 switch ($field) {
118 case 'username':
119 case 'firstname':
120 case 'lastname':
121 continue 2;
122 }
123
124 ilLoggerFactory::getLogger('mmbr')->dump($field, ilLogLevel::DEBUG);
125 // Check if default enabled
126 $this->presets[$field] = array(
127 $GLOBALS['DIC']['lng']->txt($field),
128 false
129 );
130 }
131
132 // add udf fields
134 foreach ($udf->getExportableFields($this->parent_obj->getId()) as $field_id => $udf_data) {
135 $this->presets['udf_' . $field_id] = array(
136 $udf_data['field_name'],
137 false
138 );
139 }
140
141 // add cdf fields
142 include_once './Modules/Course/classes/Export/class.ilCourseDefinedFieldDefinition.php';
143 foreach (ilCourseDefinedFieldDefinition::_getFields($this->parent_obj->getId()) as $field_obj) {
144 $this->presets['cdf_' . $field_obj->getId()] = array(
145 $field_obj->getName(),
146 false
147 );
148 }
149 return true;
150 }
static _getFields($a_container_id, $a_sort=IL_CDF_SORT_NAME)
Get all fields of a container.
static _getInstanceByType($a_type)
Get Singleton Instance.
$GLOBALS['JPEG_Segment_Names']
Global Variable: XMP_tag_captions.

References $GLOBALS, ilCourseDefinedFieldDefinition\_getFields(), ilUserDefinedFields\_getInstance(), ilExportFieldsInfo\_getInstanceByType(), ilLogLevel\DEBUG, and ilLoggerFactory\getLogger().

Referenced by __construct().

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

◆ setBlankColumns()

ilAttendanceList::setBlankColumns ( array  $a_values)

Add blank columns.

Parameters
array$a_value

Definition at line 289 of file class.ilAttendanceList.php.

290 {
291 if (!implode("", $a_values)) {
292 $a_values = array();
293 } else {
294 foreach ($a_values as $idx => $value) {
295 $a_values[$idx] = trim($value);
296 if ($a_values[$idx] == "") {
297 unset($a_values[$idx]);
298 }
299 }
300 }
301 $this->blank_columns = $a_values;
302 }

Referenced by initFromForm().

+ Here is the caller graph for this function:

◆ setCallback()

ilAttendanceList::setCallback (   $a_callback)

Set participant detail callback.

Parameters
string | array$a_callback

Definition at line 309 of file class.ilAttendanceList.php.

310 {
311 $this->callback = $a_callback;
312 }

◆ setId()

ilAttendanceList::setId (   $a_value)

Set id (used for user form settings)

Parameters
string$a_value

Definition at line 319 of file class.ilAttendanceList.php.

320 {
321 $this->id = (string) $a_value;
322 }

◆ setRoleSelection()

ilAttendanceList::setRoleSelection (   $a_role_ids)
protected

Set role selection.

Parameters
array$a_role_ids

Definition at line 205 of file class.ilAttendanceList.php.

206 {
207 $this->roles = $a_role_ids;
208 }

Referenced by initFromForm().

+ Here is the caller graph for this function:

◆ setTitle()

ilAttendanceList::setTitle (   $a_title,
  $a_description = null 
)

Set titles.

Parameters
string$a_title
string$a_description

Definition at line 180 of file class.ilAttendanceList.php.

181 {
182 $this->title = $a_title;
183 $this->description = $a_description;
184 }

Referenced by initFromForm().

+ Here is the caller graph for this function:

Field Documentation

◆ $blank_columns

ilAttendanceList::$blank_columns
protected

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

Referenced by getHTML().

◆ $callback

ilAttendanceList::$callback
protected

Definition at line 24 of file class.ilAttendanceList.php.

◆ $description

ilAttendanceList::$description
protected

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

◆ $has_local_role

ilAttendanceList::$has_local_role
protected

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

◆ $id

ilAttendanceList::$id
protected

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

Referenced by getHTML(), initForm(), and initFromForm().

◆ $include_subscribers

ilAttendanceList::$include_subscribers
protected

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

◆ $include_waiting_list

ilAttendanceList::$include_waiting_list
protected

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

◆ $logger

ilAttendanceList::$logger = null
protected

Definition at line 18 of file class.ilAttendanceList.php.

◆ $parent_gui

ilAttendanceList::$parent_gui
protected

Definition at line 20 of file class.ilAttendanceList.php.

◆ $parent_obj

ilAttendanceList::$parent_obj
protected

Definition at line 21 of file class.ilAttendanceList.php.

◆ $participants

ilAttendanceList::$participants
protected

Definition at line 22 of file class.ilAttendanceList.php.

◆ $pre_blanks

ilAttendanceList::$pre_blanks
protected

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

◆ $presets

ilAttendanceList::$presets
protected

Definition at line 25 of file class.ilAttendanceList.php.

◆ $role_data

ilAttendanceList::$role_data
protected

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

Referenced by initForm().

◆ $roles

ilAttendanceList::$roles
protected

Definition at line 27 of file class.ilAttendanceList.php.

Referenced by __construct(), and initFromForm().

◆ $title

ilAttendanceList::$title
protected

Definition at line 30 of file class.ilAttendanceList.php.

Referenced by __construct(), initForm(), and initFromForm().

◆ $user_filters

ilAttendanceList::$user_filters
protected

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

◆ $waiting_list

ilAttendanceList::$waiting_list
protected

Definition at line 23 of file class.ilAttendanceList.php.


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