ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
ilAppointmentPresentationGroupGUI Class Reference
+ Inheritance diagram for ilAppointmentPresentationGroupGUI:
+ Collaboration diagram for ilAppointmentPresentationGroupGUI:

Public Member Functions

 collectPropertiesAndActions ()
 
- Public Member Functions inherited from ilAppointmentPresentationGUI
 __construct ($a_appointment, $a_info_screen, $a_toolbar, $a_list_item)
 
 getObjIdForAppointment ()
 
 getToolbar ()
 
 getListItem ()
 Get list item. More...
 
 getInfoScreen ()
 
 getCatId ($a_entry_id)
 
 getCatInfo ()
 
 executeCommand ()
 
 getHTML ()
 Get HTML. More...
 
 addContainerInfo ($a_obj_id)
 Add course/group container info. More...
 
 addInfoSection ($a_txt)
 Add info section. More...
 
 addInfoProperty ($a_txt, $a_val)
 Add info property. More...
 
 addListItemProperty ($a_txt, $a_val)
 Add list item property. More...
 
 addAction ($a_txt, $a_link)
 Add action. More...
 
 collectPropertiesAndActions ()
 Collect properties and actions. More...
 
 collectStandardPropertiesAndActions ()
 Collect standard properties and actions. More...
 
 addObjectLinks ($obj_id)
 Add object link. More...
 
 getReadableRefIds ($a_obj_id)
 Get readable ref ids. More...
 
 addEventDescription ($a_app)
 Add event description. More...
 
 addEventLocation ($a_app)
 Add event location. More...
 
 addLastUpdate ($a_app)
 Add last update. More...
 
 addCalendarInfo ($cat_info)
 Add calendar info. More...
 
 addCommonSection ($a_app, $a_obj_id=0, $cat_info=null, $a_container_info=false)
 Add common section. More...
 
 addMetaData ($a_obj_type, $a_obj_id, $a_sub_obj_type=null, $a_sub_obj_id=null)
 Add metadata. More...
 
 getUserName ($a_user_id, $a_force_name=false)
 Get (linked if possible) user name. More...
 
 downloadFiles ()
 Download files from an appointment ( Modals ) More...
 

Additional Inherited Members

- Static Public Member Functions inherited from ilAppointmentPresentationGUI
static getInstance ($a_appointment, $a_info_screen, $a_toolbar, $a_list_item)
 
- Protected Member Functions inherited from ilAppointmentPresentationGUI
 readObjIdForAppointment ()
 read obj_id for appointment More...
 
- Protected Attributes inherited from ilAppointmentPresentationGUI
 $toolbar
 
 $appointment
 
 $infoscreen
 
 $lng
 
 $tree
 
 $ui
 
 $list_item = null
 
 $info_items = array()
 
 $list_properties = array()
 
 $actions = array()
 
 $ctrl
 
 $access
 
 $readable_ref_ids
 
 $has_files = false
 
 $obj_id = 0
 
- Static Protected Attributes inherited from ilAppointmentPresentationGUI
static $instance
 

Detailed Description

Member Function Documentation

◆ collectPropertiesAndActions()

ilAppointmentPresentationGroupGUI::collectPropertiesAndActions ( )

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

References ilAppointmentPresentationGUI\$appointment, $DIC, $users, ilObject\_getAllReferences(), ilCalendarSettings\_getInstance(), ilLink\_getStaticLink(), ilAppointmentPresentationGUI\addAction(), ilAppointmentPresentationGUI\addCommonSection(), ilAppointmentPresentationGUI\addInfoProperty(), ilAppointmentPresentationGUI\addInfoSection(), ilAppointmentPresentationGUI\addLastUpdate(), ilAppointmentPresentationGUI\getCatInfo(), ilAppointmentPresentationGUI\getUserName(), IL_CAL_UNIX, and ilUtil\makeClickable().

