ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
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 foreach ($roles as $role_id) {
71 switch (substr($title, 0, 8)) {
72 case 'il_crs_a':
73 case 'il_grp_a':
74 $this->addRole($role_id, $DIC->language()->txt('event_tbl_admin'), 'admin');
75 break;
76
77 case 'il_crs_t':
78 $this->addRole($role_id, $DIC->language()->txt('event_tbl_tutor'), 'tutor');
79 break;
80
81 case 'il_crs_m':
82 case 'il_grp_m':
83 $this->addRole($role_id, $DIC->language()->txt('event_tbl_member'), 'member');
84 break;
85
86 case 'il_sess_':
87 $this->addRole($role_id, $DIC->language()->txt('event_tbl_member'), 'member');
88 break;
89
90 // local
91 default:
92 $this->has_local_role = true;
93 $this->addRole($role_id, $title, 'local');
94 break;
95 }
96 }
97 }
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 166 of file class.ilAttendanceList.php.

167 {
168 $this->pre_blanks[] = $a_caption;
169 }

◆ 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 156 of file class.ilAttendanceList.php.

157 {
158 $this->presets[$a_id] = array($a_caption, $a_selected);
159 }

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 190 of file class.ilAttendanceList.php.

191 {
192 $this->role_data[$a_id] = array($a_caption, $a_type);
193 }
$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 214 of file class.ilAttendanceList.php.

215 {
216 $this->user_filters[$a_id] = array($a_caption, $a_checked);
217 }

◆ getFullscreenHTML()

ilAttendanceList::getFullscreenHTML ( )

render list in fullscreen mode

Returns
string

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

514 {
515 $tpl = new ilTemplate('tpl.main.html', true, true);
516 $tpl->setBodyClass("ilBodyPrint");
517
518 // load style sheet depending on user's settings
519 $location_stylesheet = ilUtil::getStyleSheetLocation();
520 $tpl->setVariable("LOCATION_STYLESHEET", $location_stylesheet);
521
522 $tpl->setVariable("BODY_ATTRIBUTES", 'onload="window.print()"');
523 $tpl->setVariable("CONTENT", $this->getHTML());
524
525 return $tpl->show();
526 }
$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 533 of file class.ilAttendanceList.php.

