33 include_once(
'./Services/Calendar/classes/class.ilTimeZone.php');
34 include_once(
'./Services/Calendar/classes/class.ilDateTime.php');
62 $lng->loadLanguageModule(
'dateplaner');
84 $ilTabs->clearTargets();
85 $ilTabs->setBackTarget(
86 $this->lng->txt(
'cal_back_to_cal'),
87 $this->ctrl->getLinkTarget($this,
'cancel')
90 $next_class = $this->ctrl->getNextClass($this);
95 $cmd = $this->ctrl->getCmd(
"add");
120 $this->ctrl->returnToParent($this);
130 protected function initForm($a_mode, $a_as_milestone =
false, $a_edit_single_app =
false)
134 include_once(
'./Services/Form/classes/class.ilPropertyFormGUI.php');
135 include_once(
'./Services/Calendar/classes/class.ilCalendarRecurrenceGUI.php');
136 include_once(
'./Services/Calendar/classes/class.ilCalendarCategories.php');
137 include_once(
'./Services/Calendar/classes/class.ilCalendarCategoryAssignments.php');
138 include_once(
'./Services/Calendar/classes/class.ilCalendarCategory.php');
142 include_once(
'./Services/YUI/classes/class.ilYuiUtil.php');
148 $this->ctrl->saveParameter($this,array(
'seed',
'idate'));
149 $this->form->setFormAction($this->ctrl->getFormAction($this));
152 $this->form->setTitle($this->lng->txt(
'cal_new_ms'));
153 $this->form->addCommandButton(
'saveMilestone',$this->lng->txt(
'cal_add_milestone'));
154 $this->form->addCommandButton(
'cancel',$this->lng->txt(
'cancel'));
158 $this->form->setTitle($this->lng->txt(
'cal_new_app'));
159 $this->form->addCommandButton(
'save',$this->lng->txt(
'cal_add_appointment'));
160 $this->form->addCommandButton(
'cancel',$this->lng->txt(
'cancel'));
167 $this->form->setTitle($this->lng->txt(
'cal_edit_milestone'));
171 $this->form->setTitle($this->lng->txt(
'cal_edit_appointment'));
173 $this->ctrl->saveParameter($this,array(
'seed',
'app_id',
'idate'));
174 $this->form->setFormAction($this->ctrl->getFormAction($this));
178 include_once(
'./Services/Calendar/classes/class.ilCalendarCategory.php');
182 && ($type ==
"grp" || $type ==
"crs"))
185 $this->form->addCommandButton(
'editResponsibleUsers',$this->lng->txt(
'cal_change_responsible_users'));
187 $this->form->addCommandButton(
'update',$this->lng->txt(
'save'));
189 $this->form->addCommandButton(
'cancel',$this->lng->txt(
'cancel'));
194 $title->
setValue($this->app->getTitle());
195 $title->setRequired(
true);
196 $title->setMaxLength(128);
198 $this->form->addItem($title);
201 $calendar =
new ilSelectInputGUI($this->lng->txt(
'cal_category_selection'),
'calendar');
205 $selected_calendar = (int) $_POST[
'calendar'];
207 else if(
$_GET[
'category_id'])
209 $calendar->setValue((
int)
$_GET[
'category_id']);
210 $selected_calendar = (int) $_GET[
'category_id'];
212 elseif($a_mode ==
'edit')
216 $calendar->setValue($cat);
217 $selected_calendar = $cat;
219 elseif(isset(
$_GET[
'ref_id']))
221 include_once(
'./Services/Calendar/classes/class.ilCalendarCategories.php');
226 $calendar->setRequired(
true);
228 $calendar->setOptions($cats->prepareCategoriesOfUserForSelection());
230 include_once
'./Services/Calendar/classes/class.ilCalendarSettings.php';
233 $notification_cals = $cats->getNotificationCalendars();
234 $notification_cals = count($notification_cals) ? implode(
',',$notification_cals) :
'';
235 $calendar->addCustomAttribute(
"onchange=\"ilToggleNotification(new Array(".$notification_cals.
"));\"");
237 $this->form->addItem($calendar);
239 if (!$a_as_milestone)
241 include_once
'./Services/Form/classes/class.ilDateDurationInputGUI.php';
242 $tpl->addJavaScript(
'./Services/Form/js/date_duration.js');
245 $dur->setEndText($this->lng->txt(
'cal_end'));
246 $dur->enableToggleFullTime(
247 $this->lng->txt(
'cal_fullday_title'),
248 $this->app->isFullday() ?
true : false
250 $dur->setShowTime(
true);
251 $dur->setStart($this->app->getStart());
252 $dur->setEnd($this->app->getEnd());
253 $this->form->addItem($dur);
256 include_once(
'./Services/Calendar/classes/Form/class.ilRecurrenceInputGUI.php');
258 $rec->setRecurrence($this->rec);
259 $this->form->addItem(
$rec);
262 $where =
new ilTextInputGUI($this->lng->txt(
'cal_where'),
'location');
263 $where->
setValue($this->app->getLocation());
264 $where->setMaxLength(128);
266 $this->form->addItem($where);
271 $deadline->
setDate($this->app->getStart());
272 $deadline->setShowTime(
false);
273 $deadline->setMinuteStepSize(5);
274 $this->form->addItem($deadline);
277 $completion_vals = array();
278 for($i = 0; $i <= 100; $i+=5)
280 $completion_vals[$i] = $i.
" %";
285 $compl->setValue($this->app->getCompletion());
286 $this->form->addItem($compl);
290 $desc->
setValue($this->app->getDescription());
292 $this->form->addItem($desc);
294 if ($a_as_milestone && $a_mode ==
"edit" && $resp_info)
297 $users = $this->app->readResponsibleUsers();
301 foreach($users as $r)
303 $value.= $delim.$r[
"lastname"].
", ".$r[
"firstname"].
" [".$r[
"login"].
"]";
306 if (count($users) > 0)
312 $resp->setValue(
"-");
315 $this->form->addItem($resp);
322 $notu->
setInfo($this->lng->txt(
'cal_user_notification_info'));
324 $notu->setMaxLength(64);
327 foreach($this->notification->getRecipients() as $rcp)
329 switch ($rcp[
'type'])
336 $values[] = $rcp[
'email'];
341 $notu->setValues($values);
343 $notu->setValues(array(
''));
344 $this->form->addItem($notu);
348 include_once
'./Services/Calendar/classes/class.ilCalendarSettings.php';
361 $tpl->addJavaScript(
'./Services/Calendar/js/toggle_notification.js');
363 $not->
setInfo($this->lng->txt(
'cal_notification_info'));
365 $not->setChecked($this->app->isNotificationEnabled());
366 $not->setDisabled($disabled);
367 $this->form->addItem($not);
380 global
$tpl, $ilHelp;
382 $ilHelp->setScreenIdComponent(
"cal");
383 $ilHelp->setScreenId(
"app");
384 $ilHelp->setSubScreenId(
"create");
387 $tpl->setContent($this->form->getHTML());
398 global
$tpl, $ilHelp;
400 $ilHelp->setScreenIdComponent(
"cal");
401 $ilHelp->setScreenId(
"app");
402 $ilHelp->setSubScreenId(
"create_milestone");
405 $tpl->setContent($this->form->getHTML());
423 protected function save($a_as_milestone =
false)
427 $this->
load($a_as_milestone);
429 if($this->app->validate() and $this->notification->validate())
431 if(!(
int)
$_POST[
'calendar'])
437 $cat_id = (int)
$_POST[
'calendar'];
441 $this->notification->setEntryId($this->app->getEntryId());
442 $this->notification->save();
443 $this->rec->setEntryId($this->app->getEntryId());
446 include_once(
'./Services/Calendar/classes/class.ilCalendarCategoryAssignments.php');
451 include_once
'./Services/Calendar/classes/class.ilCalendarSettings.php';
461 include_once(
'./Services/Calendar/classes/class.ilCalendarCategory.php');
466 && ($type ==
"grp" || $type ==
"crs"))
471 elseif($a_as_milestone)
474 $this->ctrl->returnToParent($this);
479 $this->ctrl->returnToParent($this);
504 include_once
'./Services/Calendar/classes/class.ilCalendarMailNotification.php';
506 $notification->setAppointmentId($this->app->getEntryId());
508 foreach($this->notification->getRecipients() as $rcp)
513 $notification->setSender(ANONYMOUS_USER_ID);
514 $notification->setRecipients(array($rcp[
'usr_id']));
519 $notification->setSender(ANONYMOUS_USER_ID);
520 $notification->setRecipients(array($rcp[
'email']));
524 $notification->send();
535 include_once(
'./Services/Calendar/classes/class.ilCalendarCategory.php');
538 include_once
'./Services/Calendar/classes/class.ilCalendarMailNotification.php';
540 $notification->setAppointmentId($app_id);
542 switch($cat_info[
'type'])
546 switch($cat_info[
'obj_type'])
551 $notification->setRefId(
$ref_id);
552 $notification->setType(
561 $notification->setRefId(
$ref_id);
562 $notification->setType(
571 $notification->send();
579 include_once(
'./Services/Calendar/classes/class.ilCalendarCategoryAssignments.php');
581 include_once(
'./Services/Calendar/classes/class.ilCalendarCategory.php');
595 include_once(
"./Services/Calendar/classes/class.ilMilestoneResponsiblesTableGUI.php");
597 $this->app->getEntryId());
598 $tpl->setContent($table_gui->getHTML());
608 $this->app->writeResponsibleUsers(
$_POST[
"user_id"]);
609 $ilCtrl->returnToParent($this);
619 include_once
'./Services/Calendar/classes/class.ilCalendarRecurrences.php';
623 return $this->
edit(TRUE);
626 $this->ctrl->saveParameter($this,array(
'seed',
'app_id',
'dt',
'idate'));
628 include_once(
'./Services/Utilities/classes/class.ilConfirmationGUI.php');
630 $confirm->setFormAction($this->ctrl->getFormAction($this));
631 #$confirm->setHeaderText($this->lng->txt('cal_edit_app_sure'));
632 $confirm->setCancel($this->lng->txt(
'cancel'),
'cancel');
633 $confirm->addItem(
'appointments[]',$this->app->getEntryId(),$this->app->getTitle());
634 $confirm->addButton($this->lng->txt(
'cal_edit_single'),
'editSingle');
635 $confirm->setConfirm($this->lng->txt(
'cal_edit_recurrences'),
'edit');
637 $GLOBALS[
'tpl']->setContent($confirm->getHTML());
646 $GLOBALS[
'ilCtrl']->setParameter($this,
'rexcl',1);
657 protected function edit($a_edit_single_app =
false)
661 $ilHelp->setScreenIdComponent(
"cal");
662 $ilHelp->setScreenId(
"app");
663 if ($this->app->isMilestone())
665 $ilHelp->setSubScreenId(
"edit_milestone");
669 $ilHelp->setSubScreenId(
"edit");
672 include_once(
'./Services/Calendar/classes/class.ilCalendarCategory.php');
673 include_once(
'./Services/Calendar/classes/class.ilCalendarCategories.php');
674 include_once(
'./Services/Calendar/classes/class.ilCalendarCategoryAssignments.php');
676 $GLOBALS[
'ilCtrl']->saveParameter($this,array(
'seed',
'app_id',
'dt',
'idate'));
680 $GLOBALS[
'ilCtrl']->setParameter($this,
'rexl',1);
684 include_once
'./Services/Calendar/classes/class.ilCalendarRecurrenceCalculator.php';
689 $yesterday = clone $current_date;
691 $tomorrow = clone $current_date;
695 foreach($calc->calculateDateList($current_date, $tomorrow, 1) as $date_entry)
712 if(!$cats->isVisible($cat_id))
714 $ilErr->raiseError($this->lng->txt(
'permission_denied'),$ilErr->WARNING);
717 if(!$cats->isEditable($cat_id) or $this->app->isAutoGenerated())
723 $this->
initForm(
'edit', $this->app->isMilestone(), $a_edit_single_app);
724 $tpl->setContent($this->form->getHTML());
737 include_once(
"./Services/InfoScreen/classes/class.ilInfoScreenGUI.php");
739 $info->setFormAction($this->ctrl->getFormAction($this));
741 if ($this->app->isMilestone())
743 $info->addSection($this->lng->txt(
'cal_ms_details'));
747 $info->addSection($this->lng->txt(
'cal_details'));
751 $info->addProperty($this->lng->txt(
'appointment'),
753 $this->app->getStart(),
754 $this->app->getEnd()));
755 $info->addProperty($this->lng->txt(
'title'),$this->app->getPresentationTitle());
758 if(strlen($desc = $this->app->getDescription()))
760 $info->addProperty($this->lng->txt(
'description'),$desc);
764 if(strlen($loc = $this->app->getLocation()))
766 $info->addProperty($this->lng->txt(
'cal_where'),$loc);
770 if ($this->app->isMilestone() && $this->app->getCompletion() > 0)
772 $info->addProperty($this->lng->txt(
'cal_task_completion'),
773 $this->app->getCompletion().
" %");
776 include_once(
'./Services/Calendar/classes/class.ilCalendarCategoryAssignments.php');
781 && ($type ==
"grp" || $type ==
"crs"))
784 $users = $this->app->readResponsibleUsers();
786 foreach($users as $r)
788 $value.= $delim.$r[
"lastname"].
", ".$r[
"firstname"].
" [".$r[
"login"].
"]";
791 if (count($users) > 0)
793 $info->addProperty($this->lng->txt(
'cal_responsible'),
802 $info->addSection($this->lng->txt(
'additional_info'));
807 include_once(
'./Services/Link/classes/class.ilLink.php');
809 $info->addProperty($this->lng->txt(
'perma_link'),
'<a class="small" href="'.$href.
'" target="_top">'.$href.
'</a>');
812 $tpl->setContent($info->getHTML());
825 $single_editing = (
$_REQUEST[
'rexl'] ?
true :
false);
827 $this->
load($this->app->isMilestone());
829 if($this->app->validate() and $this->notification->validate())
831 if(!(
int)
$_POST[
'calendar'])
837 $cat_id = (int)
$_POST[
'calendar'];
852 $this->notification->save();
855 include_once(
'./Services/Calendar/classes/class.ilCalendarCategoryAssignments.php');
857 $GLOBALS[
'ilLog']->write($this->app->getEntryId());
858 $ass->deleteAssignments();
859 $ass->addAssignment($cat_id);
862 include_once
'./Services/Calendar/classes/class.ilCalendarSettings.php';
873 $this->ctrl->returnToParent($this);
894 include_once(
'./Services/Utilities/classes/class.ilConfirmationGUI.php');
896 $this->ctrl->saveParameter($this,array(
'seed',
'app_id',
'dt',
'idate'));
899 $confirm->setFormAction($this->ctrl->getFormAction($this));
900 $confirm->setHeaderText($this->lng->txt(
'cal_delete_app_sure'));
901 $confirm->setCancel($this->lng->txt(
'cancel'),
'cancel');
902 $confirm->addItem(
'appointments[]',$this->app->getEntryId(),$this->app->getTitle());
904 include_once(
'./Services/Calendar/classes/class.ilCalendarRecurrences.php');
906 && !$this->app->isMilestone())
908 $confirm->addButton($this->lng->txt(
'cal_delete_single'),
'deleteexclude');
909 $confirm->setConfirm($this->lng->txt(
'cal_delete_recurrences'),
'delete');
913 $confirm->setConfirm($this->lng->txt(
'delete'),
'delete');
916 $tpl->setContent($confirm->getHTML());
927 protected function delete()
929 foreach(
$_POST[
'appointments'] as $app_id)
934 include_once(
'./Services/Calendar/classes/class.ilCalendarCategoryAssignments.php');
937 include_once
'./Services/Calendar/classes/class.ilCalendarUserNotification.php';
941 $this->ctrl->returnToParent($this);
953 include_once(
'./Services/Calendar/classes/class.ilCalendarRecurrenceExclusion.php');
962 $this->ctrl->returnToParent($this);
977 $this->timezone = $ilUser->getTimeZone();
986 if(!isset(
$_GET[
'hour']))
989 $this->default_fulltime =
true;
993 if((
int)
$_GET[
'hour'] < 10)
995 $time =
'0'.(int)
$_GET[
'hour'].
':00:00';
999 $time = (int)
$_GET[
'hour'].
':00:00';
1002 $this->default_fulltime =
false;
1015 $this->seed = clone
$seed;
1016 $this->default_fulltime =
true;
1028 include_once(
'./Services/Calendar/classes/class.ilCalendarEntry.php');
1029 include_once(
'./Services/Calendar/classes/class.ilCalendarRecurrences.php');
1032 include_once
'./Services/Calendar/classes/class.ilCalendarUserNotification.php';
1038 $this->app->setStart($start);
1041 if($this->default_fulltime)
1043 #$seed_end->increment(IL_CAL_DAY,1);
1049 $this->app->setEnd($seed_end);
1050 $this->app->setFullday($this->default_fulltime);
1068 protected function load($a_as_milestone =
false)
1070 if ($a_as_milestone)
1072 $this->app->setMilestone(
true);
1080 $this->app->enableNotification((
int)
$_POST[
'not']);
1081 if ($a_as_milestone)
1083 $this->app->setFullday(
true);
1087 $this->app->setFullday(isset($_POST[
'event'][
'fulltime']) ?
true :
false);
1090 if($this->app->isFullday())
1092 $start =
new ilDate($_POST[
'event'][
'start'][
'date'][
'y'].
'-'.$_POST[
'event'][
'start'][
'date'][
'm'].
'-'.$_POST[
'event'][
'start'][
'date'][
'd'],
1094 $this->app->setStart($start);
1096 $end =
new ilDate($_POST[
'event'][
'end'][
'date'][
'y'].
'-'.$_POST[
'event'][
'end'][
'date'][
'm'].
'-'.$_POST[
'event'][
'end'][
'date'][
'd'],
1099 if ($a_as_milestone)
1102 $this->app->setEnd($start);
1106 $this->app->setEnd($end);
1111 $start_dt[
'year'] = (int) $_POST[
'event'][
'start'][
'date'][
'y'];
1112 $start_dt[
'mon'] = (int) $_POST[
'event'][
'start'][
'date'][
'm'];
1113 $start_dt[
'mday'] = (int) $_POST[
'event'][
'start'][
'date'][
'd'];
1114 $start_dt[
'hours'] = (int) $_POST[
'event'][
'start'][
'time'][
'h'];
1115 $start_dt[
'minutes'] = (int) $_POST[
'event'][
'start'][
'time'][
'm'];
1117 $this->app->setStart($start);
1119 $end_dt[
'year'] = (int) $_POST[
'event'][
'end'][
'date'][
'y'];
1120 $end_dt[
'mon'] = (int) $_POST[
'event'][
'end'][
'date'][
'm'];
1121 $end_dt[
'mday'] = (int) $_POST[
'event'][
'end'][
'date'][
'd'];
1122 $end_dt[
'hours'] = (int) $_POST[
'event'][
'end'][
'time'][
'h'];
1123 $end_dt[
'minutes'] = (int) $_POST[
'event'][
'end'][
'time'][
'm'];
1125 $this->app->setEnd($end);
1133 $this->notification->setRecipients(array());
1135 foreach((array)
$_POST[
'notu'] as $rcp)
1140 if(strlen($rcp) == 0)
1147 $this->notification->addRecipient(
1154 $this->notification->addRecipient(
1171 $this->rec->reset();
1173 switch(
$_POST[
'frequence'])
1176 $this->rec->setFrequenceType(
$_POST[
'frequence']);
1177 $this->rec->setInterval((
int)
$_POST[
'count_DAILY']);
1181 $this->rec->setFrequenceType($_POST[
'frequence']);
1182 $this->rec->setInterval((
int) $_POST[
'count_WEEKLY']);
1183 if(is_array($_POST[
'byday_WEEKLY']))
1190 $this->rec->setFrequenceType($_POST[
'frequence']);
1191 $this->rec->setInterval((
int) $_POST[
'count_MONTHLY']);
1192 switch((
int) $_POST[
'subtype_MONTHLY'])
1199 switch((
int) $_POST[
'monthly_byday_day'])
1203 $this->rec->setBYSETPOS((
int) $_POST[
'monthly_byday_num']);
1204 $this->rec->setBYDAY(
'MO,TU,WE,TH,FR');
1209 $this->rec->setBYMONTHDAY((
int) $_POST[
'monthly_byday_num']);
1213 $this->rec->setBYDAY((
int) $_POST[
'monthly_byday_num'].$_POST[
'monthly_byday_day']);
1219 $this->rec->setBYMONTHDAY((
int) $_POST[
'monthly_bymonthday']);
1225 $this->rec->setFrequenceType($_POST[
'frequence']);
1226 $this->rec->setInterval((
int) $_POST[
'count_YEARLY']);
1227 switch((
int) $_POST[
'subtype_YEARLY'])
1234 $this->rec->setBYMONTH((
int) $_POST[
'yearly_bymonth_byday']);
1235 $this->rec->setBYDAY((
int) $_POST[
'yearly_byday_num'].$_POST[
'yearly_byday']);
1239 $this->rec->setBYMONTH((
int) $_POST[
'yearly_bymonth_by_monthday']);
1240 $this->rec->setBYMONTHDAY((
int) $_POST[
'yearly_bymonthday']);
1247 switch((
int)
$_POST[
'until_type'])
1250 $this->rec->setFrequenceUntilDate(null);
1255 $this->rec->setFrequenceUntilDate(null);
1256 $this->rec->setFrequenceUntilCount((
int) $_POST[
'count']);
1260 $end_dt[
'year'] = (int) $_POST[
'until_end'][
'date'][
'y'];
1261 $end_dt[
'mon'] = (int) $_POST[
'until_end'][
'date'][
'm'];
1262 $end_dt[
'mday'] = (int) $_POST[
'until_end'][
'date'][
'd'];
1264 $this->rec->setFrequenceUntilCount(0);
1280 switch(
$_POST[
'frequence'])
1285 if($this->rec->getRecurrenceId())
1287 $this->rec->delete();
1292 if($this->rec->getRecurrenceId())
1294 $this->rec->update();
1317 $cat->setTitle($this->lng->txt(
'cal_default_calendar'));
1318 $cat->setObjId($ilUser->getId());
1337 include_once
'Services/Utilities/classes/class.ilConfirmationGUI.php';
1340 $this->ctrl->setParameter($this,
'dstart',(
int)
$_REQUEST[
'dstart']);
1341 $this->ctrl->setParameter($this,
'dend',(
int) $_REQUEST[
'dend']);
1344 $conf->setHeaderText($this->lng->txt(
'cal_confirm_reg_info'));
1345 $conf->setConfirm($this->lng->txt(
'cal_reg_register'),
'register');
1346 $conf->setCancel($this->lng->txt(
'cancel'),
'cancel');
1347 $conf->addItem(
'app_id', $entry->getEntryId(), $entry->getTitle().
' ('.$start.
')');
1349 $tpl->setContent($conf->getHTML());
1356 protected function register()
1360 include_once
'./Services/Calendar/classes/class.ilCalendarRegistration.php';
1369 $this->ctrl->returnToParent($this);
1387 include_once
'Services/Utilities/classes/class.ilConfirmationGUI.php';
1390 $this->ctrl->setParameter($this,
'dstart',(
int)
$_REQUEST[
'dstart']);
1391 $this->ctrl->setParameter($this,
'dend',(
int) $_REQUEST[
'dend']);
1394 $conf->setHeaderText($this->lng->txt(
'cal_confirm_unreg_info'));
1395 $conf->setConfirm($this->lng->txt(
'cal_reg_unregister'),
'unregister');
1396 $conf->setCancel($this->lng->txt(
'cancel'),
'cancel');
1397 $conf->addItem(
'app_id', $entry->getEntryId(), $entry->getTitle().
' ('.$start.
')');
1399 $tpl->setContent($conf->getHTML());
1410 include_once
'./Services/Calendar/classes/class.ilCalendarRegistration.php';
1419 $this->ctrl->returnToParent($this);
1429 $entry = (int)
$_GET[
'app_id'];
1430 $user = (int)
$_GET[
'bkid'];
1432 $this->ctrl->saveParameter($this,
'app_id');
1434 include_once
'Services/Calendar/classes/class.ilCalendarEntry.php';
1435 include_once
'Services/Booking/classes/class.ilBookingEntry.php';
1442 $tpl->setContent($form->getHTML());
1452 include_once
'./Services/Form/classes/class.ilPropertyFormGUI.php';
1454 $form->setFormAction($this->ctrl->getFormAction($this));
1455 $form->addCommandButton(
'bookconfirmed',$this->lng->txt(
'cal_confirm_booking'));
1456 $form->addCommandButton(
'cancel',$this->lng->txt(
'cancel'));
1459 $form->addItem($date);
1462 $form->addItem($title);
1464 $message =
new ilTextAreaInputGUI($this->lng->txt(
'cal_ch_booking_message_tbl'),
'comment');
1466 $form->addItem($message);
1482 if($form->checkInput())
1485 include_once
'./Services/Calendar/classes/class.ilCalendarEntry.php';
1488 include_once
'./Services/Booking/classes/class.ilBookingEntry.php';
1491 if(!$booking->isAppointmentBookableForUser($entry,
$GLOBALS[
'ilUser']->getId()))
1494 $this->ctrl->returnToParent($this);
1497 include_once
'./Services/Calendar/classes/ConsultationHours/class.ilConsultationHourUtils.php';
1500 include_once
'./Services/Booking/classes/class.ilBookingEntry.php';
1504 $this->ctrl->returnToParent($this);
1515 $entry = (int)
$_GET[
'app_id'];
1517 include_once
'Services/Calendar/classes/class.ilCalendarEntry.php';
1523 include_once
'Services/Booking/classes/class.ilBookingEntry.php';
1525 if(!$booking->hasBooked($entry->getEntryId()))
1527 $this->ctrl->returnToParent($this);
1535 $entry_title =
' '.$entry->getTitle();
1539 $this->ctrl->returnToParent($this);
1545 include_once
'Services/Utilities/classes/class.ilConfirmationGUI.php';
1548 $conf->setHeaderText($this->lng->txt(
'cal_cancel_booking_info'));
1549 $conf->setConfirm($this->lng->txt(
'cal_cancel_booking'),
'cancelconfirmed');
1550 $conf->setCancel($this->lng->txt(
'cancel'),
'cancel');
1551 $conf->addItem(
'app_id', $entry->getEntryId(), $title.
' - '.$entry_title);
1553 $tpl->setContent($conf->getHTML());
1564 $entry = (int)
$_POST[
'app_id'];
1565 $user = (int)
$_GET[
'bkid'];
1567 include_once
'Services/Calendar/classes/class.ilCalendarEntry.php';
1574 include_once
'Services/Calendar/classes/ConsultationHours/class.ilConsultationHourAppointments.php';
1575 $GLOBALS[
'ilLog']->dump($entry->getStart());
1578 $entry->getContextId(),
1585 foreach((array) $apps as $own_app)
1588 $ref_entry->delete();
1591 include_once
'Services/Booking/classes/class.ilBookingEntry.php';
1599 include_once
'Modules/BookingManager/classes/class.ilBookingReservation.php';
1608 $this->ctrl->returnToParent($this);
1618 include_once
'Services/Calendar/classes/class.ilCalendarCategoryAssignments.php';
1619 include_once
'Services/Calendar/classes/class.ilCalendarCategory.php';
1631 if(!isset(
$_GET[
'autoCompleteField']))
1633 $a_fields = array(
'login',
'firstname',
'lastname',
'email');
1637 $a_fields = array((
string)
$_GET[
'autoCompleteField']);
1640 $GLOBALS[
'ilLog']->write(print_r($a_fields,
true));
1641 include_once
'./Services/User/classes/class.ilUserAutoComplete.php';
1643 $auto->setSearchFields($a_fields);
1644 $auto->enableFieldSearchableCheck(
true);
1645 $auto->setMoreLinkAvailable(
true);
1652 echo $auto->getList(
$_REQUEST[
'query']);