46 $lng->loadLanguageModule(
'dateplaner');
49 $this->logger =
$GLOBALS[
'DIC']->logger()->cal();
71 $ilTabs = $DIC[
'ilTabs'];
75 $ilTabs->clearTargets();
76 $ilTabs->setBackTarget(
77 $this->lng->txt(
'cal_back_to_cal'),
78 $this->ctrl->getLinkTarget($this,
'cancel')
81 $next_class = $this->ctrl->getNextClass($this);
82 switch ($next_class) {
85 $cmd = $this->ctrl->getCmd(
"add");
110 $this->ctrl->returnToParent($this);
120 protected function initForm($a_mode, $a_as_milestone =
false, $a_edit_single_app =
false)
129 include_once(
'./Services/YUI/classes/class.ilYuiUtil.php');
134 $this->ctrl->saveParameter($this, array(
'seed',
'idate'));
135 $this->form->setFormAction($this->ctrl->getFormAction($this));
136 if ($a_as_milestone) {
137 $this->form->setTitle($this->lng->txt(
'cal_new_ms'));
138 $this->form->addCommandButton(
'saveMilestone', $this->lng->txt(
'cal_add_milestone'));
139 $this->form->addCommandButton(
'cancel', $this->lng->txt(
'cancel'));
141 $this->form->setTitle($this->lng->txt(
'cal_new_app'));
142 $this->form->addCommandButton(
'save', $this->lng->txt(
'cal_add_appointment'));
143 $this->form->addCommandButton(
'cancel', $this->lng->txt(
'cancel'));
148 if ($a_as_milestone) {
149 $this->form->setTitle($this->lng->txt(
'cal_edit_milestone'));
151 $this->form->setTitle($this->lng->txt(
'cal_edit_appointment'));
153 $this->ctrl->saveParameter($this, array(
'seed',
'app_id',
'idate'));
154 $this->form->setFormAction($this->ctrl->getFormAction($this));
158 include_once(
'./Services/Calendar/classes/class.ilCalendarCategory.php');
164 $this->form->addCommandButton(
'editResponsibleUsers', $this->lng->txt(
'cal_change_responsible_users'));
166 $this->form->addCommandButton(
'update', $this->lng->txt(
'save'));
168 $this->form->addCommandButton(
'cancel', $this->lng->txt(
'cancel'));
173 $title->setValue($this->app->getTitle());
174 $title->setRequired(
true);
175 $title->setMaxLength(128);
177 $this->form->addItem(
$title);
183 $selected_calendar = (int) $_POST[
'calendar'];
184 } elseif (
$_GET[
'category_id']) {
186 $selected_calendar = (int) $_GET[
'category_id'];
187 } elseif ($a_mode ==
'edit') {
191 $selected_calendar = $cat;
192 } elseif (isset(
$_GET[
'ref_id'])) {
193 include_once(
'./Services/Calendar/classes/class.ilCalendarCategories.php');
198 $cats->readSingleCalendar($selected_calendar);
201 $categories = $cats->prepareCategoriesOfUserForSelection();
202 $selected_calendar = key((array) $categories);
207 $calendar->setOptions($cats->prepareCategoriesOfUserForSelection());
209 include_once
'./Services/Calendar/classes/class.ilCalendarSettings.php';
211 $notification_cals = $cats->getNotificationCalendars();
212 $notification_cals = count($notification_cals) ? implode(
',', $notification_cals) :
'';
213 $calendar->addCustomAttribute(
"onchange=\"ilToggleNotification([" . $notification_cals .
"]);\"");
217 if (!$a_as_milestone) {
218 include_once
'./Services/Form/classes/class.ilDateDurationInputGUI.php';
219 $tpl->addJavaScript(
'./Services/Form/js/date_duration.js');
222 $dur->enableToggleFullTime(
223 $this->lng->txt(
'cal_fullday_title'),
224 $this->app->isFullday() ? true : false
226 $dur->setShowTime(
true);
227 $dur->setStart($this->app->getStart());
228 $dur->setEnd($this->app->getEnd());
229 $this->form->addItem($dur);
232 include_once(
'./Services/Calendar/classes/Form/class.ilRecurrenceInputGUI.php');
234 $rec->setRecurrence($this->rec);
235 $this->form->addItem(
$rec);
238 $where =
new ilTextInputGUI($this->lng->txt(
'cal_where'),
'location');
239 $where->
setValue($this->app->getLocation());
240 $where->setMaxLength(128);
242 $this->form->addItem($where);
245 $deadline->
setDate($this->app->getStart());
246 $deadline->setShowTime(
false);
247 $deadline->setMinuteStepSize(5);
248 $this->form->addItem($deadline);
251 $completion_vals = array();
252 for (
$i = 0;
$i <= 100;
$i += 5) {
253 $completion_vals[
$i] =
$i .
" %";
256 $this->lng->txt(
'cal_task_completion'),
260 $compl->setValue($this->app->getCompletion());
261 $this->form->addItem($compl);
265 $desc->
setValue($this->app->getDescription());
267 $this->form->addItem($desc);
269 if ($a_as_milestone && $a_mode ==
"edit" && $resp_info) {
271 $users = $this->app->readResponsibleUsers();
275 $value .= $delim . $r[
"lastname"] .
", " . $r[
"firstname"] .
" [" . $r[
"login"] .
"]";
281 $resp->setValue(
"-");
284 $this->form->addItem($resp);
290 $notu->
setInfo($this->lng->txt(
'cal_user_notification_info'));
292 $notu->setMaxLength(64);
295 foreach ($this->
notification->getRecipients() as $rcp) {
296 switch ($rcp[
'type']) {
309 $notu->setValues(array(
''));
311 $this->form->addItem($notu);
315 include_once
'./Services/Calendar/classes/class.ilCalendarSettings.php';
325 $tpl->addJavaScript(
'./Services/Calendar/js/toggle_notification.js');
327 $not->
setInfo($this->lng->txt(
'cal_notification_info'));
329 $not->setChecked($this->app->isNotificationEnabled());
330 $not->setDisabled($disabled);
331 $this->form->addItem($not);
348 $ilHelp = $DIC[
'ilHelp'];
350 $ilHelp->setScreenIdComponent(
"cal");
351 $ilHelp->setScreenId(
"app");
352 $ilHelp->setSubScreenId(
"create");
357 $tpl->setContent($this->form->getHTML());
371 $ilHelp = $DIC[
'ilHelp'];
373 $ilHelp->setScreenIdComponent(
"cal");
374 $ilHelp->setScreenId(
"app");
375 $ilHelp->setSubScreenId(
"create_milestone");
378 $tpl->setContent($this->form->getHTML());
396 protected function save($a_as_milestone =
false)
402 $this->
load(
'create', $a_as_milestone);
405 if (!(
int)
$_POST[
'calendar']) {
408 $cat_id = (int)
$_POST[
'calendar'];
412 $this->
notification->setEntryId($this->app->getEntryId());
414 $this->rec->setEntryId($this->app->getEntryId());
417 include_once(
'./Services/Calendar/classes/class.ilCalendarCategoryAssignments.php');
422 include_once
'./Services/Calendar/classes/class.ilCalendarSettings.php';
430 include_once(
'./Services/Calendar/classes/class.ilCalendarCategory.php');
436 ilUtil::sendSuccess($this->lng->txt(
'cal_created_milestone_resp_q'),
true);
438 } elseif ($a_as_milestone) {
439 ilUtil::sendSuccess($this->lng->txt(
'cal_created_milestone'),
true);
440 $this->ctrl->returnToParent($this);
442 ilUtil::sendSuccess($this->lng->txt(
'cal_created_appointment'),
true);
443 $this->ctrl->returnToParent($this);
446 $this->form->setValuesByPost();
448 return $this->
add($this->form);
450 if ($a_as_milestone) {
467 include_once
'./Services/Calendar/classes/class.ilCalendarMailNotification.php';
469 $notification->setAppointmentId($this->app->getEntryId());
471 foreach ($this->
notification->getRecipients() as $rcp) {
472 switch ($rcp[
'type']) {
474 $notification->setSender(ANONYMOUS_USER_ID);
475 $notification->setRecipients(array($rcp[
'usr_id']));
480 $notification->setSender(ANONYMOUS_USER_ID);
481 $notification->setRecipients(array($rcp[
'email']));
485 $notification->send();
496 include_once(
'./Services/Calendar/classes/class.ilCalendarCategory.php');
499 include_once
'./Services/Calendar/classes/class.ilCalendarMailNotification.php';
501 $notification->setAppointmentId($app_id);
503 switch ($cat_info[
'type']) {
506 switch ($cat_info[
'obj_type']) {
509 $ref_id = current($ref_ids);
510 $notification->setRefId($ref_id);
511 $notification->setType(
520 $ref_id = current($ref_ids);
521 $notification->setRefId($ref_id);
522 $notification->setType(
532 $notification->send();
540 include_once(
'./Services/Calendar/classes/class.ilCalendarCategoryAssignments.php');
542 include_once(
'./Services/Calendar/classes/class.ilCalendarCategory.php');
558 include_once(
"./Services/Calendar/classes/class.ilMilestoneResponsiblesTableGUI.php");
563 $this->app->getEntryId()
565 $tpl->setContent($table_gui->getHTML());
577 $this->app->writeResponsibleUsers(
$_POST[
"user_id"]);
578 $ilCtrl->returnToParent($this);
588 include_once
'./Services/Calendar/classes/class.ilCalendarRecurrences.php';
591 return $this->
edit(
true);
594 $this->ctrl->saveParameter($this, array(
'seed',
'app_id',
'dt',
'idate'));
596 include_once(
'./Services/Utilities/classes/class.ilConfirmationGUI.php');
598 $confirm->setFormAction($this->ctrl->getFormAction($this));
599 #$confirm->setHeaderText($this->lng->txt('cal_edit_app_sure')); 600 $confirm->setCancel($this->lng->txt(
'cancel'),
'cancel');
601 $confirm->addItem(
'appointments[]', $this->app->getEntryId(), $this->app->getTitle());
602 $confirm->addButton($this->lng->txt(
'cal_edit_single'),
'editSingle');
603 $confirm->setConfirm($this->lng->txt(
'cal_edit_recurrences'),
'edit');
605 $GLOBALS[
'DIC'][
'tpl']->setContent($confirm->getHTML());
613 $_REQUEST[
'rexl'] = 1;
614 $GLOBALS[
'DIC'][
'ilCtrl']->setParameter($this,
'rexcl', 1);
633 $ilHelp = $DIC[
'ilHelp'];
635 $ilHelp->setScreenIdComponent(
"cal");
636 $ilHelp->setScreenId(
"app");
637 if ($this->app->isMilestone()) {
638 $ilHelp->setSubScreenId(
"edit_milestone");
640 $ilHelp->setSubScreenId(
"edit");
643 include_once(
'./Services/Calendar/classes/class.ilCalendarCategory.php');
644 include_once(
'./Services/Calendar/classes/class.ilCalendarCategories.php');
645 include_once(
'./Services/Calendar/classes/class.ilCalendarCategoryAssignments.php');
647 $GLOBALS[
'DIC'][
'ilCtrl']->saveParameter($this, array(
'seed',
'app_id',
'dt',
'idate'));
649 if ($_REQUEST[
'rexl']) {
650 $GLOBALS[
'DIC'][
'ilCtrl']->setParameter($this,
'rexl', 1);
654 include_once
'./Services/Calendar/classes/class.ilCalendarRecurrenceCalculator.php';
659 $yesterday = clone $current_date;
661 $tomorrow = clone $current_date;
665 foreach ($calc->calculateDateList($current_date, $tomorrow, 1) as $date_entry) {
680 if (!$cats->isVisible($cat_id)) {
681 $ilErr->raiseError($this->lng->txt(
'permission_denied'),
$ilErr->WARNING);
684 if (!$cats->isEditable($cat_id)
or $this->app->isAutoGenerated()) {
689 $this->
initForm(
'edit', $this->app->isMilestone(), $a_edit_single_app);
691 $tpl->setContent($this->form->getHTML());
707 include_once(
"./Services/InfoScreen/classes/class.ilInfoScreenGUI.php");
709 $info->setFormAction($this->ctrl->getFormAction($this));
711 if ($this->app->isMilestone()) {
712 $info->addSection($this->lng->txt(
'cal_ms_details'));
714 $info->addSection($this->lng->txt(
'cal_details'));
719 $this->lng->txt(
'appointment'),
721 $this->app->getStart(),
725 $info->addProperty($this->lng->txt(
'title'), $this->app->getPresentationTitle());
728 if (strlen($desc = $this->app->getDescription())) {
729 $info->addProperty($this->lng->txt(
'description'), $desc);
733 if (strlen($loc = $this->app->getLocation())) {
734 $info->addProperty($this->lng->txt(
'cal_where'), $loc);
738 if ($this->app->isMilestone() && $this->app->getCompletion() > 0) {
740 $this->lng->txt(
'cal_task_completion'),
741 $this->app->getCompletion() .
" %" 745 include_once(
'./Services/Calendar/classes/class.ilCalendarCategoryAssignments.php');
750 && (
$type ==
"grp" || $type ==
"crs")) {
752 $users = $this->app->readResponsibleUsers();
755 $value .= $delim . $r[
"lastname"] .
", " . $r[
"firstname"] .
" [" . $r[
"login"] .
"]";
760 $this->lng->txt(
'cal_responsible'),
769 $info->addSection($this->lng->txt(
'additional_info'));
774 include_once(
'./Services/Link/classes/class.ilLink.php');
776 $info->addProperty($this->lng->txt(
'perma_link'),
'<a class="small" href="' . $href .
'" target="_top">' . $href .
'</a>');
794 $single_editing = ($_REQUEST[
'rexl'] ? true :
false);
796 $this->
load(
'edit', $this->app->isMilestone());
799 if (!(
int)
$_POST[
'calendar']) {
802 $cat_id = (int)
$_POST[
'calendar'];
805 if ($single_editing) {
818 include_once(
'./Services/Calendar/classes/class.ilCalendarCategoryAssignments.php');
820 $this->logger->debug($this->app->getEntryId());
822 $ass->addAssignment($cat_id);
825 include_once
'./Services/Calendar/classes/class.ilCalendarSettings.php';
833 ilUtil::sendSuccess($this->lng->txt(
'msg_obj_modified'),
true);
834 $this->ctrl->returnToParent($this);
836 $this->form->setValuesByPost();
839 $this->
edit(
false, $this->form);
854 include_once(
'./Services/Utilities/classes/class.ilConfirmationGUI.php');
856 $this->ctrl->saveParameter($this, array(
'seed',
'app_id',
'dt',
'idate'));
859 $confirm->setFormAction($this->ctrl->getFormAction($this));
860 $confirm->setHeaderText($this->lng->txt(
'cal_delete_app_sure'));
861 $confirm->setCancel($this->lng->txt(
'cancel'),
'cancel');
862 $confirm->addItem(
'appointments[]', $this->app->getEntryId(), $this->app->getTitle());
864 include_once(
'./Services/Calendar/classes/class.ilCalendarRecurrences.php');
866 && !$this->app->isMilestone()) {
867 $confirm->addButton($this->lng->txt(
'cal_delete_single'),
'deleteexclude');
868 $confirm->setConfirm($this->lng->txt(
'cal_delete_recurrences'),
'delete');
870 $confirm->setConfirm($this->lng->txt(
'delete'),
'delete');
873 $tpl->setContent($confirm->getHTML());
883 protected function delete()
885 foreach (
$_POST[
'appointments'] as $app_id) {
889 include_once(
'./Services/Calendar/classes/class.ilCalendarCategoryAssignments.php');
892 include_once
'./Services/Calendar/classes/class.ilCalendarUserNotification.php';
895 ilUtil::sendSuccess($this->lng->txt(
'cal_deleted_app'),
true);
896 $this->ctrl->returnToParent($this);
908 include_once(
'./Services/Calendar/classes/class.ilCalendarRecurrenceExclusion.php');
910 $excl->setEntryId($_REQUEST[
'app_id']);
915 ilUtil::sendSuccess($this->lng->txt(
'cal_deleted_app'),
true);
916 $this->ctrl->returnToParent($this);
933 $this->timezone =
$ilUser->getTimeZone();
942 if (!isset(
$_GET[
'hour'])) {
944 $this->default_fulltime =
true;
946 if ((
int)
$_GET[
'hour'] < 10) {
952 $this->default_fulltime =
false;
965 $this->seed = clone
$seed;
966 $this->default_fulltime =
true;
978 include_once(
'./Services/Calendar/classes/class.ilCalendarEntry.php');
979 include_once(
'./Services/Calendar/classes/class.ilCalendarRecurrences.php');
982 include_once
'./Services/Calendar/classes/class.ilCalendarUserNotification.php';
987 $this->app->setStart(
$start);
990 if ($this->default_fulltime) {
991 #$seed_end->increment(IL_CAL_DAY,1); 995 $this->app->setEnd($seed_end);
996 $this->app->setFullday($this->default_fulltime);
1011 protected function load($a_mode, $a_as_milestone =
false)
1014 $this->
initForm($a_mode, $a_as_milestone);
1015 $this->form->checkInput();
1017 if ($a_as_milestone) {
1018 $this->app->setMilestone(
true);
1026 $this->app->enableNotification((
int)
$_POST[
'not']);
1028 if ($a_as_milestone) {
1029 $start = $this->form->getItemByPostVar(
'event_start');
1032 $this->app->setFullday(
true);
1035 $this->app->setStart(
$start);
1036 $this->app->setEnd(
$start);
1038 $period = $this->form->getItemByPostVar(
'event');
1039 $start = $period->getStart();
1040 $end = $period->getEnd();
1043 $this->app->setStart(
$start);
1044 $this->app->setEnd(
$end);
1055 foreach ((array)
$_POST[
'notu'] as $rcp) {
1059 if (strlen($rcp) == 0) {
1086 $this->rec->reset();
1088 switch (
$_POST[
'frequence']) {
1090 $this->rec->setFrequenceType(
$_POST[
'frequence']);
1091 $this->rec->setInterval((
int)
$_POST[
'count_DAILY']);
1095 $this->rec->setFrequenceType($_POST[
'frequence']);
1096 $this->rec->setInterval((
int) $_POST[
'count_WEEKLY']);
1097 if (is_array($_POST[
'byday_WEEKLY'])) {
1103 $this->rec->setFrequenceType($_POST[
'frequence']);
1104 $this->rec->setInterval((
int) $_POST[
'count_MONTHLY']);
1105 switch ((
int) $_POST[
'subtype_MONTHLY']) {
1111 switch ((
int) $_POST[
'monthly_byday_day']) {
1114 $this->rec->setBYSETPOS((
int) $_POST[
'monthly_byday_num']);
1115 $this->rec->setBYDAY(
'MO,TU,WE,TH,FR');
1120 $this->rec->setBYMONTHDAY((
int) $_POST[
'monthly_byday_num']);
1124 $this->rec->setBYDAY((
int) $_POST[
'monthly_byday_num'] . $_POST[
'monthly_byday_day']);
1130 $this->rec->setBYMONTHDAY((
int) $_POST[
'monthly_bymonthday']);
1136 $this->rec->setFrequenceType($_POST[
'frequence']);
1137 $this->rec->setInterval((
int) $_POST[
'count_YEARLY']);
1138 switch ((
int) $_POST[
'subtype_YEARLY']) {
1144 $this->rec->setBYMONTH((
int) $_POST[
'yearly_bymonth_byday']);
1145 $this->rec->setBYDAY((
int) $_POST[
'yearly_byday_num'] . $_POST[
'yearly_byday']);
1149 $this->rec->setBYMONTH((
int) $_POST[
'yearly_bymonth_by_monthday']);
1150 $this->rec->setBYMONTHDAY((
int) $_POST[
'yearly_bymonthday']);
1157 switch ((
int)
$_POST[
'until_type']) {
1159 $this->rec->setFrequenceUntilDate(null);
1164 $this->rec->setFrequenceUntilDate(null);
1165 $this->rec->setFrequenceUntilCount((
int) $_POST[
'count']);
1170 $dt->setRequired(
true);
1171 if ($dt->checkInput()) {
1172 $this->rec->setFrequenceUntilCount(0);
1173 $this->rec->setFrequenceUntilDate($dt->getDate());
1188 switch (
$_POST[
'frequence']) {
1192 if ($this->rec->getRecurrenceId()) {
1193 $this->rec->delete();
1198 if ($this->rec->getRecurrenceId()) {
1199 $this->rec->update();
1223 $cat->setTitle($this->lng->txt(
'cal_default_calendar'));
1224 $cat->setObjId(
$ilUser->getId());
1227 include_once
'./Services/Calendar/classes/class.ilCalendarCache.php';
1250 include_once
'Services/Utilities/classes/class.ilConfirmationGUI.php';
1253 $this->ctrl->setParameter($this,
'dstart', (
int) $_REQUEST[
'dstart']);
1254 $this->ctrl->setParameter($this,
'dend', (
int) $_REQUEST[
'dend']);
1257 $conf->setHeaderText($this->lng->txt(
'cal_confirm_reg_info'));
1258 $conf->setConfirm($this->lng->txt(
'cal_reg_register'),
'register');
1259 $conf->setCancel($this->lng->txt(
'cancel'),
'cancel');
1260 $conf->addItem(
'app_id', $entry->getEntryId(), $entry->getTitle() .
' (' .
$start .
')');
1262 $tpl->setContent($conf->getHTML());
1269 protected function register()
1275 include_once
'./Services/Calendar/classes/class.ilCalendarRegistration.php';
1283 ilUtil::sendSuccess($this->lng->txt(
'cal_reg_registered'),
true);
1284 $this->ctrl->returnToParent($this);
1304 include_once
'Services/Utilities/classes/class.ilConfirmationGUI.php';
1307 $this->ctrl->setParameter($this,
'dstart', (
int) $_REQUEST[
'dstart']);
1308 $this->ctrl->setParameter($this,
'dend', (
int) $_REQUEST[
'dend']);
1311 $conf->setHeaderText($this->lng->txt(
'cal_confirm_unreg_info'));
1312 $conf->setConfirm($this->lng->txt(
'cal_reg_unregister'),
'unregister');
1313 $conf->setCancel($this->lng->txt(
'cancel'),
'cancel');
1314 $conf->addItem(
'app_id', $entry->getEntryId(), $entry->getTitle() .
' (' .
$start .
')');
1316 $tpl->setContent($conf->getHTML());
1329 include_once
'./Services/Calendar/classes/class.ilCalendarRegistration.php';
1337 ilUtil::sendSuccess($this->lng->txt(
'cal_reg_unregistered'),
true);
1338 $this->ctrl->returnToParent($this);
1351 $entry = (int)
$_GET[
'app_id'];
1354 $this->ctrl->saveParameter($this,
'app_id');
1356 include_once
'Services/Calendar/classes/class.ilCalendarEntry.php';
1357 include_once
'Services/Booking/classes/class.ilBookingEntry.php';
1374 include_once
'./Services/Form/classes/class.ilPropertyFormGUI.php';
1376 $form->setFormAction($this->ctrl->getFormAction($this));
1377 $form->addCommandButton(
'bookconfirmed', $this->lng->txt(
'cal_confirm_booking'));
1378 $form->addCommandButton(
'cancel', $this->lng->txt(
'cancel'));
1381 $form->addItem($date);
1402 $entry = (int) $_REQUEST[
'app_id'];
1403 $user = (int) $_REQUEST[
'bkid'];
1406 if (
$form->checkInput()) {
1408 include_once
'./Services/Calendar/classes/class.ilCalendarEntry.php';
1411 include_once
'./Services/Booking/classes/class.ilBookingEntry.php';
1414 if (!$booking->isAppointmentBookableForUser($entry,
$GLOBALS[
'DIC'][
'ilUser']->getId())) {
1416 $this->ctrl->returnToParent($this);
1419 include_once
'./Services/Calendar/classes/ConsultationHours/class.ilConsultationHourUtils.php';
1422 include_once
'./Services/Booking/classes/class.ilBookingEntry.php';
1425 ilUtil::sendSuccess($this->lng->txt(
'cal_booking_confirmed'),
true);
1426 $this->ctrl->returnToParent($this);
1440 $entry = (int)
$_GET[
'app_id'];
1442 include_once
'Services/Calendar/classes/class.ilCalendarEntry.php';
1447 include_once
'Services/Booking/classes/class.ilBookingEntry.php';
1449 if (!$booking->hasBooked($entry->getEntryId())) {
1450 $this->ctrl->returnToParent($this);
1456 $entry_title =
' ' . $entry->getTitle();
1458 $this->ctrl->returnToParent($this);
1464 include_once
'Services/Utilities/classes/class.ilConfirmationGUI.php';
1467 $conf->setHeaderText($this->lng->txt(
'cal_cancel_booking_info'));
1468 $conf->setConfirm($this->lng->txt(
'cal_cancel_booking'),
'cancelconfirmed');
1469 $conf->setCancel($this->lng->txt(
'cancel'),
'cancel');
1470 $conf->addItem(
'app_id', $entry->getEntryId(),
$title .
' - ' . $entry_title);
1472 $tpl->setContent($conf->getHTML());
1485 $entry = (int)
$_POST[
'app_id'];
1488 include_once
'Services/Calendar/classes/class.ilCalendarEntry.php';
1494 include_once
'Services/Calendar/classes/ConsultationHours/class.ilConsultationHourAppointments.php';
1497 $entry->getContextId(),
1504 foreach ((array) $apps as $own_app) {
1506 $ref_entry->delete();
1509 include_once
'Services/Booking/classes/class.ilBookingEntry.php';
1515 include_once
'Modules/BookingManager/classes/class.ilBookingReservation.php';
1523 ilUtil::sendSuccess($this->lng->txt(
'cal_cancel_booking_confirmed'),
true);
1524 $this->ctrl->returnToParent($this);
1534 include_once
'Services/Calendar/classes/class.ilCalendarCategoryAssignments.php';
1535 include_once
'Services/Calendar/classes/class.ilCalendarCategory.php';
1547 if (!isset(
$_GET[
'autoCompleteField'])) {
1548 $a_fields = array(
'login',
'firstname',
'lastname',
'email');
1550 $a_fields = array((
string)
$_GET[
'autoCompleteField']);
1553 include_once
'./Services/User/classes/class.ilUserAutoComplete.php';
1555 $auto->setSearchFields($a_fields);
1556 $auto->enableFieldSearchableCheck(
true);
1557 $auto->setMoreLinkAvailable(
true);
1559 if (($_REQUEST[
'fetchall'])) {
1563 echo $auto->getList($_REQUEST[
'query']);
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
setFormAction($a_form_action)
static _lookupFullname($a_user_id)
Lookup Full Name.
static _getFirstRecurrence($a_cal_id)
get first recurrence
static _getStaticLink( $a_ref_id, $a_type='', $a_fallback_goto=true, $append="")
Get static link.
Distributes calendar mail notifications.
edit($a_edit_single_app=false, ilPropertyFormGUI $form=null)
edit appointment
initAppointment($a_app_id=0)
init appointment
addMilestone()
add milestone
static getAppointmentIds($a_user_id, $a_context_id=null, $a_start=null, $a_type=null, $a_check_owner=true)
Get all appointment ids.
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 formatDate(ilDateTime $date, $a_skip_day=false, $a_include_wd=false, $include_seconds=false)
Format a date public.
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
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.
catch(Exception $e) $message
deleteAssignments()
delete assignments
if(isset($_POST['submit'])) $form
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)
registration for calendar appointments
const TYPE_CRS_NOTIFICATION
This class represents a text property in a property form.
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.
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
add(ilPropertyFormGUI $form=null)
add new appointment
static formatPeriod(ilDateTime $start, ilDateTime $end, $a_skip_starting_day=false)
Format a period of two date Shows: 14.
This class represents a non editable value in a property form.
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
$GLOBALS['JPEG_Segment_Names']
Global Variable: XMP_tag_captions.
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.