534 {
535 $tpl = new ilTemplate('tpl.attendance_list_print.html', true, true, 'Services/Membership');
536
537
538 // title
539
542
543 $tpl->setVariable('TXT_TITLE', $this->title);
544 if ($this->description) {
545 $tpl->setVariable('TXT_DESCRIPTION', $this->description . " (" . $time . ")");
546 } else {
547 $tpl->setVariable('TXT_DESCRIPTION', $time);
548 }
549
550 ilLoggerFactory::getLogger('crs')->dump($this->presets);
551 // header
552
553 $tpl->setCurrentBlock('head_item');
554 foreach ($this->presets as $id => $item) {
555 if ($item[1]) {
556 $tpl->setVariable('TXT_HEAD', $item[0]);
557 $tpl->parseCurrentBlock();
558 }
559 }
560
561 if ($this->blank_columns) {
562 foreach ($this->blank_columns as $blank) {
563 $tpl->setVariable('TXT_HEAD', $blank);
564 $tpl->parseCurrentBlock();
565 }
566 }
567
568
569 // handle members
570
571 $valid_user_ids = $filters = array();
572
573 if ($this->roles) {
574 if ($this->has_local_role) {
575 $members = array();
576 foreach ($this->participants->getMembers() as $member_id) {
577 foreach ($this->participants->getAssignedRoles($member_id) as $role_id) {
578 $members[$role_id][] = $member_id;
579 }
580 }
581 } else {
582 $members = $this->participants->getMembers();
583 }
584
585 foreach ($this->roles as $role_id) {
586 switch ($this->role_data[$role_id][1]) {
587 case "admin":
588 $valid_user_ids = array_merge($valid_user_ids, $this->participants->getAdmins());
589 break;
590
591 case "tutor":
592 $valid_user_ids = array_merge($valid_user_ids, $this->participants->getTutors());
593 break;
594
595 // member/local
596 default:
597 if (!$this->has_local_role) {
598 $valid_user_ids = array_merge($valid_user_ids, (array) $members);
599 } else {
600 $valid_user_ids = array_merge($valid_user_ids, (array) $members[$role_id]);
601 }
602 break;
603 }
604 }
605 }
606
607 if ($this->include_subscribers) {
608 $valid_user_ids = array_merge($valid_user_ids, $this->participants->getSubscribers());
609 }
610
611 if ($this->include_waiting_list) {
612 $valid_user_ids = array_merge($valid_user_ids, $this->waiting_list->getUserIds());
613 }
614
615 if ($this->user_filters) {
616 foreach ($this->user_filters as $sub_id => $sub_item) {
617 $filters[$sub_id] = (bool) $sub_item[2];
618 }
619 }
620
621 $valid_user_ids = ilUtil::_sortIds(array_unique($valid_user_ids), 'usr_data', 'lastname', 'usr_id');
622
623
624 // rows
625
626 foreach ($valid_user_ids as $user_id) {
627 if ($this->callback) {
628 $user_data = call_user_func_array($this->callback, array($user_id, $filters));
629 if (!$user_data) {
630 continue;
631 }
632
633 $tpl->setCurrentBlock("row_preset");
634 foreach ($this->presets as $id => $item) {
635 if ($item[1]) {
636 switch ($id) {
637 case "name":
638 if (!$user_data[$id]) {
639 $name = ilObjUser::_lookupName($user_id);
640 $value = $name["lastname"] . ", " . $name["firstname"];
641 break;
642 }
643
644
645 // no break
646 case "login":
647 if (!$user_data[$id]) {
648 $value = ilObjUser::_lookupLogin($user_id);
649 break;
650 }
651
652 // no break
653 default:
654 $value = (string) $user_data[$id];
655 break;
656 }
657 $tpl->setVariable("TXT_PRESET", (string) $value);
658 $tpl->parseCurrentBlock();
659 }
660 }
661 }
662
663 if ($this->blank_columns) {
664 for ($loop = 0; $loop < sizeof($this->blank_columns); $loop++) {
665 $tpl->touchBlock('row_blank');
666 }
667 }
668
669 $tpl->touchBlock("member_row");
670 }
671
672 return $tpl->get();
673 }
const IL_CAL_UNIX
static formatDate(ilDateTime $date, $a_skip_day=false, $a_include_wd=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
if($format !==null) $name
Definition: metadata.php:146

References $blank_columns, $id, $name, $time, $tpl, ilObjUser\_lookupLogin(), ilObjUser\_lookupName(), ilUtil\_sortIds(), 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 224 of file class.ilAttendanceList.php.

225 {
226 global $lng;
227
228 $subscriber_ids = $this->participants->getSubscribers();
229
230 $user_ids = $subscriber_ids;
231
232 if ($this->waiting_list) {
233 $user_ids = array_merge($user_ids, $this->waiting_list->getUserIds());
234 }
235
236 // Finally read user profile data
237 $profile_data = ilObjUser::_readUsersProfileData($user_ids);
238 foreach ($profile_data as $user_id => $fields) {
239 foreach ((array) $fields as $field => $value) {
240 $a_res[$user_id][$field] = $value;
241 }
242 }
243
244 include_once './Services/User/classes/class.ilUserDefinedFields.php';
246
247 foreach ($udf->getExportableFields($this->parent_obj->getId()) as $field_id => $udf_data) {
248 foreach ($profile_data as $user_id => $field) {
249 include_once './Services/User/classes/class.ilUserDefinedData.php';
250 $udf_data = new ilUserDefinedData($user_id);
251 $a_res[$user_id]['udf_' . $field_id] = (string) $udf_data->get('f_' . $field_id);
252 }
253 }
254
255 if (sizeof($user_ids)) {
256 // object specific user data
257 include_once 'Modules/Course/classes/Export/class.ilCourseUserData.php';
258 $cdfs = ilCourseUserData::_getValuesByObjId($this->parent_obj->getId());
259
260 foreach (array_unique($user_ids) as $user_id) {
261 if ($tmp_obj = ilObjectFactory::getInstanceByObjId($user_id, false)) {
262 $a_res[$user_id]['login'] = $tmp_obj->getLogin();
263 $a_res[$user_id]['name'] = $tmp_obj->getLastname() . ', ' . $tmp_obj->getFirstname();
264
265 if (in_array($user_id, $subscriber_ids)) {
266 $a_res[$user_id]['status'] = $lng->txt('crs_subscriber');
267 } else {
268 $a_res[$user_id]['status'] = $lng->txt('crs_waiting_list');
269 }
270
271 foreach ((array) $cdfs[$user_id] as $field_id => $value) {
272 $a_res[$user_id]['cdf_' . $field_id] = (string) $value;
273 }
274 }
275 }
276 }
277 }
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.
global $lng
Definition: privfeed.php:17

References $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 325 of file class.ilAttendanceList.php.

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

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 443 of file class.ilAttendanceList.php.

444 {
445 $form = $this->initForm();
446 if ($form->checkInput()) {
447 foreach (array_keys($this->presets) as $id) {
448 $this->presets[$id][1] = false;
449 }
450 foreach ((array) $form->getInput('preset') as $value) {
451 if (isset($this->presets[$value])) {
452 $this->presets[$value][1] = true;
453 } else {
454 $this->addPreset($value, $value, true);
455 }
456 }
457
458 $this->setTitle($form->getInput('title'), $form->getInput('desc'));
459 $this->setBlankColumns($form->getInput('blank'));
460
461 $selection_of_users = (array) $form->getInput('selection_of_users'); // #18238
462
463 $roles = array();
464 foreach (array_keys($this->role_data) as $role_id) {
465 $title = ilObject::_lookupTitle($role_id);
466 $role_name = $role_id;
467 if (substr($title, 0, 10) == 'il_' . $this->parent_obj->getType() . '_adm') {
468 $role_name = 'adm';
469 }
470 if (substr($title, 0, 10) == 'il_' . $this->parent_obj->getType() . '_mem') {
471 $role_name = 'mem';
472 }
473 if (substr($title, 0, 10) == 'il_' . $this->parent_obj->getType() . '_tut') {
474 $role_name = 'tut';
475 }
476
477
478 if (in_array('role_' . $role_name, (array) $selection_of_users)) {
479 $roles[] = $role_id;
480 }
481 }
482 $this->setRoleSelection($roles);
483
484 // not in sessions
485 if ($this->waiting_list) {
486 $this->include_subscribers = (bool) in_array('subscr', $selection_of_users);
487 $this->include_waiting_list = (bool) in_array('wlist', $selection_of_users);
488 }
489
490 if ($this->user_filters) {
491 foreach (array_keys($this->user_filters) as $msub_id) {
492 $this->user_filters[$msub_id][2] = (bool) in_array("members_" . $msub_id, $selection_of_users);
493 }
494 }
495
496 if ($this->id) {
497 #$form->setValuesByPost();
498
499 #include_once "Services/User/classes/class.ilUserFormSettings.php";
500 #$settings = new ilUserFormSettings($this->id);
501 #$settings->deleteValue('desc'); // #11340
502 #$settings->importFromForm($form);
503 #$settings->store();
504 }
505 }
506 }
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 103 of file class.ilAttendanceList.php.

104 {
105 include_once('Services/PrivacySecurity/classes/class.ilPrivacySettings.php');
106 include_once('Services/PrivacySecurity/classes/class.ilExportFieldsInfo.php');
107 include_once('Modules/Course/classes/Export/class.ilCourseDefinedFieldDefinition.php');
108 include_once('Services/User/classes/class.ilUserDefinedFields.php');
109
110 $field_info = ilExportFieldsInfo::_getInstanceByType($this->parent_obj->getType());
111 $field_info->sortExportFields();
112
113 foreach ($field_info->getExportableFields() as $field) {
114 switch ($field) {
115 case 'username':
116 case 'firstname':
117 case 'lastname':
118 continue 2;
119 }
120
121 ilLoggerFactory::getLogger('mem')->dump($field, ilLogLevel::DEBUG);
122 // Check if default enabled
123 $this->presets[$field] = array(
124 $GLOBALS['lng']->txt($field),
125 false
126 );
127 }
128
129 // add udf fields
131 foreach ($udf->getExportableFields($this->parent_obj->getId()) as $field_id => $udf_data) {
132 $this->presets['udf_' . $field_id] = array(
133 $udf_data['field_name'],
134 false
135 );
136 }
137
138 // add cdf fields
139 include_once './Modules/Course/classes/Export/class.ilCourseDefinedFieldDefinition.php';
140 foreach (ilCourseDefinedFieldDefinition::_getFields($this->parent_obj->getId()) as $field_obj) {
141 $this->presets['cdf_' . $field_obj->getId()] = array(
142 $field_obj->getName(),
143 false
144 );
145 }
146 return true;
147 }
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['loaded']
Global hash that tracks already loaded includes.

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 284 of file class.ilAttendanceList.php.

285 {
286 if (!implode("", $a_values)) {
287 $a_values = array();
288 } else {
289 foreach ($a_values as $idx => $value) {
290 $a_values[$idx] = trim($value);
291 if ($a_values[$idx] == "") {
292 unset($a_values[$idx]);
293 }
294 }
295 }
296 $this->blank_columns = $a_values;
297 }

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 304 of file class.ilAttendanceList.php.

305 {
306 $this->callback = $a_callback;
307 }

◆ setId()

ilAttendanceList::setId (   $a_value)

Set id (used for user form settings)

Parameters
string$a_value

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

315 {
316 $this->id = (string) $a_value;
317 }

◆ setRoleSelection()

ilAttendanceList::setRoleSelection (   $a_role_ids)
protected

Set role selection.

Parameters
array$a_role_ids

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

203 {
204 $this->roles = $a_role_ids;
205 }

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 177 of file class.ilAttendanceList.php.

178 {
179 $this->title = $a_title;
180 $this->description = $a_description;
181 }

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: