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)) ||
72 switch ($a_permission)
76 (!$rbacsystem->checkAccessOfUser($a_user_id,
'write', $a_ref_id)))
104 array(
"permission" =>
"read",
"cmd" =>
"view",
"lang_var" =>
"show",
106 array(
"permission" =>
"write",
"cmd" =>
"edit",
"lang_var" =>
"edit"),
123 $q =
"SELECT * FROM file_based_lm WHERE id = ".$ilDB->quote($a_id);
124 $set = $ilDB->query($q);
137 $q =
"SELECT * FROM file_based_lm WHERE id = ".$ilDB->quote($a_id);
138 $set = $ilDB->query($q);
140 $start_file = $rec[
"startfile"];
143 if (($start_file !=
"") &&
144 (@is_file(
$dir.
"/".$start_file)))
146 return "./".$dir.
"/".$start_file;
148 else if (@is_file(
$dir.
"/index.html"))
150 return "./".$dir.
"/index.html";
152 else if (@is_file(
$dir.
"/index.htm"))
154 return "./".$dir.
"/index.htm";
167 $t_arr = explode(
"_", $a_target);
169 if ($t_arr[0] !=
"htlm" || ((
int) $t_arr[1]) <= 0)
174 if ($ilAccess->checkAccess(
"visible",
"", $t_arr[1]))
190 $lm_dir = $lm_data_dir.DIRECTORY_SEPARATOR.
"lm_".$a_id;
208 $q =
"SELECT obj_id ".
210 "WHERE type = 'htlm' ".
211 "AND owner = ".$ilDB->quote($user_id);
212 $us_set = $ilDB->query($q);
220 include_once(
"Modules/File/classes/class.ilObjFileAccess.php");
221 return ($as_string) ?