ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
class.ilCalendarPresentationGUI.php
Go to the documentation of this file.
1<?php
2
3/* Copyright (c) 1998-2017 ILIAS open source, Extended GPL, see docs/LICENSE */
4
5
6include_once './Services/Calendar/classes/class.ilCalendarSettings.php';
7
20{
24 protected $ctrl;
25
29 protected $lng;
30
34 protected $tpl;
35
39 protected $tabs_gui;
40
44 protected $user;
45
49 protected $help;
50
54 protected $rbacsystem;
55
59 protected $ui;
60
64 protected $toolbar;
65
66 protected $repository_mode = false;
67
71 protected $seed;
72
80 public function __construct($a_ref_id = 0)
81 {
82 global $DIC;
83
84 $this->ctrl = $DIC->ctrl();
85 $this->lng = $DIC->language();
86 $this->lng->loadLanguageModule('dateplaner');
87
88 $this->tpl = $DIC["tpl"];
89 $this->tabs_gui = $DIC->tabs();
90 $this->user = $DIC->user();
91 $this->rbacsystem = $DIC->rbac()->system();
92 $this->help = $DIC["ilHelp"];
93 $this->ui = $DIC->ui();
94 $this->toolbar = $DIC->toolbar();
95 $this->ref_id = $a_ref_id;
96 $this->category_id = $_GET["category_id"];
97 $this->ctrl->saveParameter($this, "category_id");
98
99
100 include_once('./Services/Calendar/classes/class.ilCalendarCategories.php');
101 $cats = ilCalendarCategories::_getInstance($this->user->getId());
102
103 include_once './Services/Calendar/classes/class.ilCalendarUserSettings.php';
104 if ($a_ref_id > 0) {
105 $this->repository_mode = true;
106 }
107 if ($this->category_id > 0) { // single calendar view
108 // ensure activation of this category
109 include_once("./Services/Calendar/classes/class.ilCalendarVisibility.php");
110 $vis = ilCalendarVisibility::_getInstanceByUserId($this->user->getId(), $a_ref_id);
111 $vis->forceVisibility($this->category_id);
112
113 $cats->initialize(ilCalendarCategories::MODE_SINGLE_CALENDAR, 0, false, $this->category_id);
114 } else {
115 if ($a_ref_id > 0) {
116 $cats->initialize(ilCalendarCategories::MODE_REPOSITORY, (int) $a_ref_id, true);
117 } else {
120 } else {
122 }
123 }
124 }
125
126 include_once("./Services/Calendar/classes/class.ilCalendarActions.php");
127 $this->actions = ilCalendarActions::getInstance();
128
129 $this->cats = $cats;
130 }
131
137 public function getRepositoryMode()
138 {
140 }
141
146 {
147 $visibility = ilCalendarVisibility::_getInstanceByUserId($this->user->getId(), $this->ref_id);
148 foreach ($this->cats->getCategoriesInfo() as $info) {
149 if (
151 $info["obj_id"] == $_GET["ch_user_id"]
152 ) {
153 $v = $visibility->getVisible();
154 if (!in_array($info["cat_id"], $v)) {
155 $v[] = $info["cat_id"];
156 }
157 $visibility->showSelected($v);
158 $visibility->save();
159 $this->ctrl->redirect($this, "");
160 }
161 }
162 }
163
171 public function executeCommand()
172 {
174
175 $cmd = $this->ctrl->getCmd();
176 // now next class is not empty, which breaks old consultation hour implementation
177 $next_class = $this->getNextClass();
178
179 include_once('./Services/Calendar/classes/class.ilCalendarSettings.php');
180 if (!ilCalendarSettings::_getInstance()->isEnabled()) {
181 ilUtil::sendFailure($this->lng->txt('permission_denied'), true);
182 ilUtil::redirect('ilias.php?baseClass=ilPersonalDesktopGUI');
183 }
184
185 $this->initSeed();
186 $this->prepareOutput();
187
188 switch ($cmd) {
189 case 'selectCHCalendarOfUser':
191 break;
192 }
193
194 switch ($next_class) {
195 case 'ilcalendarinboxgui':
196 $this->tabs_gui->activateTab('cal_agenda');
197 $inbox_gui = $this->forwardToClass('ilcalendarinboxgui');
198 if ($this->showToolbarAndSidebar()) {
199 $this->showViewSelection("cal_list");
200 $this->showSideBlocks();
201 $inbox_gui->addToolbarActions();
202 }
203
204 break;
205
206 case 'ilconsultationhoursgui':
207 $this->tabs_gui->activateTab('app_consultation_hours');
208 $this->tabs_gui->clearTargets();
209
210 // No side blocks
211 $this->tabs_gui->setBackTarget(
212 $this->lng->txt('cal_back_to_cal'),
213 $this->ctrl->getLinkTargetByClass($this->readLastClass())
214 );
215
216 include_once './Services/Calendar/classes/ConsultationHours/class.ilConsultationHoursGUI.php';
217 $gui = new ilConsultationHoursGUI();
218 $this->ctrl->forwardCommand($gui);
219 if ($this->showToolbarAndSidebar()) {
220 $this->showSideBlocks();
221 }
222 return true;
223
224 case 'ilcalendarmonthgui':
225 $this->tabs_gui->activateTab('cal_agenda');
226 $month_gui = $this->forwardToClass('ilcalendarmonthgui');
227
228 if ($this->showToolbarAndSidebar()) {
229 $this->showViewSelection("app_month");
230 $this->showSideBlocks();
231 $month_gui->addToolbarActions();
232 }
233 break;
234
235 case 'ilcalendarweekgui':
236 $this->tabs_gui->activateTab('cal_agenda');
237 $week_gui = $this->forwardToClass('ilcalendarweekgui');
238 if ($this->showToolbarAndSidebar()) {
239 $this->showViewSelection("app_week");
240 $this->showSideBlocks();
241 $week_gui->addToolbarActions();
242 }
243
244 break;
245
246 case 'ilcalendardaygui':
247 $this->tabs_gui->activateTab('cal_agenda');
248 $day_gui = $this->forwardToClass('ilcalendardaygui');
249 if ($this->showToolbarAndSidebar()) {
250 $this->showViewSelection("app_day");
251 $this->showSideBlocks();
252 $day_gui->addToolbarActions();
253 }
254 break;
255
256 case 'ilcalendarusersettingsgui':
257 $this->ctrl->setReturn($this, '');
258 $this->tabs_gui->activateTab('settings');
259 $this->setCmdClass('ilcalendarusersettingsgui');
260
261 include_once('./Services/Calendar/classes/class.ilCalendarUserSettingsGUI.php');
262 $user_settings = new ilCalendarUserSettingsGUI();
263 $this->ctrl->forwardCommand($user_settings);
264 // No side blocks
265 return true;
266
267 case 'ilcalendarappointmentgui':
268 $this->ctrl->setReturn($this, '');
269 $this->tabs_gui->activateTab($_SESSION['cal_last_tab']);
270
271 include_once('./Services/Calendar/classes/class.ilCalendarAppointmentGUI.php');
272 $app = new ilCalendarAppointmentGUI($this->seed, $this->seed, (int) $_GET['app_id']);
273 $this->ctrl->forwardCommand($app);
274 break;
275
276 case 'ilcalendarsubscriptiongui':
277 $this->ctrl->setReturn($this, '');
278 //$this->tabs_gui->activateTab($_SESSION['cal_last_tab']);
279 $this->tabs_gui->activateTab("cal_agenda");
280 include_once './Services/Calendar/classes/class.ilCalendarSubscriptionGUI.php';
281 $sub = new ilCalendarSubscriptionGUI((int) $_REQUEST['category_id'], (int) $_GET["ref_id"]);
282 $this->ctrl->forwardCommand($sub);
283 if ($this->showToolbarAndSidebar()) {
284 $this->showSideBlocks();
285 }
286 break;
287
288 case 'ilcalendarcategorygui':
289 $this->ctrl->setReturn($this, '');
290 $this->tabs_gui->activateTab("cal_manage");
291 include_once('Services/Calendar/classes/class.ilCalendarCategoryGUI.php');
292 $category = new ilCalendarCategoryGUI($ilUser->getId(), $this->seed, $this->ref_id);
293 if ($this->ctrl->forwardCommand($category)) {
294 //$this->tabs_gui->activateTab("cal_manage");
295
296 // no side blocks
297 return;
298 } else {
299 if ($this->getRepositoryMode()) {
300 $this->tabs_gui->setBackTarget($this->lng->txt("back"), $this->ctrl->getLinkTarget($this, ""));
301 }
302 //$this->tabs_gui->activateTab($_SESSION['cal_last_tab']);
303 $this->showSideBlocks();
304 break;
305 }
306
307 // no break
308 case 'ilcalendarblockgui':
309 $side_cal = new ilCalendarBlockGUI();
310 $side_cal->setAvailableDetailLevels(2, 2);
311 $side_cal->setRepositoryMode($this->getRepositoryMode());
312 $side_cal->setForceMonthView(true);
313 $this->ctrl->forwardCommand($side_cal);
314 $this->showSideBlocks();
315 break;
316
317 case 'ilpdcalendarblockgui':
318 $side_cal = new ilPDCalendarBlockGUI();
319 $side_cal->setAvailableDetailLevels(2, 2);
320 $side_cal->setRepositoryMode($this->getRepositoryMode());
321 $side_cal->setForceMonthView(true);
322 $this->ctrl->forwardCommand($side_cal);
323 $this->showSideBlocks();
324 break;
325
326 case 'ilpublicuserprofilegui':
327 include_once("./Services/User/classes/class.ilPublicUserProfileGUI.php");
328 $user_profile = new ilPublicUserProfileGUI($_GET["user_id"]);
329 $html = $this->ctrl->forwardCommand($user_profile);
330 $this->tpl->setContent($html);
331 break;
332
333 default:
334 $cmd = $this->ctrl->getCmd("show");
335 $this->$cmd();
336 $this->showSideBlocks();
337 break;
338 }
339
340
342
343 return true;
344 }
345
351 public function showViewSelection($a_active = "cal_list")
352 {
353 $ui = $this->ui;
357
358 $f = $ui->factory();
359
360 $actions = array(
361 $lng->txt("app_day") => $ctrl->getLinkTargetByClass('ilCalendarDayGUI', ''),
362 $lng->txt("app_week") => $ctrl->getLinkTargetByClass('ilCalendarWeekGUI', ''),
363 $lng->txt("app_month") => $ctrl->getLinkTargetByClass('ilCalendarMonthGUI', ''),
364 $lng->txt("cal_list") => $ctrl->getLinkTargetByClass('ilCalendarInboxGUI', '')
365 );
366
367 $aria_label = $lng->txt("cal_change_calendar_view");
368 $view_control = $f->viewControl()->mode($actions, $aria_label)->withActive($lng->txt($a_active));
369
370 $toolbar->addComponent($view_control);
371
372 $ctrl->setParameterByClass("ilcalendarappointmentgui", "seed", $this->seed->get(IL_CAL_DATE, ''));
373 $ctrl->setParameterByClass("ilcalendarappointmentgui", "app_id", "");
374 $ctrl->setParameterByClass("ilcalendarappointmentgui", "dt", "");
375
376 $extra_button_added = false;
377 // add appointment
378 if ($this->category_id == 0 || $this->actions->checkAddEvent($this->category_id)) {
379 $toolbar->addSeparator();
380 $extra_button_added = true;
381 $add_button = $f->button()->standard(
382 $lng->txt("cal_add_appointment"),
383 $ctrl->getLinkTargetByClass("ilcalendarappointmentgui", "add")
384 );
385 $toolbar->addComponent($add_button);
386 }
387
388 // import appointments
389 if ($this->category_id > 0 && $this->actions->checkAddEvent($this->category_id)) {
390 if (!$extra_button_added) {
391 $toolbar->addSeparator();
392 }
393 $add_button = $f->button()->standard(
394 $lng->txt("cal_import_appointments"),
395 $ctrl->getLinkTargetByClass("ilcalendarcategorygui", "importAppointments")
396 );
397 $toolbar->addComponent($add_button);
398 }
399 }
400
401
407 public function getNextClass()
408 {
409 if (strlen($next_class = $this->ctrl->getNextClass())) {
410 return $next_class;
411 }
412 if ($this->ctrl->getCmdClass() == strtolower(get_class($this)) or $this->ctrl->getCmdClass() == '') {
413 return $this->readLastClass();
414 }
415 }
416
421 public function readLastClass()
422 {
424
425 return $ilUser->getPref('cal_last_class') ? $ilUser->getPref('cal_last_class') : 'ilcalendarinboxgui';
426 }
427
428 public function setCmdClass($a_class)
429 {
430 // If cmd class == 'ilcalendarpresentationgui' the cmd class is set to the the new forwarded class
431 // otherwise e.g ilcalendarmonthgui tries to forward (back) to ilcalendargui.
432
433 if ($this->ctrl->getCmdClass() == strtolower(get_class($this))) {
434 $this->ctrl->setCmdClass(strtolower($a_class));
435 }
436 return true;
437 }
438
444 protected function forwardToClass($a_class)
445 {
447
448 switch ($a_class) {
449 case 'ilcalendarmonthgui':
450 $ilUser->writePref('cal_last_class', $a_class);
451 $_SESSION['cal_last_tab'] = 'app_month';
452 $this->setCmdClass('ilcalendarmonthgui');
453 include_once('./Services/Calendar/classes/class.ilCalendarMonthGUI.php');
454 $month_gui = new ilCalendarMonthGUI($this->seed);
455 $this->ctrl->forwardCommand($month_gui);
456 return $month_gui;
457 break;
458
459 case 'ilcalendarweekgui':
460 $ilUser->writePref('cal_last_class', $a_class);
461 $_SESSION['cal_last_tab'] = 'app_week';
462 $this->setCmdClass('ilcalendarweekgui');
463 include_once('./Services/Calendar/classes/class.ilCalendarWeekGUI.php');
464 $week_gui = new ilCalendarWeekGUI($this->seed);
465 $this->ctrl->forwardCommand($week_gui);
466 return $week_gui;
467 break;
468
469 case 'ilcalendardaygui':
470 $ilUser->writePref('cal_last_class', $a_class);
471 $_SESSION['cal_last_tab'] = 'app_day';
472 $this->setCmdClass('ilcalendardaygui');
473 include_once('./Services/Calendar/classes/class.ilCalendarDayGUI.php');
474 $day_gui = new ilCalendarDayGUI($this->seed);
475 $this->ctrl->forwardCommand($day_gui);
476 return $day_gui;
477 break;
478
479 case 'ilcalendarinboxgui':
480 #21479
481 if ($view_option = $_GET['cal_agenda_per']) {
482 ilSession::set("cal_list_view", $view_option);
483 } elseif ($view_option = ilSession::get('cal_list_view')) {
484 ilSession::set("cal_list_view", $view_option);
485 }
486 $ilUser->writePref('cal_last_class', $a_class);
487 $_SESSION['cal_last_tab'] = 'cal_upcoming_events_header';
488 $this->setCmdClass('ilcalendarinboxgui');
489 include_once('./Services/Calendar/classes/class.ilCalendarInboxGUI.php');
490 $inbox_gui = new ilCalendarinboxGUI($this->seed);
491 $this->ctrl->forwardCommand($inbox_gui);
492 return $inbox_gui;
493 break;
494 }
495 }
496
504 protected function loadHistory()
505 {
507
508 $this->ctrl->setCmd('');
509 $history = $ilUser->getPref('cal_last_class') ? $ilUser->getPref('cal_last_class') : 'ilcalendarmonthgui';
510 $this->forwardToClass($history);
511 }
512
520 protected function showSideBlocks()
521 {
524
525 $tpl = new ilTemplate('tpl.cal_side_block.html', true, true, 'Services/Calendar');
526
527 /*include_once('./Services/Calendar/classes/class.ilMiniCalendarGUI.php');
528 $mini = new ilMiniCalendarGUI($this->seed, $this);
529 $tpl->setVariable('MINICAL',$mini->getHTML());*/
530
531 /*
532 include_once("./Services/Calendar/classes/class.ilCalendarSelectionBlockGUI.php");
533 $block_gui = new ilCalendarSelectionBlockGUI($this->seed);
534 $html = $ilCtrl->getHTML($block_gui);
535 return $html;*/
536
537 if ($this->getRepositoryMode()) {
538 include_once("./Services/Calendar/classes/class.ilCalendarBlockGUI.php");
539 $side_cal = new ilCalendarBlockGUI();
540 } else {
541 include_once("./Services/Calendar/classes/class.ilPDCalendarBlockGUI.php");
542 $side_cal = new ilPDCalendarBlockGUI();
543 }
544 $side_cal->setAvailableDetailLevels(2, 2);
545 $side_cal->setParentGUI("ilCalendarPresentationGUI");
546 $side_cal->setForceMonthView(true);
547 $side_cal->setRepositoryMode($this->getRepositoryMode());
548 $tpl->setVariable('MINICAL', $ilCtrl->getHTML($side_cal));
549
550 if ($this->category_id == 0) {
551 include_once('./Services/Calendar/classes/class.ilCalendarCategoryGUI.php');
552 $cat = new ilCalendarCategoryGUI($ilUser->getId(), $this->seed, $this->ref_id);
553 $tpl->setVariable('CATEGORIES', $ilCtrl->getHTML($cat));
554 }
555
556 $this->tpl->setRightContent($tpl->get());
557 }
558
559
567 public function show()
568 {
569 $this->tpl->addCss(ilUtil::getStyleSheetLocation('filesystem', 'delos.css', 'Services/Calendar'));
570 }
571
572
578 protected function prepareOutput()
579 {
580 global $DIC;
581
582 $tpl = $DIC["tpl"];
583 //$tpl->setHeaderActionMenu(null);
584
586 $ilHelp = $this->help;
587
588 $ilHelp->setScreenIdComponent("cal");
589
590 if ($this->getRepositoryMode()) {
591 $this->tabs_gui->clearTargets();
592 $this->tabs_gui->setBackTarget($this->lng->txt("back"), $this->ctrl->getParentReturn($this));
593 } else {
594 $this->tabs_gui->addTab(
595 'cal_agenda',
596 $this->lng->txt("cal_agenda"),
597 $this->ctrl->getLinkTarget($this, '')
598 );
599 //$this->tabs_gui->addTarget('cal_upcoming_events_header',$this->ctrl->getLinkTargetByClass('ilCalendarInboxGUI',''));
600
601 if (
602 $rbacsystem->checkAccess('add_consultation_hours', ilCalendarSettings::_getInstance()->getCalendarSettingsId()) and
603 ilCalendarSettings::_getInstance()->areConsultationHoursEnabled()
604 ) {
605 $this->tabs_gui->addTarget('app_consultation_hours', $this->ctrl->getLinkTargetByClass('ilConsultationHoursGUI', ''));
606 }
607 $this->tabs_gui->addTarget('cal_manage', $this->ctrl->getLinkTargetByClass('ilCalendarCategoryGUI', 'manage'));
608 $this->tabs_gui->addTarget('settings', $this->ctrl->getLinkTargetByClass('ilCalendarUserSettingsGUI', ''));
609 }
610
611 // if we are in single calendar view
612 if ($this->category_id > 0) {
613 global $DIC;
614
618 $tpl = $DIC["tpl"];
619
620 $category = new ilCalendarCategory($this->category_id);
621
622 // Set header
623 $header = "";
624 switch ($category->getType()) {
626 $header = $this->lng->txt('cal_type_personal') . ": " . $category->getTitle();
627 break;
628
630 $header = $this->lng->txt('cal_type_system') . ": " . $category->getTitle();
631 break;
632
634 $header = $this->lng->txt('cal_type_' . $category->getObjType()) . ": " . $category->getTitle();
635 break;
636
638 $header = str_replace("%1", ilObjUser::_lookupFullname($category->getObjId()), $lng->txt("cal_consultation_hours_for_user"));
639 break;
640
642 $header = $category->getTitle();
643 break;
644 }
645 $tpl->setTitleIcon(ilUtil::getImagePath("icon_cal.svg"));
646 $tpl->setTitle($header);
647
648 $this->action_menu = new ilAdvancedSelectionListGUI();
649 $this->action_menu->setAsynch(false);
650 $this->action_menu->setAsynchUrl('');
651 $this->action_menu->setListTitle($lng->txt('actions'));
652 $this->action_menu->setId('act_cal');
653 $this->action_menu->setSelectionHeaderClass('small');
654 $this->action_menu->setItemLinkClass('xsmall');
655 $this->action_menu->setLinksMode('il_ContainerItemCommand2');
656 $this->action_menu->setHeaderIcon(ilAdvancedSelectionListGUI::DOWN_ARROW_DARK);
657 $this->action_menu->setUseImages(false);
658
659 // iCal-Url
660 $ctrl->setParameterByClass("ilcalendarsubscriptiongui", "category_id", $this->category_id);
661 $this->action_menu->addItem($lng->txt("cal_ical_url"), "", $ctrl->getLinkTargetByClass("ilcalendarsubscriptiongui", ""));
662
663 // delete action
664 if ($this->actions->checkDeleteCal($this->category_id)) {
665 $ctrl->setParameterByClass("ilcalendarcategorygui", "category_id", $this->category_id);
666 $ctrl->setParameterByClass("ilcalendarcategorygui", "backv", "1");
667 $this->action_menu->addItem($lng->txt("cal_delete_cal"), "", $ctrl->getLinkTargetByClass("ilcalendarcategorygui", "confirmDelete"));
668 $ctrl->clearParameterByClass('ilcalendarcategorygui', 'backv');
669 }
670
671 $tpl->setHeaderActionMenu($this->action_menu->getHTML());
672
673
674 $tabs->clearTargets();
675 $ctrl->setParameterByClass("ilcalendarcategorygui", "category_id", "");
676 $ctrl->setParameterByClass("ilcalendarpresentationgui", "category_id", "");
677
678 if ($this->ref_id > 0) {
679 $tabs->setBackTarget($lng->txt("back"), $ctrl->getLinkTargetByClass("ilcalendarpresentationgui", ""));
680 } else {
681 $tabs->setBackTarget($lng->txt("back"), $ctrl->getLinkTargetByClass("ilcalendarcategorygui", "manage"));
682 }
683 $ctrl->setParameterByClass("ilcalendarcategorygui", "category_id", $_GET["category_id"]);
684 $ctrl->setParameterByClass("ilcalendarpresentationgui", "category_id", $_GET["category_id"]);
685
686 // agenda
687 $tabs->addTab("cal_agenda", $lng->txt("cal_agenda"), $ctrl->getLinkTargetByClass("ilcalendarpresentationgui", ""));
688
689 // share
690 if ($this->actions->checkShareCal($this->category_id)) {
691 $tabs->addTab("share", $lng->txt("cal_share"), $ctrl->getLinkTargetByClass("ilcalendarcategorygui", "shareSearch"));
692 }
693
694 // edit settings
695 if ($this->actions->checkSettingsCal($this->category_id)) {
696 $tabs->addTab("edit", $lng->txt("settings"), $ctrl->getLinkTargetByClass("ilcalendarcategorygui", "edit"));
697 }
698 $tabs->activateTab("cal_agenda");
699 }
700 }
701
707 public function initSeed()
708 {
709 include_once('Services/Calendar/classes/class.ilDate.php');
710 $this->seed = $_REQUEST['seed'] ? new ilDate($_REQUEST['seed'], IL_CAL_DATE) : new ilDate(date('Y-m-d', time()), IL_CAL_DATE);
711 $_GET['seed'] = $this->seed->get(IL_CAL_DATE, '');
712 $this->ctrl->saveParameter($this, array('seed'));
713 }
714
718 protected function synchroniseExternalCalendars()
719 {
721
722 if (!ilCalendarSettings::_getInstance()->isWebCalSyncEnabled()) {
723 return false;
724 }
725 // @todo make this thread safe
726
727 $limit = new ilDateTime(time(), IL_CAL_UNIX);
728 $limit->increment(IL_CAL_HOUR, -1 * ilCalendarSettings::_getInstance()->getWebCalSyncHours());
729
731 foreach ($cats->getCategoriesInfo() as $cat_id => $info) {
732 if ($info['remote']) {
733 // Check for execution
734 $category = new ilCalendarCategory($cat_id);
735
736 if (ilDateTime::_before($category->getRemoteSyncLastExecution(), $limit)) {
737 // update in any case to avoid multiple updates of invalid calendar sources.
738 $category->setRemoteSyncLastExecution(new ilDateTime(time(), IL_CAL_UNIX));
739 $category->update();
740
741 include_once './Services/Calendar/classes/class.ilCalendarRemoteReader.php';
742 $remote = new ilCalendarRemoteReader($category->getRemoteUrl());
743 $remote->setUser($category->getRemoteUser());
744 $remote->setPass($category->getRemotePass());
745 $remote->read();
746 $remote->import($category);
747 break;
748 }
749 }
750 }
751 }
752
753 #21613
754 public function showToolbarAndSidebar()
755 {
756 #21783
757 if ($this->ctrl->getCmdClass() == "ilcalendarappointmentgui" || $this->ctrl->getCmdClass() == 'ilconsultationhoursgui') {
758 return false;
759 }
760 return true;
761 }
762}
date( 'd-M-Y', $objPHPExcel->getProperties() ->getCreated())
user()
Definition: user.php:4
$_GET["client_id"]
$_SESSION["AccountId"]
An exception for terminatinating execution or to throw for unit testing.
const IL_CAL_DATE
const IL_CAL_UNIX
const IL_CAL_HOUR
User interface class for advanced drop-down selection lists.
static getInstance()
Get instance.
Administrate calendar appointments.
Calendar blocks, displayed in different contexts, e.g.
static _getInstance($a_usr_id=0)
get singleton instance
Administration, Side-Block presentation of calendar categories.
Stores calendar categories.
Presentation day view.
loadHistory()
forward to last presentation class
initSeed()
init the seed date for presentations (month view, minicalendar)
readLastClass()
Read last class from history.
initAndRedirectToConsultationHours()
Init and redirect to consultation hours.
showViewSelection($a_active="cal_list")
Show view selection.
synchroniseExternalCalendars()
Sync external calendars.
Reader for remote ical calendars.
static _getInstance()
get singleton instance
Show calendar subscription info.
static _getInstance()
get instance for logged in user
static _getInstanceByUserId($a_user_id, $a_ref_id=0)
get instance by user id
Consultation hours editor.
@classDescription Date and time handling
static _before(ilDateTime $start, ilDateTime $end, $a_compare_field='', $a_tz='')
compare two dates and check start is before end This method does not consider tz offsets.
Class for single dates.
static _lookupFullname($a_user_id)
Lookup Full Name.
Calendar blocks, displayed on personal desktop.
GUI class for public user profile presentation.
static set($a_var, $a_val)
Set a value.
static get($a_var)
Get a value.
special template class to simplify handling of ITX/PEAR
static getStyleSheetLocation($mode="output", $a_css_name="", $a_css_location="")
get full style sheet file name (path inclusive) of current user
static redirect($a_script)
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
static getImagePath($img, $module_path="", $mode="output", $offline=false)
get image path (for images located in a template directory)
if(!empty($this->data['faventry'])) $tabs
Definition: disco.tpl.php:124
$html
Definition: example_001.php:87
global $ilCtrl
Definition: ilias.php:18
$info
Definition: index.php:5
global $DIC
Definition: saml.php:7
$ilUser
Definition: imgupload.php:18