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;
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]);