ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
class.ilCalendarWeekGUI.php
Go to the documentation of this file.
1<?php
2/* Copyright (c) 1998-2017 ILIAS open source, Extended GPL, see docs/LICENSE */
3
15{
16 protected $num_appointments = 1;
17 protected $user_settings = null;
18 protected $weekdays = array();
19
20 protected $lng;
21 protected $ctrl;
22 protected $tabs_gui;
23 protected $tpl;
24
25 protected $timezone = 'UTC';
26
27 protected $user;
28 protected $cal_settings;
29 protected $colspans;
30
31 // config
32 protected $raster = 15;
33 //setup_calendar
34 protected $user_id;
35 protected $disable_empty;
36 protected $no_add;
37
45 public function __construct(ilDate $seed_date)
46 {
47 parent::__construct($seed_date, ilCalendarViewGUI::CAL_PRESENTATION_WEEK);
48
49 $this->seed_info = $this->seed->get(IL_CAL_FKT_GETDATE, '', 'UTC');
50
51 $this->user_settings = ilCalendarUserSettings::_getInstanceByUserId($this->user->getId());
52 $this->app_colors = new ilCalendarAppointmentColors($this->user->getId());
53
54 $this->timezone = $this->user->getTimeZone();
55 }
56
63 public function executeCommand()
64 {
65 global $DIC;
66
67 $ilCtrl = $DIC['ilCtrl'];
68 $tpl = $DIC['tpl'];
69
70 $this->ctrl->saveParameter($this, 'seed');
71
72 $next_class = $ilCtrl->getNextClass();
73 switch ($next_class) {
74 case "ilcalendarappointmentpresentationgui":
75 $this->ctrl->setReturn($this, "");
76 include_once("./Services/Calendar/classes/class.ilCalendarAppointmentPresentationGUI.php");
78 $this->ctrl->forwardCommand($gui);
79 break;
80 case 'ilcalendarappointmentgui':
81 $this->ctrl->setReturn($this, '');
82 $this->tabs_gui->setSubTabActive($_SESSION['cal_last_tab']);
83
84 // initial date for new calendar appointments
85 $idate = new ilDate($_REQUEST['idate'], IL_CAL_DATE);
86
87 include_once('./Services/Calendar/classes/class.ilCalendarAppointmentGUI.php');
88 $app = new ilCalendarAppointmentGUI($this->seed, $idate, (int) $_GET['app_id']);
89 $this->ctrl->forwardCommand($app);
90 break;
91
92 default:
93 $time = microtime(true);
94 $cmd = $this->ctrl->getCmd("show");
95 $this->$cmd();
96 $tpl->setContent($this->tpl->get());
97 #echo "Zeit: ".(microtime(true) - $time);
98 break;
99 }
100
101 return true;
102 }
103
110 public function show()
111 {
112 $morning_aggr = $this->getMorningAggr();
113 $evening_aggr = $this->user_settings->getDayEnd() * 60;
114
115 $this->tpl = new ilTemplate('tpl.week_view.html', true, true, 'Services/Calendar');
116
117 include_once('./Services/YUI/classes/class.ilYuiUtil.php');
119
120 $navigation = new ilCalendarHeaderNavigationGUI($this, $this->seed, ilDateTime::WEEK);
121 $this->tpl->setVariable('NAVIGATION', $navigation->getHTML());
122
123 $this->setUpCalendar();
124
125 include_once('Services/Calendar/classes/class.ilCalendarSchedule.php');
126 $this->scheduler = new ilCalendarSchedule($this->seed, ilCalendarSchedule::TYPE_WEEK, $this->user_id, $this->disable_empty);
127 $this->scheduler->addSubitemCalendars(true);
128 $this->scheduler->calculate();
129
130 $counter = 0;
131 $hours = null;
132 $all_fullday = array();
133 foreach (ilCalendarUtil::_buildWeekDayList($this->seed, $this->user_settings->getWeekStart())->get() as $date) {
134 $daily_apps = $this->scheduler->getByDay($date, $this->timezone);
135 if (!$this->view_with_appointments && count($daily_apps)) {
136 $this->view_with_appointments = true;
137 }
138 $hours = $this->parseHourInfo(
139 $daily_apps,
140 $date,
141 $counter,
142 $hours,
143 $morning_aggr,
144 $evening_aggr,
145 $this->raster
146 );
147 $this->weekdays[] = $date;
148
149 $num_apps[$date->get(IL_CAL_DATE)] = count($daily_apps);
150
151 $all_fullday[] = $daily_apps;
152 $counter++;
153 }
154
155 $this->calculateColspans($hours);
156
157 include_once('Services/Calendar/classes/class.ilCalendarSettings.php');
158 $this->cal_settings = ilCalendarSettings::_getInstance();
159
160 // Table header
161 $counter = 0;
162 foreach (ilCalendarUtil::_buildWeekDayList($this->seed, $this->user_settings->getWeekStart())->get() as $date) {
163 $this->ctrl->setParameterByClass('ilcalendarappointmentgui', 'seed', $date->get(IL_CAL_DATE));
164 $this->ctrl->setParameterByClass('ilcalendarappointmentgui', 'idate', $date->get(IL_CAL_DATE));
165 $this->ctrl->setParameterByClass('ilcalendardaygui', 'seed', $date->get(IL_CAL_DATE));
166
167 if (!$this->no_add) {
168 $this->addAppointmentLink($date);
169 }
170
171 $this->addHeaderDate($date, $num_apps);
172
173 $this->tpl->setCurrentBlock('day_header_row');
174 $this->tpl->setVariable('DAY_COLSPAN', max($this->colspans[$counter], 1));
175 $this->tpl->parseCurrentBlock();
176
177 $counter++;
178 }
179
180 // show fullday events
181 $this->addFullDayEvents($all_fullday);
182
183 //show timed events
184 $this->addTimedEvents($hours, $morning_aggr, $evening_aggr);
185
186 $this->tpl->setVariable("TXT_TIME", $this->lng->txt("time"));
187 }
188
196 protected function showFulldayAppointment($a_app)
197 {
198 $event_tpl = new ilTemplate('tpl.day_event_view.html', true, true, 'Services/Calendar');
199
200 // milestone icon
201 if ($a_app['event']->isMilestone()) {
202 $event_tpl->setCurrentBlock('fullday_ms_icon');
203 $event_tpl->setVariable('ALT_FD_MS', $this->lng->txt("cal_milestone"));
204 $event_tpl->setVariable('SRC_FD_MS', ilUtil::getImagePath("icon_ms.svg"));
205 $event_tpl->parseCurrentBlock();
206 }
207
208 $event_tpl->setCurrentBlock('fullday_app');
209
210 $compl = ($a_app['event']->isMilestone() && $a_app['event']->getCompletion() > 0)
211 ? " (" . $a_app['event']->getCompletion() . "%)"
212 : "";
213
214 $shy = $this->getAppointmentShyButton($a_app['event'], $a_app['dstart'], "");
215
216 $title = $shy . $compl;
217
218 $event_tpl->setVariable('EVENT_CONTENT', $title);
219
220 $color = $this->app_colors->getColorByAppointment($a_app['event']->getEntryId());
221 $font_color = ilCalendarUtil::calculateFontColor($color);
222
223 $event_tpl->setVariable('F_APP_BGCOLOR', $color);
224 $event_tpl->setVariable('F_APP_FONTCOLOR', $font_color);
225
226 $this->ctrl->clearParametersByClass('ilcalendarappointmentgui');
227 $this->ctrl->setParameterByClass('ilcalendarappointmentgui', 'app_id', $a_app['event']->getEntryId());
228 $event_tpl->setVariable('F_APP_EDIT_LINK', $this->ctrl->getLinkTargetByClass('ilcalendarappointmentgui', 'edit'));
229
230 if ($event_html_by_plugin = $this->getContentByPlugins($a_app['event'], $a_app['dstart'], $title, $event_tpl)) {
231 $event_html = $event_html_by_plugin;
232 } else {
233 $event_tpl->parseCurrentBlock();
234 $event_html = $event_tpl->get();
235 }
236
237 $this->tpl->setCurrentBlock("content_fd");
238 $this->tpl->setVariable("CONTENT_EVENT_FD", $event_html);
239 $this->tpl->parseCurrentBlock();
240
241 $this->num_appointments++;
242 }
243
250 protected function showAppointment($a_app)
251 {
252 $event_tpl = new ilTemplate('tpl.week_event_view.html', true, true, 'Services/Calendar');
253
255
256 if (!$ilUser->prefs["screen_reader_optimization"]) {
257 $this->tpl->setCurrentBlock('not_empty');
258 } else {
259 $this->tpl->setCurrentBlock('scrd_not_empty');
260 }
261
262 $this->ctrl->clearParametersByClass('ilcalendarappointmentgui');
263 $this->ctrl->setParameterByClass('ilcalendarappointmentgui', 'app_id', $a_app['event']->getEntryId());
264
265 $color = $this->app_colors->getColorByAppointment($a_app['event']->getEntryId());
266 $style = 'background-color: ' . $color . ';';
267 $style .= ('color:' . ilCalendarUtil::calculateFontColor($color));
268 $td_style = $style;
269
270
271 if (!$a_app['event']->isFullDay()) {
272 $time = $this->getAppointmentTimeString($a_app['event']);
273
274 $td_style .= $a_app['event']->getPresentationStyle();
275 }
276
277 $shy = $this->getAppointmentShyButton($a_app['event'], $a_app['dstart'], "");
278
279 $title = ($time != "")? $time . " " . $shy : $shy;
280
281 $event_tpl->setCurrentBlock('event_cell_content');
282 if (!$ilUser->prefs["screen_reader_optimization"]) {
283 $event_tpl->setVariable("STYLE", $style);
284 }
285 $event_tpl->setVariable('EVENT_CONTENT', $title);
286
287 if ($event_html_by_plugin = $this->getContentByPlugins($a_app['event'], $a_app['dstart'], $title, $event_tpl)) {
288 $event_html = $event_html_by_plugin;
289 } else {
290 $event_tpl->parseCurrentBlock();
291 $event_html = $event_tpl->get();
292 }
293
294 $this->tpl->setVariable('GRID_CONTENT', $event_html);
295
296 if (!$ilUser->prefs["screen_reader_optimization"]) {
297 // provide table cell attributes
298 $this->tpl->parseCurrentBlock();
299
300 $this->tpl->setCurrentBlock('day_cell');
301
302 $this->tpl->setVariable('DAY_CELL_NUM', $this->num_appointments);
303 $this->tpl->setVariable('TD_ROWSPAN', $a_app['rowspan']);
304 $this->tpl->setVariable('TD_STYLE',$a_app['event']->getPresentationStyle());
305 $this->tpl->setVariable('TD_CLASS', 'calevent il_calevent');
306
307 $this->tpl->parseCurrentBlock();
308 } else {
309 // screen reader: work on div attributes
310 $this->tpl->setVariable('DIV_STYLE', $style);
311 $this->tpl->parseCurrentBlock();
312 }
313
314 $this->num_appointments++;
315 }
316
323 protected function parseHourInfo($daily_apps, $date, $num_day, $hours = null, $morning_aggr, $evening_aggr)
324 {
325 global $DIC;
326
327 $ilUser = $DIC['ilUser'];
328
329 for ($i = $morning_aggr;$i <= $evening_aggr;$i += $this->raster) {
330 $hours[$i][$num_day]['apps_start'] = array();
331 $hours[$i][$num_day]['apps_num'] = 0;
332 switch ($this->user_settings->getTimeFormat()) {
334 if ($morning_aggr > 0 && $i == $morning_aggr) {
335 $hours[$i][$num_day]['txt'] = sprintf('%02d:00', 0) . ' - ' .
336 sprintf('%02d:00', ceil(($i + 1) / 60));
337 } else {
338 $hours[$i][$num_day]['txt'] .= sprintf('%02d:%02d', floor($i / 60), $i % 60);
339 }
340 if ($evening_aggr < 23 * 60 && $i == $evening_aggr) {
341 $hours[$i][$num_day]['txt'] .= ' - ' . sprintf('%02d:00', 0);
342 }
343 break;
344
346 if ($morning_aggr > 0 && $i == $morning_aggr) {
347 $hours[$i][$num_day]['txt'] =
348 date('h a', mktime(0, 0, 0, 1, 1, 2000)) . ' - ' .
349 date('h a', mktime($this->user_settings->getDayStart(), 0, 0, 1, 1, 2000));
350 } else {
351 $hours[$i][$num_day]['txt'] .= date('h a', mktime(floor($i / 60), $i % 60, 0, 1, 1, 2000));
352 }
353 if ($evening_aggr < 23 * 60 && $i == $evening_aggr) {
354 $hours[$i][$num_day]['txt'] =
355 date('h a', mktime($this->user_settings->getDayEnd(), 0, 0, 1, 1, '2000')) . ' - ' .
356 date('h a', mktime(0, 0, 0, 1, 1, 2000));
357 }
358 break;
359 }
360 }
361
362 $date_info = $date->get(IL_CAL_FKT_GETDATE, '', 'UTC');
363
364
365 foreach ($daily_apps as $app) {
366 // fullday appointment are not relavant
367 if ($app['fullday']) {
368 continue;
369 }
370 // start hour for this day
371 #21636
372 if ($app['start_info']['mday'] != $date_info['mday']) {
373 $start = 0;
374 } else {
375 $start = $app['start_info']['hours'] * 60 + $app['start_info']['minutes'];
376 }
377 #21132 #21636
378 //$start = $app['start_info']['hours']*60+$app['start_info']['minutes'];
379
380 // end hour for this day
381 if ($app['end_info']['mday'] != $date_info['mday']) {
382 $end = 23 * 60;
383 } elseif ($app['start_info']['hours'] == $app['end_info']['hours']) {
384 $end = $start + $raster;
385 } else {
386 $end = $app['end_info']['hours'] * 60 + $app['end_info']['minutes'];
387 }
388 #21132 #21636
389 //$end = $app['end_info']['hours']*60+$app['end_info']['minutes'];
390
391 // set end to next hour for screen readers
392 if ($ilUser->prefs["screen_reader_optimization"]) {
394 }
395
396 if ($start < $morning_aggr) {
397 $start = $morning_aggr;
398 }
399 if ($end <= $morning_aggr) {
400 $end = $morning_aggr + $this->raster;
401 }
402 if ($start > $evening_aggr) {
403 $start = $evening_aggr;
404 }
405 if ($end > $evening_aggr + $this->raster) {
406 $end = $evening_aggr + $this->raster;
407 }
408 if ($end <= $start) {
410 }
411
412 // map start and end to raster
413 $start = floor($start / $this->raster) * $this->raster;
414 $end = ceil($end / $this->raster) * $this->raster;
415
416 $first = true;
417 for ($i = $start;$i < $end;$i += $this->raster) {
418 if ($first) {
419 if (!$ilUser->prefs["screen_reader_optimization"]) {
420 $app['rowspan'] = ceil(($end - $start) / $this->raster);
421 } else { // screen readers get always a rowspan of 1
422 $app['rowspan'] = 1;
423 }
424 $hours[$i][$num_day]['apps_start'][] = $app;
425 $first = false;
426 }
427 $hours[$i][$num_day]['apps_num']++;
428 }
429 }
430 return $hours;
431 }
432
440 protected function calculateColspans($hours)
441 {
442 global $DIC;
443
444 $ilUser = $DIC['ilUser'];
445
446 foreach ($hours as $hour_num => $hours_per_day) {
447 foreach ($hours_per_day as $num_day => $hour) {
448 $this->colspans[$num_day] = max($this->colspans[$num_day], $hour['apps_num']);
449
450 // screen reader: always one col
451 if ($ilUser->prefs["screen_reader_optimization"]) {
452 $this->colspans[$num_day] = 1;
453 }
454 }
455 }
456 }
457
461 protected function getMorningAggr()
462 {
463 if ($this->user_settings->getDayStart()) {
464 // push starting point to last "slot" of hour BEFORE morning aggregation
465 $morning_aggr = ($this->user_settings->getDayStart() - 1) * 60 + (60 - $this->raster);
466 } else {
467 $morning_aggr = 0;
468 }
469
470 return $morning_aggr;
471 }
472
477 protected function addAppointmentLink($date)
478 {
479 $new_app_url = $this->ctrl->getLinkTargetByClass('ilcalendarappointmentgui', 'add');
480
481 if ($this->cal_settings->getEnableGroupMilestones()) {
482 $new_ms_url = $this->ctrl->getLinkTargetByClass('ilcalendarappointmentgui', 'addMilestone');
483
484 $this->tpl->setCurrentBlock("new_ms");
485 $this->tpl->setVariable('DD_ID', $date->get(IL_CAL_UNIX));
486 $this->tpl->setVariable('DD_TRIGGER', $this->ui_renderer->render($this->ui_factory->glyph()->add()));
487 $this->tpl->setVariable('URL_DD_NEW_APP', $new_app_url);
488 $this->tpl->setVariable('TXT_DD_NEW_APP', $this->lng->txt('cal_new_app'));
489 $this->tpl->setVariable('URL_DD_NEW_MS', $new_ms_url);
490 $this->tpl->setVariable('TXT_DD_NEW_MS', $this->lng->txt('cal_new_ms'));
491 $this->tpl->parseCurrentBlock();
492 } else {
493 $this->tpl->setCurrentBlock("new_app");
494 //$this->tpl->setVariable('NEW_APP_LINK',$new_app_url);
495 $this->tpl->setVariable('NEW_APP_GLYPH', $this->ui_renderer->render(
496 $this->ui_factory->glyph()->add($new_app_url)
497 ));
498 // $this->tpl->setVariable('NEW_APP_ALT',$this->lng->txt('cal_new_app'));
499 $this->tpl->parseCurrentBlock();
500 }
501
502 $this->ctrl->clearParametersByClass('ilcalendarappointmentgui');
503 }
504
508 protected function setUpCalendar()
509 {
510 if (isset($_GET["bkid"])) {
511 $this->user_id = $_GET["bkid"];
512 $this->disable_empty = true;
513 $this->no_add = true;
514 } elseif ($this->user->getId() == ANONYMOUS_USER_ID) {
515 //$this->user_id = $ilUser->getId();
516 $this->disable_empty = false;
517 $this->no_add = true;
518 } else {
519 //$this->user_id = $ilUser->getId();
520 $this->disable_empty = false;
521 $this->no_add = false;
522 }
523 }
524
529 protected function addHeaderDate($date, $num_apps)
530 {
531 $date_info = $date->get(IL_CAL_FKT_GETDATE, '', 'UTC');
532 $dayname = ilCalendarUtil::_numericDayToString($date->get(IL_CAL_FKT_DATE, 'w'), false);
533 $daydate = $dayname . ' ' . $date_info['mday'] . '.';
534
535 if (!$this->disable_empty || $num_apps[$date->get(IL_CAL_DATE)] > 0) {
536 $link = $this->ctrl->getLinkTargetByClass('ilcalendardaygui', '');
537 $this->ctrl->clearParametersByClass('ilcalendardaygui');
538
539 $this->tpl->setCurrentBlock("day_view_link");
540 $this->tpl->setVariable('HEADER_DATE', $daydate);
541 $this->tpl->setVariable('DAY_VIEW_LINK', $link);
542 $this->tpl->parseCurrentBlock();
543 } else {
544 $this->tpl->setCurrentBlock("day_view_no_link");
545 $this->tpl->setVariable('HEADER_DATE', $daydate);
546 $this->tpl->parseCurrentBlock();
547 }
548 }
549
553 protected function addFullDayEvents($all_fullday)
554 {
555 $counter = 0;
556 foreach ($all_fullday as $daily_apps) {
557 foreach ($daily_apps as $event) {
558 if ($event['fullday']) {
559 $this->showFulldayAppointment($event);
560 }
561 }
562 $this->tpl->setCurrentBlock('f_day_row');
563 $this->tpl->setVariable('COLSPAN', max($this->colspans[$counter], 1));
564 $this->tpl->parseCurrentBlock();
565 $counter++;
566 }
567 $this->tpl->setCurrentBlock('fullday_apps');
568 $this->tpl->setVariable('TXT_F_DAY', $this->lng->txt("cal_all_day"));
569 $this->tpl->parseCurrentBlock();
570 }
571
577 protected function addTimedEvents($hours, $morning_aggr, $evening_aggr)
578 {
579 global $DIC;
580
581 $ui_factory = $DIC->ui()->factory();
582 $renderer = $DIC->ui()->renderer();
583
584 $new_link_counter = 0;
585 foreach ($hours as $num_hour => $hours_per_day) {
586 $first = true;
587 foreach ($hours_per_day as $num_day => $hour) {
588
589 #ADD the hours in the left side of the grid.
590 if ($first) {
591 if (!($num_hour % 60) || ($num_hour == $morning_aggr && $morning_aggr) ||
592 ($num_hour == $evening_aggr && $evening_aggr)) {
593 $first = false;
594
595 // aggregation rows
596 if (($num_hour == $morning_aggr && $morning_aggr) ||
597 ($num_hour == $evening_aggr && $evening_aggr)) {
598 $this->tpl->setVariable('TIME_ROWSPAN', 1);
599 }
600 // rastered hour
601 else {
602 $this->tpl->setVariable('TIME_ROWSPAN', 60 / $this->raster);
603 }
604
605 $this->tpl->setCurrentBlock('time_txt');
606
607 $this->tpl->setVariable('TIME', $hour['txt']);
608 $this->tpl->parseCurrentBlock();
609 }
610 }
611
612 foreach ($hour['apps_start'] as $app) {
613 $this->showAppointment($app);
614 }
615
616 // screen reader: appointments are divs, now output cell
617 if ($this->user->prefs["screen_reader_optimization"]) {
618 $this->tpl->setCurrentBlock('scrd_day_cell');
619 $this->tpl->setVariable('TD_CLASS', 'calstd');
620 $this->tpl->parseCurrentBlock();
621 }
622
623 #echo "NUMDAY: ".$num_day;
624 #echo "COLAPANS: ".max($colspans[$num_day],1).'<br />';
625 $num_apps = $hour['apps_num'];
626 $colspan = max($this->colspans[$num_day], 1);
627
628 // Show new apointment link
629 if (!$hour['apps_num'] && !$this->user->prefs["screen_reader_optimization"] && !$this->no_add) {
630 $this->tpl->setCurrentBlock('new_app_link');
631
632 $this->ctrl->clearParameterByClass('ilcalendarappointmentgui', 'app_id');
633
634 $this->ctrl->setParameterByClass('ilcalendarappointmentgui', 'idate', $this->weekdays[$num_day]->get(IL_CAL_DATE));
635 $this->ctrl->setParameterByClass('ilcalendarappointmentgui', 'seed', $this->seed->get(IL_CAL_DATE));
636 $this->ctrl->setParameterByClass('ilcalendarappointmentgui', 'hour', floor($num_hour / 60));
637
638 //todo:it could be nice use also ranges of 15 min to create events.
639 $new_app_url = $this->ctrl->getLinkTargetByClass('ilcalendarappointmentgui', 'add');
640 $this->tpl->setVariable("DAY_NEW_APP_LINK", $renderer->render($ui_factory->glyph()->add($new_app_url)));
641
642
643 $this->tpl->setVariable('DAY_NEW_ID', ++$new_link_counter);
644 $this->tpl->parseCurrentBlock();
645 }
646
647 for ($i = $colspan;$i > $hour['apps_num'];$i--) {
648 if ($this->user->prefs["screen_reader_optimization"]) {
649 continue;
650 }
651 $this->tpl->setCurrentBlock('day_cell');
652
653 // last "slot" of hour needs border
654 $empty_border = '';
655 if ($num_hour % 60 == 60 - $this->raster ||
656 ($num_hour == $morning_aggr && $morning_aggr) ||
657 ($num_hour == $evening_aggr && $evening_aggr)) {
658 $empty_border = ' calempty_border';
659 }
660
661 $this->tpl->setVariable('TD_CLASS', 'calempty createhover' . $empty_border);
662
663 if (!$hour['apps_num']) {
664 $this->tpl->setVariable('DAY_ID', $new_link_counter);
665 }
666 $this->tpl->setVariable('TD_ROWSPAN', 1);
667 $this->tpl->parseCurrentBlock();
668 }
669 }
670
671 $this->tpl->touchBlock('time_row');
672 }
673 }
674
679 protected function getAppointmentTimeString(ilCalendarEntry $a_event)
680 {
681 $time = "";
682 switch ($this->user_settings->getTimeFormat()) {
684 $time = $a_event->getStart()->get(IL_CAL_FKT_DATE, 'H:i', $this->timezone);
685 break;
686
688 $time = $a_event->getStart()->get(IL_CAL_FKT_DATE, 'h:ia', $this->timezone);
689 break;
690 }
691 // add end time for screen readers
692 if ($this->user->prefs["screen_reader_optimization"]) {
693 switch ($this->user_settings->getTimeFormat()) {
695 $time .= "-" . $a_event->getEnd()->get(IL_CAL_FKT_DATE, 'H:i', $this->timezone);
696 break;
697
699 $time .= "-" . $a_event->getEnd()->get(IL_CAL_FKT_DATE, 'h:ia', $this->timezone);
700 break;
701 }
702 }
703
704 return $time;
705 }
706}
user()
Definition: user.php:4
$_GET["client_id"]
$_SESSION["AccountId"]
An exception for terminatinating execution or to throw for unit testing.
const IL_CAL_FKT_GETDATE
const IL_CAL_DATE
const IL_CAL_UNIX
const IL_CAL_FKT_DATE
Administrate calendar appointments.
static _getInstance(ilDate $seed, $a_app)
get singleton instance
Model for a calendar entry.
getEnd()
get end @access public
Represents a list of calendar appointments (including recurring events) for a specific user in a give...
static _getInstance()
get singleton instance
static _getInstanceByUserId($a_user_id)
get singleton instance
static _numericDayToString($a_day, $a_long=true)
get
static _buildWeekDayList($a_day, $a_weekstart)
build week day list
static calculateFontColor($a_html_color_code)
Calculate best font color from html hex color code.
getAppointmentShyButton($a_calendar_entry, $a_dstart, $a_title_forced="")
getCurrentApp()
Get app for id.
getContentByPlugins($a_cal_entry, $a_start_date, $a_content, $a_tpl)
getAppointmentTimeString(ilCalendarEntry $a_event)
setUpCalendar()
Set values for: user_id, disable_empty, no_add.
addTimedEvents($hours, $morning_aggr, $evening_aggr)
__construct(ilDate $seed_date)
Constructor.
addHeaderDate($date, $num_apps)
showFulldayAppointment($a_app)
show fullday appointment
calculateColspans($hours)
calculate colspan
executeCommand()
Execute command.
addAppointmentLink($date)
Add the links to create an appointment or milestone.
showAppointment($a_app)
show appointment
parseHourInfo($daily_apps, $date, $num_day, $hours=null, $morning_aggr, $evening_aggr)
calculate overlapping hours
Class for single dates.
special template class to simplify handling of ITX/PEAR
static getImagePath($img, $module_path="", $mode="output", $offline=false)
get image path (for images located in a template directory)
static initDragDrop()
Init YUI Drag and Drop.
$i
Definition: disco.tpl.php:19
$style
Definition: example_012.php:70
global $ilCtrl
Definition: ilias.php:18
$time
Definition: cron.php:21
global $DIC
Definition: saml.php:7
$ilUser
Definition: imgupload.php:18
$start
Definition: bench.php:8