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();
58 switch ($a_permission)
62 (!$rbacsystem->checkAccessOfUser($a_user_id,
'write', $a_ref_id)))
72 && !$rbacsystem->checkAccessOfUser($a_user_id,
'write',$a_ref_id)) ||
101 array(
"permission" =>
"read",
"cmd" =>
"view",
"lang_var" =>
"show",
103 array(
"permission" =>
"write",
"cmd" =>
"edit",
"lang_var" =>
"edit"),
120 $q =
"SELECT * FROM file_based_lm WHERE id = ".$ilDB->quote($a_id,
"integer");
121 $set = $ilDB->query($q);
122 $rec = $ilDB->fetchAssoc($set);
134 $q =
"SELECT * FROM file_based_lm WHERE id = ".$ilDB->quote($a_id,
"integer");
135 $set = $ilDB->query($q);
136 $rec = $ilDB->fetchAssoc($set);
137 $start_file = $rec[
"startfile"];
140 if (($start_file !=
"") &&
141 (@is_file(
$dir.
"/".$start_file)))
143 return "./".$dir.
"/".$start_file;
145 else if (@is_file(
$dir.
"/index.html"))
147 return "./".$dir.
"/index.html";
149 else if (@is_file(
$dir.
"/index.htm"))
151 return "./".$dir.
"/index.htm";
164 $t_arr = explode(
"_", $a_target);
166 if ($t_arr[0] !=
"htlm" || ((
int) $t_arr[1]) <= 0)
171 if ($ilAccess->checkAccess(
"visible",
"", $t_arr[1]))
186 $lm_dir = $lm_data_dir.DIRECTORY_SEPARATOR.
"lm_".$a_id;