33include_once(
'./Services/Calendar/classes/class.ilTimeZone.php');
34include_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));
177 $cat = $ass->getFirstAssignment();
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');
204 $calendar->setValue((
int)
$_POST[
'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')
215 $cat = $ass->getFirstAssignment();
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');
244 $dur->setRequired(
true);
245 $dur->enableToggleFullTime(
246 $this->lng->txt(
'cal_fullday_title'),
247 $this->app->isFullday() ?
true :
false
249 $dur->setShowTime(
true);
250 $dur->setStart($this->app->getStart());
251 $dur->setEnd($this->app->getEnd());
252 $this->form->addItem($dur);
255 include_once(
'./Services/Calendar/classes/Form/class.ilRecurrenceInputGUI.php');
257 $rec->setRecurrence($this->rec);
258 $this->form->addItem(
$rec);
261 $where =
new ilTextInputGUI($this->lng->txt(
'cal_where'),
'location');
262 $where->setValue($this->app->getLocation());
263 $where->setMaxLength(128);
265 $this->form->addItem($where);
270 $deadline->setDate($this->app->getStart());
271 $deadline->setShowTime(
false);
272 $deadline->setMinuteStepSize(5);
273 $this->form->addItem($deadline);
276 $completion_vals = array();
277 for($i = 0; $i <= 100; $i+=5)
279 $completion_vals[$i] = $i.
" %";
283 $compl->setOptions($completion_vals);
284 $compl->setValue($this->app->getCompletion());
285 $this->form->addItem($compl);
289 $desc->setValue($this->app->getDescription());
291 $this->form->addItem($desc);
293 if ($a_as_milestone && $a_mode ==
"edit" && $resp_info)
296 $users = $this->app->readResponsibleUsers();
299 foreach($users as
$r)
301 $value.= $delim.$r[
"lastname"].
", ".
$r[
"firstname"].
" [".
$r[
"login"].
"]";
304 if (count($users) > 0)
306 $resp->setValue($value);
310 $resp->setValue(
"-");
313 $this->form->addItem($resp);
320 $notu->setInfo($this->lng->txt(
'cal_user_notification_info'));
322 $notu->setMaxLength(64);
327 switch ($rcp[
'type'])
334 $values[] = $rcp[
'email'];
339 $notu->setValues($values);
341 $notu->setValues(array(
''));
342 $this->form->addItem($notu);
346 include_once
'./Services/Calendar/classes/class.ilCalendarSettings.php';
359 $tpl->addJavaScript(
'./Services/Calendar/js/toggle_notification.js');
361 $not->setInfo($this->lng->txt(
'cal_notification_info'));
363 $not->setChecked($this->app->isNotificationEnabled());
364 $not->setDisabled($disabled);
365 $this->form->addItem($not);
378 global
$tpl, $ilHelp;
380 $ilHelp->setScreenIdComponent(
"cal");
381 $ilHelp->setScreenId(
"app");
382 $ilHelp->setSubScreenId(
"create");
385 $tpl->setContent($this->form->getHTML());
396 global
$tpl, $ilHelp;
398 $ilHelp->setScreenIdComponent(
"cal");
399 $ilHelp->setScreenId(
"app");
400 $ilHelp->setSubScreenId(
"create_milestone");
403 $tpl->setContent($this->form->getHTML());
421 protected function save($a_as_milestone =
false)
425 $this->
load(
'create', $a_as_milestone);
427 if($this->app->validate() and $this->notification->validate())
429 if(!(
int)
$_POST[
'calendar'])
435 $cat_id = (int)
$_POST[
'calendar'];
439 $this->
notification->setEntryId($this->app->getEntryId());
441 $this->rec->setEntryId($this->app->getEntryId());
444 include_once(
'./Services/Calendar/classes/class.ilCalendarCategoryAssignments.php');
446 $ass->addAssignment($cat_id);
449 include_once
'./Services/Calendar/classes/class.ilCalendarSettings.php';
459 include_once(
'./Services/Calendar/classes/class.ilCalendarCategory.php');
464 && ($type ==
"grp" || $type ==
"crs"))
469 elseif($a_as_milestone)
472 $this->ctrl->returnToParent($this);
477 $this->ctrl->returnToParent($this);
502 include_once
'./Services/Calendar/classes/class.ilCalendarMailNotification.php';
504 $notification->setAppointmentId($this->app->getEntryId());
511 $notification->setSender(ANONYMOUS_USER_ID);
512 $notification->setRecipients(array($rcp[
'usr_id']));
517 $notification->setSender(ANONYMOUS_USER_ID);
518 $notification->setRecipients(array($rcp[
'email']));
522 $notification->send();
533 include_once(
'./Services/Calendar/classes/class.ilCalendarCategory.php');
536 include_once
'./Services/Calendar/classes/class.ilCalendarMailNotification.php';
538 $notification->setAppointmentId($app_id);
540 switch($cat_info[
'type'])
544 switch($cat_info[
'obj_type'])
549 $notification->setRefId(
$ref_id);
550 $notification->setType(
559 $notification->setRefId(
$ref_id);
560 $notification->setType(
569 $notification->send();
577 include_once(
'./Services/Calendar/classes/class.ilCalendarCategoryAssignments.php');
579 include_once(
'./Services/Calendar/classes/class.ilCalendarCategory.php');
593 include_once(
"./Services/Calendar/classes/class.ilMilestoneResponsiblesTableGUI.php");
595 $this->app->getEntryId());
596 $tpl->setContent($table_gui->getHTML());
606 $this->app->writeResponsibleUsers(
$_POST[
"user_id"]);
607 $ilCtrl->returnToParent($this);
617 include_once
'./Services/Calendar/classes/class.ilCalendarRecurrences.php';
621 return $this->
edit(TRUE);
624 $this->ctrl->saveParameter($this,array(
'seed',
'app_id',
'dt',
'idate'));
626 include_once(
'./Services/Utilities/classes/class.ilConfirmationGUI.php');
628 $confirm->setFormAction($this->ctrl->getFormAction($this));
629 #$confirm->setHeaderText($this->lng->txt('cal_edit_app_sure'));
630 $confirm->setCancel($this->lng->txt(
'cancel'),
'cancel');
631 $confirm->addItem(
'appointments[]',$this->app->getEntryId(),$this->app->getTitle());
632 $confirm->addButton($this->lng->txt(
'cal_edit_single'),
'editSingle');
633 $confirm->setConfirm($this->lng->txt(
'cal_edit_recurrences'),
'edit');
635 $GLOBALS[
'tpl']->setContent($confirm->getHTML());
643 $_REQUEST[
'rexl'] = 1;
644 $GLOBALS[
'ilCtrl']->setParameter($this,
'rexcl',1);
655 protected function edit($a_edit_single_app =
false)
659 $ilHelp->setScreenIdComponent(
"cal");
660 $ilHelp->setScreenId(
"app");
661 if ($this->app->isMilestone())
663 $ilHelp->setSubScreenId(
"edit_milestone");
667 $ilHelp->setSubScreenId(
"edit");
670 include_once(
'./Services/Calendar/classes/class.ilCalendarCategory.php');
671 include_once(
'./Services/Calendar/classes/class.ilCalendarCategories.php');
672 include_once(
'./Services/Calendar/classes/class.ilCalendarCategoryAssignments.php');
674 $GLOBALS[
'ilCtrl']->saveParameter($this,array(
'seed',
'app_id',
'dt',
'idate'));
676 if($_REQUEST[
'rexl'])
678 $GLOBALS[
'ilCtrl']->setParameter($this,
'rexl',1);
682 include_once
'./Services/Calendar/classes/class.ilCalendarRecurrenceCalculator.php';
687 $yesterday = clone $current_date;
689 $tomorrow = clone $current_date;
693 foreach($calc->calculateDateList($current_date, $tomorrow, 1) as $date_entry)
710 if(!$cats->isVisible($cat_id))
712 $ilErr->raiseError($this->lng->txt(
'permission_denied'),
$ilErr->WARNING);
715 if(!$cats->isEditable($cat_id) or $this->app->isAutoGenerated())
721 $this->
initForm(
'edit', $this->app->isMilestone(), $a_edit_single_app);
722 $tpl->setContent($this->form->getHTML());
735 include_once(
"./Services/InfoScreen/classes/class.ilInfoScreenGUI.php");
737 $info->setFormAction($this->ctrl->getFormAction($this));
739 if ($this->app->isMilestone())
741 $info->addSection($this->lng->txt(
'cal_ms_details'));
745 $info->addSection($this->lng->txt(
'cal_details'));
749 $info->addProperty($this->lng->txt(
'appointment'),
751 $this->app->getStart(),
752 $this->app->getEnd()));
753 $info->addProperty($this->lng->txt(
'title'),$this->app->getPresentationTitle());
756 if(strlen($desc = $this->app->getDescription()))
762 if(strlen($loc = $this->app->getLocation()))
764 $info->addProperty($this->lng->txt(
'cal_where'),$loc);
768 if ($this->app->isMilestone() && $this->app->getCompletion() > 0)
770 $info->addProperty($this->lng->txt(
'cal_task_completion'),
771 $this->app->getCompletion().
" %");
774 include_once(
'./Services/Calendar/classes/class.ilCalendarCategoryAssignments.php');
779 && ($type ==
"grp" || $type ==
"crs"))
782 $users = $this->app->readResponsibleUsers();
784 foreach($users as
$r)
786 $value.= $delim.$r[
"lastname"].
", ".
$r[
"firstname"].
" [".
$r[
"login"].
"]";
789 if (count($users) > 0)
791 $info->addProperty($this->lng->txt(
'cal_responsible'),
800 $info->addSection($this->lng->txt(
'additional_info'));
805 include_once(
'./Services/Link/classes/class.ilLink.php');
807 $info->addProperty($this->lng->txt(
'perma_link'),
'<a class="small" href="'.$href.
'" target="_top">'.$href.
'</a>');
823 $single_editing = ($_REQUEST[
'rexl'] ? true :
false);
825 $this->
load(
'edit', $this->app->isMilestone());
827 if($this->app->validate() and $this->notification->validate())
829 if(!(
int)
$_POST[
'calendar'])
835 $cat_id = (int)
$_POST[
'calendar'];
853 include_once(
'./Services/Calendar/classes/class.ilCalendarCategoryAssignments.php');
855 $GLOBALS[
'ilLog']->write($this->app->getEntryId());
856 $ass->deleteAssignments();
857 $ass->addAssignment($cat_id);
860 include_once
'./Services/Calendar/classes/class.ilCalendarSettings.php';
871 $this->ctrl->returnToParent($this);
892 include_once(
'./Services/Utilities/classes/class.ilConfirmationGUI.php');
894 $this->ctrl->saveParameter($this,array(
'seed',
'app_id',
'dt',
'idate'));
897 $confirm->setFormAction($this->ctrl->getFormAction($this));
898 $confirm->setHeaderText($this->lng->txt(
'cal_delete_app_sure'));
899 $confirm->setCancel($this->lng->txt(
'cancel'),
'cancel');
900 $confirm->addItem(
'appointments[]',$this->app->getEntryId(),$this->app->getTitle());
902 include_once(
'./Services/Calendar/classes/class.ilCalendarRecurrences.php');
904 && !$this->app->isMilestone())
906 $confirm->addButton($this->lng->txt(
'cal_delete_single'),
'deleteexclude');
907 $confirm->setConfirm($this->lng->txt(
'cal_delete_recurrences'),
'delete');
911 $confirm->setConfirm($this->lng->txt(
'delete'),
'delete');
914 $tpl->setContent($confirm->getHTML());
925 protected function delete()
927 foreach(
$_POST[
'appointments'] as $app_id)
932 include_once(
'./Services/Calendar/classes/class.ilCalendarCategoryAssignments.php');
935 include_once
'./Services/Calendar/classes/class.ilCalendarUserNotification.php';
939 $this->ctrl->returnToParent($this);
951 include_once(
'./Services/Calendar/classes/class.ilCalendarRecurrenceExclusion.php');
953 $excl->setEntryId($_REQUEST[
'app_id']);
960 $this->ctrl->returnToParent($this);
975 $this->timezone =
$ilUser->getTimeZone();
984 if(!isset(
$_GET[
'hour']))
987 $this->default_fulltime =
true;
991 if((
int)
$_GET[
'hour'] < 10)
993 $time =
'0'.(int)
$_GET[
'hour'].
':00:00';
997 $time = (int)
$_GET[
'hour'].
':00:00';
1000 $this->default_fulltime =
false;
1013 $this->seed = clone
$seed;
1014 $this->default_fulltime =
true;
1026 include_once(
'./Services/Calendar/classes/class.ilCalendarEntry.php');
1027 include_once(
'./Services/Calendar/classes/class.ilCalendarRecurrences.php');
1030 include_once
'./Services/Calendar/classes/class.ilCalendarUserNotification.php';
1036 $this->app->setStart(
$start);
1039 if($this->default_fulltime)
1041 #$seed_end->increment(IL_CAL_DAY,1);
1047 $this->app->setEnd($seed_end);
1048 $this->app->setFullday($this->default_fulltime);
1066 protected function load($a_mode, $a_as_milestone =
false)
1069 $this->
initForm($a_mode, $a_as_milestone);
1070 $this->form->checkInput();
1072 if ($a_as_milestone)
1074 $this->app->setMilestone(
true);
1082 $this->app->enableNotification((
int)
$_POST[
'not']);
1084 if ($a_as_milestone)
1086 $start = $this->form->getItemByPostVar(
'event_start');
1089 $this->app->setFullday(
true);
1092 $this->app->setStart(
$start);
1093 $this->app->setEnd(
$start);
1098 $period = $this->form->getItemByPostVar(
'event');
1099 $start = $period->getStart();
1100 $end = $period->getEnd();
1103 $this->app->setStart(
$start);
1104 $this->app->setEnd($end);
1115 foreach((array)
$_POST[
'notu'] as $rcp)
1120 if(strlen($rcp) == 0)
1151 $this->rec->reset();
1153 switch(
$_POST[
'frequence'])
1156 $this->rec->setFrequenceType(
$_POST[
'frequence']);
1157 $this->rec->setInterval((
int)
$_POST[
'count_DAILY']);
1161 $this->rec->setFrequenceType(
$_POST[
'frequence']);
1162 $this->rec->setInterval((
int)
$_POST[
'count_WEEKLY']);
1163 if(is_array(
$_POST[
'byday_WEEKLY']))
1170 $this->rec->setFrequenceType(
$_POST[
'frequence']);
1171 $this->rec->setInterval((
int)
$_POST[
'count_MONTHLY']);
1172 switch((
int)
$_POST[
'subtype_MONTHLY'])
1179 switch((
int)
$_POST[
'monthly_byday_day'])
1183 $this->rec->setBYSETPOS((
int)
$_POST[
'monthly_byday_num']);
1184 $this->rec->setBYDAY(
'MO,TU,WE,TH,FR');
1189 $this->rec->setBYMONTHDAY((
int)
$_POST[
'monthly_byday_num']);
1193 $this->rec->setBYDAY((
int)
$_POST[
'monthly_byday_num'].
$_POST[
'monthly_byday_day']);
1199 $this->rec->setBYMONTHDAY((
int)
$_POST[
'monthly_bymonthday']);
1205 $this->rec->setFrequenceType(
$_POST[
'frequence']);
1206 $this->rec->setInterval((
int)
$_POST[
'count_YEARLY']);
1207 switch((
int)
$_POST[
'subtype_YEARLY'])
1214 $this->rec->setBYMONTH((
int)
$_POST[
'yearly_bymonth_byday']);
1215 $this->rec->setBYDAY((
int)
$_POST[
'yearly_byday_num'].
$_POST[
'yearly_byday']);
1219 $this->rec->setBYMONTH((
int)
$_POST[
'yearly_bymonth_by_monthday']);
1220 $this->rec->setBYMONTHDAY((
int)
$_POST[
'yearly_bymonthday']);
1227 switch((
int)
$_POST[
'until_type'])
1230 $this->rec->setFrequenceUntilDate(
null);
1235 $this->rec->setFrequenceUntilDate(
null);
1236 $this->rec->setFrequenceUntilCount((
int)
$_POST[
'count']);
1241 $dt->setRequired(
true);
1242 if($dt->checkInput())
1244 $this->rec->setFrequenceUntilCount(0);
1245 $this->rec->setFrequenceUntilDate($dt->getDate());
1261 switch(
$_POST[
'frequence'])
1266 if($this->rec->getRecurrenceId())
1268 $this->rec->delete();
1273 if($this->rec->getRecurrenceId())
1275 $this->rec->update();
1298 $cat->setTitle($this->lng->txt(
'cal_default_calendar'));
1299 $cat->setObjId(
$ilUser->getId());
1302 include_once
'./Services/Calendar/classes/class.ilCalendarCache.php';
1323 include_once
'Services/Utilities/classes/class.ilConfirmationGUI.php';
1326 $this->ctrl->setParameter($this,
'dstart',(
int) $_REQUEST[
'dstart']);
1327 $this->ctrl->setParameter($this,
'dend',(
int) $_REQUEST[
'dend']);
1330 $conf->setHeaderText($this->lng->txt(
'cal_confirm_reg_info'));
1331 $conf->setConfirm($this->lng->txt(
'cal_reg_register'),
'register');
1332 $conf->setCancel($this->lng->txt(
'cancel'),
'cancel');
1333 $conf->addItem(
'app_id', $entry->getEntryId(), $entry->getTitle().
' ('.
$start.
')');
1335 $tpl->setContent($conf->getHTML());
1342 protected function register()
1346 include_once
'./Services/Calendar/classes/class.ilCalendarRegistration.php';
1355 $this->ctrl->returnToParent($this);
1373 include_once
'Services/Utilities/classes/class.ilConfirmationGUI.php';
1376 $this->ctrl->setParameter($this,
'dstart',(
int) $_REQUEST[
'dstart']);
1377 $this->ctrl->setParameter($this,
'dend',(
int) $_REQUEST[
'dend']);
1380 $conf->setHeaderText($this->lng->txt(
'cal_confirm_unreg_info'));
1381 $conf->setConfirm($this->lng->txt(
'cal_reg_unregister'),
'unregister');
1382 $conf->setCancel($this->lng->txt(
'cancel'),
'cancel');
1383 $conf->addItem(
'app_id', $entry->getEntryId(), $entry->getTitle().
' ('.
$start.
')');
1385 $tpl->setContent($conf->getHTML());
1396 include_once
'./Services/Calendar/classes/class.ilCalendarRegistration.php';
1405 $this->ctrl->returnToParent($this);
1415 $entry = (int)
$_GET[
'app_id'];
1416 $user = (int)
$_GET[
'bkid'];
1418 $this->ctrl->saveParameter($this,
'app_id');
1420 include_once
'Services/Calendar/classes/class.ilCalendarEntry.php';
1421 include_once
'Services/Booking/classes/class.ilBookingEntry.php';
1428 $tpl->setContent($form->getHTML());
1438 include_once
'./Services/Form/classes/class.ilPropertyFormGUI.php';
1440 $form->setFormAction($this->ctrl->getFormAction($this));
1441 $form->addCommandButton(
'bookconfirmed',$this->lng->txt(
'cal_confirm_booking'));
1442 $form->addCommandButton(
'cancel',$this->lng->txt(
'cancel'));
1445 $form->addItem($date);
1450 $message =
new ilTextAreaInputGUI($this->lng->txt(
'cal_ch_booking_message_tbl'),
'comment');
1451 $message->setRows(5);
1452 $form->addItem($message);
1464 $entry = (int) $_REQUEST[
'app_id'];
1465 $user = (int) $_REQUEST[
'bkid'];
1468 if($form->checkInput())
1471 include_once
'./Services/Calendar/classes/class.ilCalendarEntry.php';
1474 include_once
'./Services/Booking/classes/class.ilBookingEntry.php';
1477 if(!$booking->isAppointmentBookableForUser($entry,
$GLOBALS[
'ilUser']->getId()))
1480 $this->ctrl->returnToParent($this);
1483 include_once
'./Services/Calendar/classes/ConsultationHours/class.ilConsultationHourUtils.php';
1486 include_once
'./Services/Booking/classes/class.ilBookingEntry.php';
1490 $this->ctrl->returnToParent($this);
1501 $entry = (int)
$_GET[
'app_id'];
1503 include_once
'Services/Calendar/classes/class.ilCalendarEntry.php';
1509 include_once
'Services/Booking/classes/class.ilBookingEntry.php';
1511 if(!$booking->hasBooked($entry->getEntryId()))
1513 $this->ctrl->returnToParent($this);
1521 $entry_title =
' '.$entry->getTitle();
1525 $this->ctrl->returnToParent($this);
1531 include_once
'Services/Utilities/classes/class.ilConfirmationGUI.php';
1534 $conf->setHeaderText($this->lng->txt(
'cal_cancel_booking_info'));
1535 $conf->setConfirm($this->lng->txt(
'cal_cancel_booking'),
'cancelconfirmed');
1536 $conf->setCancel($this->lng->txt(
'cancel'),
'cancel');
1537 $conf->addItem(
'app_id', $entry->getEntryId(),
$title.
' - '.$entry_title);
1539 $tpl->setContent($conf->getHTML());
1550 $entry = (int)
$_POST[
'app_id'];
1551 $user = (int)
$_GET[
'bkid'];
1553 include_once
'Services/Calendar/classes/class.ilCalendarEntry.php';
1560 include_once
'Services/Calendar/classes/ConsultationHours/class.ilConsultationHourAppointments.php';
1561 $GLOBALS[
'ilLog']->dump($entry->getStart());
1564 $entry->getContextId(),
1571 foreach((array) $apps as $own_app)
1574 $ref_entry->delete();
1577 include_once
'Services/Booking/classes/class.ilBookingEntry.php';
1579 $booking->cancelBooking($entry->getEntryId());
1585 include_once
'Modules/BookingManager/classes/class.ilBookingReservation.php';
1594 $this->ctrl->returnToParent($this);
1604 include_once
'Services/Calendar/classes/class.ilCalendarCategoryAssignments.php';
1605 include_once
'Services/Calendar/classes/class.ilCalendarCategory.php';
1607 $assignment = $assignment->getFirstAssignment();
1617 if(!isset(
$_GET[
'autoCompleteField']))
1619 $a_fields = array(
'login',
'firstname',
'lastname',
'email');
1623 $a_fields = array((
string)
$_GET[
'autoCompleteField']);
1626 $GLOBALS[
'ilLog']->write(print_r($a_fields,
true));
1627 include_once
'./Services/User/classes/class.ilUserAutoComplete.php';
1629 $auto->setSearchFields($a_fields);
1630 $auto->enableFieldSearchableCheck(
true);
1631 $auto->setMoreLinkAvailable(
true);
1633 if(($_REQUEST[
'fetchall']))
1638 echo $auto->getList($_REQUEST[
'query']);
An exception for terminatinating execution or to throw for unit testing.
const IL_CAL_FREQ_MONTHLY
static writeBookingMessage($a_entry_id, $a_usr_id, $a_message)
Write booking message.
Administrate calendar appointments.
askEdit()
Check edit single apppointment / edit all appointments for recurring appointments.
initForm($a_mode, $a_as_milestone=false, $a_edit_single_app=false)
init form
deleteExclude($a_return=true)
delete single item of recurrence list
__construct(ilDate $seed, ilDate $initialDate, $a_appointment_id=0)
Constructor.
calendarEntryToCategory(ilCalendarEntry $entry)
Get category object of given calendar entry.
editSingle()
Edit one single appointment ^.
initInitialDate(ilDate $initialDate)
init initial date
bookconfirmed()
Book consultation appointment, was confirmed.
saveMilestone()
save milestone
distributeUserNotifications()
Send mail to selected users @global ilObjUser $ilUser.
load($a_mode, $a_as_milestone=false)
load post
loadRecurrenceSettings($a_as_milestone=false)
load recurrence settings
executeCommand()
Execute command.
showResponsibleUsersList($a_grp_id)
Show responsible uses of a milestone (default set is participants of group)
distributeNotifications($a_cat_id, $app_id, $a_new_appointment=true)
Distribute mail notifications.
saveRecurrenceSettings()
save recurrence settings
edit($a_edit_single_app=false)
edit appointment
createDefaultCalendar()
Create a default calendar.
confirmRegister()
Register to an appointment.
cancelConfirmed()
Cancel consultation appointment or ressource booking, was confirmed This will delete the calendar ent...
doUserAutoComplete()
Do auto completion.
showInfoScreen()
show info screen
book()
Confirmation screen for booking of consultation appointment.
loadNotificationRecipients()
save($a_as_milestone=false)
save appointment
saveMilestoneResponsibleUsers()
Save milestone responsibilites.
getAppointment()
Get current appointment.
initAppointment($a_app_id=0)
init appointment
initSeed(ilDate $seed)
init seed
initTimeZone()
init timezone
addMilestone()
add milestone
editResponsibleUsers()
Edit responsible users.
cancelBooking()
Confirmation screen to cancel consultation appointment or ressource booking depends on calendar categ...
confirmUnregister()
Confirmation screen to unregister calendar.
unregister()
Unregister calendar, was confirmed.
static getInstance()
get singleton instance
static _lookupCategoryIdByObjId($a_obj_id)
lookup category by obj_id
static _getInstance($a_usr_id=0)
get singleton instance
static _lookupCategory($a_cal_id)
Lookup category id.
static _deleteByAppointmentId($a_app_id)
Delete appointment assignment.
Stores calendar categories.
Model for a calendar entry.
Distributes calendar mail notifications.
const TYPE_USER_ANONYMOUS
const TYPE_CRS_NEW_NOTIFICATION
const TYPE_CRS_NOTIFICATION
const TYPE_GRP_NOTIFICATION
const TYPE_GRP_NEW_NOTIFICATION
Calculates an ilDateList for a given calendar entry and recurrence rule.
Stores exclusion dates for calendar recurrences.
static _getRecurrences($a_cal_id)
get all recurrences of an appointment
static _getFirstRecurrence($a_cal_id)
get first recurrence
registration for calendar appointments
static _getInstance()
get singleton instance
static deleteCalendarEntry($a_cal_id)
Delete notification for a calendar entry @global ilDB $ilDB.
Confirmation screen class.
setFormAction($a_form_action)
static getAppointmentIds($a_user_id, $a_context_id=NULL, $a_start=NULL, $a_type=NULL, $a_check_owner=true)
Get all appointment ids.
static bookAppointment($a_usr_id, $a_app_id)
Book an appointment.
static formatPeriod(ilDateTime $start, ilDateTime $end)
Format a period of two date Shows: 14.
static formatDate(ilDateTime $date)
Format a date @access public.
@classDescription Date and time handling
static _equals(ilDateTime $start, ilDateTime $end, $a_compare_field='', $a_tz='')
Check if two date are equal.
static _getStaticLink($a_ref_id, $a_type='', $a_fallback_goto=true, $append="")
Get static link.
TableGUI class for selection of milestone responsibles.
This class represents a non editable value in a property form.
static _lookupLogin($a_user_id)
lookup login
static _lookupFullname($a_user_id)
Lookup Full Name.
static _loginExists($a_login, $a_user_id=0)
check if a login name already exists You may exclude a user from the check by giving his user id as 2...
static _lookupObjId($a_id)
static _getAllReferences($a_id)
get all reference ids of object
static _lookupType($a_id, $a_reference=false)
lookup object type
This class represents a text area property in a property form.
This class represents a text property in a property form.
This class represents a text wizard property in a property form.
Auto completion class for user lists.
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
static makeClickable($a_text, $detectGotoLinks=false)
makeClickable In Texten enthaltene URLs und Mail-Adressen klickbar machen
static stripSlashes($a_str, $a_strip_html=true, $a_allow="")
strip slashes if magic qoutes is enabled
static initDomEvent()
Init YUI DomEvent.
$GLOBALS['loaded']
Global hash that tracks already loaded includes.
const IL_CAL_FREQ_DAILY
Model of calendar entry recurrcences.