ILIAS  release_9 Revision v9.13-25-g2c18ec4c24f
class.ilBookingReservationsGUI.php
Go to the documentation of this file.
1 <?php
2 
24 {
25  protected \ILIAS\BookingManager\BookingProcess\ProcessUtilGUI $util_gui;
27  protected \ILIAS\DI\UIServices $ui;
28  protected \ILIAS\BookingManager\InternalService $service;
29  protected array $raw_post_data;
30  protected \ILIAS\BookingManager\StandardGUIRequest $book_request;
32  protected int $context_obj_id;
33  protected ilCtrl $ctrl;
35  protected ilLanguage $lng;
37  protected ilTabsGUI $tabs_gui;
38  protected ilObjUser $user;
40  protected int $ref_id;
41  protected int $book_obj_id;
42  protected int $pbooked_user;
43  protected string $reservation_id; // see BookingReservationDBRepo, obj_user_(slot)_context
44  protected int $booked_user;
45 
46  public function __construct(
47  ilObjBookingPool $pool,
49  int $context_obj_id = 0
50  ) {
51  global $DIC;
52 
53  $this->tpl = $DIC->ui()->mainTemplate();
54  $this->pool = $pool;
55  $this->ctrl = $DIC->ctrl();
56  $this->ref_id = $pool->getRefId();
57  $this->lng = $DIC->language();
58  $this->access = $DIC->access();
59  $this->tabs_gui = $DIC->tabs();
60  $this->help = $help;
61  $this->user = $DIC->user();
62  $this->book_request = $DIC->bookingManager()
63  ->internal()
64  ->gui()
65  ->standardRequest();
66  $this->service = $DIC->bookingManager()->internal();
67  $this->ui = $DIC->ui();
68  $this->toolbar = $DIC->toolbar();
69 
70  $this->book_obj_id = $this->book_request->getObjectId();
71 
72  $this->context_obj_id = $context_obj_id;
73 
74  // user who's reservation is being tackled (e.g. canceled)
75  $this->booked_user = $this->book_request->getBookedUser();
76  if ($this->booked_user === 0) {
77  $this->booked_user = $DIC->user()->getId();
78  }
79  // we get this from the reservation screen
80  $this->reservation_id = $this->book_request->getReservationId();
81 
82  $this->ctrl->saveParameter($this, ["object_id", "bkusr"]);
83 
84  if ($this->book_request->getObjectId() > 0 && ilBookingObject::lookupPoolId($this->book_request->getObjectId()) !== $this->pool->getId()) {
85  throw new ilException("Booking Object ID does not match Booking Pool.");
86  }
87 
88  $this->raw_post_data = $DIC->http()->request()->getParsedBody();
89  $this->util_gui = $DIC->bookingManager()->internal()->gui()->process()->ProcessUtilGUI(
90  $this->pool,
91  $this
92  );
93  }
94 
98  protected function getLogReservationIds(): array
99  {
100  $mrsv = $this->book_request->getReservationIds();
101  if (count($mrsv) > 0) {
102  return $mrsv;
103  }
104  if ($this->reservation_id > 0) {
105  return array($this->reservation_id);
106  }
107  return [];
108  }
109 
110  public function executeCommand(): void
111  {
112  $ctrl = $this->ctrl;
113 
114  $next_class = $ctrl->getNextClass($this);
115  $cmd = $ctrl->getCmd("log");
116 
117  switch ($next_class) {
118  default:
119  if (in_array($cmd, array("log", "logDetails", "changeStatusObject", "rsvConfirmCancelUser", "rsvCancelUser",
120  "applyLogFilter", "resetLogFilter", "rsvConfirmCancel", "rsvCancel", "back", "rsvConfirmDelete", "rsvDelete", "confirmResetRun", "resetRun", "displayPostInfo", "deliverPostFile", "redirectMailToBooker"))) {
121  $this->$cmd();
122  }
123  }
124  }
125 
126  protected function setHelpId(string $a_id): void
127  {
128  $this->help->setHelpId($a_id);
129  }
130 
134  public function log(): void
135  {
136  $tpl = $this->tpl;
138  $table = $this->getReservationsTable();
139  $tpl->setContent($table->getHTML());
140  }
141 
145  protected function getReservationsTable(
146  ?string $reservation_id = null
148  $show_all = ($this->checkPermissionBool('write') || $this->pool->hasPublicLog());
149 
150  $filter = null;
151  if ($this->book_obj_id > 0) {
152  $filter["object"] = $this->book_obj_id;
153  }
154  // coming from participants tab to cancel reservations.
155  if ($this->book_request->getUserId() > 0) {
156  $filter["user_id"] = $this->book_request->getUserId();
157  }
158  $context_filter = ($this->context_obj_id > 0)
159  ? [$this->context_obj_id]
160  : null;
161 
163  $this,
164  'log',
165  $this->ref_id,
166  $this->pool,
167  $show_all,
168  $filter,
169  $reservation_id,
170  $context_filter
171  );
172  }
173 
174  public function logDetails(): void
175  {
176  $tpl = $this->tpl;
177 
178  $this->tabs_gui->clearTargets();
179  $this->tabs_gui->setBackTarget(
180  $this->lng->txt("back"),
181  $this->ctrl->getLinkTarget($this, "log")
182  );
183 
184  $table = $this->getReservationsTable($this->reservation_id);
185  $tpl->setContent($table->getHTML());
186  }
187 
191  public function changeStatusObject(): void
192  {
193  $rsv_ids = $this->book_request->getReservationIds();
194  if (count($rsv_ids) === 0) {
195  $this->tpl->setOnScreenMessage('failure', $this->lng->txt('select_one'));
196  $this->log();
197  }
198 
199  if ($this->checkPermissionBool('write')) {
201  $rsv_ids,
202  $this->book_request->getStatus()
203  );
204  }
205 
206  $this->tpl->setOnScreenMessage('success', $this->lng->txt('settings_saved'), true);
207  $this->ctrl->redirect($this, 'log');
208  }
209 
210  public function applyLogFilter(): void
211  {
212  $table = $this->getReservationsTable();
213  $table->resetOffset();
214  $table->writeFilterToSession();
215  $this->log();
216  }
217 
218  public function resetLogFilter(): void
219  {
220  $table = $this->getReservationsTable();
221  $table->resetOffset();
222  $table->resetFilter();
223  $this->log();
224  }
225 
226  protected function checkPermissionBool(string $a_perm): bool
227  {
228  return $this->access->checkAccess($a_perm, "", $this->ref_id);
229  }
230 
231  //
232  // Cancelation reservations
233  //
234 
244  public function rsvConfirmCancelUser(): void
245  {
246  $ilCtrl = $this->ctrl;
247  $lng = $this->lng;
248  $tpl = $this->tpl;
250  if (!$id) {
251  return;
252  }
253 
254  $this->setHelpId("cancel_booking");
255 
256  $conf = new ilConfirmationGUI();
257  $conf->setFormAction($ilCtrl->getFormAction($this));
258  $conf->setHeaderText($lng->txt('book_confirm_cancel'));
259 
260  $type = new ilBookingObject($id);
261  $conf->addItem('object_id', $id, $type->getTitle());
262  $conf->setConfirm($lng->txt('book_set_cancel'), 'rsvCancelUser');
263  $conf->setCancel($lng->txt('cancel'), 'back');
264 
265  $tpl->setContent($conf->getHTML());
266  }
267 
271  public function rsvCancelUser(): void
272  {
273  $lng = $this->lng;
274 
276  $user_id = $this->booked_user;
277 
278  if (!$id || !$user_id) {
279  return;
280  }
281 
283  $id = current($ids);
284  $obj = new ilBookingReservation($id);
285  if ($obj->getUserId() !== $user_id) {
286  $this->tpl->setOnScreenMessage('failure', $lng->txt('permission_denied'), true);
287  $this->back();
288  }
289 
291  $obj->update();
292 
293  $this->tpl->setOnScreenMessage('success', $lng->txt('settings_saved'), true);
294  $this->back();
295  }
296 
300  protected function back(): void
301  {
302  $this->ctrl->redirect($this, "log");
303  }
304 
308  public function rsvConfirmCancel(): void
309  {
310  $ilCtrl = $this->ctrl;
311  $lng = $this->lng;
312  $tpl = $this->tpl;
313  $ilUser = $this->user;
314 
315  $ids = $this->getLogReservationIds();
316  if (count($ids) === 0) {
317  $this->back();
318  }
319  $max = array();
320  foreach ($ids as $idx => $id) {
321  if (!is_numeric($id)) {
322  [$obj_id, $user_id, $from, $to] = explode("_", $id);
323 
324  $valid_ids = array();
325  foreach (ilBookingObject::getList($this->pool->getId()) as $item) {
326  $valid_ids[$item["booking_object_id"]] = $item["title"];
327  }
328  if (array_key_exists($obj_id, $valid_ids) && $from > time() && ($this->checkPermissionBool("write") || (int) $user_id === $ilUser->getId())) {
329  $rsv_ids = ilBookingReservation::getCancelDetails($obj_id, $user_id, $from, $to);
330  if (!count($rsv_ids)) {
331  unset($ids[$idx]);
332  }
333  if (count($rsv_ids) > 1) {
334  $max[$id] = count($rsv_ids);
335  $ids[$idx] = $rsv_ids;
336  } else {
337  // only 1 in group? treat as normal reservation
338  $ids[$idx] = array_shift($rsv_ids);
339  }
340  } else {
341  unset($ids[$idx]);
342  }
343  }
344  }
345 
346  if (!is_array($ids) || !count($ids)) {
347  $this->ctrl->redirect($this, 'log');
348  }
349 
350  // show form instead
351  if (count($max) && max($max) > 1) {
352  $this->rsvConfirmCancelAggregation($ids);
353  return;
354  }
355 
356  $this->tabs_gui->clearTargets();
357  $this->tabs_gui->setBackTarget(
358  $lng->txt("back"),
359  $ilCtrl->getLinkTargetByClass("ilBookingReservationsGUI", "")
360  );
361 
362  $this->setHelpId("cancel_booking");
363 
364  $conf = new ilConfirmationGUI();
365  $conf->setFormAction($ilCtrl->getFormAction($this, 'rsvCancel'));
366  $conf->setHeaderText($lng->txt('book_confirm_cancel'));
367  $conf->setConfirm($lng->txt('book_set_cancel'), 'rsvCancel');
368  $conf->setCancel($lng->txt('cancel'), 'back');
369 
370  foreach ($ids as $id) {
371  $rsv = new ilBookingReservation($id);
372  $obj = new ilBookingObject($rsv->getObjectId());
373 
374  $details = $obj->getTitle();
375  if ($this->pool->getScheduleType() !== ilObjBookingPool::TYPE_NO_SCHEDULE) {
376  $details .= ", " . ilDatePresentation::formatPeriod(
377  new ilDateTime($rsv->getFrom(), IL_CAL_UNIX),
378  new ilDateTime($rsv->getTo() + 1, IL_CAL_UNIX)
379  );
380  }
381 
382  $conf->addItem('rsv_id[]', $id, $details);
383  }
384 
385  $tpl->setContent($conf->getHTML());
386  }
387 
388 
393  public function rsvConfirmCancelAggregation(array $a_ids = null): void
394  {
395  $tpl = $this->tpl;
396  $ilCtrl = $this->ctrl;
397  $lng = $this->lng;
398 
399  $this->tabs_gui->clearTargets();
400  $this->tabs_gui->setBackTarget(
401  $lng->txt("back"),
402  $ilCtrl->getLinkTarget($this, "log")
403  );
404 
405  $this->setHelpId("cancel_booking");
406 
407  // #13511
408  $this->tpl->setOnScreenMessage('question', $lng->txt("book_confirm_cancel"));
409 
410  $form = $this->rsvConfirmCancelAggregationForm($a_ids);
411 
412  $tpl->setContent($form->getHTML());
413  }
414 
419  array $a_ids
420  ): ilPropertyFormGUI {
421  $form = new ilPropertyFormGUI();
422  $form->setFormAction($this->ctrl->getFormAction($this, "rsvCancel"));
423  $form->setTitle($this->lng->txt("book_confirm_cancel_aggregation"));
424 
426 
427  foreach ($a_ids as $idx => $ids) {
428  $first = $ids;
429  if (is_array($ids)) {
430  $first = array_shift($first);
431  }
432 
433  $rsv = new ilBookingReservation($first);
434  $obj = new ilBookingObject($rsv->getObjectId());
435 
436  $caption = $obj->getTitle() . ", " . ilDatePresentation::formatPeriod(
437  new ilDateTime($rsv->getFrom(), IL_CAL_UNIX),
438  new ilDateTime($rsv->getTo() + 1, IL_CAL_UNIX)
439  );
440 
441  // #17869
442  if (is_array($ids)) {
443  $caption .= " (" . count($ids) . ")";
444  }
445 
446  $item = new ilNumberInputGUI($caption, "rsv_id_" . $idx);
447  $item->setRequired(true);
448  $item->setMinValue(0);
449  $item->setSize(4);
450  $form->addItem($item);
451 
452  if (is_array($ids)) {
453  $item->setMaxValue(count($ids));
454 
455  foreach ($ids as $id) {
456  $hidden = new ilHiddenInputGUI("rsv_aggr[" . $idx . "][]");
457  $hidden->setValue($id);
458  $form->addItem($hidden);
459  }
460  } else {
461  $item->setMaxValue(1);
462 
463  $hidden = new ilHiddenInputGUI("rsv_aggr[" . $idx . "]");
464  $hidden->setValue($ids);
465  $form->addItem($hidden);
466  }
467 
468  if ($this->book_request->getCancelNr($idx)) {
469  $item->setValue($this->book_request->getCancelNr($idx));
470  }
471  }
472 
473  $form->addCommandButton("rsvCancel", $this->lng->txt("confirm"));
474  $form->addCommandButton("log", $this->lng->txt("cancel"));
475 
476  return $form;
477  }
478 
482  public function rsvCancel(): void
483  {
484  $ilUser = $this->user;
485  $tpl = $this->tpl;
486  $lng = $this->lng;
487  $ilCtrl = $this->ctrl;
488 
489  // simple version of reservation id
490  $ids = $this->book_request->getReservationIds();
491 
492  $rsv_aggr = $this->raw_post_data["rsv_aggr"] ?? null;
493  // aggregated version: determine reservation ids
494  if (!is_null($rsv_aggr)) {
495  $form = $this->rsvConfirmCancelAggregationForm($rsv_aggr);
496  if (!$form->checkInput()) {
497  $this->tabs_gui->clearTargets();
498  $this->tabs_gui->setBackTarget(
499  $lng->txt("back"),
500  $ilCtrl->getLinkTarget($this, "log")
501  );
502 
503  $tpl->setContent($form->getHTML());
504  return;
505  }
506 
507  $ids = array();
508  foreach ($rsv_aggr as $idx => $aggr_ids) {
509  $max = $this->book_request->getCancelNr($idx);
510  if ($max) {
511  if (!is_array($aggr_ids)) {
512  $ids[] = $aggr_ids;
513  } else {
514  $aggr_ids = array_slice($aggr_ids, 0, $max);
515  $ids = array_merge($ids, $aggr_ids);
516  }
517  }
518  }
519  }
520 
521  // for all reservation ids -> set reservation status to cancelled (and remove calendar entry)
522  if ($ids) {
523  foreach ($ids as $id) {
524  $res = new ilBookingReservation($id);
525 
526  // either write permission or own booking
527  $cancel_allowed_per_read = ($this->checkPermissionBool("read") && ($res->getUserId() === $ilUser->getId()));
528  $cancel_allowed_per_write = ($this->checkPermissionBool("write"));
529  if (!$cancel_allowed_per_read && !$cancel_allowed_per_write) {
530  $this->tpl->setOnScreenMessage('failure', $this->lng->txt('permission_denied'), true);
531  $this->ctrl->redirect($this, 'log');
532  }
533 
535  $res->update();
536 
537  if ($this->pool->getScheduleType() !== ilObjBookingPool::TYPE_NO_SCHEDULE) {
538  // remove user calendar entry (#11086)
539  $cal_entry_id = $res->getCalendarEntry();
540  if ($cal_entry_id) {
541  $entry = new ilCalendarEntry($cal_entry_id);
542  $entry->delete();
543  }
544  }
545  }
546  }
547 
548  $this->tpl->setOnScreenMessage('success', $this->lng->txt('settings_saved'));
549  $this->log();
550  }
551 
552  public function rsvConfirmDelete(): void
553  {
554  global $DIC;
555  if (!$this->checkPermissionBool("write")) {
556  $this->tpl->setOnScreenMessage('failure', $this->lng->txt('permission_denied'), true);
557  $this->ctrl->redirect($this, 'log');
558  }
559 
560  $ids = $this->getLogReservationIds();
561  if (count($ids) === 0) {
562  $this->back();
563  }
564 
565  $this->tabs_gui->clearTargets();
566  $this->tabs_gui->setBackTarget(
567  $this->lng->txt("back"),
568  $this->ctrl->getLinkTarget($this, "log")
569  );
570 
571  $conf = new ilConfirmationGUI();
572  $conf->setFormAction($this->ctrl->getFormAction($this, 'rsvDelete'));
573  $conf->setHeaderText($this->lng->txt('book_confirm_delete'));
574  $conf->setConfirm($this->lng->txt('book_set_delete'), 'rsvDelete');
575  $conf->setCancel($this->lng->txt('cancel'), 'log');
576 
577  if ($this->pool->getScheduleType() === ilObjBookingPool::TYPE_FIX_SCHEDULE) {
578  foreach ($ids as $idx => $id) {
579  [$obj_id, $user_id, $from, $to] = explode("_", $id);
580  $rsv_ids = ilBookingReservation::getCancelDetails($obj_id, $user_id, $from, $to);
581  $rsv_id = $rsv_ids[0];
582 
583  $rsv = new ilBookingReservation($rsv_id);
584  $obj = new ilBookingObject($rsv->getObjectId());
585 
586  $details = sprintf($this->lng->txt('X_reservations_of'), count($rsv_ids)) . ' ' . $obj->getTitle();
587  $details .= ", " . ilDatePresentation::formatPeriod(
588  new ilDateTime($rsv->getFrom(), IL_CAL_UNIX),
589  new ilDateTime($rsv->getTo() + 1, IL_CAL_UNIX)
590  );
591  $conf->addItem('mrsv[]', $id, $details);
592  }
593  } else {
594  foreach ($ids as $idx => $rsv_id) {
595  $rsv = new ilBookingReservation($rsv_id);
596  $obj = new ilBookingObject($rsv->getObjectId());
597  $details = sprintf($this->lng->txt('X_reservations_of'), 1) . ' ' . $obj->getTitle();
598  $conf->addItem('mrsv[]', $rsv_id, $details);
599  }
600  }
601  $this->tpl->setContent($conf->getHTML());
602  }
603 
604  public function rsvDelete(): void
605  {
606  global $DIC;
607  $get = $DIC->http()->request()->getParsedBody()['mrsv'];
608  if ($get) {
609  foreach ($get as $id) {
610  if ($this->pool->getScheduleType() == ilObjBookingPool::TYPE_FIX_SCHEDULE) {
611  list($obj_id, $user_id, $from, $to) = explode("_", $id);
612  $rsv_ids = ilBookingReservation::getCancelDetails($obj_id, $user_id, $from, $to);
613  } else {
614  $rsv_ids = [$id];
615  }
616 
617  foreach ($rsv_ids as $rsv_id) {
618  $res = new ilBookingReservation($rsv_id);
619  $obj = new ilBookingObject($res->getObjectId());
620  if (!$this->checkPermissionBool("write") || $obj->getPoolId() !== $this->pool->getId()) {
621  $this->tpl->setOnScreenMessage('failure', $this->lng->txt('permission_denied'), true);
622  $this->ctrl->redirect($this, 'log');
623  }
624  if ($this->pool->getScheduleType() !== ilObjBookingPool::TYPE_NO_SCHEDULE) {
625  $cal_entry_id = $res->getCalendarEntry();
626  if ($cal_entry_id) {
627  $entry = new ilCalendarEntry($cal_entry_id);
628  $entry->delete();
629  }
630  }
631  $res->delete();
632  }
633  }
634  }
635  $this->tpl->setOnScreenMessage('success', $this->lng->txt('reservation_deleted'), true);
636  $this->ctrl->redirect($this, 'log');
637  }
638 
639  protected function showRerunPreferenceAssignment(): void
640  {
641  if (!$this->checkPermissionBool('write')) {
642  return;
643  }
644  if ($this->pool->getScheduleType() === ilObjBookingPool::TYPE_NO_SCHEDULE_PREFERENCES) {
645  $pref_manager = $this->service->domain()->preferences($this->pool);
646  if ($pref_manager->hasRun()) {
647  $this->toolbar->addComponent($this->ui->factory()->button()->standard(
648  $this->lng->txt("book_rerun_assignments"),
649  $this->ctrl->getLinkTarget($this, "confirmResetRun")
650  ));
651  }
652  }
653  }
654 
655  protected function confirmResetRun()
656  {
657  if (!$this->checkPermissionBool('write')) {
658  return;
659  }
660  $this->tabs_gui->activateTab("log");
661  $mess = $this->ui->factory()->messageBox()->confirmation($this->lng->txt("book_rerun_confirmation"))->withButtons(
662  [
663  $this->ui->factory()->button()->standard(
664  $this->lng->txt("book_rerun_assignments"),
665  $this->ctrl->getLinkTarget($this, "resetRun")
666  ),
667  $this->ui->factory()->button()->standard(
668  $this->lng->txt("cancel"),
669  $this->ctrl->getLinkTarget($this, "log")
670  )
671  ]
672  );
673  $this->tpl->setContent(
674  $this->ui->renderer()->render($mess)
675  );
676  }
677 
678  protected function resetRun()
679  {
680  if (!$this->checkPermissionBool('write')) {
681  return;
682  }
683  if ($this->pool->getScheduleType() === ilObjBookingPool::TYPE_NO_SCHEDULE_PREFERENCES
684  && $this->access->checkAccess("write", "", $this->pool->getRefId())) {
685  $pref_manager = $this->service->domain()->preferences($this->pool);
686  $repo = $this->service->repo()->preferences();
687  $pref_manager->resetRun();
688  $pref_manager->storeBookings(
689  $repo->getPreferences($this->pool->getId())
690  );
691  }
692  $this->ctrl->redirect($this, "log");
693  }
694 
695  public function displayPostInfo(): void
696  {
697  $this->ctrl->saveParameter($this, "object_id");
698  $this->util_gui->displayPostInfo(
699  $this->book_obj_id,
700  0,
701  "deliverPostFile"
702  );
703  }
704 
705  public function deliverPostFile(): void
706  {
707  $this->util_gui->deliverPostFile(
708  $this->book_obj_id,
709  $this->user->getId()
710  );
711  }
712 
713  public function redirectMailToBooker(): void
714  {
715  if (!$this->checkPermissionBool("write")) {
716  $this->tpl->setOnScreenMessage('failure', $this->lng->txt('permission_denied'), true);
717  $this->ctrl->redirect($this, 'log');
718  }
719 
720  $ids = $this->getLogReservationIds();
721  if (count($ids) === 0) {
722  $this->back();
723  }
724 
725  $users = [];
726  if ($this->pool->getScheduleType() === ilObjBookingPool::TYPE_FIX_SCHEDULE) {
727  foreach ($ids as $idx => $id) {
728  [$obj_id, $user_id, $from, $to] = explode("_", $id);
729  $rsv_ids = ilBookingReservation::getCancelDetails($obj_id, $user_id, $from, $to);
730  $rsv_id = $rsv_ids[0];
731  $rsv = new ilBookingReservation($rsv_id);
732  $users[$rsv->getUserId()] = ilObjUser::_lookupLogin($rsv->getUserId());
733  }
734  } else {
735  foreach ($ids as $idx => $rsv_id) {
736  $rsv = new ilBookingReservation($rsv_id);
737  $users[$rsv->getUserId()] = ilObjUser::_lookupLogin($rsv->getUserId());
738  }
739  }
740  $logins = implode(",", $users);
741  // #16530 - see ilObjCourseGUI::createMailSignature
742  $sig = chr(13) . chr(10) . chr(13) . chr(10) . chr(13) . chr(10);
743  $sig .= $this->lng->txt('book_mail_permanent_link') . ": ";
744  $sig .= chr(13) . chr(10);
745  $sig .= ilLink::_getLink($this->book_request->getRefId());
746  $sig = rawurlencode(base64_encode($sig));
747 
750  $this,
751  "log",
752  array(),
753  array(
754  'type' => 'new',
755  'rcp_to' => $logins,
757  )
758  ));
759  }
760 
761 }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
$res
Definition: ltiservices.php:69
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
static changeStatus(array $a_ids, int $a_status)
Batch update reservation status.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
txt(string $a_topic, string $a_default_lang_fallback_mod="")
gets the text for a given topic if the topic is not in the list, the topic itself with "-" will be re...
getCmd(string $fallback_command=null)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
ILIAS BookingManager InternalService $service
static getObjectReservationForUser(int $a_object_id, int $a_user_id)
rsvConfirmCancel()
(C2) Confirmation screen for canceling booking from reservations screen (with and without schedule) ...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
const IL_CAL_UNIX
getReservationsTable(?string $reservation_id=null)
Get reservationsTable.
getLogReservationIds()
Reservations IDs as currently provided from.
global $DIC
Definition: feed.php:28
array $details
Details for error message relating to last request processed.
Definition: System.php:109
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
getNextClass($a_gui_class=null)
setContent(string $a_html)
Sets content for standard template.
rsvConfirmCancelUser()
(C1) Confirmation screen for canceling booking without schedule from booking objects screen or from p...
static getCancelDetails(int $a_obj_id, int $a_user_id, int $a_from, int $a_to)
Get reservation ids from aggregated id for cancellation.
__construct(ilObjBookingPool $pool, ilBookingHelpAdapter $help, int $context_obj_id=0)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
static redirect(string $a_script)
final const SIGNATURE_KEY
static setRecipients(array $recipients, string $type='to')
static formatPeriod(ilDateTime $start, ilDateTime $end, bool $a_skip_starting_day=false)
Format a period of two dates Shows: 14.
ILIAS BookingManager BookingProcess ProcessUtilGUI $util_gui
$id
plugin.php for ilComponentBuildPluginInfoObjectiveTest::testAddPlugins
Definition: plugin.php:23
static getRedirectTarget( $gui, string $cmd, array $gui_params=[], array $mail_params=[], array $context_params=[])
changeStatusObject()
Change status of given reservations.
ILIAS BookingManager StandardGUIRequest $book_request
rsvConfirmCancelAggregationForm(array $a_ids)
Form being used in (C2.a)
static lookupPoolId(int $object_id)
static setUseRelativeDates(bool $a_status)
set use relative dates
static getList(int $a_pool_id, string $a_title=null)
Get list of booking objects.
rsvCancel()
(C2.b) Cancel reservations (coming from C2 or C2.a)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
rsvConfirmCancelAggregation(array $a_ids=null)
(C2.a) Cancel aggregated booking from reservations screen (with and without schedule) called in (C2) ...
static _lookupLogin(int $a_user_id)