17 include_once
'./Services/JSON/classes/class.ilJsonUtil.php';
18 $result =
new stdClass();
19 $result->response =
new stdClass();
20 $result->response->results = array();
21 if (strlen($a_str) < 3)
27 $query =
"SELECT o1.title role,o2.title container FROM object_data o1 ".
28 "JOIN rbac_fa fa ON o1.obj_id = rol_id ".
29 "JOIN tree t1 ON fa.parent = t1.child ".
30 "JOIN object_reference obr ON ref_id = t1.parent ".
31 "JOIN object_data o2 ON obr.obj_id = o2.obj_id ".
32 "WHERE o1.type = 'role' ".
34 "AND ".$ilDB->like(
'o1.title',
'text',
'%'.$a_str.
'%').
" ".
35 "AND fa.parent != 8 ".
36 "ORDER BY role,container";
42 $result->response->results[$counter] =
new stdClass();
43 $result->response->results[$counter]->role =
$row->role;
44 $result->response->results[$counter]->container =
$row->container;
62 global $rbacreview,
$ilDB;
64 include_once
'./Services/JSON/classes/class.ilJsonUtil.php';
65 $result =
new stdClass();
66 $result->response =
new stdClass();
67 $result->response->results = array();
69 if(strpos($a_str,
'@') !== 0)
74 $a_str = substr($a_str,1);
77 $query =
"SELECT ref_id, title FROM object_data ode ".
78 "JOIN object_reference ore ON ode.obj_id = ore.obj_id ".
79 "WHERE ".$ilDB->like(
'title',
'text',$a_str.
'%').
' '.
85 $rolf = $rbacreview->getRoleFolderIdOfObject(
$row->ref_id);
88 foreach($rbacreview->getRolesOfRoleFolder($rolf,
false) as $rol_id)
90 $result->response->results[$counter] =
new stdClass();
92 $result->response->results[$counter]->container =
$row->title;