19 declare(strict_types=1);
70 $this->
lng = $DIC->language();
71 $this->
lng->loadLanguageModule(
'dateplaner');
72 $this->
ctrl = $DIC->ctrl();
73 $this->tpl = $DIC->ui()->mainTemplate();
74 $this->
logger = $DIC->logger()->cal();
75 $this->
user = $DIC->user();
77 $this->
tabs = $DIC->tabs();
78 $this->
help = $DIC->help();
79 $this->error = $DIC[
'ilErr'];
80 $this->ui_factory = $DIC->ui()->factory();
81 $this->ui_renderer = $DIC->ui()->renderer();
82 $this->
http = $DIC->http();
84 $this->request = $DIC->http()->request();
95 if ($this->
http->wrapper()->query()->has(
'app_id')) {
96 return $this->
http->wrapper()->query()->retrieve(
107 if ($this->
http->wrapper()->post()->has(
'rexl')) {
108 $val = $this->
http->wrapper()->post()->retrieve(
113 if ($val === 0 && $this->
http->wrapper()->query()->has(
'rexl')) {
114 $val = $this->
http->wrapper()->query()->retrieve(
124 if ($this->
http->wrapper()->query()->has(
'dt')) {
125 return $this->
http->wrapper()->query()->retrieve(
136 $this->
tabs->clearTargets();
137 if ($this->
http->wrapper()->query()->has(
'app_id')) {
138 $this->
ctrl->saveParameter($this,
'app_id');
140 $this->
tabs->setBackTarget(
141 $this->
lng->txt(
'cal_back_to_cal'),
142 $this->
ctrl->getLinkTarget($this,
'cancel')
145 $next_class = $this->
ctrl->getNextClass($this);
146 switch ($next_class) {
148 $cmd = $this->
ctrl->getCmd(
"add");
161 $this->
ctrl->returnToParent($this);
164 protected function initForm(
string $a_mode,
bool $a_edit_single_app =
false): Form
170 $description_input = $this->ui_factory->input()->field()->textarea($this->
lng->txt(
'description'))
171 ->
withValue($this->app->getDescription());
173 $title_input = $this->ui_factory->input()->field()->text($this->
lng->txt(
'title'))
175 ->withValue($this->app->getTitle())
180 $start_time =
new DateTimeImmutable(
'@' . $this->app->getStart()->getUnixTime());
183 $duration_datetime_input = $this->ui_factory->input()->field()->duration(
184 $this->
lng->txt(
'cal_duration')
185 )->withTimezone($this->
user->getTimeZone())
186 ->withLabels($this->
lng->txt(
'cal_duration_start'), $this->
lng->txt(
'cal_duration_end'))
193 $datetime_group = $this->ui_factory->input()->field()->group(
194 [$duration_datetime_input],
195 $this->
lng->txt(
'cal_date_time_title')
198 $duration_date_input = $this->ui_factory->input()->field()->duration(
199 $this->
lng->txt(
'cal_duration')
200 )->withTimezone(
'UTC')
201 ->withLabels($this->
lng->txt(
'cal_duration_start'), $this->
lng->txt(
'cal_duration_end'))
204 ->withValue([$start_time, $end_time]);
205 $date_group = $this->ui_factory->input()->field()->group(
206 [$duration_date_input],
207 $this->
lng->txt(
'cal_fullday_title')
210 $event_input = $this->ui_factory->input()->field()->switchableGroup(
211 [
'with_time' => $datetime_group,
'full_day' => $date_group],
212 $this->
lng->txt(
'appointment')
213 )->
withValue($this->app->isFullday() ?
'full_day' :
'with_time')
214 ->withRequired(
true);
216 $rec_factory =
new RecurrenceInputFactory(
222 $recurrence_input = $rec_factory->build($this->rec)->get();
224 $location_input = $this->ui_factory->input()->field()->text($this->
lng->txt(
'cal_where'))
232 $calendar_input = $this->ui_factory->input()->field()->select(
233 $this->
lng->txt(
'cal_category_selection'),
234 $cats->prepareCategoriesOfUserForSelection()
235 )->withRequired(
true)
236 ->withValue($selected_calendar);
244 foreach ($this->
notification->getRecipients() as $rcp) {
245 switch ($rcp[
'type']) {
251 $values[] = $rcp[
'email'];
260 $notif_inputs[
'notu'] = $this->ui_factory->input()->field()->tag(
261 $this->
lng->txt(
'cal_user_notification'),
263 $this->
lng->txt(
'cal_user_notification_info')
276 $this->tpl->addJavaScript(
'assets/js/toggle_notification.js');
278 $notif_inputs[
'not'] = $this->ui_factory->input()->field()->checkbox(
279 $this->
lng->txt(
'cal_cg_notification'),
280 $this->
lng->txt(
'cal_notification_info')
281 )->
withValue($this->app->isNotificationEnabled())
282 ->withDisabled($disabled)
283 ->withDedicatedName(
'cal_cg_notif_checkbox');
285 $notification_cals = $cats->getNotificationCalendars();
286 $notification_cals = count($notification_cals) ? implode(
',', $notification_cals) :
'';
287 $calendar_input = $calendar_input->withAdditionalOnLoadCode(
function (
$id) use ($notification_cals) {
288 return 'il.CalendarAppointmentNotificationToggler.init(' .
290 '[' . $notification_cals .
'], ' .
291 '"cal_cg_notif_checkbox"' .
298 $section_title = match ($a_mode) {
299 'create' => $this->
lng->txt(
'cal_new_app'),
300 'edit' => $this->
lng->txt(
'cal_edit_appointment'),
302 $sections[] = $this->ui_factory->input()->field()->section(
303 [
'title' => $title_input,
'description' => $description_input],
306 $sections[] = $this->ui_factory->input()->field()->section(
307 [
'event' => $event_input,
'recurrence' => $recurrence_input,
'location' => $location_input],
308 $this->
lng->txt(
'cal_date_and_time'),
310 $sections[] = $this->ui_factory->input()->field()->section(
311 [
'calendar' => $calendar_input],
312 $this->
lng->txt(
'cal_belongs_to'),
314 if (!empty($notif_inputs)) {
315 $sections[] = $this->ui_factory->input()->field()->section(
317 $this->
lng->txt(
'cal_appointment_notifications'),
323 $this->
ctrl->saveParameter($this, [
'seed',
'idate']);
324 $action = $this->
ctrl->getLinkTarget($this,
'save');
325 $submit_label = $this->
lng->txt(
'cal_add_appointment');
328 $this->
ctrl->saveParameter($this, [
'seed',
'app_id',
'idate']);
329 $action = $this->
ctrl->getLinkTarget($this,
'update');
330 $submit_label = $this->
lng->txt(
'save');
335 $form = $this->ui_factory->input()->container()->form()->standard(
338 )->withSubmitLabel($submit_label)
339 ->withAdditionalTransformation($this->
refinery->custom()->transformation(
function ($vs) {
342 foreach ($vs as $v) {
353 if ($this->
http->wrapper()->query()->has(
'category_id')) {
354 $category_id = $this->
http->wrapper()->query()->retrieve(
360 if ($this->
http->wrapper()->query()->has(
'ref_id')) {
361 $ref_id = $this->
http->wrapper()->query()->retrieve(
366 $selected_calendar = 0;
367 if ($this->
http->wrapper()->post()->has(
'calendar')) {
368 $selected_calendar = $this->
http->wrapper()->post()->retrieve(
374 if ($selected_calendar > 0) {
375 return $selected_calendar;
379 return (
int) $category_id;
382 if ($mode ==
'edit') {
391 $cats->readSingleCalendar($selected_calendar);
392 return $selected_calendar;
396 $categories = $cats->prepareCategoriesOfUserForSelection();
397 return key($categories);
408 return json_encode(
new stdClass(), JSON_THROW_ON_ERROR);
410 if (!$this->
http->wrapper()->query()->has(
'autoCompleteField')) {
417 $result_field =
'login';
419 $auto_complete_field = $this->
http->wrapper()->query()->retrieve(
421 $this->
refinery->kindlyTo()->string()
423 $a_fields = [$auto_complete_field];
424 $result_field = $auto_complete_field;
429 if ($this->
http->wrapper()->query()->has(
'fetchall')) {
433 $auto->setMoreLinkAvailable(
true);
434 $auto->setSearchFields($a_fields);
435 $auto->setResultField($result_field);
436 $auto->enableFieldSearchableCheck(
true);
438 if ($this->
http->wrapper()->post()->has(
'term')) {
439 $query = $this->
http->wrapper()->post()->retrieve(
441 $this->
refinery->kindlyTo()->string()
445 if ($this->
http->wrapper()->query()->has(
'term')) {
446 $query = $this->
http->wrapper()->query()->retrieve(
448 $this->
refinery->kindlyTo()->string()
452 echo $auto->getList($query);
459 protected function add(?Form $form =
null): void
461 $this->
help->setScreenIdComponent(
"cal");
462 $this->
help->setScreenId(
"app");
463 $this->
help->setSubScreenId(
"create");
466 $form = $this->initForm(
'create');
468 $this->tpl->setContent($this->ui_renderer->render($form));
471 protected function save(): void
473 $data = $this->load(
'create');
476 if ((
int)
$data[
'calendar'] === 0) {
483 $this->
notification->setEntryId($this->app->getEntryId());
485 $this->rec->setEntryId($this->app->getEntryId());
494 (
$data[
'not'] ??
false)
502 $this->tpl->setOnScreenMessage(
'success', $this->
lng->txt(
'cal_created_appointment'),
true);
503 $this->
ctrl->returnToParent($this);
505 if (
$data && $this->error->getMessage() !==
'') {
506 $this->tpl->setOnScreenMessage(
'failure', $this->error->getMessage());
508 $this->tpl->setOnScreenMessage(
'failure', $this->
lng->txt(
'err_check_input'));
522 $notification->setAppointmentId($this->app->getEntryId());
524 foreach ($this->
notification->getRecipients() as $rcp) {
525 switch ($rcp[
'type']) {
538 $notification->send();
547 $notification->setAppointmentId($app_id);
549 switch ($cat_info[
'type']) {
552 switch ($cat_info[
'obj_type']) {
556 $notification->setRefId(
$ref_id);
557 $notification->setType(
567 $notification->setRefId(
$ref_id);
568 $notification->setType(
577 $notification->send();
592 $this->
ctrl->saveParameter($this, array(
'seed',
'app_id',
'dt',
'idate'));
595 $confirm->setHeaderText($this->
lng->txt(
'cal_edit_single_or_all_info'));
596 $confirm->setFormAction($this->
ctrl->getFormAction($this));
597 $confirm->setCancel($this->
lng->txt(
'cancel'),
'cancel');
598 $confirm->addItem(
'appointments[]', (
string) $this->app->getEntryId(), $this->app->getTitle());
599 $confirm->addButton($this->
lng->txt(
'cal_edit_single'),
'editSingle');
600 $confirm->setConfirm($this->
lng->txt(
'cal_edit_recurrences'),
'edit');
602 $this->tpl->setContent($confirm->getHTML());
610 $this->
ctrl->setParameter($this,
'rexl',
"1");
611 $this->requested_rexl =
true;
618 protected function edit(
bool $a_edit_single_app =
false, ?Form $form =
null): void
620 $this->
help->setScreenIdComponent(
"cal");
621 $this->
help->setScreenId(
"app");
622 $this->
help->setSubScreenId(
"edit");
624 $this->
ctrl->saveParameter($this, array(
'seed',
'app_id',
'dt',
'idate'));
625 if ($this->requested_rexl) {
626 $this->
ctrl->setParameter($this,
'rexl', 1);
633 $yesterday = clone $current_date;
635 $tomorrow = clone $current_date;
638 foreach ($calc->calculateDateList($current_date, $tomorrow, 1) as $date_entry) {
655 if (!$cats->isVisible($cat_id)) {
656 $this->error->raiseError($this->
lng->txt(
'permission_denied'), $this->error->WARNING);
659 if (!$cats->isEditable($cat_id) or $this->app->isAutoGenerated()) {
664 $form = $this->initForm(
'edit', $a_edit_single_app);
666 $this->tpl->setContent($this->ui_renderer->render($form));
672 $info->setFormAction($this->
ctrl->getFormAction($this));
673 $info->addSection($this->
lng->txt(
'cal_details'));
677 $this->
lng->txt(
'appointment'),
679 $this->app->getStart(),
683 $info->addProperty($this->
lng->txt(
'title'), $this->app->getPresentationTitle());
686 if (strlen($desc = $this->app->getDescription())) {
687 $info->addProperty($this->
lng->txt(
'description'), $desc);
691 if (strlen($loc = $this->app->getLocation())) {
692 $info->addProperty($this->
lng->txt(
'cal_where'), $loc);
699 $info->addSection($this->
lng->txt(
'additional_info'));
706 $this->
lng->txt(
'perma_link'),
707 '<a class="small" href="' . $href .
'" target="_top">' . $href .
'</a>' 710 $this->tpl->setContent(
$info->getHTML());
716 $data = $this->load(
'edit');
719 if (!(
int)
$data[
'calendar']) {
725 if ($single_editing) {
729 if ($selected_ut > 0) {
731 $exclusion->setEntryId($original_id);
746 $ass->addAssignment($cat_id);
749 $notification = (bool) (
$data[
'not'] ??
false);
760 $this->tpl->setOnScreenMessage(
'success', $this->
lng->txt(
'msg_obj_modified'),
true);
761 $this->
ctrl->returnToParent($this);
762 } elseif (
$data && $this->error->getMessage() !==
'') {
763 $this->tpl->setOnScreenMessage(
'failure', $this->error->getMessage());
765 $this->tpl->setOnScreenMessage(
'failure', $this->
lng->txt(
'err_check_input'));
772 $this->
ctrl->saveParameter(
782 $app_id = (
int) ($this->request->getQueryParams()[
'app_id'] ?? 0);
784 $this->tpl->setOnScreenMessage(
'failure', $this->
lng->txt(
'err_check_input'));
785 $this->
ctrl->returnToParent($this);
791 $confirm->setFormAction($this->
ctrl->getFormAction($this));
792 $confirm->setHeaderText($this->
lng->txt(
'cal_delete_app_sure'));
793 $confirm->setCancel($this->
lng->txt(
'cancel'),
'cancel');
794 $confirm->addItem(
'appointments[]', (
string) $this->app->getEntryId(), $this->app->getTitle());
795 $confirm->setConfirm($this->
lng->txt(
'delete'),
'delete');
796 $this->tpl->setContent($confirm->getHTML());
805 $this->tpl->setContent($table->getHTML());
806 $this->tpl->setOnScreenMessage(
'question', $this->
lng->txt(
'cal_delete_app_sure'));
807 $this->tpl->setOnScreenMessage(
'info', $this->
lng->txt(
'cal_recurrence_confirm_deletion'));
811 protected function delete():
void 813 $app_ids = (array) ($this->request->getParsedBody()[
'appointment_ids'] ?? []);
815 $this->
logger->dump($app_ids);
816 $app_ids = (array) ($this->request->getQueryParams()[
'app_id'] ?? []);
819 $this->
ctrl->returnToParent($this);
821 foreach ($app_ids as $app_id) {
822 $app_id = (
int) $app_id;
828 $this->tpl->setOnScreenMessage(
'success', $this->
lng->txt(
'cal_deleted_app'),
true);
829 $this->
ctrl->returnToParent($this);
834 $recurrence_ids = (array) ($this->request->getParsedBody()[
'recurrence_ids'] ?? []);
835 $app_id = (
int) ($this->request->getQueryParams()[
'app_id'] ?? 0);
836 if (!count($recurrence_ids)) {
837 $this->tpl->setOnScreenMessage(
'failure', $this->
lng->txt(
'select_one'),
true);
838 $this->
ctrl->redirect($this,
'askDelete');
841 $this->
ctrl->returnToParent($this);
843 foreach ($recurrence_ids as $rdate) {
845 $exclusion->setEntryId($app_id);
850 $this->tpl->setOnScreenMessage(
'success', $this->
lng->txt(
'cal_deleted_app'),
true);
851 $this->
ctrl->returnToParent($this);
857 $this->timezone = $this->
user->getTimeZone();
863 if ($this->
http->wrapper()->query()->has(
'hour')) {
864 $hour = $this->
http->wrapper()->query()->retrieve(
872 $this->default_fulltime =
true;
875 $time =
'0' . $hour .
':00:00';
877 $time = (
int) $hour .
':00:00';
884 $this->default_fulltime =
false;
890 $this->seed = clone
$seed;
891 $this->default_fulltime =
true;
901 $this->app->setStart($start);
904 if ($this->default_fulltime) {
905 #$seed_end->increment(IL_CAL_DAY,1); 909 $this->app->setEnd($seed_end);
910 $this->app->setFullday($this->default_fulltime);
918 protected function load($a_mode): ?array
921 $this->
form = $this->initForm($a_mode)->withRequest($this->request);
927 $this->app->setTitle(
$data[
'title']);
928 $this->app->setLocation(
$data[
'location']);
929 $this->app->setDescription(
$data[
'description']);
931 $this->app->enableNotification((
bool) (
$data[
'not'] ??
false));
935 $start_datetime =
$data[
'event'][1][0][
'start'];
937 $end_datetime =
$data[
'event'][1][0][
'end'];
938 $full_day =
$data[
'event'][0] ===
'full_day';
947 $this->app->setFullday($full_day);
948 $this->app->setStart($start);
949 $this->app->setEnd($end);
965 foreach ($recipients as $rcp) {
971 if (in_array($rcp, $map)) {
993 $this->rec = $recurrence;
1001 switch ($this->rec->getFrequenceType()) {
1005 if ($this->rec->getRecurrenceId()) {
1006 $this->rec->delete();
1011 if ($this->rec->getRecurrenceId()) {
1012 $this->rec->update();
1025 $cat->setTitle($this->
lng->txt(
'cal_default_calendar'));
1026 $cat->setObjId($this->
user->getId());
1040 if ($this->
http->wrapper()->query()->has(
'dstart')) {
1041 $dstart = $this->
http->wrapper()->query()->retrieve(
1047 if ($this->
http->wrapper()->query()->has(
'dend')) {
1048 $dend = $this->
http->wrapper()->query()->retrieve(
1062 $this->
ctrl->setParameter($this,
'dstart', $dstart);
1063 $this->
ctrl->setParameter($this,
'dend', $dend);
1065 $conf->setFormAction($this->
ctrl->getFormAction($this));
1066 $conf->setHeaderText($this->
lng->txt(
'cal_confirm_reg_info'));
1067 $conf->setConfirm($this->
lng->txt(
'cal_reg_register'),
'register');
1068 $conf->setCancel($this->
lng->txt(
'cancel'),
'cancel');
1069 $conf->addItem(
'app_id', (
string) $entry->getEntryId(), $entry->getTitle() .
' (' . $start .
')');
1070 $this->tpl->setContent($conf->getHTML());
1073 protected function register():
void 1076 if ($this->
http->wrapper()->query()->has(
'dstart')) {
1077 $dstart = $this->
http->wrapper()->query()->retrieve(
1083 if ($this->
http->wrapper()->query()->has(
'dend')) {
1084 $dend = $this->
http->wrapper()->query()->retrieve(
1090 if ($this->
http->wrapper()->post()->has(
'app_id')) {
1091 $app_id = $this->
http->wrapper()->post()->retrieve(
1098 $this->
user->getId(),
1103 $this->tpl->setOnScreenMessage(
'success', $this->
lng->txt(
'cal_reg_registered'),
true);
1104 $this->
ctrl->returnToParent($this);
1110 if ($this->
http->wrapper()->query()->has(
'dstart')) {
1111 $dstart = $this->
http->wrapper()->query()->retrieve(
1117 if ($this->
http->wrapper()->query()->has(
'dend')) {
1118 $dend = $this->
http->wrapper()->query()->retrieve(
1131 $this->
ctrl->setParameter($this,
'dstart', (
int) $dstart);
1132 $this->
ctrl->setParameter($this,
'dend', (
int) $dend);
1135 $conf->setFormAction($this->
ctrl->getFormAction($this));
1136 $conf->setHeaderText($this->
lng->txt(
'cal_confirm_unreg_info'));
1137 $conf->setConfirm($this->
lng->txt(
'cal_reg_unregister'),
'unregister');
1138 $conf->setCancel($this->
lng->txt(
'cancel'),
'cancel');
1139 $conf->addItem(
'app_id', (
string) $entry->getEntryId(), $entry->getTitle() .
' (' . $start .
')');
1141 $this->tpl->setContent($conf->getHTML());
1150 if ($this->
http->wrapper()->query()->has(
'dstart')) {
1151 $dstart = $this->
http->wrapper()->query()->retrieve(
1157 if ($this->
http->wrapper()->query()->has(
'dend')) {
1158 $dend = $this->
http->wrapper()->query()->retrieve(
1164 if ($this->
http->wrapper()->post()->has(
'app_id')) {
1165 $app_id = $this->
http->wrapper()->post()->retrieve(
1172 $this->
user->getId(),
1177 $this->tpl->setOnScreenMessage(
'success', $this->
lng->txt(
'cal_reg_unregistered'),
true);
1178 $this->
ctrl->returnToParent($this);
1187 $this->
ctrl->saveParameter($this,
'app_id');
1190 $booking = new \ilBookingEntry($entry->getContextId());
1191 $user = $booking->getObjId();
1200 $this->tpl->setContent($form->getHTML());
1206 $form->setFormAction($this->
ctrl->getFormAction($this));
1207 $form->addCommandButton(
'bookconfirmed', $this->
lng->txt(
'cal_confirm_booking'));
1208 $form->addCommandButton(
'cancel', $this->
lng->txt(
'cancel'));
1211 $form->addItem($date);
1214 $form->addItem($title);
1230 if ($form->checkInput()) {
1236 if (!$booking->isAppointmentBookableForUser($entry,
$GLOBALS[
'DIC'][
'ilUser']->getId())) {
1237 $this->tpl->setOnScreenMessage(
'failure', $this->
lng->txt(
'cal_booking_failed_info'),
true);
1238 $this->
ctrl->returnToParent($this);
1243 $this->tpl->setOnScreenMessage(
'success', $this->
lng->txt(
'cal_booking_confirmed'),
true);
1244 $this->
ctrl->returnToParent($this);
1264 if (!$booking->hasBooked($entry->getEntryId()) && !$booking->isOwner()) {
1265 $this->
ctrl->returnToParent($this);
1270 $entry_title =
' ' . $entry->getTitle();
1272 $this->
ctrl->returnToParent($this);
1277 $conf->setFormAction($this->
ctrl->getFormAction($this));
1278 $conf->setHeaderText(
1280 $this->
lng->txt(
'cal_cancel_booking_info') :
1281 $this->
lng->txt(
'cal_delete_booking_info')
1285 $this->
lng->txt(
'cal_cancel_booking') :
1286 $this->
lng->txt(
'delete'),
1291 $conf->setCancel($this->
lng->txt(
'cancel'),
'cancel');
1292 $conf->addItem(
'app_id', (
string) $entry->getEntryId(), $title .
' - ' . $entry_title);
1293 $this->tpl->setContent($conf->getHTML());
1308 if ($this->
http->wrapper()->post()->has(
'app_id')) {
1309 $app_id = $this->
http->wrapper()->post()->retrieve(
1318 foreach ($booking->getCurrentBookings($entry->getEntryId()) as $bookuser) {
1328 $this->
user->getId(),
1329 $entry->getContextId(),
1336 foreach ($apps as $own_app) {
1338 $ref_entry->delete();
1342 $booking->cancelBooking($entry->getEntryId());
1353 $this->tpl->setOnScreenMessage(
'success', $this->
lng->txt(
'cal_cancel_booking_confirmed'),
true);
1354 $this->
ctrl->returnToParent($this);
__construct(ilDate $seed, ilDate $initialDate, int $a_appointment_id=0)
edit(bool $a_edit_single_app=false, ?Form $form=null)
edit appointment
initAppointment(int $a_app_id=0)
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)
static getAppointmentIds(int $a_user_id, ?int $a_context_id=null, ?ilDateTime $a_start=null, ?int $a_type=null, bool $a_check_owner=true)
const PRIVACY_MODE_RESPECT_USER_SETTING
static _getFirstRecurrence($a_cal_id)
loadNotificationRecipients(array $recipients)
Distributes calendar mail notifications.
static _getAllReferences(int $id)
get all reference ids for object ID
static cancelBooking(int $a_usr_id, int $a_app_id, bool $a_send_notification=true)
Cancel a booking.
distributeNotifications(int $a_cat_id, int $app_id, bool $a_new_appointment=true)
get(int $a_format, string $a_format_str='', string $a_tz='')
add(?Form $form=null)
add new appointment
initInitialDate(ilDate $initialDate)
doUserAutoComplete()
Currently not in use, but will be as soon as tag inputs support autocomplete, see ilCalendarAppointme...
increment(string $a_type, int $a_count=1)
Stores calendar categories.
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.
static _getInstanceByUserId(int $a_user_id)
notification()
description: > Example for rendring a notification glyph.
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
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
const TYPE_GRP_NEW_NOTIFICATION
cancelBooking(bool $send_mail=true)
Confirmation screen to cancel consultation appointment or ressource booking depends on calendar categ...
static http()
Fetches the global http state from ILIAS.
ilGlobalTemplateInterface $tpl
static _deleteByAppointmentId(int $a_app_id)
Delete appointment assignment.
Calculates an ilDateList for a given calendar entry and recurrence rule.
distributeUserNotifications()
Send mail to selected users.
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="")
RequestInterface $request
setRecipients(array $a_rcps)
const TYPE_CRS_NOTIFICATION
addAssignment(int $a_cal_cat_id)
setStatus(?int $a_status)
Set booking status.
static _getInstance($a_usr_id=0)
get singleton instance
getAppointmentIdFromQuery()
bookconfirmed()
Book consultation appointment, was confirmed.
loadRecurrenceSettings(?ilCalendarRecurrence $recurrence)
ilCalendarRecurrence $rec
form( $class_path, string $cmd, string $submit_caption="")
editSingle()
Edit one single appointment ^.
Administrate calendar appointments.
static deleteCalendarEntry(int $a_cal_id)
$id
plugin.php for ilComponentBuildPluginInfoObjectiveTest::testAddPlugins
This class represents a text area property in a property form.
const TYPE_GRP_NOTIFICATION
static formatDate(ilDateTime $date, bool $a_skip_day=false, bool $a_include_wd=false, bool $include_seconds=false, ?ilObjUser $user=null,)
static _equals(ilDateTime $start, ilDateTime $end, string $a_compare_field='', string $a_tz='')
Check if two date are equal.
static bookAppointment(int $a_usr_id, int $a_app_id, string $comment='')
Book an appointment.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
RefineryFactory $refinery
static _lookupType(int $id, bool $reference=false)
book()
Confirmation screen for booking of consultation appointment.
const TYPE_CRS_NEW_NOTIFICATION
const TYPE_USER_ANONYMOUS
cancelConfirmed(bool $send_mail=true)
Cancel consultation appointment or ressource booking, was confirmed This will delete the calendar ent...
readAndPrepareCalendarSelection(string $mode)
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...
static formatPeriod(ilDateTime $start, ilDateTime $end, bool $a_skip_starting_day=false, ?ilObjUser $user=null)
Format a period of two dates Shows: 14.
getRecurrenceExclusionFromQuery()
static _lookupLogin(int $a_user_id)