24 include_once(
'./Services/Calendar/classes/class.ilCalendarCategories.php');
25 include_once(
'./Services/Table/classes/class.ilTable2GUI.php');
58 $this->lng->loadLanguageModule(
'dateplaner');
61 $this->
setId(
'calinbox');
63 parent::__construct($a_parent_obj, $a_parent_cmd);
65 $this->
addColumn($this->lng->txt(
'date'),
'begin',
"30%");
66 $this->
addColumn($this->lng->txt(
'title'),
'title',
"40%");
67 #$this->addColumn($this->lng->txt('cal_duration'),'duration',"15%"); 68 $this->
addColumn($this->lng->txt(
'cal_recurrences'),
'frequence',
"15%");
69 $this->
addColumn($this->lng->txt(
'last_update'),
'last_update',
"15%");
72 $this->
setFormAction($this->ctrl->getFormAction($a_parent_obj));
73 $this->
setRowTemplate(
"tpl.show_changed_appointment_row.html",
"Services/Calendar");
99 if ($a_set[
"milestone"]) {
100 $this->tpl->setCurrentBlock(
"img_ms");
102 $this->tpl->setVariable(
"ALT_MS",
$lng->txt(
"cal_milestone"));
103 $this->tpl->parseCurrentBlock();
106 $this->tpl->setVariable(
'VAL_DESCRIPTION', $a_set[
'description']);
108 $this->tpl->setVariable(
'VAL_TITLE_LINK', $a_set[
'title']);
109 $this->ctrl->setParameterByClass(
'ilcalendarappointmentgui',
'app_id', $a_set[
'id']);
110 $this->tpl->setVariable(
'VAL_LINK', $this->ctrl->getLinkTargetByClass(
'ilcalendarappointmentgui',
'edit'));
112 switch ($a_set[
'frequence']) {
114 $this->tpl->setVariable(
'VAL_FREQUENCE', $this->lng->txt(
'cal_daily'));
118 $this->tpl->setVariable(
'VAL_FREQUENCE', $this->lng->txt(
'cal_weekly'));
122 $this->tpl->setVariable(
'VAL_FREQUENCE', $this->lng->txt(
'cal_monthly'));
126 $this->tpl->setVariable(
'VAL_FREQUENCE', $this->lng->txt(
'cal_yearly'));
130 #$this->tpl->setVariable('VAL_FREQUENCE',$this->lng->txt('cal_no_recurrence')); 133 if ($a_set[
'fullday']) {
144 $this->tpl->setVariable(
'VAL_BEGIN', $date);
174 include_once(
'./Services/Calendar/classes/class.ilCalendarEntry.php');
175 include_once(
'./Services/Calendar/classes/class.ilCalendarRecurrences.php');
176 $appointments = array();
178 foreach ($a_apps as $event) {
179 $entry = $event[
'event'];
183 $tmp_arr[
'id'] = $entry->getEntryId();
184 $tmp_arr[
'milestone'] = $entry->isMilestone();
185 $tmp_arr[
'title'] = $entry->getPresentationTitle();
186 $tmp_arr[
'description'] = $entry->getDescription();
187 $tmp_arr[
'fullday'] = $entry->isFullday();
188 #$tmp_arr['begin'] = $entry->getStart()->get(IL_CAL_UNIX); 189 #$tmp_arr['end'] = $entry->getEnd()->get(IL_CAL_UNIX); 191 $tmp_arr[
'begin'] = $event[
'dstart'];
192 $tmp_arr[
'end'] = $event[
'dend'];
194 $tmp_arr[
'duration'] = $tmp_arr[
'end'] - $tmp_arr[
'begin'];
195 if ($tmp_arr[
'fullday']) {
196 $tmp_arr[
'duration'] += (60 * 60 * 24);
198 if (!$tmp_arr[
'fullday']
and $tmp_arr[
'end'] == $tmp_arr[
'begin']) {
199 $tmp_arr[
'duration'] =
'';
202 $tmp_arr[
'last_update'] = $entry->getLastUpdate()->get(
IL_CAL_UNIX);
203 $tmp_arr[
'frequence'] = $rec->getFrequenceType();
205 $appointments[] = $tmp_arr;
209 $appointments = array_slice($appointments, 0, $this->
getLimit());
211 $this->
setData($appointments ? $appointments : array());
const IL_CAL_FREQ_MONTHLY
setDefaultOrderField($a_defaultorderfield)
Set Default order field.
static _getFirstRecurrence($a_cal_id)
get first recurrence
setAppointments($a_apps)
set appointments
static formatDate(ilDateTime $date, $a_skip_day=false, $a_include_wd=false, $include_seconds=false)
Format a date public.
__construct($a_parent_obj, $a_parent_cmd)
Constructor.
setDefaultOrderDirection($a_defaultorderdirection)
Set Default order direction.
static getImagePath($img, $module_path="", $mode="output", $offline=false)
get image path (for images located in a template directory)
const IL_CAL_FREQ_DAILY
Model of calendar entry recurrcences.
enable($a_module_name)
enables particular modules of table
static _getInstance($a_usr_id=0)
get singleton instance
setRowTemplate($a_template, $a_template_dir="")
Set row template.
setFormAction($a_form_action, $a_multipart=false)
Set Form action parameter.
static formatPeriod(ilDateTime $start, ilDateTime $end, $a_skip_starting_day=false)
Format a period of two date Shows: 14.
setFormName($a_formname="")
Set Form name.
addColumn( $a_text, $a_sort_field="", $a_width="", $a_is_checkbox_action_column=false, $a_class="", $a_tooltip="", $a_tooltip_with_html=false)
Add a column to the header.
setShowRowsSelector($a_value)
Toggle rows-per-page selector.