2 include_once(
'./Services/Table/classes/class.ilTable2GUI.php');
3 include_once(
'./Services/History/classes/class.ilHistory.php');
4 include_once(
'./Services/User/classes/class.ilUserUtil.php');
28 public function __construct($a_parent_obj, $a_parent_cmd, $a_obj_id, $a_obj_type = null)
33 parent::__construct($a_parent_obj, $a_parent_cmd);
57 $this->
setTitle($this->lng->txt(
"history"));
58 $this->
addColumn($this->lng->txt(
"user"),
"",
"25%");
59 $this->
addColumn($this->lng->txt(
"date"),
"",
"25%");
60 $this->
addColumn($this->lng->txt(
"action"),
"",
"50%");
71 $this->tpl->setVariable(
75 $this->tpl->setVariable(
"TXT_ACTION", $this->
createInfoText($a_set));
78 $obj_arr = explode(
":", $a_set[
"obj_type"]);
79 switch ($obj_arr[1]) {
82 $class =
"ilstructureobjectgui";
88 $class =
"illmpageobjectgui";
93 $img_type = $obj_arr[0];
99 $this->tpl->setCurrentBlock(
"item_icon");
101 $this->tpl->parseCurrentBlock();
104 $this->tpl->setCurrentBlock(
"item_link");
106 $this->tpl->setVariable(
110 $this->tpl->setVariable(
"TXT_LINK", $a_set[
"title"]);
111 $this->tpl->parseCurrentBlock();
113 $this->tpl->setCurrentBlock(
"item_title");
114 $this->tpl->setVariable(
118 $this->tpl->parseCurrentBlock();
123 $this->tpl->setCurrentBlock(
"user_comment");
124 $this->tpl->setVariable(
"TXT_COMMENT", $this->lng->txt(
"comment"));
125 $this->tpl->setVariable(
"TXT_USER_COMMENT", $a_set[
"user_comment"]);
126 $this->tpl->parseCurrentBlock();
137 $info_params = explode(
",", $a_set[
"info_params"]);
141 $info_text = $this->lng->txt(
"hist_" . str_replace(
":",
"_", $a_set[
"obj_type"]) .
142 "_" . $a_set[
"action"]);
145 $info_text = $this->lng->txt(
"hist_" . str_replace(
":",
"_", $this->
getObjType()) .
146 "_" . $a_set[
"action"]);
151 foreach ($info_params as $info_param) {
152 $info_text = str_replace(
"%" .
$i, $info_param, $info_text);
166 $this->comment_visibility = (bool) $a_visible;
184 $this->obj_id = $a_obj_id;
202 $this->obj_type = $a_obj_type;
211 if (!$this->obj_type) {
isCommentVisible()
comments visible?
This class provides processing control methods.
createInfoText($a_set)
format info parameters into info text
static _lookupTitle($a_id)
lookup object title
getDataFromDb()
Get data and put it into an array.
static formatDate(ilDateTime $date, $a_skip_day=false, $a_include_wd=false, $include_seconds=false)
Format a date public.
setTitle($a_title, $a_icon=0, $a_icon_alt=0)
Set title and title icon.
setObjId($a_obj_id)
set object id
static getImagePath($img, $module_path="", $mode="output", $offline=false)
get image path (for images located in a template directory)
__construct($a_parent_obj, $a_parent_cmd, $a_obj_id, $a_obj_type=null)
getObjType()
get object type (if not set, it will be set via object id)
static getNamePresentation( $a_user_id, $a_user_image=false, $a_profile_link=false, $a_profile_back_link="", $a_force_first_lastname=false, $a_omit_login=false, $a_sortable=true, $a_return_data_array=false, $a_ctrl_path="ilpublicuserprofilegui")
Default behaviour is:
setRowTemplate($a_template, $a_template_dir="")
Set row template.
static _getEntriesForObject($a_obj_id, $a_obj_type="")
get all history entries for an object
static _lookupType($a_id, $a_reference=false)
lookup object type
getLinkTargetByClass( $a_class, $a_cmd="", $a_anchor="", $a_asynch=false, $xml_style=true)
Get link target for command using gui class name.
Copyright (c) 1998-2014 ILIAS open source, Extended GPL, see docs/LICENSE Date: 24.10.14 Time: 10:35.
setFormAction($a_form_action, $a_multipart=false)
Set Form action parameter.
setParameterByClass($a_class, $a_parameter, $a_value)
Same as setParameterByClass, except that a class name is passed.
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.
fillRow($a_set)
Fill a single data row.
setCommentVisibility($a_visible)
set comments visible
setObjType($a_obj_type)
set object type (not required)
getFormAction( $a_gui_obj, $a_fallback_cmd="", $a_anchor="", $a_asynch=false, $xml_style=true)
Get form action url for gui class object.