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
"classes/class.ilLink.php";
135 $result[] = array(
"action"=>$this->lng->txt(
"rbac_log_source_object"),
140 foreach($raw[
"ops"] as $role_id => $ops)
145 "operation"=>$this->lng->txt($type.
"_".$this->operations[$op]));
149 else if(isset($raw[
"ops"]))
151 foreach($raw[
"ops"] as $role_id => $actions)
153 foreach($actions as $action => $ops)
158 "operation"=>$this->lng->txt($type.
"_".$this->operations[$op]));
164 if(isset($raw[
"inht"]))
166 foreach($raw[
"inht"] as $action => $role_ids)
168 foreach($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_add"), $this->lng->txt(
"obj_".$type)),
188 "operation"=>$this->lng->txt($type.
"_".$this->operations[$op]));