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(
"name"),
"",
"10%");
37 $this->
addColumn($this->lng->txt(
"login"),
"",
"10%");
38 $this->
addColumn($this->lng->txt(
"action"),
"",
"15%");
39 $this->
addColumn($this->lng->txt(
"rbac_changes"),
"",
"50%");
43 $this->
setFormAction($ilCtrl->getFormAction($a_parent_obj, $a_parent_cmd));
44 $this->
setRowTemplate(
"tpl.rbac_log_row.html",
"Services/AccessControl");
59 $this->
getItems($this->ref_id, $this->filter);
65 $item->setOptions(array(
"" => $this->lng->txt(
"all"))+$this->action_map);
66 $this->filter[
"action"] = $item->getValue();
69 $this->filter[
"date"] = $item->getDate();
72 protected function getItems($a_ref_id, array $a_current_filter = NULL)
78 foreach($rbacreview->getOperations() as $op)
80 $this->operations[$op[
"ops_id"]] = $op[
"operation"];
84 if($a_ref_id == ROLE_FOLDER_ID)
86 $a_ref_id = ROOT_FOLDER_ID;
99 $this->tpl->setVariable(
"LASTNAME", $name[
"lastname"]);
100 $this->tpl->setVariable(
"FIRSTNAME",$name[
"firstname"]);
101 $this->tpl->setVariable(
"LOGIN", $name[
"login"]);
102 $this->tpl->setVariable(
"ACTION", $this->action_map[$a_set[
"action"]]);
107 $changes = array(array(
"action"=>$this->lng->txt(
"rbac_log_changed_owner"),
"operation"=>$user));
118 $this->tpl->setCurrentBlock(
"changes");
119 foreach($changes as $change)
121 $this->tpl->setVariable(
"CHANGE_ACTION", $change[
"action"]);
122 $this->tpl->setVariable(
"CHANGE_OPERATION", $change[
"operation"]);
123 $this->tpl->parseCurrentBlock();
133 if(isset($raw[
"src"]))
138 include_once
"./Services/Link/classes/class.ilLink.php";
139 $result[] = array(
"action"=>$this->lng->txt(
"rbac_log_source_object"),
144 foreach($raw[
"ops"] as $role_id => $ops)
153 else if(isset($raw[
"ops"]))
155 foreach($raw[
"ops"] as $role_id => $actions)
157 foreach($actions as $action => $ops)
159 foreach((array) $ops as $op)
168 if(isset($raw[
"inht"]))
170 foreach($raw[
"inht"] as $action => $role_ids)
172 foreach((array) $role_ids as $role_id)
185 foreach($raw as $type => $actions)
187 foreach($actions as $action => $ops)
191 $result[] = array(
"action"=>sprintf($this->lng->txt(
"rbac_log_operation_".$action), $this->lng->txt(
"obj_".$type)),
206 foreach($a_op as $op)
210 return implode(
", ",
$res);
213 if(is_numeric($a_op) && isset($this->operations[$a_op]))
215 $op_id = $this->operations[$a_op];
216 if(substr($op_id, 0, 7) !=
"create_")
218 return $this->lng->txt($a_type.
"_".$this->operations[$a_op]);
222 return $this->lng->txt(
"rbac_".$this->operations[$a_op]);