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->setMinuteStepSize(5);
251 $dur->setShowDate(
true);
252 $dur->setShowTime(
true);
253 $dur->setStart($this->app->getStart());
254 $dur->setEnd($this->app->getEnd());
255 $this->form->addItem($dur);
258 include_once(
'./Services/Calendar/classes/Form/class.ilRecurrenceInputGUI.php');
260 $rec->setRecurrence($this->rec);
261 $this->form->addItem(
$rec);
264 $where =
new ilTextInputGUI($this->lng->txt(
'cal_where'),
'location');
265 $where->
setValue($this->app->getLocation());
266 $where->setMaxLength(128);
268 $this->form->addItem($where);
273 $deadline->
setDate($this->app->getStart());
274 $deadline->setShowTime(
false);
275 $deadline->setMinuteStepSize(5);
276 $this->form->addItem($deadline);
279 $completion_vals = array();
280 for($i = 0; $i <= 100; $i+=5)
282 $completion_vals[$i] = $i.
" %";
287 $compl->setValue($this->app->getCompletion());
288 $this->form->addItem($compl);
292 $desc->
setValue($this->app->getDescription());
294 $this->form->addItem($desc);
296 if ($a_as_milestone && $a_mode ==
"edit" && $resp_info)
299 $users = $this->app->readResponsibleUsers();
303 foreach($users as $r)
305 $value.= $delim.$r[
"lastname"].
", ".$r[
"firstname"].
" [".$r[
"login"].
"]";
308 if (count($users) > 0)
314 $resp->setValue(
"-");
317 $this->form->addItem($resp);
324 $notu->
setInfo($this->lng->txt(
'cal_user_notification_info'));
326 $notu->setMaxLength(64);
329 foreach($this->notification->getRecipients() as $rcp)
331 switch ($rcp[
'type'])
338 $values[] = $rcp[
'email'];
343 $notu->setValues($values);
345 $notu->setValues(array(
''));
346 $this->form->addItem($notu);
350 include_once
'./Services/Calendar/classes/class.ilCalendarSettings.php';
363 $tpl->addJavaScript(
'./Services/Calendar/js/toggle_notification.js');
365 $not->
setInfo($this->lng->txt(
'cal_notification_info'));
367 $not->setChecked($this->app->isNotificationEnabled());
368 $not->setDisabled($disabled);
369 $this->form->addItem($not);
382 global
$tpl, $ilHelp;
384 $ilHelp->setScreenIdComponent(
"cal");
385 $ilHelp->setScreenId(
"app");
386 $ilHelp->setSubScreenId(
"create");
389 $tpl->setContent($this->form->getHTML());
400 global
$tpl, $ilHelp;
402 $ilHelp->setScreenIdComponent(
"cal");
403 $ilHelp->setScreenId(
"app");
404 $ilHelp->setSubScreenId(
"create_milestone");
407 $tpl->setContent($this->form->getHTML());
425 protected function save($a_as_milestone =
false)
429 $this->
load($a_as_milestone);
431 if($this->app->validate() and $this->notification->validate())
433 if(!(
int)
$_POST[
'calendar'])
439 $cat_id = (int)
$_POST[
'calendar'];
443 $this->notification->setEntryId($this->app->getEntryId());
444 $this->notification->save();
445 $this->rec->setEntryId($this->app->getEntryId());
448 include_once(
'./Services/Calendar/classes/class.ilCalendarCategoryAssignments.php');
453 include_once
'./Services/Calendar/classes/class.ilCalendarSettings.php';
463 include_once(
'./Services/Calendar/classes/class.ilCalendarCategory.php');
468 && ($type ==
"grp" || $type ==
"crs"))
473 elseif($a_as_milestone)
476 $this->ctrl->returnToParent($this);
481 $this->ctrl->returnToParent($this);
506 include_once
'./Services/Calendar/classes/class.ilCalendarMailNotification.php';
508 $notification->setAppointmentId($this->app->getEntryId());
510 foreach($this->notification->getRecipients() as $rcp)
515 $notification->setSender(ANONYMOUS_USER_ID);
516 $notification->setRecipients(array($rcp[
'usr_id']));
521 $notification->setSender(ANONYMOUS_USER_ID);
522 $notification->setRecipients(array($rcp[
'email']));
526 $notification->send();
537 include_once(
'./Services/Calendar/classes/class.ilCalendarCategory.php');
540 include_once
'./Services/Calendar/classes/class.ilCalendarMailNotification.php';
542 $notification->setAppointmentId($app_id);
544 switch($cat_info[
'type'])
548 switch($cat_info[
'obj_type'])
553 $notification->setRefId(
$ref_id);
554 $notification->setType(
563 $notification->setRefId(
$ref_id);
564 $notification->setType(
573 $notification->send();
581 include_once(
'./Services/Calendar/classes/class.ilCalendarCategoryAssignments.php');
583 include_once(
'./Services/Calendar/classes/class.ilCalendarCategory.php');
597 include_once(
"./Services/Calendar/classes/class.ilMilestoneResponsiblesTableGUI.php");
599 $this->app->getEntryId());
600 $tpl->setContent($table_gui->getHTML());
610 $this->app->writeResponsibleUsers(
$_POST[
"user_id"]);
611 $ilCtrl->returnToParent($this);
621 include_once
'./Services/Calendar/classes/class.ilCalendarRecurrences.php';
625 return $this->
edit();
628 $this->ctrl->saveParameter($this,array(
'seed',
'app_id',
'dt',
'idate'));
630 include_once(
'./Services/Utilities/classes/class.ilConfirmationGUI.php');
632 $confirm->setFormAction($this->ctrl->getFormAction($this));
633 #$confirm->setHeaderText($this->lng->txt('cal_edit_app_sure'));
634 $confirm->setCancel($this->lng->txt(
'cancel'),
'cancel');
635 $confirm->addItem(
'appointments[]',$this->app->getEntryId(),$this->app->getTitle());
636 $confirm->addButton($this->lng->txt(
'cal_edit_single'),
'editSingle');
637 $confirm->setConfirm($this->lng->txt(
'cal_edit_recurrences'),
'edit');
639 $GLOBALS[
'tpl']->setContent($confirm->getHTML());
648 $GLOBALS[
'ilCtrl']->setParameter($this,
'rexcl',1);
659 protected function edit($a_edit_single_app =
false)
663 $ilHelp->setScreenIdComponent(
"cal");
664 $ilHelp->setScreenId(
"app");
665 if ($this->app->isMilestone())
667 $ilHelp->setSubScreenId(
"edit_milestone");
671 $ilHelp->setSubScreenId(
"edit");
674 include_once(
'./Services/Calendar/classes/class.ilCalendarCategory.php');
675 include_once(
'./Services/Calendar/classes/class.ilCalendarCategories.php');
676 include_once(
'./Services/Calendar/classes/class.ilCalendarCategoryAssignments.php');
678 $GLOBALS[
'ilCtrl']->saveParameter($this,array(
'seed',
'app_id',
'dt',
'idate'));
682 $GLOBALS[
'ilCtrl']->setParameter($this,
'rexl',1);
686 include_once
'./Services/Calendar/classes/class.ilCalendarRecurrenceCalculator.php';
691 $yesterday = clone $current_date;
693 $tomorrow = clone $current_date;
697 foreach($calc->calculateDateList($current_date, $tomorrow, 1) as $date_entry)
714 if(!$cats->isVisible($cat_id))
716 $ilErr->raiseError($this->lng->txt(
'permission_denied'),$ilErr->WARNING);
719 if(!$cats->isEditable($cat_id) or $this->app->isAutoGenerated())
725 $this->
initForm(
'edit', $this->app->isMilestone(), $a_edit_single_app);
726 $tpl->setContent($this->form->getHTML());
739 include_once(
"./Services/InfoScreen/classes/class.ilInfoScreenGUI.php");
741 $info->setFormAction($this->ctrl->getFormAction($this));
743 if ($this->app->isMilestone())
745 $info->addSection($this->lng->txt(
'cal_ms_details'));
749 $info->addSection($this->lng->txt(
'cal_details'));
753 $info->addProperty($this->lng->txt(
'appointment'),
755 $this->app->getStart(),
756 $this->app->getEnd()));
757 $info->addProperty($this->lng->txt(
'title'),$this->app->getPresentationTitle());
760 if(strlen($desc = $this->app->getDescription()))
762 $info->addProperty($this->lng->txt(
'description'),$desc);
766 if(strlen($loc = $this->app->getLocation()))
768 $info->addProperty($this->lng->txt(
'cal_where'),$loc);
772 if ($this->app->isMilestone() && $this->app->getCompletion() > 0)
774 $info->addProperty($this->lng->txt(
'cal_task_completion'),
775 $this->app->getCompletion().
" %");
778 include_once(
'./Services/Calendar/classes/class.ilCalendarCategoryAssignments.php');
783 && ($type ==
"grp" || $type ==
"crs"))
786 $users = $this->app->readResponsibleUsers();
788 foreach($users as $r)
790 $value.= $delim.$r[
"lastname"].
", ".$r[
"firstname"].
" [".$r[
"login"].
"]";
793 if (count($users) > 0)
795 $info->addProperty($this->lng->txt(
'cal_responsible'),
804 $info->addSection($this->lng->txt(
'additional_info'));
809 include_once(
'./Services/Link/classes/class.ilLink.php');
811 $info->addProperty($this->lng->txt(
'perma_link'),
'<a class="small" href="'.$href.
'" target="_top">'.$href.
'</a>');
814 $tpl->setContent($info->getHTML());
827 $single_editing = (
$_REQUEST[
'rexl'] ?
true :
false);
829 $this->
load($this->app->isMilestone());
831 if($this->app->validate() and $this->notification->validate())
833 if(!(
int)
$_POST[
'calendar'])
839 $cat_id = (int)
$_POST[
'calendar'];
854 $this->notification->save();
857 include_once(
'./Services/Calendar/classes/class.ilCalendarCategoryAssignments.php');
859 $GLOBALS[
'ilLog']->write($this->app->getEntryId());
860 $ass->deleteAssignments();
861 $ass->addAssignment($cat_id);
864 include_once
'./Services/Calendar/classes/class.ilCalendarSettings.php';
875 $this->ctrl->returnToParent($this);
896 include_once(
'./Services/Utilities/classes/class.ilConfirmationGUI.php');
898 $this->ctrl->saveParameter($this,array(
'seed',
'app_id',
'dt',
'idate'));
901 $confirm->setFormAction($this->ctrl->getFormAction($this));
902 $confirm->setHeaderText($this->lng->txt(
'cal_delete_app_sure'));
903 $confirm->setCancel($this->lng->txt(
'cancel'),
'cancel');
904 $confirm->addItem(
'appointments[]',$this->app->getEntryId(),$this->app->getTitle());
906 include_once(
'./Services/Calendar/classes/class.ilCalendarRecurrences.php');
908 && !$this->app->isMilestone())
910 $confirm->addButton($this->lng->txt(
'cal_delete_single'),
'deleteexclude');
911 $confirm->setConfirm($this->lng->txt(
'cal_delete_recurrences'),
'delete');
915 $confirm->setConfirm($this->lng->txt(
'delete'),
'delete');
918 $tpl->setContent($confirm->getHTML());
929 protected function delete()
931 foreach(
$_POST[
'appointments'] as $app_id)
936 include_once(
'./Services/Calendar/classes/class.ilCalendarCategoryAssignments.php');
939 include_once
'./Services/Calendar/classes/class.ilCalendarUserNotification.php';
943 $this->ctrl->returnToParent($this);
955 include_once(
'./Services/Calendar/classes/class.ilCalendarRecurrenceExclusion.php');
964 $this->ctrl->returnToParent($this);
979 $this->timezone = $ilUser->getTimeZone();
988 if(!isset(
$_GET[
'hour']))
991 $this->default_fulltime =
true;
995 if((
int)
$_GET[
'hour'] < 10)
997 $time =
'0'.(int)
$_GET[
'hour'].
':00:00';
1001 $time = (int)
$_GET[
'hour'].
':00:00';
1004 $this->default_fulltime =
false;
1017 $this->seed = clone
$seed;
1018 $this->default_fulltime =
true;
1030 include_once(
'./Services/Calendar/classes/class.ilCalendarEntry.php');
1031 include_once(
'./Services/Calendar/classes/class.ilCalendarRecurrences.php');
1034 include_once
'./Services/Calendar/classes/class.ilCalendarUserNotification.php';
1040 $this->app->setStart($start);
1043 if($this->default_fulltime)
1045 #$seed_end->increment(IL_CAL_DAY,1);
1051 $this->app->setEnd($seed_end);
1052 $this->app->setFullday($this->default_fulltime);
1070 protected function load($a_as_milestone =
false)
1072 if ($a_as_milestone)
1074 $this->app->setMilestone(
true);
1082 $this->app->enableNotification((
int)
$_POST[
'not']);
1083 if ($a_as_milestone)
1085 $this->app->setFullday(
true);
1089 $this->app->setFullday(isset($_POST[
'event'][
'fulltime']) ?
true :
false);
1092 if($this->app->isFullday())
1094 $start =
new ilDate($_POST[
'event'][
'start'][
'date'][
'y'].
'-'.$_POST[
'event'][
'start'][
'date'][
'm'].
'-'.$_POST[
'event'][
'start'][
'date'][
'd'],
1096 $this->app->setStart($start);
1098 $end =
new ilDate($_POST[
'event'][
'end'][
'date'][
'y'].
'-'.$_POST[
'event'][
'end'][
'date'][
'm'].
'-'.$_POST[
'event'][
'end'][
'date'][
'd'],
1101 if ($a_as_milestone)
1104 $this->app->setEnd($start);
1108 $this->app->setEnd($end);
1113 $start_dt[
'year'] = (int) $_POST[
'event'][
'start'][
'date'][
'y'];
1114 $start_dt[
'mon'] = (int) $_POST[
'event'][
'start'][
'date'][
'm'];
1115 $start_dt[
'mday'] = (int) $_POST[
'event'][
'start'][
'date'][
'd'];
1116 $start_dt[
'hours'] = (int) $_POST[
'event'][
'start'][
'time'][
'h'];
1117 $start_dt[
'minutes'] = (int) $_POST[
'event'][
'start'][
'time'][
'm'];
1119 $this->app->setStart($start);
1121 $end_dt[
'year'] = (int) $_POST[
'event'][
'end'][
'date'][
'y'];
1122 $end_dt[
'mon'] = (int) $_POST[
'event'][
'end'][
'date'][
'm'];
1123 $end_dt[
'mday'] = (int) $_POST[
'event'][
'end'][
'date'][
'd'];
1124 $end_dt[
'hours'] = (int) $_POST[
'event'][
'end'][
'time'][
'h'];
1125 $end_dt[
'minutes'] = (int) $_POST[
'event'][
'end'][
'time'][
'm'];
1127 $this->app->setEnd($end);
1135 $this->notification->setRecipients(array());
1137 foreach((array)
$_POST[
'notu'] as $rcp)
1142 if(strlen($rcp) == 0)
1149 $this->notification->addRecipient(
1156 $this->notification->addRecipient(
1173 $this->rec->reset();
1175 switch(
$_POST[
'frequence'])
1178 $this->rec->setFrequenceType(
$_POST[
'frequence']);
1179 $this->rec->setInterval((
int)
$_POST[
'count_DAILY']);
1183 $this->rec->setFrequenceType($_POST[
'frequence']);
1184 $this->rec->setInterval((
int) $_POST[
'count_WEEKLY']);
1185 if(is_array($_POST[
'byday_WEEKLY']))
1192 $this->rec->setFrequenceType($_POST[
'frequence']);
1193 $this->rec->setInterval((
int) $_POST[
'count_MONTHLY']);
1194 switch((
int) $_POST[
'subtype_MONTHLY'])
1201 switch((
int) $_POST[
'monthly_byday_day'])
1205 $this->rec->setBYSETPOS((
int) $_POST[
'monthly_byday_num']);
1206 $this->rec->setBYDAY(
'MO,TU,WE,TH,FR');
1211 $this->rec->setBYMONTHDAY((
int) $_POST[
'monthly_byday_num']);
1215 $this->rec->setBYDAY((
int) $_POST[
'monthly_byday_num'].$_POST[
'monthly_byday_day']);
1221 $this->rec->setBYMONTHDAY((
int) $_POST[
'monthly_bymonthday']);
1227 $this->rec->setFrequenceType($_POST[
'frequence']);
1228 $this->rec->setInterval((
int) $_POST[
'count_YEARLY']);
1229 switch((
int) $_POST[
'subtype_YEARLY'])
1236 $this->rec->setBYMONTH((
int) $_POST[
'yearly_bymonth_byday']);
1237 $this->rec->setBYDAY((
int) $_POST[
'yearly_byday_num'].$_POST[
'yearly_byday']);
1241 $this->rec->setBYMONTH((
int) $_POST[
'yearly_bymonth_by_monthday']);
1242 $this->rec->setBYMONTHDAY((
int) $_POST[
'yearly_bymonthday']);
1249 switch((
int)
$_POST[
'until_type'])
1252 $this->rec->setFrequenceUntilDate(null);
1257 $this->rec->setFrequenceUntilDate(null);
1258 $this->rec->setFrequenceUntilCount((
int) $_POST[
'count']);
1262 $end_dt[
'year'] = (int) $_POST[
'until_end'][
'date'][
'y'];
1263 $end_dt[
'mon'] = (int) $_POST[
'until_end'][
'date'][
'm'];
1264 $end_dt[
'mday'] = (int) $_POST[
'until_end'][
'date'][
'd'];
1266 $this->rec->setFrequenceUntilCount(0);
1282 switch(
$_POST[
'frequence'])
1286 if($this->rec->getRecurrenceId())
1288 $this->rec->delete();
1293 if($this->rec->getRecurrenceId())
1295 $this->rec->update();
1318 $cat->setTitle($this->lng->txt(
'cal_default_calendar'));
1319 $cat->setObjId($ilUser->getId());
1338 include_once
'Services/Utilities/classes/class.ilConfirmationGUI.php';
1341 $this->ctrl->setParameter($this,
'dstart',(
int)
$_REQUEST[
'dstart']);
1342 $this->ctrl->setParameter($this,
'dend',(
int) $_REQUEST[
'dend']);
1345 $conf->setHeaderText($this->lng->txt(
'cal_confirm_reg_info'));
1346 $conf->setConfirm($this->lng->txt(
'cal_reg_register'),
'register');
1347 $conf->setCancel($this->lng->txt(
'cancel'),
'cancel');
1348 $conf->addItem(
'app_id', $entry->getEntryId(), $entry->getTitle().
' ('.$start.
')');
1350 $tpl->setContent($conf->getHTML());
1357 protected function register()
1361 include_once
'./Services/Calendar/classes/class.ilCalendarRegistration.php';
1370 $this->ctrl->returnToParent($this);
1388 include_once
'Services/Utilities/classes/class.ilConfirmationGUI.php';
1391 $this->ctrl->setParameter($this,
'dstart',(
int)
$_REQUEST[
'dstart']);
1392 $this->ctrl->setParameter($this,
'dend',(
int) $_REQUEST[
'dend']);
1395 $conf->setHeaderText($this->lng->txt(
'cal_confirm_unreg_info'));
1396 $conf->setConfirm($this->lng->txt(
'cal_reg_unregister'),
'unregister');
1397 $conf->setCancel($this->lng->txt(
'cancel'),
'cancel');
1398 $conf->addItem(
'app_id', $entry->getEntryId(), $entry->getTitle().
' ('.$start.
')');
1400 $tpl->setContent($conf->getHTML());
1411 include_once
'./Services/Calendar/classes/class.ilCalendarRegistration.php';
1420 $this->ctrl->returnToParent($this);
1430 $entry = (int)
$_GET[
'app_id'];
1431 $user = (int)
$_GET[
'bkid'];
1433 $this->ctrl->saveParameter($this,
'app_id');
1435 include_once
'Services/Calendar/classes/class.ilCalendarEntry.php';
1436 include_once
'Services/Booking/classes/class.ilBookingEntry.php';
1443 $tpl->setContent($form->getHTML());
1453 include_once
'./Services/Form/classes/class.ilPropertyFormGUI.php';
1455 $form->setFormAction($this->ctrl->getFormAction($this));
1456 $form->addCommandButton(
'bookconfirmed',$this->lng->txt(
'cal_confirm_booking'));
1457 $form->addCommandButton(
'cancel',$this->lng->txt(
'cancel'));
1460 $form->addItem($date);
1463 $form->addItem($title);
1465 $message =
new ilTextAreaInputGUI($this->lng->txt(
'cal_ch_booking_message_tbl'),
'comment');
1467 $form->addItem($message);
1483 if($form->checkInput())
1486 include_once
'./Services/Calendar/classes/class.ilCalendarEntry.php';
1489 include_once
'./Services/Booking/classes/class.ilBookingEntry.php';
1492 if(!$booking->isAppointmentBookableForUser($entry,
$GLOBALS[
'ilUser']->getId()))
1495 $this->ctrl->returnToParent($this);
1498 include_once
'./Services/Calendar/classes/ConsultationHours/class.ilConsultationHourUtils.php';
1501 include_once
'./Services/Booking/classes/class.ilBookingEntry.php';
1505 $this->ctrl->returnToParent($this);
1516 $entry = (int)
$_GET[
'app_id'];
1518 include_once
'Services/Calendar/classes/class.ilCalendarEntry.php';
1524 include_once
'Services/Booking/classes/class.ilBookingEntry.php';
1526 if(!$booking->hasBooked($entry->getEntryId()))
1528 $this->ctrl->returnToParent($this);
1536 $entry_title =
' '.$entry->getTitle();
1540 $this->ctrl->returnToParent($this);
1546 include_once
'Services/Utilities/classes/class.ilConfirmationGUI.php';
1549 $conf->setHeaderText($this->lng->txt(
'cal_cancel_booking_info'));
1550 $conf->setConfirm($this->lng->txt(
'cal_cancel_booking'),
'cancelconfirmed');
1551 $conf->setCancel($this->lng->txt(
'cancel'),
'cancel');
1552 $conf->addItem(
'app_id', $entry->getEntryId(), $title.
' - '.$entry_title);
1554 $tpl->setContent($conf->getHTML());
1565 $entry = (int)
$_POST[
'app_id'];
1566 $user = (int)
$_GET[
'bkid'];
1568 include_once
'Services/Calendar/classes/class.ilCalendarEntry.php';
1575 include_once
'Services/Calendar/classes/ConsultationHours/class.ilConsultationHourAppointments.php';
1576 $GLOBALS[
'ilLog']->dump($entry->getStart());
1579 $entry->getContextId(),
1586 foreach((array) $apps as $own_app)
1589 $ref_entry->delete();
1592 include_once
'Services/Booking/classes/class.ilBookingEntry.php';
1600 include_once
'Modules/BookingManager/classes/class.ilBookingReservation.php';
1609 $this->ctrl->returnToParent($this);
1619 include_once
'Services/Calendar/classes/class.ilCalendarCategoryAssignments.php';
1620 include_once
'Services/Calendar/classes/class.ilCalendarCategory.php';
1632 if(!isset(
$_GET[
'autoCompleteField']))
1634 $a_fields = array(
'login',
'firstname',
'lastname',
'email');
1638 $a_fields = array((
string)
$_GET[
'autoCompleteField']);
1641 $GLOBALS[
'ilLog']->write(print_r($a_fields,
true));
1642 include_once
'./Services/User/classes/class.ilUserAutoComplete.php';
1644 $auto->setSearchFields($a_fields);
1645 $auto->enableFieldSearchableCheck(
true);
1646 echo $auto->getList(
$_REQUEST[
'query']);