24 include_once(
'./Services/Calendar/classes/class.ilCalendarCategories.php');
53 $this->lng->loadLanguageModule(
'dateplaner');
58 $this->
addColumn($this->lng->txt(
'title'),
'title',
"40%");
59 $this->
addColumn($this->lng->txt(
'cal_start'),
'begin',
"15%");
60 $this->
addColumn($this->lng->txt(
'cal_duration'),
'duration',
"20%");
61 $this->
addColumn($this->lng->txt(
'cal_recurrences'),
'frequence',
"10%");
62 $this->
addColumn($this->lng->txt(
'last_update'),
'last_update',
"15%");
65 $this->
setFormAction($this->ctrl->getFormAction($a_parent_obj));
66 $this->
setRowTemplate(
"tpl.show_changed_appointment_row.html",
"Services/Calendar");
91 $this->tpl->setVariable(
'VAL_DESCRIPTION',$a_set[
'description']);
93 $this->tpl->setVariable(
'VAL_TITLE_LINK',$a_set[
'title']);
94 $this->ctrl->setParameterByClass(
'ilcalendarappointmentgui',
'app_id',$a_set[
'id']);
95 $this->tpl->setVariable(
'VAL_LINK',$this->ctrl->getLinkTargetByClass(
'ilcalendarappointmentgui',
'edit'));
97 switch($a_set[
'frequence'])
100 $this->tpl->setVariable(
'VAL_FREQUENCE',$this->lng->txt(
'cal_daily'));
104 $this->tpl->setVariable(
'VAL_FREQUENCE',$this->lng->txt(
'cal_weekly'));
108 $this->tpl->setVariable(
'VAL_FREQUENCE',$this->lng->txt(
'cal_monthly'));
112 $this->tpl->setVariable(
'VAL_FREQUENCE',$this->lng->txt(
'cal_yearly'));
116 $this->tpl->setVariable(
'VAL_FREQUENCE',$this->lng->txt(
'cal_no_recurrence'));
117 break; $this->
addColumn($this->lng->txt(
'cal_duration'),
'duration',
"20%");
120 if($a_set[
'fullday'])
130 if($a_set[
'duration'])
136 $this->tpl->setVariable(
'VAL_DURATION',
'');
152 include_once(
'./Services/Calendar/classes/class.ilCalendarEntry.php');
153 include_once(
'./Services/Calendar/classes/class.ilCalendarRecurrences.php');
156 foreach($a_apps as $entry)
160 $tmp_arr[
'id'] = $entry->getEntryId();
161 $tmp_arr[
'title'] = $entry->getPresentationTitle();
162 $tmp_arr[
'description'] = $entry->getDescription();
163 $tmp_arr[
'fullday'] = $entry->isFullday();
164 $tmp_arr[
'begin'] = $entry->getStart()->get(
IL_CAL_UNIX);
165 $tmp_arr[
'end'] = $entry->getEnd()->get(
IL_CAL_UNIX);
167 #$tmp_arr['duration'] = ($dur = $tmp_arr['end'] - $tmp_arr['begin']) ? $dur : 60 * 60 * 24;
168 $tmp_arr[
'duration'] = $tmp_arr[
'end'] - $tmp_arr[
'begin'];
169 if($tmp_arr[
'fullday'])
171 $tmp_arr[
'duration'] += (60 * 60 * 24);
173 if(!$tmp_arr[
'fullday'] and $tmp_arr[
'end'] == $tmp_arr[
'begin'])
175 $tmp_arr[
'duration'] =
'';
178 $tmp_arr[
'last_update'] = $entry->getLastUpdate()->get(
IL_CAL_UNIX);
179 $tmp_arr[
'frequence'] = $rec->getFrequenceType();
181 $appointments[] = $tmp_arr;
184 $this->
setData($appointments ? $appointments : array());