ILIAS  release_5-2 Revision v5.2.25-18-g3f80b828510
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

 $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
object$a_parent_obj
ilParticipants$a_participants_object
ilWaitingList$a_waiting_list

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

41 {
42 global $lng;
43
44 $this->parent_gui = $a_parent_gui;
45 $this->parent_obj = $a_parent_obj;
46 $this->participants = $a_participants_object;
47 $this->waiting_list = $a_waiting_list;
48
49 // always available
50 $this->presets['name'] = array($lng->txt('name'), true);
51 $this->presets['login'] = array($lng->txt('login'), true);
52
53 // add exportable fields
55
56 $lng->loadLanguageModule('crs');
57
58 // roles
59 $roles = $this->participants->getRoles();
60 foreach($roles as $role_id)
61 {
63 switch(substr($title, 0, 8))
64 {
65 case 'il_crs_a':
66 case 'il_grp_a':
67 $this->addRole($role_id, $lng->txt('event_tbl_admin'), 'admin');
68 break;
69
70 case 'il_crs_t':
71 $this->addRole($role_id, $lng->txt('event_tbl_tutor'), 'tutor');
72 break;
73
74 case 'il_crs_m':
75 case 'il_grp_m':
76 $this->addRole($role_id, $lng->txt('event_tbl_member'), 'member');
77 break;
78
79 // local
80 default:
81 $this->has_local_role = true;
82 $this->addRole($role_id, $title, 'local');
83 break;
84 }
85 }
86 }
addRole($a_id, $a_caption, $a_type)
Add role.
readOrderedExportableFields()
read object export fields
static _lookupTitle($a_id)
lookup object title
global $lng
Definition: privfeed.php:17

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

160 {
161 $this->pre_blanks[] = $a_caption;
162 }

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

150 {
151 $this->presets[$a_id] = array($a_caption, $a_selected);
152 }

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

184 {
185 $this->role_data[$a_id] = array($a_caption, $a_type);
186 }
$a_type
Definition: workflow.php:93

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

206 {
207 $this->user_filters[$a_id] = array($a_caption, $a_checked);
208 }

◆ getFullscreenHTML()

ilAttendanceList::getFullscreenHTML ( )

render list in fullscreen mode

Returns
string

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

540 {
541 $tpl = new ilTemplate('tpl.main.html',true,true);
542 $tpl->setBodyClass("ilBodyPrint");
543
544 // load style sheet depending on user's settings
545 $location_stylesheet = ilUtil::getStyleSheetLocation();
546 $tpl->setVariable("LOCATION_STYLESHEET",$location_stylesheet);
547
548 $tpl->setVariable("BODY_ATTRIBUTES",'onload="window.print()"');
549 $tpl->setVariable("CONTENT", $this->getHTML());
550
551 return $tpl->show();
552 }
global $tpl
Definition: ilias.php:8
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 559 of file class.ilAttendanceList.php.

