ILIAS  release_8 Revision v8.19
All Data Structures Namespaces Files Functions Variables Modules Pages
ilAppointmentPresentationGroupGUI Class Reference
+ Inheritance diagram for ilAppointmentPresentationGroupGUI:
+ Collaboration diagram for ilAppointmentPresentationGroupGUI:

Public Member Functions

 collectPropertiesAndActions ()
 
- Public Member Functions inherited from ilAppointmentPresentationGUI
 __construct (array $a_appointment, ?ilInfoScreenGUI $a_info_screen, ?ilToolbarGUI $a_toolbar, ?Item $a_list_item)
 
 getObjIdForAppointment ()
 
 getToolbar ()
 
 getListItem ()
 Get list item. More...
 
 getInfoScreen ()
 
 getCatId (int $a_entry_id)
 
 getCatInfo ()
 
 executeCommand ()
 
 getHTML ()
 
 addContainerInfo (int $a_obj_id)
 Add course/group container info. More...
 
 addInfoSection (string $a_txt)
 Add info section. More...
 
 addInfoProperty (string $a_txt, string $a_val)
 Add info property. More...
 
 addListItemProperty (string $a_txt, string $a_val)
 Add list item property. More...
 
 addAction (string $a_txt, string $a_link)
 Add action. More...
 
 collectPropertiesAndActions ()
 Collect properties and actions. More...
 
 collectStandardPropertiesAndActions ()
 Collect standard properties and actions. More...
 
 addObjectLinks (int $obj_id, ?array $a_appointment=null)
 Add object link. More...
 
 getReadableRefIds (int $a_obj_id)
 
 addEventDescription (array $a_app)
 Add event description. More...
 
 addEventLocation (array $a_app)
 Add event location. More...
 
 addLastUpdate (array $a_app)
 Add last update. More...
 
 addCalendarInfo (array $cat_info)
 
 addCommonSection (array $a_app, int $a_obj_id=0, ?array $cat_info=null, bool $a_container_info=false)
 
 addMetaData (string $a_obj_type, int $a_obj_id, ?string $a_sub_obj_type=null, ?int $a_sub_obj_id=null)
 
 getUserName (int $a_user_id, bool $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 (array $a_appointment, ?ilInfoScreenGUI $a_info_screen, ?ilToolbarGUI $a_toolbar, ?Item $a_list_item)
 
- Protected Member Functions inherited from ilAppointmentPresentationGUI
 readObjIdForAppointment ()
 read obj_id for appointment More...
 
 buildDirectLinkForAppointment (int $a_ref_id, ?array $a_appointment=null)
 Build direct link for appointment. More...
 
- Protected Attributes inherited from ilAppointmentPresentationGUI
array $appointment
 
ilToolbarGUI $toolbar
 
ilInfoScreenGUI $infoscreen
 
ilLanguage $lng
 
ilTree $tree
 
UIServices $ui
 
ilCtrlInterface $ctrl
 
ilAccessHandler $access
 
ilRbacSystem $rbacsystem
 
ilObjUser $user
 
RefineryFactory $refinery
 
HttpServices $http
 
Item $list_item = null
 
array $info_items = []
 
array $list_properties = []
 
array $actions = []
 
array $readable_ref_ids
 
bool $has_files = false
 
int $obj_id = 0
 
- Static Protected Attributes inherited from ilAppointmentPresentationGUI
static self $instance
 

Detailed Description

Member Function Documentation

◆ collectPropertiesAndActions()

ilAppointmentPresentationGroupGUI::collectPropertiesAndActions ( )

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

References $app, ilAppointmentPresentationGUI\$appointment, ILIAS\LTI\ToolProvider\$settings, ilAppointmentPresentationGUI\$user, ilObject\_getAllReferences(), ilCalendarSettings\_getInstance(), ilLink\_getStaticLink(), ilAppointmentPresentationGUI\addAction(), ilAppointmentPresentationGUI\addCommonSection(), ilAppointmentPresentationGUI\addInfoProperty(), ilAppointmentPresentationGUI\addInfoSection(), ilAppointmentPresentationGUI\addLastUpdate(), ILIAS\Repository\ctrl(), ilAppointmentPresentationGUI\getCatInfo(), ilAppointmentPresentationGUI\getUserName(), IL_CAL_UNIX, ILIAS\Repository\lng(), and ilUtil\makeClickable().

13  : void
14  {
17 
18  $this->lng->loadLanguageModule("grp");
19 
20  $cat_info = $this->getCatInfo();
21  $grp = new ilObjGroup($cat_info['obj_id'], false);
22 
23  $refs = ilObject::_getAllReferences($cat_info['obj_id']);
24  $grp_ref_id = current($refs);
25 
26  // add common section (title, description, object/calendar, location)
27  $this->addCommonSection($app, $cat_info['obj_id']);
28 
29  if ($app['event']->isAutogenerated() && $grp->getInformation()) {
30  $this->addInfoSection($this->lng->txt("cal_grp_info"));
31  $this->addInfoProperty(
32  $this->lng->txt("grp_information"),
33  ilUtil::makeClickable(nl2br($grp->getInformation()))
34  );
35  }
36 
37  // last edited
38  $this->addLastUpdate($app);
39 
40  $this->addAction($this->lng->txt("grp_grp_open"), ilLink::_getStaticLink($grp_ref_id, "grp"));
41 
42  // register/unregister to appointment
43  if ($settings->isCGRegistrationEnabled()) {
44  if (!$app['event']->isAutoGenerated()) {
45  $reg = new ilCalendarRegistration($app['event']->getEntryId());
46 
47  if ($reg->isRegistered(
48  $this->user->getId(),
49  new ilDateTime($app['dstart'], IL_CAL_UNIX),
50  new ilDateTime($app['dend'], IL_CAL_UNIX)
51  )) {
52  //$this->ctrl->setParameterByClass('ilcalendarappointmentgui','seed',$this->getSeed()->get(IL_CAL_DATE));
53  $this->ctrl->setParameterByClass('ilcalendarappointmentgui', 'app_id', $app['event']->getEntryId());
54  $this->ctrl->setParameterByClass('ilcalendarappointmentgui', 'dstart', $app['dstart']);
55  $this->ctrl->setParameterByClass('ilcalendarappointmentgui', 'dend', $app['dend']);
56 
57  $this->addAction(
58  $this->lng->txt('cal_reg_unregister'),
59  $this->ctrl->getLinkTargetByClass('ilcalendarappointmentgui', 'confirmUnregister')
60  );
61  } else {
62  //$this->ctrl->setParameterByClass('ilcalendarappointmentgui','seed',$this->getSeed()->get(IL_CAL_DATE));
63  $this->ctrl->setParameterByClass('ilcalendarappointmentgui', 'app_id', $app['event']->getEntryId());
64  $this->ctrl->setParameterByClass('ilcalendarappointmentgui', 'dstart', $app['dstart']);
65  $this->ctrl->setParameterByClass('ilcalendarappointmentgui', 'dend', $app['dend']);
66 
67  $this->addAction(
68  $this->lng->txt('cal_reg_register'),
69  $this->ctrl->getLinkTargetByClass('ilcalendarappointmentgui', 'confirmRegister')
70  );
71  }
72  $registered = $reg->getRegisteredUsers(
73  new \ilDateTime($app['dstart'], IL_CAL_UNIX),
74  new \ilDateTime($app['dend'], IL_CAL_UNIX)
75  );
76 
77  $users = "";
78  foreach ($registered as $user) {
79  $users .= $this->getUserName($user) . '<br />';
80  }
81  if ($users != "") {
82  $this->addInfoProperty($this->lng->txt("cal_reg_registered_users"), $users);
83  }
84  }
85  }
86  }
$app
Definition: cli.php:39
array $settings
Setting values (LTI parameters, custom parameters and local parameters).
Definition: System.php:200
static _getAllReferences(int $id)
get all reference ids for object ID
const IL_CAL_UNIX
addInfoSection(string $a_txt)
Add info section.
addInfoProperty(string $a_txt, string $a_val)
Add info property.
addLastUpdate(array $a_app)
Add last update.
registration for calendar appointments
getUserName(int $a_user_id, bool $a_force_name=false)
Get (linked if possible) user name.
addCommonSection(array $a_app, int $a_obj_id=0, ?array $cat_info=null, bool $a_container_info=false)
addAction(string $a_txt, string $a_link)
Add action.
Class ilObjGroup.
static makeClickable(string $a_text, bool $detectGotoLinks=false)
+ Here is the call graph for this function:

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