3 include_once(
"./Services/Table/classes/class.ilTable2GUI.php");
4 include_once
'./Modules/Course/classes/class.ilCourseConstants.php';
26 $this->container = $a_container_obj;
27 $this->main_container = $a_main_container;
30 parent::__construct($a_parent_class, $a_parent_cmd);
51 $this->user_id = $a_usr_id;
68 $this->
setRowTemplate(
'tpl.crs_personal_timings_row.html',
'Modules/Course');
70 $this->
setTitle($this->lng->txt(
'crs_timings_edit_personal'));
72 $this->
addColumn($this->lng->txt(
'title'),
'',
'40%');
73 $this->
addColumn($this->lng->txt(
'crs_timings_short_start_end'),
'');
74 $this->
addColumn($this->lng->txt(
'crs_timings_short_end'),
'');
75 $this->
addColumn($this->lng->txt(
'crs_timings_short_changeable'),
'');
104 if ($set[
'error'] ==
true) {
105 $this->tpl->setVariable(
'TD_CLASS',
'warning');
107 $this->tpl->setVariable(
'TD_CLASS',
'std');
111 if (strlen($set[
'title_link'])) {
112 $this->tpl->setCurrentBlock(
'title_link');
113 $this->tpl->setVariable(
'TITLE_LINK', $set[
'title_link']);
114 $this->tpl->setVariable(
'TITLE_LINK_NAME', $set[
'title']);
115 $this->tpl->parseCurrentBlock();
117 $this->tpl->setCurrentBlock(
'title_plain');
118 $this->tpl->setVariable(
'TITLE', $set[
'title']);
119 $this->tpl->parseCurrentBlock();
121 if (strlen($set[
'desc'])) {
122 $this->tpl->setCurrentBlock(
'item_description');
123 $this->tpl->setVariable(
'DESC', $set[
'desc']);
124 $this->tpl->parseCurrentBlock();
126 if ($set[
'failure']) {
127 $this->tpl->setCurrentBlock(
'alert');
129 $this->tpl->setVariable(
'ALT_ALERT', $this->lng->txt(
"alert"));
130 $this->tpl->setVariable(
"TXT_ALERT", $this->lng->txt($set[
'failure']));
131 $this->tpl->parseCurrentBlock();
135 $this->tpl->setVariable(
'NAME_ACTIVE',
'item[' . $set[
'ref_id'] .
'][active]');
139 include_once
'./Services/Form/classes/class.ilDateTimeInputGUI.php';
146 if (!$set[
'item'][
'changeable']) {
147 $dt_input->setDisabled(
true);
150 $this->tpl->setVariable(
'start_abs');
151 $this->tpl->setVariable(
'SUG_START', $dt_input->render());
152 $this->tpl->parseCurrentBlock();
155 include_once
'./Services/Form/classes/class.ilDateTimeInputGUI.php';
162 if (!$set[
'item'][
'changeable']) {
163 $dt_end->setDisabled(
true);
166 $this->tpl->setVariable(
'end_abs');
167 $this->tpl->setVariable(
'SUG_END', $dt_end->render());
168 $this->tpl->parseCurrentBlock();
172 $this->tpl->setVariable(
'TXT_CHANGEABLE', $set[
'item'][
'changeable'] ? $this->lng->txt(
'yes') : $this->lng->txt(
'no'));
182 foreach ($a_item_data as $item) {
188 $current_row = array();
191 if ($item[
'type'] ==
'itgr') {
194 $current_row[
'ref_id'] = $item[
'ref_id'];
196 $current_row = $this->
parseTitle($current_row, $item);
201 if (array_key_exists($item[
'ref_id'],
$failed)) {
202 $current_row[
'failed'] =
true;
203 $current_row[
'failure'] =
$failed[$item[
'ref_id']];
205 $current_row[
'item'] = $item;
206 $rows[] = $current_row;
216 include_once
'./Modules/Course/classes/Timings/class.ilTimingUser.php';
221 $a_item[
'suggestion_start'] = $tu->getStart()->get(
IL_CAL_UNIX);
224 $a_item[
'suggestion_end'] = $tu->getEnd()->get(
IL_CAL_UNIX);
238 include_once
'./Services/Link/classes/class.ilLink.php';
239 switch ($item[
'type']) {
242 $current_row[
'title'] = $item[
'title'];
243 $current_row[
'title_link'] =
ilLink::_getLink($item[
'ref_id'], $item[
'type']);
247 if (strlen($item[
'title'])) {
248 $current_row[
'title'] = $item[
'title'];
250 include_once(
'./Modules/Session/classes/class.ilSessionAppointment.php');
258 $current_row[
'title_link'] =
ilLink::_getLink($item[
'ref_id'], $item[
'type']);
262 $current_row[
'title'] = $item[
'title'];
263 $current_row[
'title_link'] =
'';
267 $current_row[
'desc'] = $item[
'desc'];
addCommandButton($a_cmd, $a_text, $a_onclick='', $a_id="", $a_class=null)
Add Command button.
TableGUI class for timings administration.
fillRow($set)
Fill table row.
getParentObject()
Get parent object.
parseTitle($current_row, $item)
Parse title.
getFailureStatus()
Get failure status.
setTitle($a_title, $a_icon=0, $a_icon_alt=0)
Set title and title icon.
setFailureStatus($a_status)
Set status.
static getImagePath($img, $module_path="", $mode="output", $offline=false)
get image path (for images located in a template directory)
parseUserTimings($a_item)
Parse/read individual timings.
static _lookupObjId($a_id)
static _appointmentToString($start, $end, $fulltime)
getFormAction()
Get Form action parameter.
setRowTemplate($a_template, $a_template_dir="")
Set row template.
setFormAction($a_form_action, $a_multipart=false)
Set Form action parameter.
__construct($a_parent_class, $a_parent_cmd, ilObject $a_container_obj, ilObjCourse $a_main_container)
Constructor.
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.
static _lookupAppointment($a_obj_id)
lookup appointment
setShowRowsSelector($a_value)
Toggle rows-per-page selector.
TableGUI class for editing personal timings.
parse($a_item_data, $failed=array())
Parse table content.
static _getLink($a_ref_id, $a_type='', $a_params=array(), $append="")
$GLOBALS['JPEG_Segment_Names']
Global Variable: XMP_tag_captions.