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->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.
" %";
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)
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);
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');
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>');
810 $tpl->setContent(
$info->getHTML());
823 $single_editing = ($_REQUEST[
'rexl'] ? true :
false);
825 $this->
load(
'edit', $this->app->isMilestone());
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);
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');
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';
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';
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']);
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.
static _lookupLogin($a_user_id)
lookup login
getAppointment()
Get current appointment.
static getInstance()
get singleton instance
static _lookupCategory($a_cal_id)
Lookup category id.
static _getRecurrences($a_cal_id)
get all recurrences of an appointment
const IL_CAL_FREQ_MONTHLY
Model for a calendar entry.
static _getInstance()
get singleton instance
cancelConfirmed()
Cancel consultation appointment or ressource booking, was confirmed This will delete the calendar ent...
setValue($a_value)
Set Value.
setStatus($a_status)
Set booking status.
initTimeZone()
init timezone
static _getStaticLink($a_ref_id, $a_type='', $a_fallback_goto=true, $append="")
Get static link.
setFormAction($a_form_action)
static _lookupFullname($a_user_id)
Lookup Full Name.
static _getFirstRecurrence($a_cal_id)
get first recurrence
static getAppointmentIds($a_user_id, $a_context_id=NULL, $a_start=NULL, $a_type=NULL, $a_check_owner=true)
Get all appointment ids.
Distributes calendar mail notifications.
static formatPeriod(ilDateTime $start, ilDateTime $end)
Format a period of two date Shows: 14.
initAppointment($a_app_id=0)
init appointment
$GLOBALS['loaded']
Global hash that tracks already loaded includes.
addMilestone()
add milestone
setValue($a_value)
Set Value.
loadNotificationRecipients()
initInitialDate(ilDate $initialDate)
init initial date
doUserAutoComplete()
Do auto completion.
static _lookupCategoryIdByObjId($a_obj_id)
lookup category by obj_id
initSeed(ilDate $seed)
init seed
saveMilestoneResponsibleUsers()
Save milestone responsibilites.
Stores calendar categories.
unregister()
Unregister calendar, was confirmed.
editResponsibleUsers()
Edit responsible users.
askEdit()
Check edit single apppointment / edit all appointments for recurring appointments.
TableGUI class for selection of milestone responsibles.
static _getAllReferences($a_id)
get all reference ids of object
get($a_format, $a_format_str='', $a_tz='')
get formatted date
deleteExclude($a_return=true)
delete single item of recurrence list
Auto completion class for user lists.
showInfoScreen()
show info screen
edit($a_edit_single_app=false)
edit appointment
confirmUnregister()
Confirmation screen to unregister calendar.
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 writeBookingMessage($a_entry_id, $a_usr_id, $a_message)
Write booking message.
const TYPE_GRP_NEW_NOTIFICATION
static _equals(ilDateTime $start, ilDateTime $end, $a_compare_field='', $a_tz='')
Check if two date are equal.
Calculates an ilDateList for a given calendar entry and recurrence rule.
distributeUserNotifications()
Send mail to selected users ilObjUser $ilUser.
const IL_CAL_FREQ_DAILY
Model of calendar entry recurrcences.
calendarEntryToCategory(ilCalendarEntry $entry)
Get category object of given calendar entry.
static _lookupObjId($a_id)
static makeClickable($a_text, $detectGotoLinks=false)
makeClickable In Texten enthaltene URLs und Mail-Adressen klickbar machen
registration for calendar appointments
const TYPE_CRS_NOTIFICATION
This class represents a text property in a property form.
static formatDate(ilDateTime $date)
Format a date public.
static initDomEvent()
Init YUI DomEvent.
cancelBooking($a_entry_id, $a_user_id=false)
cancel calendar booking for user
save($a_as_milestone=false)
save appointment
initForm($a_mode, $a_as_milestone=false, $a_edit_single_app=false)
init form
static stripSlashes($a_str, $a_strip_html=true, $a_allow="")
strip slashes if magic qoutes is enabled
static _deleteByAppointmentId($a_app_id)
Delete appointment assignment.
static _getInstance($a_usr_id=0)
get singleton instance
cancelBooking()
Confirmation screen to cancel consultation appointment or ressource booking depends on calendar categ...
distributeNotifications($a_cat_id, $app_id, $a_new_appointment=true)
Distribute mail notifications.
Create styles array
The data for the language used.
static _lookupType($a_id, $a_reference=false)
lookup object type
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
addAssignment($a_cal_cat_id)
add assignment
bookconfirmed()
Book consultation appointment, was confirmed.
__construct(ilDate $seed, ilDate $initialDate, $a_appointment_id=0)
Constructor.
load($a_mode, $a_as_milestone=false)
load post
loadRecurrenceSettings($a_as_milestone=false)
load recurrence settings
This class represents a non editable value in a property form.
setRows($a_rows)
Set Rows.
editSingle()
Edit one single appointment ^.
Administrate calendar appointments.
saveMilestone()
save milestone
This class represents a text area property in a property form.
const TYPE_GRP_NOTIFICATION
saveRecurrenceSettings()
save recurrence settings
Stores exclusion dates for calendar recurrences.
createDefaultCalendar()
Create a default calendar.
This class represents a text wizard property in a property form.
book()
Confirmation screen for booking of consultation appointment.
static deleteCalendarEntry($a_cal_id)
Delete notification for a calendar entry ilDB $ilDB.
setValue($a_value)
Set Value.
const TYPE_CRS_NEW_NOTIFICATION
executeCommand()
Execute command.
const TYPE_USER_ANONYMOUS
confirmRegister()
Register to an appointment.
getFirstAssignment()
get first assignment
showResponsibleUsersList($a_grp_id)
Show responsible uses of a milestone (default set is participants of group)
Confirmation screen class.
static bookAppointment($a_usr_id, $a_app_id)
Book an appointment.