2 include_once
'./Services/Calendar/interfaces/interface.ilCalendarAppointmentPresentation.php';
3 include_once
'./Services/Calendar/classes/AppointmentPresentation/class.ilAppointmentPresentationGUI.php';
18 include_once(
'./Services/Link/classes/class.ilLink.php');
22 $cat_id = $this->
getCatId($a_app[
'event']->getEntryId());
24 $context_id = $a_app[
'event']->getContextId();
29 include_once
'Services/Booking/classes/class.ilBookingEntry.php';
36 if ($booking->isOwner()) {
38 foreach ($booking->getTargetObjIds() as
$obj_id) {
45 foreach ($refs as $ref_id) {
47 if (count($refs) > 1) {
48 $par_ref = $this->tree->getParentId($ref_id);
51 $buttons[] = $this->ui->renderer()->render(
56 if (count($buttons) > 0) {
57 $this->
addInfoProperty($this->lng->txt(
"cal_repo_obj"), implode(
"<br>", $buttons));
64 if ($deadline = $booking->getDeadlineHours()) {
65 $limit = $a_app[
'dstart'] - ($deadline * 60 * 60);
67 if (
time() > $limit) {
68 $this->
addInfoProperty($this->lng->txt(
"cal_ch_deadline"), $this->lng->txt(
"exc_time_over_short"));
83 $this->
addInfoProperty($this->lng->txt(
'cal_ch_num_bookings'), $booking->getNumberOfBookings());
84 $this->
addListItemProperty($this->lng->txt(
'cal_ch_num_bookings'), $booking->getNumberOfBookings());
88 $is_owner = $booking->isOwner();
89 $user_entry = ($cat_info[
'obj_id'] == $this->
user->getId());
91 if ($user_entry && !$is_owner) {
93 include_once
'Services/Calendar/classes/ConsultationHours/class.ilConsultationHourAppointments.php';
95 $ref_event = $apps[0];
97 $ref_event = $a_app[
'event']->getEntryId();
100 $cb = $booking->getCurrentNumberOfBookings($ref_event);
102 $this->
addInfoProperty($this->lng->txt(
'cal_ch_current_bookings'), $cb);
107 if ($booking->hasBooked($ref_event)) {
109 $this->ctrl->setParameterByClass(
'ilcalendarappointmentgui',
'app_id', $ref_event);
112 $this->lng->txt(
'cal_ch_cancel_booking'),
113 $this->ctrl->getLinkTargetByClass(
'ilcalendarappointmentgui',
'cancelBooking')
116 } elseif ($booking->isAppointmentBookableForUser($ref_event,
$GLOBALS[
'ilUser']->getId())) {
117 $this->ctrl->setParameterByClass(
'ilcalendarappointmentgui',
'app_id', $ref_event);
120 $this->lng->txt(
'cal_ch_book'),
121 $this->ctrl->getLinkTargetByClass(
'ilcalendarappointmentgui',
'book')
130 include_once
'./Services/Link/classes/class.ilLink.php';
132 foreach ($booking->getCurrentBookings($a_app[
'event']->getEntryId()) as $user_id) {
addInfoProperty($a_txt, $a_val)
Add info property.
collectPropertiesAndActions()
getUserName($a_user_id, $a_force_name=false)
Get (linked if possible) user name.
getReadableRefIds($a_obj_id)
Get readable ref ids.
static _lookupFullname($a_user_id)
Lookup Full Name.
static _after(ilDateTime $start, ilDateTime $end, $a_compare_field='', $a_tz='')
compare two dates and check start is after end This method does not consider tz offsets.
static _getStaticLink( $a_ref_id, $a_type='', $a_fallback_goto=true, $append="")
Get static link.
static formatDate(ilDateTime $date, $a_skip_day=false, $a_include_wd=false)
Format a date public.
$GLOBALS['loaded']
Global hash that tracks already loaded includes.
static getAppointmentIds($a_user_id, $a_context_id=null, $a_start=null, $a_type=null, $a_check_owner=true)
Get all appointment ids.
static _lookupTitle($a_id)
lookup object title
addCommonSection($a_app, $a_obj_id=0, $cat_info=null, $a_container_info=false)
Add common section.
static _lookupObjId($a_id)
addLastUpdate($a_app)
Add last update.
const MODE_PORTFOLIO_CONSULTATION
static _getInstance($a_usr_id=0)
get singleton instance
Create styles array
The data for the language used.
addListItemProperty($a_txt, $a_val)
Add list item property.
addAction($a_txt, $a_link)
Add action.
static getManager($a_as_name=false, $a_full_name=false, $a_user_id=null)
Get consultation hour manager for current user or specific user.
Add data(end) time
Method that wraps PHPs time in order to allow simulations with the workflow.