560 {
561 $tpl = new ilTemplate('tpl.attendance_list_print.html',true,true,'Services/Membership');
562
563
564 // title
565
568
569 $tpl->setVariable('TXT_TITLE', $this->title);
570 if($this->description)
571 {
572 $tpl->setVariable('TXT_DESCRIPTION', $this->description." (".$time.")");
573 }
574 else
575 {
576 $tpl->setVariable('TXT_DESCRIPTION', $time);
577 }
578
579
580 // header
581
582 $tpl->setCurrentBlock('head_item');
583 foreach($this->presets as $id => $item)
584 {
585 if($item[1])
586 {
587 $tpl->setVariable('TXT_HEAD', $item[0]);
588 $tpl->parseCurrentBlock();
589 }
590 }
591
592 if($this->blank_columns)
593 {
594 foreach($this->blank_columns as $blank)
595 {
596 $tpl->setVariable('TXT_HEAD', $blank);
597 $tpl->parseCurrentBlock();
598 }
599 }
600
601
602 // handle members
603
604 $valid_user_ids = $filters = array();
605
606 if($this->roles)
607 {
608 if($this->has_local_role)
609 {
610 $members = array();
611 foreach($this->participants->getMembers() as $member_id)
612 {
613 foreach($this->participants->getAssignedRoles($member_id) as $role_id)
614 {
615 $members[$role_id][] = $member_id;
616 }
617 }
618 }
619 else
620 {
621 $members = $this->participants->getMembers();
622 }
623
624 foreach($this->roles as $role_id)
625 {
626 switch($this->role_data[$role_id][1])
627 {
628 case "admin":
629 $valid_user_ids = array_merge($valid_user_ids, $this->participants->getAdmins());
630 break;
631
632 case "tutor":
633 $valid_user_ids = array_merge($valid_user_ids, $this->participants->getTutors());
634 break;
635
636 // member/local
637 default:
638 if(!$this->has_local_role)
639 {
640 $valid_user_ids = array_merge($valid_user_ids, (array)$members);
641 }
642 else
643 {
644 $valid_user_ids = array_merge($valid_user_ids, (array)$members[$role_id]);
645 }
646 break;
647 }
648 }
649 }
650
651 if($this->include_subscribers)
652 {
653 $valid_user_ids = array_merge($valid_user_ids, $this->participants->getSubscribers());
654 }
655
656 if($this->include_waiting_list)
657 {
658 $valid_user_ids = array_merge($valid_user_ids, $this->waiting_list->getUserIds());
659 }
660
661 if($this->user_filters)
662 {
663 foreach($this->user_filters as $sub_id => $sub_item)
664 {
665 $filters[$sub_id] = (bool)$sub_item[2];
666 }
667 }
668
669 $valid_user_ids = ilUtil::_sortIds(array_unique($valid_user_ids),'usr_data','lastname','usr_id');
670
671
672 // rows
673
674 foreach($valid_user_ids as $user_id)
675 {
676 if($this->callback)
677 {
678 $user_data = call_user_func_array($this->callback, array($user_id, $filters));
679 if(!$user_data)
680 {
681 continue;
682 }
683
684 $tpl->setCurrentBlock("row_preset");
685 foreach($this->presets as $id => $item)
686 {
687 if($item[1])
688 {
689 switch($id)
690 {
691 case "name":
692 if(!$user_data[$id])
693 {
694 $name = ilObjUser::_lookupName($user_id);
695 $value = $name["lastname"].", ".$name["firstname"];
696 break;
697 }
698
699
700 case "login":
701 if(!$user_data[$id])
702 {
703 $value = ilObjUser::_lookupLogin($user_id);
704 break;
705 }
706
707 default:
708 $value = (string) $user_data[$id];
709 break;
710 }
711 $tpl->setVariable("TXT_PRESET", (string) $value);
712 $tpl->parseCurrentBlock();
713 }
714 }
715 }
716
717 if($this->blank_columns)
718 {
719 for($loop = 0; $loop < sizeof($this->blank_columns); $loop++)
720 {
721 $tpl->touchBlock('row_blank');
722 }
723 }
724
725 $tpl->touchBlock("member_row");
726 }
727
728 return $tpl->get();
729 }
const IL_CAL_UNIX
static setUseRelativeDates($a_status)
set use relative dates
static formatDate(ilDateTime $date)
Format a date @access public.
@classDescription Date and time handling
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,...

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

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

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

334 {
335 global $ilCtrl, $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 {
356 $preset = new ilCheckboxGroupInputGUI($lng->txt('user_detail'), 'preset');
357 $preset_value = array();
358 foreach($this->presets as $id => $item)
359 {
360 $preset->addOption(new ilCheckboxOption($item[0], $id));
361 if($item[1])
362 {
363 $preset_value[] = $id;
364 }
365 }
366 $preset->setValue($preset_value);
367 $form->addItem($preset);
368 }
369
370 $blank = new ilTextInputGUI($lng->txt('event_blank_columns'), 'blank');
371 $blank->setMulti(true);
372 $form->addItem($blank);
373
374 if($this->pre_blanks)
375 {
376 $blank->setValue($this->pre_blanks);
377 }
378
379 $checked = array();
380
381 $chk_grp = new ilCheckboxGroupInputGUI($lng->txt('event_user_selection'), 'selection_of_users');
382
383 // participants by roles
384 foreach($this->role_data as $role_id => $role_data)
385 {
386 $title = ilObject::_lookupTitle($role_id);
387
388 $role_name = $role_id;
389 if(substr($title, 0, 10) == 'il_'.$this->parent_obj->getType().'_adm')
390 {
391 $role_name = 'adm';
392 }
393 if(substr($title, 0, 10) == 'il_'.$this->parent_obj->getType().'_mem')
394 {
395 $role_name = 'mem';
396 }
397 if(substr($title, 0, 10) == 'il_'.$this->parent_obj->getType().'_tut')
398 {
399 $role_name = 'tut';
400 }
401
402 $chk = new ilCheckboxOption(sprintf($lng->txt('event_user_selection_include_role'),$role_data[0]), 'role_'.$role_name);
403 $checked[] = 'role_'.$role_name;
404 $chk_grp->addOption($chk);
405 }
406
407 if($this->waiting_list)
408 {
409 $chk = new ilCheckboxOption($lng->txt('event_user_selection_include_requests'), 'subscr');
410 $chk_grp->addOption($chk);
411
412 $chk = new ilCheckboxOption($lng->txt('event_user_selection_include_waiting_list'), 'wlist');
413 $chk_grp->addOption($chk);
414 }
415
416 if($this->user_filters)
417 {
418 foreach($this->user_filters as $sub_id => $sub_item)
419 {
420 $chk = new ilCheckboxOption(sprintf($lng->txt('event_user_selection_include_filter'),$sub_item[0]),
421 'members_'.$sub_id);
422 if($sub_item[1])
423 {
424 $checked[] = 'members_'.$sub_id;
425 }
426 $chk_grp->addOption($chk);
427 }
428 }
429 $chk_grp->setValue($checked);
430 $form->addItem($chk_grp);
431
432 $form->addCommandButton($a_cmd,$lng->txt('sess_print_attendance_list'));
433
434 if($this->id && $a_cmd)
435 {
436 include_once "Services/User/classes/class.ilUserFormSettings.php";
437 $settings = new ilUserFormSettings($this->id);
438 if(!$settings->hasStoredEntry())
439 {
440 $settings = new ilUserFormSettings($this->parent_obj->getType().'s_pview', -1);
441 }
442
443 $settings->deleteValue('desc'); // #11340
444 $settings->exportToForm($form);
445 }
446
447 return $form;
448 }
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

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

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

