43 $lng->loadLanguageModule(
'dateplaner');
46 $this->logger =
$GLOBALS[
'DIC']->logger()->cal();
67 $ilTabs->clearTargets();
68 $ilTabs->setBackTarget(
69 $this->lng->txt(
'cal_back_to_cal'),
70 $this->ctrl->getLinkTarget($this,
'cancel')
73 $next_class = $this->ctrl->getNextClass($this);
74 switch ($next_class) {
77 $cmd = $this->ctrl->getCmd(
"add");
102 $this->ctrl->returnToParent($this);
112 protected function initForm($a_mode, $a_as_milestone =
false, $a_edit_single_app =
false)
118 include_once(
'./Services/YUI/classes/class.ilYuiUtil.php');
123 $this->ctrl->saveParameter($this, array(
'seed',
'idate'));
124 $this->form->setFormAction($this->ctrl->getFormAction($this));
125 if ($a_as_milestone) {
126 $this->form->setTitle($this->lng->txt(
'cal_new_ms'));
127 $this->form->addCommandButton(
'saveMilestone', $this->lng->txt(
'cal_add_milestone'));
128 $this->form->addCommandButton(
'cancel', $this->lng->txt(
'cancel'));
130 $this->form->setTitle($this->lng->txt(
'cal_new_app'));
131 $this->form->addCommandButton(
'save', $this->lng->txt(
'cal_add_appointment'));
132 $this->form->addCommandButton(
'cancel', $this->lng->txt(
'cancel'));
137 if ($a_as_milestone) {
138 $this->form->setTitle($this->lng->txt(
'cal_edit_milestone'));
140 $this->form->setTitle($this->lng->txt(
'cal_edit_appointment'));
142 $this->ctrl->saveParameter($this, array(
'seed',
'app_id',
'idate'));
143 $this->form->setFormAction($this->ctrl->getFormAction($this));
146 $cat = $ass->getFirstAssignment();
147 include_once(
'./Services/Calendar/classes/class.ilCalendarCategory.php');
153 $this->form->addCommandButton(
'editResponsibleUsers', $this->lng->txt(
'cal_change_responsible_users'));
155 $this->form->addCommandButton(
'update', $this->lng->txt(
'save'));
157 $this->form->addCommandButton(
'cancel', $this->lng->txt(
'cancel'));
162 $title->setValue($this->app->getTitle());
163 $title->setRequired(
true);
164 $title->setMaxLength(128);
166 $this->form->addItem(
$title);
169 $calendar =
new ilSelectInputGUI($this->lng->txt(
'cal_category_selection'),
'calendar');
171 $calendar->setValue((
int)
$_POST[
'calendar']);
172 $selected_calendar = (int)
$_POST[
'calendar'];
173 } elseif (
$_GET[
'category_id']) {
174 $calendar->setValue((
int)
$_GET[
'category_id']);
175 $selected_calendar = (int)
$_GET[
'category_id'];
176 } elseif ($a_mode ==
'edit') {
178 $cat = $ass->getFirstAssignment();
179 $calendar->setValue($cat);
180 $selected_calendar = $cat;
181 } elseif (isset(
$_GET[
'ref_id'])) {
182 include_once(
'./Services/Calendar/classes/class.ilCalendarCategories.php');
187 $cats->readSingleCalendar($selected_calendar);
190 $categories = $cats->prepareCategoriesOfUserForSelection();
191 $selected_calendar = key((array) $categories);
192 $calendar->setValue($selected_calendar);
194 $calendar->setRequired(
true);
196 $calendar->setOptions($cats->prepareCategoriesOfUserForSelection());
198 include_once
'./Services/Calendar/classes/class.ilCalendarSettings.php';
200 $notification_cals = $cats->getNotificationCalendars();
201 $notification_cals = count($notification_cals) ? implode(
',', $notification_cals) :
'';
202 $calendar->addCustomAttribute(
"onchange=\"ilToggleNotification([" . $notification_cals .
"]);\"");
204 $this->form->addItem($calendar);
206 if (!$a_as_milestone) {
207 include_once
'./Services/Form/classes/class.ilDateDurationInputGUI.php';
208 $tpl->addJavaScript(
'./Services/Form/js/date_duration.js');
210 $dur->setRequired(
true);
211 $dur->enableToggleFullTime(
212 $this->lng->txt(
'cal_fullday_title'),
213 $this->app->isFullday() ?
true :
false
215 $dur->setShowTime(
true);
216 $dur->setStart($this->app->getStart());
217 $dur->setEnd($this->app->getEnd());
218 $this->form->addItem($dur);
221 include_once(
'./Services/Calendar/classes/Form/class.ilRecurrenceInputGUI.php');
223 $rec->setRecurrence($this->rec);
224 $this->form->addItem(
$rec);
227 $where =
new ilTextInputGUI($this->lng->txt(
'cal_where'),
'location');
228 $where->setValue($this->app->getLocation());
229 $where->setMaxLength(128);
231 $this->form->addItem($where);
234 $deadline->setDate($this->app->getStart());
235 $deadline->setShowTime(
false);
236 $deadline->setMinuteStepSize(5);
237 $this->form->addItem($deadline);
240 $completion_vals = array();
241 for (
$i = 0;
$i <= 100;
$i+=5) {
242 $completion_vals[
$i] =
$i .
" %";
245 $this->lng->txt(
'cal_task_completion'),
248 $compl->setOptions($completion_vals);
249 $compl->setValue($this->app->getCompletion());
250 $this->form->addItem($compl);
254 $desc->setValue($this->app->getDescription());
256 $this->form->addItem($desc);
258 if ($a_as_milestone && $a_mode ==
"edit" && $resp_info) {
260 $users = $this->app->readResponsibleUsers();
264 $value.= $delim .
$r[
"lastname"] .
", " .
$r[
"firstname"] .
" [" .
$r[
"login"] .
"]";
268 $resp->setValue($value);
270 $resp->setValue(
"-");
273 $this->form->addItem($resp);
279 $notu->setInfo($this->lng->txt(
'cal_user_notification_info'));
281 $notu->setMaxLength(64);
284 foreach ($this->
notification->getRecipients() as $rcp) {
285 switch ($rcp[
'type']) {
291 $values[] = $rcp[
'email'];
295 if (count($values)) {
296 $notu->setValues($values);
298 $notu->setValues(array(
''));
300 $this->form->addItem($notu);
304 include_once
'./Services/Calendar/classes/class.ilCalendarSettings.php';
314 $tpl->addJavaScript(
'./Services/Calendar/js/toggle_notification.js');
316 $not->setInfo($this->lng->txt(
'cal_notification_info'));
318 $not->setChecked($this->app->isNotificationEnabled());
319 $not->setDisabled($disabled);
320 $this->form->addItem($not);
334 global
$tpl, $ilHelp;
336 $ilHelp->setScreenIdComponent(
"cal");
337 $ilHelp->setScreenId(
"app");
338 $ilHelp->setSubScreenId(
"create");
343 $tpl->setContent($this->form->getHTML());
354 global
$tpl, $ilHelp;
356 $ilHelp->setScreenIdComponent(
"cal");
357 $ilHelp->setScreenId(
"app");
358 $ilHelp->setSubScreenId(
"create_milestone");
361 $tpl->setContent($this->form->getHTML());
379 protected function save($a_as_milestone =
false)
383 $this->
load(
'create', $a_as_milestone);
385 if ($this->app->validate() and $this->notification->validate()) {
386 if (!(
int)
$_POST[
'calendar']) {
389 $cat_id = (int)
$_POST[
'calendar'];
393 $this->
notification->setEntryId($this->app->getEntryId());
395 $this->rec->setEntryId($this->app->getEntryId());
398 include_once(
'./Services/Calendar/classes/class.ilCalendarCategoryAssignments.php');
400 $ass->addAssignment($cat_id);
403 include_once
'./Services/Calendar/classes/class.ilCalendarSettings.php';
411 include_once(
'./Services/Calendar/classes/class.ilCalendarCategory.php');
419 } elseif ($a_as_milestone) {
421 $this->ctrl->returnToParent($this);
424 $this->ctrl->returnToParent($this);
427 $this->form->setValuesByPost();
429 return $this->
add($this->form);
431 if ($a_as_milestone) {
446 include_once
'./Services/Calendar/classes/class.ilCalendarMailNotification.php';
448 $notification->setAppointmentId($this->app->getEntryId());
450 foreach ($this->
notification->getRecipients() as $rcp) {
451 switch ($rcp[
'type']) {
453 $notification->setSender(ANONYMOUS_USER_ID);
454 $notification->setRecipients(array($rcp[
'usr_id']));
459 $notification->setSender(ANONYMOUS_USER_ID);
460 $notification->setRecipients(array($rcp[
'email']));
464 $notification->send();
475 include_once(
'./Services/Calendar/classes/class.ilCalendarCategory.php');
478 include_once
'./Services/Calendar/classes/class.ilCalendarMailNotification.php';
480 $notification->setAppointmentId($app_id);
482 switch ($cat_info[
'type']) {
485 switch ($cat_info[
'obj_type']) {
488 $ref_id = current($ref_ids);
489 $notification->setRefId($ref_id);
490 $notification->setType(
499 $ref_id = current($ref_ids);
500 $notification->setRefId($ref_id);
501 $notification->setType(
511 $notification->send();
519 include_once(
'./Services/Calendar/classes/class.ilCalendarCategoryAssignments.php');
521 include_once(
'./Services/Calendar/classes/class.ilCalendarCategory.php');
535 include_once(
"./Services/Calendar/classes/class.ilMilestoneResponsiblesTableGUI.php");
540 $this->app->getEntryId()
542 $tpl->setContent($table_gui->getHTML());
552 $this->app->writeResponsibleUsers(
$_POST[
"user_id"]);
553 $ilCtrl->returnToParent($this);
563 include_once
'./Services/Calendar/classes/class.ilCalendarRecurrences.php';
566 return $this->
edit(
true);
569 $this->ctrl->saveParameter($this, array(
'seed',
'app_id',
'dt',
'idate'));
571 include_once(
'./Services/Utilities/classes/class.ilConfirmationGUI.php');
573 $confirm->setFormAction($this->ctrl->getFormAction($this));
574 #$confirm->setHeaderText($this->lng->txt('cal_edit_app_sure'));
575 $confirm->setCancel($this->lng->txt(
'cancel'),
'cancel');
576 $confirm->addItem(
'appointments[]', $this->app->getEntryId(), $this->app->getTitle());
577 $confirm->addButton($this->lng->txt(
'cal_edit_single'),
'editSingle');
578 $confirm->setConfirm($this->lng->txt(
'cal_edit_recurrences'),
'edit');
580 $GLOBALS[
'tpl']->setContent($confirm->getHTML());
588 $_REQUEST[
'rexl'] = 1;
589 $GLOBALS[
'ilCtrl']->setParameter($this,
'rexcl', 1);
605 $ilHelp->setScreenIdComponent(
"cal");
606 $ilHelp->setScreenId(
"app");
607 if ($this->app->isMilestone()) {
608 $ilHelp->setSubScreenId(
"edit_milestone");
610 $ilHelp->setSubScreenId(
"edit");
613 include_once(
'./Services/Calendar/classes/class.ilCalendarCategory.php');
614 include_once(
'./Services/Calendar/classes/class.ilCalendarCategories.php');
615 include_once(
'./Services/Calendar/classes/class.ilCalendarCategoryAssignments.php');
617 $GLOBALS[
'ilCtrl']->saveParameter($this, array(
'seed',
'app_id',
'dt',
'idate'));
619 if ($_REQUEST[
'rexl']) {
620 $GLOBALS[
'ilCtrl']->setParameter($this,
'rexl', 1);
624 include_once
'./Services/Calendar/classes/class.ilCalendarRecurrenceCalculator.php';
629 $yesterday = clone $current_date;
631 $tomorrow = clone $current_date;
635 foreach ($calc->calculateDateList($current_date, $tomorrow, 1) as $date_entry) {
650 if (!$cats->isVisible($cat_id)) {
651 $ilErr->raiseError($this->lng->txt(
'permission_denied'),
$ilErr->WARNING);
654 if (!$cats->isEditable($cat_id) or $this->app->isAutoGenerated()) {
659 $this->
initForm(
'edit', $this->app->isMilestone(), $a_edit_single_app);
661 $tpl->setContent($this->form->getHTML());
674 include_once(
"./Services/InfoScreen/classes/class.ilInfoScreenGUI.php");
676 $info->setFormAction($this->ctrl->getFormAction($this));
678 if ($this->app->isMilestone()) {
679 $info->addSection($this->lng->txt(
'cal_ms_details'));
681 $info->addSection($this->lng->txt(
'cal_details'));
686 $this->lng->txt(
'appointment'),
688 $this->app->getStart(),
692 $info->addProperty($this->lng->txt(
'title'), $this->app->getPresentationTitle());
695 if (strlen($desc = $this->app->getDescription())) {
696 $info->addProperty($this->lng->txt(
'description'), $desc);
700 if (strlen($loc = $this->app->getLocation())) {
701 $info->addProperty($this->lng->txt(
'cal_where'), $loc);
705 if ($this->app->isMilestone() && $this->app->getCompletion() > 0) {
707 $this->lng->txt(
'cal_task_completion'),
708 $this->app->getCompletion() .
" %"
712 include_once(
'./Services/Calendar/classes/class.ilCalendarCategoryAssignments.php');
719 $users = $this->app->readResponsibleUsers();
722 $value.= $delim .
$r[
"lastname"] .
", " .
$r[
"firstname"] .
" [" .
$r[
"login"] .
"]";
727 $this->lng->txt(
'cal_responsible'),
736 $info->addSection($this->lng->txt(
'additional_info'));
741 include_once(
'./Services/Link/classes/class.ilLink.php');
743 $info->addProperty($this->lng->txt(
'perma_link'),
'<a class="small" href="' . $href .
'" target="_top">' . $href .
'</a>');
759 $single_editing = ($_REQUEST[
'rexl'] ? true :
false);
761 $this->
load(
'edit', $this->app->isMilestone());
763 if ($this->app->validate() and $this->notification->validate()) {
764 if (!(
int)
$_POST[
'calendar']) {
767 $cat_id = (int)
$_POST[
'calendar'];
770 if ($single_editing) {
783 include_once(
'./Services/Calendar/classes/class.ilCalendarCategoryAssignments.php');
785 $GLOBALS[
'ilLog']->write($this->app->getEntryId());
786 $ass->deleteAssignments();
787 $ass->addAssignment($cat_id);
790 include_once
'./Services/Calendar/classes/class.ilCalendarSettings.php';
799 $this->ctrl->returnToParent($this);
801 $this->form->setValuesByPost();
804 $this->
edit(
false, $this->form);
817 include_once(
'./Services/Utilities/classes/class.ilConfirmationGUI.php');
819 $this->ctrl->saveParameter($this, array(
'seed',
'app_id',
'dt',
'idate'));
822 $confirm->setFormAction($this->ctrl->getFormAction($this));
823 $confirm->setHeaderText($this->lng->txt(
'cal_delete_app_sure'));
824 $confirm->setCancel($this->lng->txt(
'cancel'),
'cancel');
825 $confirm->addItem(
'appointments[]', $this->app->getEntryId(), $this->app->getTitle());
827 include_once(
'./Services/Calendar/classes/class.ilCalendarRecurrences.php');
829 && !$this->app->isMilestone()) {
830 $confirm->addButton($this->lng->txt(
'cal_delete_single'),
'deleteexclude');
831 $confirm->setConfirm($this->lng->txt(
'cal_delete_recurrences'),
'delete');
833 $confirm->setConfirm($this->lng->txt(
'delete'),
'delete');
836 $tpl->setContent($confirm->getHTML());
846 protected function delete()
848 foreach (
$_POST[
'appointments'] as $app_id) {
852 include_once(
'./Services/Calendar/classes/class.ilCalendarCategoryAssignments.php');
855 include_once
'./Services/Calendar/classes/class.ilCalendarUserNotification.php';
859 $this->ctrl->returnToParent($this);
871 include_once(
'./Services/Calendar/classes/class.ilCalendarRecurrenceExclusion.php');
873 $excl->setEntryId($_REQUEST[
'app_id']);
879 $this->ctrl->returnToParent($this);
894 $this->timezone =
$ilUser->getTimeZone();
903 if (!isset(
$_GET[
'hour'])) {
905 $this->default_fulltime =
true;
907 if ((
int)
$_GET[
'hour'] < 10) {
913 $this->default_fulltime =
false;
926 $this->seed = clone
$seed;
927 $this->default_fulltime =
true;
939 include_once(
'./Services/Calendar/classes/class.ilCalendarEntry.php');
940 include_once(
'./Services/Calendar/classes/class.ilCalendarRecurrences.php');
943 include_once
'./Services/Calendar/classes/class.ilCalendarUserNotification.php';
948 $this->app->setStart($start);
951 if ($this->default_fulltime) {
952 #$seed_end->increment(IL_CAL_DAY,1);
956 $this->app->setEnd($seed_end);
957 $this->app->setFullday($this->default_fulltime);
972 protected function load($a_mode, $a_as_milestone =
false)
975 $this->
initForm($a_mode, $a_as_milestone);
976 $this->form->checkInput();
978 if ($a_as_milestone) {
979 $this->app->setMilestone(
true);
987 $this->app->enableNotification((
int)
$_POST[
'not']);
989 if ($a_as_milestone) {
990 $start = $this->form->getItemByPostVar(
'event_start');
991 $start = $start->getDate();
993 $this->app->setFullday(
true);
996 $this->app->setStart($start);
997 $this->app->setEnd($start);
999 $period = $this->form->getItemByPostVar(
'event');
1000 $start = $period->getStart();
1001 $end = $period->getEnd();
1003 $this->app->setFullday($start instanceof
ilDate);
1004 $this->app->setStart($start);
1005 $this->app->setEnd(
$end);
1016 foreach ((array)
$_POST[
'notu'] as $rcp) {
1020 if (strlen($rcp) == 0) {
1047 $this->rec->reset();
1049 switch (
$_POST[
'frequence']) {
1051 $this->rec->setFrequenceType(
$_POST[
'frequence']);
1052 $this->rec->setInterval((
int)
$_POST[
'count_DAILY']);
1056 $this->rec->setFrequenceType(
$_POST[
'frequence']);
1057 $this->rec->setInterval((
int)
$_POST[
'count_WEEKLY']);
1058 if (is_array(
$_POST[
'byday_WEEKLY'])) {
1064 $this->rec->setFrequenceType(
$_POST[
'frequence']);
1065 $this->rec->setInterval((
int)
$_POST[
'count_MONTHLY']);
1066 switch ((
int)
$_POST[
'subtype_MONTHLY']) {
1072 switch ((
int)
$_POST[
'monthly_byday_day']) {
1075 $this->rec->setBYSETPOS((
int)
$_POST[
'monthly_byday_num']);
1076 $this->rec->setBYDAY(
'MO,TU,WE,TH,FR');
1081 $this->rec->setBYMONTHDAY((
int)
$_POST[
'monthly_byday_num']);
1085 $this->rec->setBYDAY((
int)
$_POST[
'monthly_byday_num'] .
$_POST[
'monthly_byday_day']);
1091 $this->rec->setBYMONTHDAY((
int)
$_POST[
'monthly_bymonthday']);
1097 $this->rec->setFrequenceType(
$_POST[
'frequence']);
1098 $this->rec->setInterval((
int)
$_POST[
'count_YEARLY']);
1099 switch ((
int)
$_POST[
'subtype_YEARLY']) {
1105 $this->rec->setBYMONTH((
int)
$_POST[
'yearly_bymonth_byday']);
1106 $this->rec->setBYDAY((
int)
$_POST[
'yearly_byday_num'] .
$_POST[
'yearly_byday']);
1110 $this->rec->setBYMONTH((
int)
$_POST[
'yearly_bymonth_by_monthday']);
1111 $this->rec->setBYMONTHDAY((
int)
$_POST[
'yearly_bymonthday']);
1118 switch ((
int)
$_POST[
'until_type']) {
1120 $this->rec->setFrequenceUntilDate(
null);
1125 $this->rec->setFrequenceUntilDate(
null);
1126 $this->rec->setFrequenceUntilCount((
int)
$_POST[
'count']);
1131 $dt->setRequired(
true);
1132 if ($dt->checkInput()) {
1133 $this->rec->setFrequenceUntilCount(0);
1134 $this->rec->setFrequenceUntilDate($dt->getDate());
1149 switch (
$_POST[
'frequence']) {
1153 if ($this->rec->getRecurrenceId()) {
1154 $this->rec->delete();
1159 if ($this->rec->getRecurrenceId()) {
1160 $this->rec->update();
1181 $cat->setTitle($this->lng->txt(
'cal_default_calendar'));
1182 $cat->setObjId(
$ilUser->getId());
1185 include_once
'./Services/Calendar/classes/class.ilCalendarCache.php';
1206 include_once
'Services/Utilities/classes/class.ilConfirmationGUI.php';
1209 $this->ctrl->setParameter($this,
'dstart', (
int) $_REQUEST[
'dstart']);
1210 $this->ctrl->setParameter($this,
'dend', (
int) $_REQUEST[
'dend']);
1213 $conf->setHeaderText($this->lng->txt(
'cal_confirm_reg_info'));
1214 $conf->setConfirm($this->lng->txt(
'cal_reg_register'),
'register');
1215 $conf->setCancel($this->lng->txt(
'cancel'),
'cancel');
1216 $conf->addItem(
'app_id', $entry->getEntryId(), $entry->getTitle() .
' (' . $start .
')');
1218 $tpl->setContent($conf->getHTML());
1225 protected function register()
1229 include_once
'./Services/Calendar/classes/class.ilCalendarRegistration.php';
1238 $this->ctrl->returnToParent($this);
1256 include_once
'Services/Utilities/classes/class.ilConfirmationGUI.php';
1259 $this->ctrl->setParameter($this,
'dstart', (
int) $_REQUEST[
'dstart']);
1260 $this->ctrl->setParameter($this,
'dend', (
int) $_REQUEST[
'dend']);
1263 $conf->setHeaderText($this->lng->txt(
'cal_confirm_unreg_info'));
1264 $conf->setConfirm($this->lng->txt(
'cal_reg_unregister'),
'unregister');
1265 $conf->setCancel($this->lng->txt(
'cancel'),
'cancel');
1266 $conf->addItem(
'app_id', $entry->getEntryId(), $entry->getTitle() .
' (' . $start .
')');
1268 $tpl->setContent($conf->getHTML());
1279 include_once
'./Services/Calendar/classes/class.ilCalendarRegistration.php';
1288 $this->ctrl->returnToParent($this);
1298 $entry = (int)
$_GET[
'app_id'];
1299 $user = (int)
$_GET[
'bkid'];
1301 $this->ctrl->saveParameter($this,
'app_id');
1303 include_once
'Services/Calendar/classes/class.ilCalendarEntry.php';
1304 include_once
'Services/Booking/classes/class.ilBookingEntry.php';
1321 include_once
'./Services/Form/classes/class.ilPropertyFormGUI.php';
1323 $form->setFormAction($this->ctrl->getFormAction($this));
1324 $form->addCommandButton(
'bookconfirmed', $this->lng->txt(
'cal_confirm_booking'));
1325 $form->addCommandButton(
'cancel', $this->lng->txt(
'cancel'));
1328 $form->addItem($date);
1347 $entry = (int) $_REQUEST[
'app_id'];
1348 $user = (int) $_REQUEST[
'bkid'];
1351 if (
$form->checkInput()) {
1353 include_once
'./Services/Calendar/classes/class.ilCalendarEntry.php';
1356 include_once
'./Services/Booking/classes/class.ilBookingEntry.php';
1359 if (!$booking->isAppointmentBookableForUser($entry,
$GLOBALS[
'ilUser']->getId())) {
1361 $this->ctrl->returnToParent($this);
1364 include_once
'./Services/Calendar/classes/ConsultationHours/class.ilConsultationHourUtils.php';
1367 include_once
'./Services/Booking/classes/class.ilBookingEntry.php';
1371 $this->ctrl->returnToParent($this);
1382 $entry = (int)
$_GET[
'app_id'];
1384 include_once
'Services/Calendar/classes/class.ilCalendarEntry.php';
1389 include_once
'Services/Booking/classes/class.ilBookingEntry.php';
1391 if (!$booking->hasBooked($entry->getEntryId())) {
1392 $this->ctrl->returnToParent($this);
1398 $entry_title =
' ' . $entry->getTitle();
1400 $this->ctrl->returnToParent($this);
1406 include_once
'Services/Utilities/classes/class.ilConfirmationGUI.php';
1409 $conf->setHeaderText($this->lng->txt(
'cal_cancel_booking_info'));
1410 $conf->setConfirm($this->lng->txt(
'cal_cancel_booking'),
'cancelconfirmed');
1411 $conf->setCancel($this->lng->txt(
'cancel'),
'cancel');
1412 $conf->addItem(
'app_id', $entry->getEntryId(),
$title .
' - ' . $entry_title);
1414 $tpl->setContent($conf->getHTML());
1425 $entry = (int)
$_POST[
'app_id'];
1426 $user = (int)
$_GET[
'bkid'];
1428 include_once
'Services/Calendar/classes/class.ilCalendarEntry.php';
1434 include_once
'Services/Calendar/classes/ConsultationHours/class.ilConsultationHourAppointments.php';
1435 $GLOBALS[
'ilLog']->dump($entry->getStart());
1438 $entry->getContextId(),
1446 foreach ((array) $apps as $own_app) {
1448 $ref_entry->delete();
1451 include_once
'Services/Booking/classes/class.ilBookingEntry.php';
1453 $booking->cancelBooking($entry->getEntryId());
1457 include_once
'Modules/BookingManager/classes/class.ilBookingReservation.php';
1466 $this->ctrl->returnToParent($this);
1476 include_once
'Services/Calendar/classes/class.ilCalendarCategoryAssignments.php';
1477 include_once
'Services/Calendar/classes/class.ilCalendarCategory.php';
1479 $assignment = $assignment->getFirstAssignment();
1489 if (!isset(
$_GET[
'autoCompleteField'])) {
1490 $a_fields = array(
'login',
'firstname',
'lastname',
'email');
1492 $a_fields = array((
string)
$_GET[
'autoCompleteField']);
1495 $GLOBALS[
'ilLog']->write(print_r($a_fields,
true));
1496 include_once
'./Services/User/classes/class.ilUserAutoComplete.php';
1498 $auto->setSearchFields($a_fields);
1499 $auto->enableFieldSearchableCheck(
true);
1500 $auto->setMoreLinkAvailable(
true);
1502 if (($_REQUEST[
'fetchall'])) {
1506 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
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()
add(ilPropertyFormGUI $form=null)
add new appointment
save($a_as_milestone=false)
save appointment
saveMilestoneResponsibleUsers()
Save milestone responsibilites.
getAppointment()
Get current appointment.
edit($a_edit_single_app=false, ilPropertyFormGUI $form=null)
edit 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 formatDate(ilDateTime $date, $a_skip_day=false, $a_include_wd=false)
Format a date @access public.
static formatPeriod(ilDateTime $start, ilDateTime $end, $a_skip_starting_day=false)
Format a period of two date Shows: 14.
@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 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.
catch(Exception $e) $message
if(isset($_POST['submit'])) $form