24 include_once(
"classes/class.ilObjectAccess.php");
49 function _checkAccess($a_cmd, $a_permission, $a_ref_id, $a_obj_id, $a_user_id =
"")
51 global $ilUser,
$lng, $rbacsystem, $ilAccess;
55 $a_user_id = $ilUser->getId();
63 && !$rbacsystem->checkAccessOfUser($a_user_id,
'write',$a_ref_id))
73 if ($ilUser->getId() == ANONYMOUS_USER_ID)
80 && !$rbacsystem->checkAccessOfUser($a_user_id,
'write',$a_ref_id))
101 $ilAccess->addInfoItem(IL_STATUS_MESSAGE, $lng->txt(
"online"));
107 switch ($a_permission)
112 (!$rbacsystem->checkAccessOfUser($a_user_id,
'write', $a_ref_id)))
137 $q =
"SELECT * FROM content_object WHERE id = ".$ilDB->quote($a_id);
138 $lm_set = $ilDB->query($q);
152 global $ilDB, $ilUser;
154 if ($a_user_id ==
"")
156 $a_user_id = $ilUser->getId();
159 $q =
"SELECT * FROM lo_access WHERE ".
160 "usr_id = ".$ilDB->quote($a_user_id).
" AND ".
161 "lm_id = ".$ilDB->quote($a_ref_id);
165 $acc_set = $ilDB->query($q);
169 $mtree =
new ilTree($lm_id);
170 $mtree->setTableNames(
'lm_tree',
'lm_data');
171 $mtree->setTreeTablePK(
"lm_id");
172 if ($mtree->isInTree($acc_rec[
"obj_id"]))
174 return $acc_rec[
"obj_id"];
188 $t_arr = explode(
"_", $a_target);
190 if (($t_arr[0] !=
"lm" && $t_arr[0] !=
"dbk" && $t_arr[0] !=
"st"
191 && $t_arr[0] !=
"pg")
192 || ((
int) $t_arr[1]) <= 0)
197 if ($t_arr[0] ==
"lm" || $t_arr[0] ==
"dbk")
199 if ($ilAccess->checkAccess(
"read",
"", $t_arr[1]) ||
200 $ilAccess->checkAccess(
"visible",
"", $t_arr[1]))
209 $ref_ids = array($t_arr[2]);
214 include_once(
"./Modules/LearningModule/classes/class.ilLMObject.php");
222 if ($ilAccess->checkAccess(
"read",
"", $ref_id))