3 declare(strict_types=1);
64 $this->
lng = $DIC->language();
65 $this->
lng->loadLanguageModule(
'dateplaner');
66 $this->
ctrl = $DIC->ctrl();
67 $this->tpl = $DIC->ui()->mainTemplate();
68 $this->
logger = $DIC->logger()->cal();
69 $this->
user = $DIC->user();
71 $this->
tabs = $DIC->tabs();
72 $this->
help = $DIC->help();
73 $this->error = $DIC[
'ilErr'];
75 $this->
http = $DIC->http();
77 $this->request = $DIC->http()->request();
88 if ($this->
http->wrapper()->query()->has(
'app_id')) {
89 return $this->
http->wrapper()->query()->retrieve(
100 if ($this->
http->wrapper()->post()->has(
'rexl')) {
101 $val = $this->
http->wrapper()->post()->retrieve(
106 if ($val === 0 && $this->
http->wrapper()->query()->has(
'rexl')) {
107 $val = $this->
http->wrapper()->query()->retrieve(
117 if ($this->
http->wrapper()->query()->has(
'dt')) {
118 return $this->
http->wrapper()->query()->retrieve(
129 $this->
tabs->clearTargets();
130 if ($this->
http->wrapper()->query()->has(
'app_id')) {
131 $this->
ctrl->saveParameter($this,
'app_id');
133 $this->
tabs->setBackTarget(
134 $this->
lng->txt(
'cal_back_to_cal'),
135 $this->
ctrl->getLinkTarget($this,
'cancel')
138 $next_class = $this->
ctrl->getNextClass($this);
139 switch ($next_class) {
142 $cmd = $this->
ctrl->getCmd(
"add");
155 $this->
ctrl->returnToParent($this);
160 bool $a_as_milestone =
false,
161 bool $a_edit_single_app =
false 168 $this->
ctrl->saveParameter($this, array(
'seed',
'idate'));
169 $this->
form->setFormAction($this->
ctrl->getFormAction($this));
170 if ($a_as_milestone) {
171 $this->
form->setTitle($this->
lng->txt(
'cal_new_ms'));
172 $this->
form->addCommandButton(
'saveMilestone', $this->
lng->txt(
'cal_add_milestone'));
174 $this->
form->setTitle($this->
lng->txt(
'cal_new_app'));
175 $this->
form->addCommandButton(
'save', $this->
lng->txt(
'cal_add_appointment'));
177 $this->
form->addCommandButton(
'cancel', $this->
lng->txt(
'cancel'));
181 if ($a_as_milestone) {
182 $this->
form->setTitle($this->
lng->txt(
'cal_edit_milestone'));
184 $this->
form->setTitle($this->
lng->txt(
'cal_edit_appointment'));
186 $this->
ctrl->saveParameter($this, array(
'seed',
'app_id',
'idate'));
187 $this->
form->setFormAction($this->
ctrl->getFormAction($this));
196 $this->
form->addCommandButton(
197 'editResponsibleUsers',
198 $this->
lng->txt(
'cal_change_responsible_users')
201 $this->
form->addCommandButton(
'update', $this->
lng->txt(
'save'));
203 $this->
form->addCommandButton(
'cancel', $this->
lng->txt(
'cancel'));
208 $title->setValue($this->app->getTitle());
209 $title->setRequired(
true);
210 $title->setMaxLength(128);
212 $this->
form->addItem($title);
215 if ($this->
http->wrapper()->query()->has(
'category_id')) {
216 $category_id = $this->
http->wrapper()->query()->retrieve(
222 if ($this->
http->wrapper()->query()->has(
'ref_id')) {
223 $ref_id = $this->
http->wrapper()->query()->retrieve(
231 $selected_calendar = 0;
232 if ($this->
http->wrapper()->post()->has(
'calendar')) {
233 $selected_calendar = $this->
http->wrapper()->post()->retrieve(
238 if ($selected_calendar > 0) {
239 $calendar->setValue($selected_calendar);
240 } elseif ($category_id) {
241 $calendar->setValue((
int) $category_id);
242 $selected_calendar = (
int) $category_id;
243 } elseif ($a_mode ==
'edit') {
246 $calendar->setValue($cat);
247 $selected_calendar = $cat;
253 $cats->readSingleCalendar($selected_calendar);
256 $categories = $cats->prepareCategoriesOfUserForSelection();
257 $selected_calendar = key($categories);
258 $calendar->setValue($selected_calendar);
260 $calendar->setRequired(
true);
262 $calendar->setOptions($cats->prepareCategoriesOfUserForSelection());
265 $notification_cals = $cats->getNotificationCalendars();
266 $notification_cals = count($notification_cals) ? implode(
',', $notification_cals) :
'';
267 $calendar->addCustomAttribute(
"onchange=\"ilToggleNotification([" . $notification_cals .
"]);\"");
269 $this->
form->addItem($calendar);
271 if (!$a_as_milestone) {
274 $dur->enableToggleFullTime(
275 $this->
lng->txt(
'cal_fullday_title'),
276 $this->app->isFullday()
278 $dur->setShowTime(
true);
279 $dur->setStart($this->app->getStart());
280 $dur->setEnd($this->app->getEnd());
281 $this->
form->addItem($dur);
286 $this->
form->addItem($rec);
290 $where->setValue($this->app->getLocation());
291 $where->setMaxLength(128);
293 $this->
form->addItem($where);
296 $deadline->
setDate($this->app->getStart());
297 $deadline->setShowTime(
false);
298 $deadline->setMinuteStepSize(5);
299 $this->
form->addItem($deadline);
302 $completion_vals = array();
303 for (
$i = 0;
$i <= 100;
$i += 5) {
304 $completion_vals[
$i] =
$i .
" %";
307 $this->
lng->txt(
'cal_task_completion'),
310 $compl->setOptions($completion_vals);
311 $compl->setValue($this->app->getCompletion());
312 $this->
form->addItem($compl);
316 $desc->
setValue($this->app->getDescription());
318 $this->
form->addItem($desc);
320 if ($a_as_milestone && $a_mode ==
"edit" && $resp_info) {
322 $users = $this->app->readResponsibleUsers();
326 foreach ($users as $r) {
327 $value .= $delim . $r[
"lastname"] .
", " . $r[
"firstname"] .
" [" . $r[
"login"] .
"]";
330 if (count($users) > 0) {
331 $resp->setValue($value);
333 $resp->setValue(
"-");
340 $ajax_url = $this->
ctrl->getLinkTarget(
342 'doUserAutoComplete',
349 $this->
lng->txt(
'cal_user_notification'),
352 $notu->setMulti(
true,
true);
353 $notu->setInfo($this->
lng->txt(
'cal_user_notification_info'));
354 $notu->setDataSource($ajax_url,
',');
357 foreach ($this->
notification->getRecipients() as $rcp) {
358 switch ($rcp[
'type']) {
364 $values[] = $rcp[
'email'];
368 $notu->setValue($values);
369 $this->
form->addItem($notu);
382 $this->tpl->addJavaScript(
'./Services/Calendar/js/toggle_notification.js');
384 $not->
setInfo($this->
lng->txt(
'cal_notification_info'));
386 $not->setChecked($this->app->isNotificationEnabled());
387 $not->setDisabled($disabled);
388 $this->
form->addItem($not);
398 return json_encode(
new stdClass(), JSON_THROW_ON_ERROR);
400 if (!$this->
http->wrapper()->query()->has(
'autoCompleteField')) {
407 $result_field =
'login';
409 $auto_complete_field = $this->
http->wrapper()->query()->retrieve(
411 $this->
refinery->kindlyTo()->string()
413 $a_fields = [$auto_complete_field];
414 $result_field = $auto_complete_field;
419 if ($this->
http->wrapper()->query()->has(
'fetchall')) {
423 $auto->setMoreLinkAvailable(
true);
424 $auto->setSearchFields($a_fields);
425 $auto->setResultField($result_field);
426 $auto->enableFieldSearchableCheck(
true);
428 if ($this->
http->wrapper()->post()->has(
'term')) {
429 $query = $this->
http->wrapper()->post()->retrieve(
431 $this->
refinery->kindlyTo()->string()
434 echo $auto->getList(
$query);
443 $this->
help->setScreenIdComponent(
"cal");
444 $this->
help->setScreenId(
"app");
445 $this->
help->setSubScreenId(
"create");
450 $this->tpl->setContent($form->
getHTML());
458 $this->
help->setScreenIdComponent(
"cal");
459 $this->
help->setScreenId(
"app");
460 $this->
help->setSubScreenId(
"create_milestone");
462 $form = $this->
initForm(
'create',
true);
463 $this->tpl->setContent($form->
getHTML());
471 protected function save(
bool $a_as_milestone =
false): void
473 $form = $this->
load(
'create', $a_as_milestone);
475 if ($this->app->validate() and $this->
notification->validate()) {
476 if ((
int) $form->
getInput(
'calendar') === 0) {
483 $this->
notification->setEntryId($this->app->getEntryId());
485 $this->rec->setEntryId($this->app->getEntryId());
510 $this->tpl->setOnScreenMessage(
'success', $this->
lng->txt(
'cal_created_milestone_resp_q'),
true);
513 } elseif ($a_as_milestone) {
514 $this->tpl->setOnScreenMessage(
'success', $this->
lng->txt(
'cal_created_milestone'),
true);
515 $this->
ctrl->returnToParent($this);
517 $this->tpl->setOnScreenMessage(
'success', $this->
lng->txt(
'cal_created_appointment'),
true);
518 $this->
ctrl->returnToParent($this);
521 $this->
form->setValuesByPost();
522 if ($this->error->getMessage() !==
'') {
523 $this->tpl->setOnScreenMessage(
'failure', $this->error->getMessage());
525 $this->tpl->setOnScreenMessage(
'failure', $this->
lng->txt(
'err_check_input'));
530 if ($a_as_milestone) {
543 $notification->setAppointmentId($this->app->getEntryId());
545 foreach ($this->
notification->getRecipients() as $rcp) {
546 switch ($rcp[
'type']) {
559 $notification->send();
568 $notification->setAppointmentId($app_id);
570 switch ($cat_info[
'type']) {
573 switch ($cat_info[
'obj_type']) {
577 $notification->setRefId(
$ref_id);
578 $notification->setType(
588 $notification->setRefId(
$ref_id);
589 $notification->setType(
598 $notification->send();
618 $this->app->getEntryId()
620 $this->tpl->setContent($table_gui->getHTML());
629 if ($this->
http->wrapper()->post()->has(
'user_id')) {
630 $user_ids = $this->
http->wrapper()->post()->retrieve(
632 $this->
refinery->kindlyTo()->dictOf(
637 $this->app->writeResponsibleUsers($user_ids);
638 $this->
ctrl->returnToParent($this);
654 $this->
ctrl->saveParameter($this, array(
'seed',
'app_id',
'dt',
'idate'));
657 $confirm->setHeaderText($this->
lng->txt(
'cal_edit_single_or_all_info'));
658 $confirm->setFormAction($this->
ctrl->getFormAction($this));
659 $confirm->setCancel($this->
lng->txt(
'cancel'),
'cancel');
660 $confirm->addItem(
'appointments[]', (
string) $this->app->getEntryId(), $this->app->getTitle());
661 $confirm->addButton($this->
lng->txt(
'cal_edit_single'),
'editSingle');
662 $confirm->setConfirm($this->
lng->txt(
'cal_edit_recurrences'),
'edit');
664 $this->tpl->setContent($confirm->getHTML());
672 $this->
ctrl->setParameter($this,
'rexl',
"1");
673 $this->requested_rexl =
true;
682 $this->
help->setScreenIdComponent(
"cal");
683 $this->
help->setScreenId(
"app");
684 if ($this->app->isMilestone()) {
685 $this->
help->setSubScreenId(
"edit_milestone");
687 $this->
help->setSubScreenId(
"edit");
690 $this->
ctrl->saveParameter($this, array(
'seed',
'app_id',
'dt',
'idate'));
691 if ($this->requested_rexl) {
692 $this->
ctrl->setParameter($this,
'rexl', 1);
699 $yesterday = clone $current_date;
701 $tomorrow = clone $current_date;
704 foreach ($calc->calculateDateList($current_date, $tomorrow, 1) as $date_entry) {
721 if (!$cats->isVisible($cat_id)) {
722 $this->error->raiseError($this->
lng->txt(
'permission_denied'), $this->error->WARNING);
725 if (!$cats->isEditable($cat_id) or $this->app->isAutoGenerated()) {
730 $form = $this->
initForm(
'edit', $this->app->isMilestone(), $a_edit_single_app);
732 $this->tpl->setContent($form->
getHTML());
738 $info->setFormAction($this->
ctrl->getFormAction($this));
740 if ($this->app->isMilestone()) {
741 $info->addSection($this->
lng->txt(
'cal_ms_details'));
743 $info->addSection($this->
lng->txt(
'cal_details'));
748 $this->
lng->txt(
'appointment'),
750 $this->app->getStart(),
754 $info->addProperty($this->
lng->txt(
'title'), $this->app->getPresentationTitle());
757 if (strlen($desc = $this->app->getDescription())) {
758 $info->addProperty($this->
lng->txt(
'description'), $desc);
762 if (strlen($loc = $this->app->getLocation())) {
763 $info->addProperty($this->
lng->txt(
'cal_where'), $loc);
767 if ($this->app->isMilestone() && $this->app->getCompletion() > 0) {
769 $this->
lng->txt(
'cal_task_completion'),
770 $this->app->getCompletion() .
" %" 778 && (
$type ==
"grp" || $type ==
"crs")) {
780 $users = $this->app->readResponsibleUsers();
783 foreach ($users as $r) {
784 $value .= $delim . $r[
"lastname"] .
", " . $r[
"firstname"] .
" [" . $r[
"login"] .
"]";
787 if (count($users) > 0) {
789 $this->
lng->txt(
'cal_responsible'),
798 $info->addSection($this->
lng->txt(
'additional_info'));
805 $this->
lng->txt(
'perma_link'),
806 '<a class="small" href="' . $href .
'" target="_top">' . $href .
'</a>' 809 $this->tpl->setContent($info->getHTML());
815 $form = $this->
load(
'edit', $this->app->isMilestone());
817 if ($this->app->validate() and $this->
notification->validate()) {
818 if (!(
int) $form->
getInput(
'calendar')) {
824 if ($single_editing) {
828 if ($selected_ut > 0) {
830 $exclusion->setEntryId($original_id);
845 $ass->addAssignment($cat_id);
848 $notification = (bool) $form->
getInput(
'not');
859 $this->tpl->setOnScreenMessage(
'success', $this->
lng->txt(
'msg_obj_modified'),
true);
860 $this->
ctrl->returnToParent($this);
862 $this->
form->setValuesByPost();
863 $this->tpl->setOnScreenMessage(
'failure', $this->error->getMessage());
870 $this->
ctrl->saveParameter(
880 $app_id = (
int) ($this->request->getQueryParams()[
'app_id'] ?? 0);
882 $this->tpl->setOnScreenMessage(
'failure', $this->
lng->txt(
'err_check_input'));
883 $this->
ctrl->returnToParent($this);
890 $this->app->isMilestone()
893 $confirm->setFormAction($this->
ctrl->getFormAction($this));
894 $confirm->setHeaderText($this->
lng->txt(
'cal_delete_app_sure'));
895 $confirm->setCancel($this->
lng->txt(
'cancel'),
'cancel');
896 $confirm->addItem(
'appointments[]', (
string) $this->app->getEntryId(), $this->app->getTitle());
897 $confirm->setConfirm($this->
lng->txt(
'delete'),
'delete');
898 $this->tpl->setContent($confirm->getHTML());
907 $this->tpl->setContent($table->getHTML());
908 $this->tpl->setOnScreenMessage(
'question', $this->
lng->txt(
'cal_delete_app_sure'));
909 $this->tpl->setOnScreenMessage(
'info', $this->
lng->txt(
'cal_recurrence_confirm_deletion'));
913 protected function delete():
void 915 $app_ids = (array) ($this->request->getParsedBody()[
'appointment_ids'] ?? []);
917 $this->
logger->dump($app_ids);
918 $app_ids = (array) ($this->request->getQueryParams()[
'app_id'] ?? []);
921 $this->
ctrl->returnToParent($this);
923 foreach ($app_ids as $app_id) {
924 $app_id = (
int) $app_id;
930 $this->tpl->setOnScreenMessage(
'success', $this->
lng->txt(
'cal_deleted_app'),
true);
931 $this->
ctrl->returnToParent($this);
936 $recurrence_ids = (array) ($this->request->getParsedBody()[
'recurrence_ids'] ?? []);
937 $app_id = (
int) ($this->request->getQueryParams()[
'app_id'] ?? 0);
938 if (!count($recurrence_ids)) {
939 $this->tpl->setOnScreenMessage(
'failure', $this->
lng->txt(
'select_one'),
true);
940 $this->
ctrl->redirect($this,
'askDelete');
943 $this->
ctrl->returnToParent($this);
945 foreach ($recurrence_ids as $rdate) {
947 $exclusion->setEntryId($app_id);
952 $this->tpl->setOnScreenMessage(
'success', $this->
lng->txt(
'cal_deleted_app'),
true);
953 $this->
ctrl->returnToParent($this);
959 $this->timezone = $this->
user->getTimeZone();
965 if ($this->
http->wrapper()->query()->has(
'hour')) {
966 $hour = $this->
http->wrapper()->query()->retrieve(
974 $this->default_fulltime =
true;
977 $time =
'0' . $hour .
':00:00';
979 $time = (
int) $hour .
':00:00';
986 $this->default_fulltime =
false;
992 $this->seed = clone
$seed;
993 $this->default_fulltime =
true;
1003 $this->app->setStart($start);
1006 if ($this->default_fulltime) {
1007 #$seed_end->increment(IL_CAL_DAY,1); 1011 $this->app->setEnd($seed_end);
1012 $this->app->setFullday($this->default_fulltime);
1023 $form = $this->
initForm($a_mode, $a_as_milestone);
1024 $this->
form->checkInput();
1026 if ($a_as_milestone) {
1027 $this->app->setMilestone(
true);
1028 $this->app->setCompletion((
int) $form->
getInput(
'completion'));
1031 $this->app->setTitle($form->
getInput(
'title'));
1032 $this->app->setLocation($form->
getInput(
'location'));
1033 $this->app->setDescription($form->
getInput(
'description'));
1034 $this->app->enableNotification((
bool) $form->
getInput(
'not'));
1036 if ($a_as_milestone) {
1037 $start = $this->
form->getItemByPostVar(
'event_start');
1038 $start = $start->getDate();
1039 $this->app->setFullday(
true);
1041 $this->app->setStart($start);
1042 $this->app->setEnd($start);
1044 $period = $this->
form->getItemByPostVar(
'event');
1045 $start = $period->getStart();
1046 $end = $period->getEnd();
1048 $this->app->setFullday($start instanceof
ilDate);
1049 $this->app->setStart($start);
1050 $this->app->setEnd($end);
1062 foreach ((array) $form->
getInput(
'notu') as $rcp) {
1068 if (in_array($rcp, $map)) {
1098 switch ($this->rec->getFrequenceType()) {
1102 if ($this->rec->getRecurrenceId()) {
1103 $this->rec->delete();
1108 if ($this->rec->getRecurrenceId()) {
1109 $this->rec->update();
1122 $cat->setTitle($this->
lng->txt(
'cal_default_calendar'));
1123 $cat->setObjId($this->
user->getId());
1137 if ($this->
http->wrapper()->query()->has(
'dstart')) {
1138 $dstart = $this->
http->wrapper()->query()->retrieve(
1144 if ($this->
http->wrapper()->query()->has(
'dend')) {
1145 $dend = $this->
http->wrapper()->query()->retrieve(
1159 $this->
ctrl->setParameter($this,
'dstart', $dstart);
1160 $this->
ctrl->setParameter($this,
'dend', $dend);
1162 $conf->setFormAction($this->
ctrl->getFormAction($this));
1163 $conf->setHeaderText($this->
lng->txt(
'cal_confirm_reg_info'));
1164 $conf->setConfirm($this->
lng->txt(
'cal_reg_register'),
'register');
1165 $conf->setCancel($this->
lng->txt(
'cancel'),
'cancel');
1166 $conf->addItem(
'app_id', (
string) $entry->getEntryId(), $entry->getTitle() .
' (' . $start .
')');
1167 $this->tpl->setContent($conf->getHTML());
1170 protected function register():
void 1173 if ($this->
http->wrapper()->query()->has(
'dstart')) {
1174 $dstart = $this->
http->wrapper()->query()->retrieve(
1180 if ($this->
http->wrapper()->query()->has(
'dend')) {
1181 $dend = $this->
http->wrapper()->query()->retrieve(
1187 if ($this->
http->wrapper()->post()->has(
'app_id')) {
1188 $app_id = $this->
http->wrapper()->post()->retrieve(
1195 $this->
user->getId(),
1200 $this->tpl->setOnScreenMessage(
'success', $this->
lng->txt(
'cal_reg_registered'),
true);
1201 $this->
ctrl->returnToParent($this);
1207 if ($this->
http->wrapper()->query()->has(
'dstart')) {
1208 $dstart = $this->
http->wrapper()->query()->retrieve(
1214 if ($this->
http->wrapper()->query()->has(
'dend')) {
1215 $dend = $this->
http->wrapper()->query()->retrieve(
1228 $this->
ctrl->setParameter($this,
'dstart', (
int) $dstart);
1229 $this->
ctrl->setParameter($this,
'dend', (
int) $dend);
1232 $conf->setFormAction($this->
ctrl->getFormAction($this));
1233 $conf->setHeaderText($this->
lng->txt(
'cal_confirm_unreg_info'));
1234 $conf->setConfirm($this->
lng->txt(
'cal_reg_unregister'),
'unregister');
1235 $conf->setCancel($this->
lng->txt(
'cancel'),
'cancel');
1236 $conf->addItem(
'app_id', (
string) $entry->getEntryId(), $entry->getTitle() .
' (' . $start .
')');
1238 $this->tpl->setContent($conf->getHTML());
1247 if ($this->
http->wrapper()->query()->has(
'dstart')) {
1248 $dstart = $this->
http->wrapper()->query()->retrieve(
1254 if ($this->
http->wrapper()->query()->has(
'dend')) {
1255 $dend = $this->
http->wrapper()->query()->retrieve(
1261 if ($this->
http->wrapper()->post()->has(
'app_id')) {
1262 $app_id = $this->
http->wrapper()->post()->retrieve(
1269 $this->
user->getId(),
1274 $this->tpl->setOnScreenMessage(
'success', $this->
lng->txt(
'cal_reg_unregistered'),
true);
1275 $this->
ctrl->returnToParent($this);
1284 $this->
ctrl->saveParameter($this,
'app_id');
1287 $booking = new \ilBookingEntry($entry->getContextId());
1288 $user = $booking->getObjId();
1297 $this->tpl->setContent($form->
getHTML());
1333 if (!$booking->isAppointmentBookableForUser($entry,
$GLOBALS[
'DIC'][
'ilUser']->getId())) {
1334 $this->tpl->setOnScreenMessage(
'failure', $this->
lng->txt(
'cal_booking_failed_info'),
true);
1335 $this->
ctrl->returnToParent($this);
1341 $this->tpl->setOnScreenMessage(
'success', $this->
lng->txt(
'cal_booking_confirmed'),
true);
1342 $this->
ctrl->returnToParent($this);
1357 if (!$booking->hasBooked($entry->getEntryId())) {
1358 $this->
ctrl->returnToParent($this);
1364 $entry_title =
' ' . $entry->getTitle();
1366 $this->
ctrl->returnToParent($this);
1373 $conf->setFormAction($this->
ctrl->getFormAction($this));
1374 $conf->setHeaderText($this->
lng->txt(
'cal_cancel_booking_info'));
1375 $conf->setConfirm($this->
lng->txt(
'cal_cancel_booking'),
'cancelconfirmed');
1376 $conf->setCancel($this->
lng->txt(
'cancel'),
'cancel');
1377 $conf->addItem(
'app_id', (
string) $entry->getEntryId(), $title .
' - ' . $entry_title);
1379 $this->tpl->setContent($conf->getHTML());
1389 if ($this->
http->wrapper()->post()->has(
'app_id')) {
1390 $app_id = $this->
http->wrapper()->post()->retrieve(
1400 $this->
user->getId(),
1401 $entry->getContextId(),
1408 foreach ($apps as $own_app) {
1410 $ref_entry->delete();
1425 $this->tpl->setOnScreenMessage(
'success', $this->
lng->txt(
'cal_cancel_booking_confirmed'),
true);
1426 $this->
ctrl->returnToParent($this);
__construct(ilDate $seed, ilDate $initialDate, int $a_appointment_id=0)
initAppointment(int $a_app_id=0)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
cancelConfirmed()
Cancel consultation appointment or ressource booking, was confirmed This will delete the calendar ent...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
static _lookupCategory(int $a_cal_id)
ilCalendarUserNotification $notification
deleteExclude(bool $a_return=true)
static _lookupFullname(int $a_user_id)
const PRIVACY_MODE_RESPECT_USER_SETTING
static _getFirstRecurrence($a_cal_id)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
Distributes calendar mail notifications.
static _getAllReferences(int $id)
get all reference ids for object ID
distributeNotifications(int $a_cat_id, int $app_id, bool $a_new_appointment=true)
static initDomEvent(?ilGlobalTemplateInterface $a_main_tpl=null)
Init YUI DomEvent used in Services/Calendar, Modules/Session, Modules/Test (Jan 2022) ...
addMilestone()
add milestone
static formatDate(ilDateTime $date, bool $a_skip_day=false, bool $a_include_wd=false, bool $include_seconds=false)
get(int $a_format, string $a_format_str='', string $a_tz='')
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
initInitialDate(ilDate $initialDate)
increment(string $a_type, int $a_count=1)
static writeBookingMessage(int $a_entry_id, int $a_usr_id, string $a_message)
Write booking message.
saveMilestoneResponsibleUsers()
Save milestone responsibilites.
loadNotificationRecipients(ilPropertyFormGUI $form)
Stores calendar categories.
add(?ilPropertyFormGUI $form=null)
add new appointment
static _getRecurrences(int $a_cal_id)
get all recurrences of an appointment
unregister()
Unregister calendar, was confirmed.
askEdit()
Check edit single apppointment / edit all appointments for recurring appointments.
TableGUI class for selection of milestone responsibles.
setRecurrence(int $a_type)
set type of recurrence public
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
static _lookupObjId(int $ref_id)
static _lookupCategoryIdByObjId(int $a_obj_id)
lookup category by obj_id
setValue(string $a_value)
static bookAppointment(int $a_usr_id, int $a_app_id)
Book an appointment.
const TYPE_GRP_NEW_NOTIFICATION
static getAppointmentIds(int $a_user_id, int $a_context_id=null, ?ilDateTime $a_start=null, ?int $a_type=null, bool $a_check_owner=true)
static http()
Fetches the global http state from ILIAS.
ilGlobalTemplateInterface $tpl
static _deleteByAppointmentId(int $a_app_id)
Delete appointment assignment.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
distributeUserNotifications()
Send mail to selected users.
initForm(string $a_mode, bool $a_as_milestone=false, bool $a_edit_single_app=false)
getRecurrenceDateFromQuery()
calendarEntryToCategory(ilCalendarEntry $entry)
Get category object of given calendar entry.
static _loginExists(string $a_login, int $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...
registration for calendar appointments
static _getStaticLink(?int $a_ref_id, string $a_type='', bool $a_fallback_goto=true, string $append="")
Get static link.
RequestInterface $request
cancelBooking(int $a_entry_id, ?int $a_user_id=null)
cancel calendar booking for user
setRecipients(array $a_rcps)
const TYPE_CRS_NOTIFICATION
if(!defined('PATH_SEPARATOR')) $GLOBALS['_PEAR_default_error_mode']
addAssignment(int $a_cal_cat_id)
setStatus(?int $a_status)
Set booking status.
save(bool $a_as_milestone=false)
static _getInstance($a_usr_id=0)
get singleton instance
edit(bool $a_edit_single_app=false, ilPropertyFormGUI $form=null)
edit appointment
form( $class_path, string $cmd)
cancelBooking()
Confirmation screen to cancel consultation appointment or ressource booking depends on calendar categ...
getAppointmentIdFromQuery()
bookconfirmed()
Book consultation appointment, was confirmed.
load($a_mode, $a_as_milestone=false)
ilCalendarRecurrence $rec
Error Handling & global info handling uses PEAR error class.
static formatPeriod(ilDateTime $start, ilDateTime $end, bool $a_skip_starting_day=false)
Format a period of two dates Shows: 14.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
editSingle()
Edit one single appointment ^.
Administrate calendar appointments.
static deleteCalendarEntry(int $a_cal_id)
This class represents a text area property in a property form.
const TYPE_GRP_NOTIFICATION
static _equals(ilDateTime $start, ilDateTime $end, string $a_compare_field='', string $a_tz='')
Check if two date are equal.
Stores exclusion dates for calendar recurrences.
RefineryFactory $refinery
static _lookupType(int $id, bool $reference=false)
book()
Confirmation screen for booking of consultation appointment.
const TYPE_CRS_NEW_NOTIFICATION
loadRecurrenceSettings(ilPropertyFormGUI $form, bool $a_as_milestone=false)
const TYPE_USER_ANONYMOUS
showResponsibleUsersList(int $a_grp_id)
Show responsible uses of a milestone (default set is participants of group)
confirmRegister()
Register to an appointment.
Class ilCalendarRecurrenceTableGUI.
getFirstAssignment()
get first assignment
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
getRecurrenceExclusionFromQuery()
static _lookupLogin(int $a_user_id)