ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
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 $ilCtrl,$tpl;
66
67 $this->ctrl->saveParameter($this, 'seed');
68
69 $next_class = $ilCtrl->getNextClass();
70 switch ($next_class) {
71 case "ilcalendarappointmentpresentationgui":
72 $this->ctrl->setReturn($this, "");
73 include_once("./Services/Calendar/classes/class.ilCalendarAppointmentPresentationGUI.php");
75 $this->ctrl->forwardCommand($gui);
76 break;
77 case 'ilcalendarappointmentgui':
78 $this->ctrl->setReturn($this, '');
79 $this->tabs_gui->setSubTabActive($_SESSION['cal_last_tab']);
80
81 // initial date for new calendar appointments
82 $idate = new ilDate($_REQUEST['idate'], IL_CAL_DATE);
83
84 include_once('./Services/Calendar/classes/class.ilCalendarAppointmentGUI.php');
85 $app = new ilCalendarAppointmentGUI($this->seed, $idate, (int) $_GET['app_id']);
86 $this->ctrl->forwardCommand($app);
87 break;
88
89 default:
90 $time = microtime(true);
91 $cmd = $this->ctrl->getCmd("show");
92 $this->$cmd();
93 $tpl->setContent($this->tpl->get());
94 #echo "Zeit: ".(microtime(true) - $time);
95 break;
96 }
97
98 return true;
99 }
100
107 public function show()
108 {
109 $morning_aggr = $this->getMorningAggr();
110 $evening_aggr = $this->user_settings->getDayEnd()*60;
111
112 $this->tpl = new ilTemplate('tpl.week_view.html', true, true, 'Services/Calendar');
113
114 include_once('./Services/YUI/classes/class.ilYuiUtil.php');
116
117 $navigation = new ilCalendarHeaderNavigationGUI($this, $this->seed, ilDateTime::WEEK);
118 $this->tpl->setVariable('NAVIGATION', $navigation->getHTML());
119
120 $this->setUpCalendar();
121
122 include_once('Services/Calendar/classes/class.ilCalendarSchedule.php');
123 $this->scheduler = new ilCalendarSchedule($this->seed, ilCalendarSchedule::TYPE_WEEK, $this->user_id, $this->disable_empty);
124 $this->scheduler->addSubitemCalendars(true);
125 $this->scheduler->calculate();
126
127 $counter = 0;
128 $hours = null;
129 $all_fullday = array();
130 foreach (ilCalendarUtil::_buildWeekDayList($this->seed, $this->user_settings->getWeekStart())->get() as $date) {
131 $daily_apps = $this->scheduler->getByDay($date, $this->timezone);
132 if (!$this->view_with_appointments && count($daily_apps)) {
133 $this->view_with_appointments = true;
134 }
135 $hours = $this->parseHourInfo(
136 $daily_apps,
137 $date,
138 $counter,
139 $hours,
140 $morning_aggr,
141 $evening_aggr,
142 $this->raster
143 );
144 $this->weekdays[] = $date;
145
146 $num_apps[$date->get(IL_CAL_DATE)] = count($daily_apps);
147
148 $all_fullday[] = $daily_apps;
149 $counter++;
150 }
151
152 $this->calculateColspans($hours);
153
154 include_once('Services/Calendar/classes/class.ilCalendarSettings.php');
155 $this->cal_settings = ilCalendarSettings::_getInstance();
156
157 // Table header
158 $counter = 0;
159 foreach (ilCalendarUtil::_buildWeekDayList($this->seed, $this->user_settings->getWeekStart())->get() as $date) {
160 $this->ctrl->setParameterByClass('ilcalendarappointmentgui', 'seed', $date->get(IL_CAL_DATE));
161 $this->ctrl->setParameterByClass('ilcalendarappointmentgui', 'idate', $date->get(IL_CAL_DATE));
162 $this->ctrl->setParameterByClass('ilcalendardaygui', 'seed', $date->get(IL_CAL_DATE));
163
164 if (!$this->no_add) {
165 $this->addAppointmentLink($date);
166 }
167
168 $this->addHeaderDate($date, $num_apps);
169
170 $this->tpl->setCurrentBlock('day_header_row');
171 $this->tpl->setVariable('DAY_COLSPAN', max($this->colspans[$counter], 1));
172 $this->tpl->parseCurrentBlock();
173
174 $counter++;
175 }
176
177 // show fullday events
178 $this->addFullDayEvents($all_fullday);
179
180 //show timed events
181 $this->addTimedEvents($hours, $morning_aggr, $evening_aggr);
182
183 $this->tpl->setVariable("TXT_TIME", $this->lng->txt("time"));
184 }
185
193 protected function showFulldayAppointment($a_app)
194 {
195 $event_tpl = new ilTemplate('tpl.day_event_view.html', true, true, 'Services/Calendar');
196
197 // milestone icon
198 if ($a_app['event']->isMilestone()) {
199 $event_tpl->setCurrentBlock('fullday_ms_icon');
200 $event_tpl->setVariable('ALT_FD_MS', $this->lng->txt("cal_milestone"));
201 $event_tpl->setVariable('SRC_FD_MS', ilUtil::getImagePath("icon_ms.svg"));
202 $event_tpl->parseCurrentBlock();
203 }
204
205 $event_tpl->setCurrentBlock('fullday_app');
206
207 $compl = ($a_app['event']->isMilestone() && $a_app['event']->getCompletion() > 0)
208 ? " (" . $a_app['event']->getCompletion() . "%)"
209 : "";
210
211 $shy = $this->getAppointmentShyButton($a_app['event'], $a_app['dstart'], "");
212
213 $title = $shy . $compl;
214
215 $event_tpl->setVariable('EVENT_CONTENT', $title);
216
217 $color = $this->app_colors->getColorByAppointment($a_app['event']->getEntryId());
218 $font_color = ilCalendarUtil::calculateFontColor($color);
219
220 $event_tpl->setVariable('F_APP_BGCOLOR', $color);
221 $event_tpl->setVariable('F_APP_FONTCOLOR', $font_color);
222
223 $this->ctrl->clearParametersByClass('ilcalendarappointmentgui');
224 $this->ctrl->setParameterByClass('ilcalendarappointmentgui', 'app_id', $a_app['event']->getEntryId());
225 $event_tpl->setVariable('F_APP_EDIT_LINK', $this->ctrl->getLinkTargetByClass('ilcalendarappointmentgui', 'edit'));
226
227 if ($event_html_by_plugin = $this->getContentByPlugins($a_app['event'], $a_app['dstart'], $title, $event_tpl)) {
228 $event_html = $event_html_by_plugin;
229 } else {
230 $event_tpl->parseCurrentBlock();
231 $event_html = $event_tpl->get();
232 }
233
234 $this->tpl->setCurrentBlock("content_fd");
235 $this->tpl->setVariable("CONTENT_EVENT_FD", $event_html);
236 $this->tpl->parseCurrentBlock();
237
238 $this->num_appointments++;
239 }
240
247 protected function showAppointment($a_app)
248 {
249 $event_tpl = new ilTemplate('tpl.week_event_view.html', true, true, 'Services/Calendar');
250
252
253 if (!$ilUser->prefs["screen_reader_optimization"]) {
254 $this->tpl->setCurrentBlock('not_empty');
255 } else {
256 $this->tpl->setCurrentBlock('scrd_not_empty');
257 }
258
259 $this->ctrl->clearParametersByClass('ilcalendarappointmentgui');
260 $this->ctrl->setParameterByClass('ilcalendarappointmentgui', 'app_id', $a_app['event']->getEntryId());
261
262 $color = $this->app_colors->getColorByAppointment($a_app['event']->getEntryId());
263 $style = 'background-color: ' . $color . ';';
264 $style .= ('color:' . ilCalendarUtil::calculateFontColor($color));
265 $td_style = $style;
266
267
268 if (!$a_app['event']->isFullDay()) {
269 $time = $this->getAppointmentTimeString($a_app['event']);
270
271 $td_style .= $a_app['event']->getPresentationStyle();
272 }
273
274 $shy = $this->getAppointmentShyButton($a_app['event'], $a_app['dstart'], "");
275
276 $title = ($time != "")? $time . " " . $shy : $shy;
277
278 $event_tpl->setCurrentBlock('event_cell_content');
279 if (!$ilUser->prefs["screen_reader_optimization"]) {
280 $event_tpl->setVariable("STYLE", $style);
281 }
282 $event_tpl->setVariable('EVENT_CONTENT', $title);
283
284 if ($event_html_by_plugin = $this->getContentByPlugins($a_app['event'], $a_app['dstart'], $title, $event_tpl)) {
285 $event_html = $event_html_by_plugin;
286 } else {
287 $event_tpl->parseCurrentBlock();
288 $event_html = $event_tpl->get();
289 }
290
291 $this->tpl->setVariable('GRID_CONTENT', $event_html);
292
293 if (!$ilUser->prefs["screen_reader_optimization"]) {
294 // provide table cell attributes
295 $this->tpl->parseCurrentBlock();
296
297 $this->tpl->setCurrentBlock('day_cell');
298
299 $this->tpl->setVariable('DAY_CELL_NUM', $this->num_appointments);
300 $this->tpl->setVariable('TD_ROWSPAN', $a_app['rowspan']);
301 //$event_tpl->setVariable('TD_STYLE',$td_style);
302 $this->tpl->setVariable('TD_CLASS', 'calevent il_calevent');
303
304 $this->tpl->parseCurrentBlock();
305 } else {
306 // screen reader: work on div attributes
307 $this->tpl->setVariable('DIV_STYLE', $style);
308 $this->tpl->parseCurrentBlock();
309 }
310
311 $this->num_appointments++;
312 }
313
320 protected function parseHourInfo($daily_apps, $date, $num_day, $hours = null, $morning_aggr, $evening_aggr)
321 {
322 global $ilUser;
323
324 for ($i = $morning_aggr;$i <= $evening_aggr;$i+=$this->raster) {
325 $hours[$i][$num_day]['apps_start'] = array();
326 $hours[$i][$num_day]['apps_num'] = 0;
327 switch ($this->user_settings->getTimeFormat()) {
329 if ($morning_aggr > 0 && $i == $morning_aggr) {
330 $hours[$i][$num_day]['txt'] = sprintf('%02d:00', 0) . "-" .
331 sprintf('%02d:00', ceil(($i+1)/60));
332 } else {
333 $hours[$i][$num_day]['txt'].= sprintf('%02d:%02d', floor($i/60), $i%60);
334 }
335 if ($evening_aggr < 23*60 && $i == $evening_aggr) {
336 $hours[$i][$num_day]['txt'].= "-" . sprintf('%02d:00', 23);
337 }
338 break;
339
341 if ($morning_aggr > 0 && $i == $morning_aggr) {
342 $hours[$i][$num_day]['txt'] = date('h a', mktime(0, 0, 0, 1, 1, 2000)) . "-";
343 }
344 $hours[$i][$num_day]['txt'].= date('h a', mktime(floor($i/60), $i%60, 0, 1, 1, 2000));
345 if ($evening_aggr < 23 && $i == $evening_aggr) {
346 $hours[$i][$num_day]['txt'].= "-" . date('h a', mktime(23, 0, 0, 1, 1, 2000));
347 }
348 break;
349 }
350 }
351
352 $date_info = $date->get(IL_CAL_FKT_GETDATE, '', 'UTC');
353
354
355 foreach ($daily_apps as $app) {
356 // fullday appointment are not relavant
357 if ($app['fullday']) {
358 continue;
359 }
360 // start hour for this day
361 #21636
362 if ($app['start_info']['mday'] != $date_info['mday']) {
363 $start = 0;
364 } else {
365 $start = $app['start_info']['hours']*60+$app['start_info']['minutes'];
366 }
367 #21132 #21636
368 //$start = $app['start_info']['hours']*60+$app['start_info']['minutes'];
369
370 // end hour for this day
371 if ($app['end_info']['mday'] != $date_info['mday']) {
372 $end = 23*60;
373 } elseif ($app['start_info']['hours'] == $app['end_info']['hours']) {
374 $end = $start+$raster;
375 } else {
376 $end = $app['end_info']['hours']*60+$app['end_info']['minutes'];
377 }
378 #21132 #21636
379 //$end = $app['end_info']['hours']*60+$app['end_info']['minutes'];
380
381 // set end to next hour for screen readers
382 if ($ilUser->prefs["screen_reader_optimization"]) {
383 $end = $start+$this->raster;
384 }
385
386 if ($start < $morning_aggr) {
387 $start = $morning_aggr;
388 }
389 if ($end <= $morning_aggr) {
390 $end = $morning_aggr+$this->raster;
391 }
392 if ($start > $evening_aggr) {
393 $start = $evening_aggr;
394 }
395 if ($end > $evening_aggr+$this->raster) {
396 $end = $evening_aggr+$this->raster;
397 }
398 if ($end <= $start) {
399 $end = $start+$this->raster;
400 }
401
402 // map start and end to raster
403 $start = floor($start/$this->raster)*$this->raster;
404 $end = ceil($end/$this->raster)*$this->raster;
405
406 $first = true;
407 for ($i = $start;$i < $end;$i+=$this->raster) {
408 if ($first) {
409 if (!$ilUser->prefs["screen_reader_optimization"]) {
410 $app['rowspan'] = ceil(($end - $start)/$this->raster);
411 } else { // screen readers get always a rowspan of 1
412 $app['rowspan'] = 1;
413 }
414 $hours[$i][$num_day]['apps_start'][] = $app;
415 $first = false;
416 }
417 $hours[$i][$num_day]['apps_num']++;
418 }
419 }
420 return $hours;
421 }
422
430 protected function calculateColspans($hours)
431 {
432 global $ilUser;
433
434 foreach ($hours as $hour_num => $hours_per_day) {
435 foreach ($hours_per_day as $num_day => $hour) {
436 $this->colspans[$num_day] = max($this->colspans[$num_day], $hour['apps_num']);
437
438 // screen reader: always one col
439 if ($ilUser->prefs["screen_reader_optimization"]) {
440 $this->colspans[$num_day] = 1;
441 }
442 }
443 }
444 }
445
449 protected function getMorningAggr()
450 {
451 if ($this->user_settings->getDayStart()) {
452 // push starting point to last "slot" of hour BEFORE morning aggregation
453 $morning_aggr = ($this->user_settings->getDayStart()-1)*60+(60-$this->raster);
454 } else {
455 $morning_aggr = 0;
456 }
457
458 return $morning_aggr;
459 }
460
465 protected function addAppointmentLink($date)
466 {
467 $new_app_url = $this->ctrl->getLinkTargetByClass('ilcalendarappointmentgui', 'add');
468
469 if ($this->cal_settings->getEnableGroupMilestones()) {
470 $new_ms_url = $this->ctrl->getLinkTargetByClass('ilcalendarappointmentgui', 'addMilestone');
471
472 $this->tpl->setCurrentBlock("new_ms");
473 $this->tpl->setVariable('DD_ID', $date->get(IL_CAL_UNIX));
474 $this->tpl->setVariable('DD_TRIGGER', $this->ui_renderer->render($this->ui_factory->glyph()->add()));
475 $this->tpl->setVariable('URL_DD_NEW_APP', $new_app_url);
476 $this->tpl->setVariable('TXT_DD_NEW_APP', $this->lng->txt('cal_new_app'));
477 $this->tpl->setVariable('URL_DD_NEW_MS', $new_ms_url);
478 $this->tpl->setVariable('TXT_DD_NEW_MS', $this->lng->txt('cal_new_ms'));
479 $this->tpl->parseCurrentBlock();
480 } else {
481 $this->tpl->setCurrentBlock("new_app");
482 //$this->tpl->setVariable('NEW_APP_LINK',$new_app_url);
483 $this->tpl->setVariable('NEW_APP_GLYPH', $this->ui_renderer->render(
484 $this->ui_factory->glyph()->add($new_app_url)
485 ));
486 // $this->tpl->setVariable('NEW_APP_ALT',$this->lng->txt('cal_new_app'));
487 $this->tpl->parseCurrentBlock();
488 }
489
490 $this->ctrl->clearParametersByClass('ilcalendarappointmentgui');
491 }
492
496 protected function setUpCalendar()
497 {
498 if (isset($_GET["bkid"])) {
499 $this->user_id = $_GET["bkid"];
500 $this->disable_empty = true;
501 $this->no_add = true;
502 } elseif ($this->user->getId() == ANONYMOUS_USER_ID) {
503 //$this->user_id = $ilUser->getId();
504 $this->disable_empty = false;
505 $this->no_add = true;
506 } else {
507 //$this->user_id = $ilUser->getId();
508 $this->disable_empty = false;
509 $this->no_add = false;
510 }
511 }
512
517 protected function addHeaderDate($date, $num_apps)
518 {
519 $date_info = $date->get(IL_CAL_FKT_GETDATE, '', 'UTC');
520 $dayname = ilCalendarUtil::_numericDayToString($date->get(IL_CAL_FKT_DATE, 'w'), false);
521 $daydate = $dayname . ' ' . $date_info['mday'] . '.';
522
523 if (!$this->disable_empty || $num_apps[$date->get(IL_CAL_DATE)] > 0) {
524 $link = $this->ctrl->getLinkTargetByClass('ilcalendardaygui', '');
525 $this->ctrl->clearParametersByClass('ilcalendardaygui');
526
527 $this->tpl->setCurrentBlock("day_view_link");
528 $this->tpl->setVariable('HEADER_DATE', $daydate);
529 $this->tpl->setVariable('DAY_VIEW_LINK', $link);
530 $this->tpl->parseCurrentBlock();
531 } else {
532 $this->tpl->setCurrentBlock("day_view_no_link");
533 $this->tpl->setVariable('HEADER_DATE', $daydate);
534 $this->tpl->parseCurrentBlock();
535 }
536 }
537
541 protected function addFullDayEvents($all_fullday)
542 {
543 $counter = 0;
544 foreach ($all_fullday as $daily_apps) {
545 foreach ($daily_apps as $event) {
546 if ($event['fullday']) {
547 $this->showFulldayAppointment($event);
548 }
549 }
550 $this->tpl->setCurrentBlock('f_day_row');
551 $this->tpl->setVariable('COLSPAN', max($this->colspans[$counter], 1));
552 $this->tpl->parseCurrentBlock();
553 $counter++;
554 }
555 $this->tpl->setCurrentBlock('fullday_apps');
556 $this->tpl->setVariable('TXT_F_DAY', $this->lng->txt("cal_all_day"));
557 $this->tpl->parseCurrentBlock();
558 }
559
565 protected function addTimedEvents($hours, $morning_aggr, $evening_aggr)
566 {
567 global $DIC;
568
569 $ui_factory = $DIC->ui()->factory();
570 $renderer = $DIC->ui()->renderer();
571
572 $new_link_counter = 0;
573 foreach ($hours as $num_hour => $hours_per_day) {
574 $first = true;
575 foreach ($hours_per_day as $num_day => $hour) {
576
577 #ADD the hours in the left side of the grid.
578 if ($first) {
579 if (!($num_hour%60) || ($num_hour == $morning_aggr && $morning_aggr) ||
580 ($num_hour == $evening_aggr && $evening_aggr)) {
581 $first = false;
582
583 // aggregation rows
584 if (($num_hour == $morning_aggr && $morning_aggr) ||
585 ($num_hour == $evening_aggr && $evening_aggr)) {
586 $this->tpl->setVariable('TIME_ROWSPAN', 1);
587 }
588 // rastered hour
589 else {
590 $this->tpl->setVariable('TIME_ROWSPAN', 60/$this->raster);
591 }
592
593 $this->tpl->setCurrentBlock('time_txt');
594
595 $this->tpl->setVariable('TIME', $hour['txt']);
596 $this->tpl->parseCurrentBlock();
597 }
598 }
599
600 foreach ($hour['apps_start'] as $app) {
601 $this->showAppointment($app);
602 }
603
604 // screen reader: appointments are divs, now output cell
605 if ($this->user->prefs["screen_reader_optimization"]) {
606 $this->tpl->setCurrentBlock('scrd_day_cell');
607 $this->tpl->setVariable('TD_CLASS', 'calstd');
608 $this->tpl->parseCurrentBlock();
609 }
610
611 #echo "NUMDAY: ".$num_day;
612 #echo "COLAPANS: ".max($colspans[$num_day],1).'<br />';
613 $num_apps = $hour['apps_num'];
614 $colspan = max($this->colspans[$num_day], 1);
615
616 // Show new apointment link
617 if (!$hour['apps_num'] && !$this->user->prefs["screen_reader_optimization"] && !$this->no_add) {
618 $this->tpl->setCurrentBlock('new_app_link');
619
620 $this->ctrl->clearParameterByClass('ilcalendarappointmentgui', 'app_id');
621
622 $this->ctrl->setParameterByClass('ilcalendarappointmentgui', 'idate', $this->weekdays[$num_day]->get(IL_CAL_DATE));
623 $this->ctrl->setParameterByClass('ilcalendarappointmentgui', 'seed', $this->seed->get(IL_CAL_DATE));
624 $this->ctrl->setParameterByClass('ilcalendarappointmentgui', 'hour', floor($num_hour/60));
625
626 //todo:it could be nice use also ranges of 15 min to create events.
627 $new_app_url = $this->ctrl->getLinkTargetByClass('ilcalendarappointmentgui', 'add');
628 $this->tpl->setVariable("DAY_NEW_APP_LINK", $renderer->render($ui_factory->glyph()->add($new_app_url)));
629
630
631 $this->tpl->setVariable('DAY_NEW_ID', ++$new_link_counter);
632 $this->tpl->parseCurrentBlock();
633 }
634
635 for ($i = $colspan;$i > $hour['apps_num'];$i--) {
636 if ($this->user->prefs["screen_reader_optimization"]) {
637 continue;
638 }
639 $this->tpl->setCurrentBlock('day_cell');
640
641 // last "slot" of hour needs border
642 $empty_border = '';
643 if ($num_hour%60 == 60-$this->raster ||
644 ($num_hour == $morning_aggr && $morning_aggr) ||
645 ($num_hour == $evening_aggr && $evening_aggr)) {
646 $empty_border = ' calempty_border';
647 }
648
649 $this->tpl->setVariable('TD_CLASS', 'calempty createhover' . $empty_border);
650
651 if (!$hour['apps_num']) {
652 $this->tpl->setVariable('DAY_ID', $new_link_counter);
653 }
654 $this->tpl->setVariable('TD_ROWSPAN', 1);
655 $this->tpl->parseCurrentBlock();
656 }
657 }
658
659 $this->tpl->touchBlock('time_row');
660 }
661 }
662
667 protected function getAppointmentTimeString(ilCalendarEntry $a_event)
668 {
669 $time = "";
670 switch ($this->user_settings->getTimeFormat()) {
672 $time = $a_event->getStart()->get(IL_CAL_FKT_DATE, 'H:i', $this->timezone);
673 break;
674
676 $time = $a_event->getStart()->get(IL_CAL_FKT_DATE, 'h:ia', $this->timezone);
677 break;
678 }
679 // add end time for screen readers
680 if ($this->user->prefs["screen_reader_optimization"]) {
681 switch ($this->user_settings->getTimeFormat()) {
683 $time.= "-" . $a_event->getEnd()->get(IL_CAL_FKT_DATE, 'H:i', $this->timezone);
684 break;
685
687 $time.= "-" . $a_event->getEnd()->get(IL_CAL_FKT_DATE, 'h:ia', $this->timezone);
688 break;
689 }
690 }
691
692 return $time;
693 }
694}
sprintf('%.4f', $callTime)
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_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.
$counter
$i
Definition: disco.tpl.php:19
$style
Definition: example_012.php:70
global $ilCtrl
Definition: ilias.php:18
$time
Definition: cron.php:21
$end
Definition: saml1-acs.php:18
global $DIC
Definition: saml.php:7
$ilUser
Definition: imgupload.php:18