17  {
18  global $DIC;
19 
20  include_once "./Modules/Group/classes/class.ilObjGroup.php";
21 
23  $user = $DIC->user();
24 
25  $app = $this->appointment;
26 
27  $this->lng->loadLanguageModule("grp");
28 
29  $cat_info = $this->getCatInfo();
30 
31  $grp = new ilObjGroup($cat_info['obj_id'], false);
32 
33  $refs = ilObject::_getAllReferences($cat_info['obj_id']);
34  $grp_ref_id = current($refs);
35 
36  // add common section (title, description, object/calendar, location)
37  $this->addCommonSection($app, $cat_info['obj_id']);
38 
39  if ($app['event']->isAutogenerated() && $grp->getInformation()) {
40  $this->addInfoSection($this->lng->txt("cal_grp_info"));
41  $this->addInfoProperty($this->lng->txt("grp_information"), ilUtil::makeClickable(nl2br($grp->getInformation())));
42  }
43 
44  // last edited
45  $this->addLastUpdate($app);
46 
47  $this->addAction($this->lng->txt("grp_grp_open"), ilLink::_getStaticLink($grp_ref_id, "grp"));
48 
49  // register/unregister to appointment
50  if ($settings->isCGRegistrationEnabled()) {
51  if (!$app['event']->isAutoGenerated()) {
52  include_once './Services/Calendar/classes/class.ilCalendarRegistration.php';
53  $reg = new ilCalendarRegistration($app['event']->getEntryId());
54 
55  if ($reg->isRegistered($user->getId(), new ilDateTime($app['dstart'], IL_CAL_UNIX), new ilDateTime($app['dend'], IL_CAL_UNIX))) {
56  //$this->ctrl->setParameterByClass('ilcalendarappointmentgui','seed',$this->getSeed()->get(IL_CAL_DATE));
57  $this->ctrl->setParameterByClass('ilcalendarappointmentgui', 'app_id', $app['event']->getEntryId());
58  $this->ctrl->setParameterByClass('ilcalendarappointmentgui', 'dstart', $app['dstart']);
59  $this->ctrl->setParameterByClass('ilcalendarappointmentgui', 'dend', $app['dend']);
60 
61  $this->addAction($this->lng->txt('cal_reg_unregister'), $this->ctrl->getLinkTargetByClass('ilcalendarappointmentgui', 'confirmUnregister'));
62  } else {
63  //$this->ctrl->setParameterByClass('ilcalendarappointmentgui','seed',$this->getSeed()->get(IL_CAL_DATE));
64  $this->ctrl->setParameterByClass('ilcalendarappointmentgui', 'app_id', $app['event']->getEntryId());
65  $this->ctrl->setParameterByClass('ilcalendarappointmentgui', 'dstart', $app['dstart']);
66  $this->ctrl->setParameterByClass('ilcalendarappointmentgui', 'dend', $app['dend']);
67 
68  $this->addAction($this->lng->txt('cal_reg_register'), $this->ctrl->getLinkTargetByClass('ilcalendarappointmentgui', 'confirmRegister'));
69  }
70  include_once './Services/Link/classes/class.ilLink.php';
71  $users = "";
72  foreach ($reg->getRegisteredUsers(new ilDateTime($app['dstart'], IL_CAL_UNIX), new ilDateTime($app['dend'], IL_CAL_UNIX)) as $usr_data) {
73  $users.= $this->getUserName($usr_data['usr_id']) . "<br>";
74  }
75  if ($users != "") {
76  $this->addInfoProperty($this->lng->txt("cal_reg_registered_users"), $users);
77  }
78  }
79  }
80  }
addInfoProperty($a_txt, $a_val)
Add info property.
static _getInstance()
get singleton instance
getUserName($a_user_id, $a_force_name=false)
Get (linked if possible) user name.
global $DIC
Definition: saml.php:7
const IL_CAL_UNIX
static _getAllReferences($a_id)
get all reference ids of object
addCommonSection($a_app, $a_obj_id=0, $cat_info=null, $a_container_info=false)
Add common section.
static makeClickable($a_text, $detectGotoLinks=false)
makeClickable In Texten enthaltene URLs und Mail-Adressen klickbar machen
registration for calendar appointments
Date and time handling
$users
Definition: authpage.php:44
Class ilObjGroup.
+ Here is the call graph for this function:

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