93 {
94 include_once('Services/PrivacySecurity/classes/class.ilPrivacySettings.php');
95 include_once('Services/PrivacySecurity/classes/class.ilExportFieldsInfo.php');
96 include_once('Modules/Course/classes/Export/class.ilCourseDefinedFieldDefinition.php');
97 include_once('Services/User/classes/class.ilUserDefinedFields.php');
98
99 $field_info = ilExportFieldsInfo::_getInstanceByType($this->parent_obj->getType());
100 $field_info->sortExportFields();
101
102 foreach($field_info->getExportableFields() as $field)
103 {
104 switch($field)
105 {
106 case 'username':
107 case 'firstname':
108 case 'lastname':
109 continue 2;
110 }
111
112 ilLoggerFactory::getLogger('mem')->dump($field, ilLogLevel::DEBUG);
113 // Check if default enabled
114 $this->presets[$field] = array(
115 $GLOBALS['lng']->txt($field),
116 false
117 );
118 }
119
120 // add udf fields
122 foreach($udf->getExportableFields($this->parent_obj->getId()) as $field_id => $udf_data)
123 {
124 $this->presets['udf_'.$field_id] = array(
125 $udf_data['field_name'],
126 false
127 );
128 }
129
130 // add cdf fields
131 include_once './Modules/Course/classes/Export/class.ilCourseDefinedFieldDefinition.php';
132 foreach(ilCourseDefinedFieldDefinition::_getFields($this->parent_obj->getId()) as $field_obj)
133 {
134 $this->presets['cdf_'.$field_obj->getId()] = array(
135 $field_obj->getName(),
136 false
137 );
138 }
139 return true;
140 }
static _getFields($a_container_id, $a_sort=IL_CDF_SORT_NAME)
Get all fields of a container.
static _getInstanceByType($a_type)
Get Singleton Instance.
static getLogger($a_component_id)
Get component logger.
$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 287 of file class.ilAttendanceList.php.

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

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

313 {
314 $this->callback = $a_callback;
315 }

◆ setId()

ilAttendanceList::setId (   $a_value)

Set id (used for user form settings)

Parameters
string$a_value

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

323 {
324 $this->id = (string)$a_value;
325 }

◆ setRoleSelection()

ilAttendanceList::setRoleSelection (   $a_role_ids)
protected

Set role selection.

Parameters
array$a_role_ids

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

194 {
195 $this->roles = $a_role_ids;
196 }

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

171 {
172 $this->title = $a_title;
173 $this->description = $a_description;
174 }

Referenced by initFromForm().

+ Here is the caller graph for this function:

Field Documentation

◆ $blank_columns

ilAttendanceList::$blank_columns
protected

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

Referenced by getHTML().

◆ $callback

ilAttendanceList::$callback
protected

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

◆ $description

ilAttendanceList::$description
protected

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

◆ $has_local_role

ilAttendanceList::$has_local_role
protected

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

◆ $id

ilAttendanceList::$id
protected

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

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

◆ $include_subscribers

ilAttendanceList::$include_subscribers
protected

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

◆ $include_waiting_list

ilAttendanceList::$include_waiting_list
protected

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

◆ $parent_gui

ilAttendanceList::$parent_gui
protected

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

◆ $parent_obj

ilAttendanceList::$parent_obj
protected

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

◆ $participants

ilAttendanceList::$participants
protected

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

◆ $pre_blanks

ilAttendanceList::$pre_blanks
protected

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

◆ $presets

ilAttendanceList::$presets
protected

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

◆ $role_data

ilAttendanceList::$role_data
protected

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

Referenced by initForm().

◆ $roles

ilAttendanceList::$roles
protected

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

Referenced by __construct(), and initFromForm().

◆ $title

ilAttendanceList::$title
protected

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

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

◆ $user_filters

ilAttendanceList::$user_filters
protected

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

◆ $waiting_list

ilAttendanceList::$waiting_list
protected

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


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