4 include_once
'./Services/Table/classes/class.ilTable2GUI.php';
5 include_once
"Services/AccessControl/classes/class.ilRbacLog.php";
28 $this->
setId(
"rbaclog");
29 $this->ref_id = $a_ref_id;
31 parent::__construct($a_parent_obj, $a_parent_cmd);
32 $this->
setTitle($lng->txt(
"rbac_log"));
35 $this->
addColumn($this->lng->txt(
"date"),
"",
"15%");
36 $this->
addColumn($this->lng->txt(
"user"),
"",
"15%");
37 $this->
addColumn($this->lng->txt(
"action"),
"",
"20%");
38 $this->
addColumn($this->lng->txt(
"rbac_changes"),
"",
"50%");
42 $this->
setFormAction($ilCtrl->getFormAction($a_parent_obj, $a_parent_cmd));
43 $this->
setRowTemplate(
"tpl.rbac_log_row.html",
"Services/AccessControl");
58 $this->
getItems($this->ref_id, $this->filter);
64 $item->setOptions(array(
"" => $this->lng->txt(
"all"))+$this->action_map);
65 $this->filter[
"action"] = $item->getValue();
68 $this->filter[
"date"] = $item->getDate();
71 protected function getItems($a_ref_id, array $a_current_filter = NULL)
77 foreach($rbacreview->getOperations() as $op)
79 $this->operations[$op[
"ops_id"]] = $op[
"operation"];
83 if($a_ref_id == ROLE_FOLDER_ID)
85 $a_ref_id = ROOT_FOLDER_ID;
98 $this->tpl->setVariable(
"ACTION", $this->action_map[$a_set[
"action"]]);
103 $changes = array(array(
"action"=>$this->lng->txt(
"rbac_log_changed_owner"),
"operation"=>$user));
114 $this->tpl->setCurrentBlock(
"changes");
115 foreach($changes as $change)
117 $this->tpl->setVariable(
"CHANGE_ACTION", $change[
"action"]);
118 $this->tpl->setVariable(
"CHANGE_OPERATION", $change[
"operation"]);
119 $this->tpl->parseCurrentBlock();
129 if(isset($raw[
"src"]))
134 include_once
"./Services/Link/classes/class.ilLink.php";
135 $result[] = array(
"action"=>$this->lng->txt(
"rbac_log_source_object"),
140 foreach($raw[
"ops"] as $role_id => $ops)
149 else if(isset($raw[
"ops"]))
151 foreach($raw[
"ops"] as $role_id => $actions)
153 foreach($actions as $action => $ops)
155 foreach((array) $ops as $op)
164 if(isset($raw[
"inht"]))
166 foreach($raw[
"inht"] as $action => $role_ids)
168 foreach((array) $role_ids as $role_id)
181 foreach($raw as $type => $actions)
183 foreach($actions as $action => $ops)
187 $result[] = array(
"action"=>sprintf($this->lng->txt(
"rbac_log_operation_".$action), $this->lng->txt(
"obj_".$type)),
202 foreach($a_op as $op)
206 return implode(
", ",
$res);
209 if(is_numeric($a_op) && isset($this->operations[$a_op]))
211 $op_id = $this->operations[$a_op];
212 if(substr($op_id, 0, 7) !=
"create_")
214 return $this->lng->txt($a_type.
"_".$this->operations[$a_op]);
218 return $this->lng->txt(
"rbac_".$this->operations[$a_op]);
addFilterItemByMetaType($id, $type=self::FILTER_TEXT, $a_optional=false, $caption=NULL)
Add filter by standard type.
getOPCaption($a_type, $a_op)
setFilterCommand($a_val)
Set filter command.
setExternalSegmentation($a_val)
Set external segmentation.
parseChangesFaPa(array $raw)
static _lookupTitle($a_id)
lookup object title
parseChangesTemplate(array $raw)
_lookupFullname($a_user_id)
Lookup Full Name.
static _lookupObjectId($a_ref_id)
lookup object id
setTitle($a_title, $a_icon=0, $a_icon_alt=0)
Set title and title icon.
setLimit($a_limit=0, $a_default_limit=0)
set max.
getItems($a_ref_id, array $a_current_filter=NULL)
addColumn($a_text, $a_sort_field="", $a_width="", $a_is_checkbox_action_column=false, $a_class="", $a_tooltip="")
Add a column to the header.
static formatDate(ilDateTime $date)
Format a date public.
setRowTemplate($a_template, $a_template_dir="")
Set row template.
static _lookupType($a_id, $a_reference=false)
lookup object type
determineOffsetAndOrder($a_omit_offset=false)
Determine offset and order.
static getLogItems($a_ref_id, $a_limit, $a_offset, array $a_filter=NULL)
setFormAction($a_form_action)
Set Form action parameter.
const EDIT_TEMPLATE_EXISTING
setEnableHeader($a_enableheader)
Set Enable Header.
setMaxCount($a_max_count)
set max.
setResetCommand($a_val)
Set reset filter command.
__construct($a_parent_obj, $a_parent_cmd, $a_ref_id)