5 include_once(
"./Services/Object/classes/class.ilObjectAccess.php");
46 $this->
user = $DIC->user();
47 $this->lng = $DIC->language();
48 $this->rbacsystem = $DIC->rbac()->system();
49 $this->access = $DIC->access();
66 public function _checkAccess($a_cmd, $a_permission, $a_ref_id, $a_obj_id, $a_user_id =
"")
72 if ($a_user_id ==
"") {
76 switch ($a_permission) {
103 array(
"permission" =>
"read",
"cmd" =>
"view",
"lang_var" =>
"show",
105 array(
"permission" =>
"write",
"cmd" =>
"edit",
"lang_var" =>
"edit_content"),
106 array(
"permission" =>
"write",
"cmd" =>
"properties",
"lang_var" =>
"settings")
123 $ilDB = $DIC->database();
125 if (isset(self::$startfile[$a_id])) {
126 $start_file = self::$startfile[$a_id];
128 $q =
"SELECT startfile FROM file_based_lm WHERE id = " .
$ilDB->quote($a_id,
"integer");
129 $set =
$ilDB->query($q);
130 $rec =
$ilDB->fetchAssoc($set);
131 $start_file = $rec[
"startfile"];
132 self::$startfile[$a_id] = $start_file .
"";
137 if (($start_file !=
"") &&
138 (@is_file($dir .
"/" . $start_file))) {
139 return "./" . $dir .
"/" . $start_file;
140 } elseif (@is_file($dir .
"/index.html")) {
141 return "./" . $dir .
"/index.html";
142 } elseif (@is_file($dir .
"/index.htm")) {
143 return "./" . $dir .
"/index.htm";
156 $ilAccess = $DIC->access();
158 $t_arr = explode(
"_", $a_target);
160 if ($t_arr[0] !=
"htlm" || ((
int) $t_arr[1]) <= 0) {
164 if ($ilAccess->checkAccess(
"visible",
"", $t_arr[1]) ||
165 $ilAccess->checkAccess(
"read",
"", $t_arr[1])) {
179 $lm_dir = $lm_data_dir . DIRECTORY_SEPARATOR .
"lm_" . $a_id;
194 $ilDB = $DIC->database();
196 $q =
"SELECT id, startfile FROM file_based_lm WHERE " .
197 $ilDB->in(
"id", $a_obj_ids,
false,
"integer");
201 self::$startfile[$rec[
"id"]] = $rec[
"startfile"] .
"";
static _lookupDiskUsage($a_id)
Returns the number of bytes used on the harddisk by the learning module with the specified object id...
const IL_NO_OBJECT_ACCESS
_checkAccess($a_cmd, $a_permission, $a_ref_id, $a_obj_id, $a_user_id="")
checks wether a user may invoke a command or not (this method is called by ilAccessHandler::checkAcce...
static _preloadData($a_obj_ids, $a_ref_ids)
Preload data.
static _checkGoto($a_target)
check whether goto script will succeed
Class ilFileBasedLMAccess.
static _determineStartUrl($a_id)
determine start url
static dirsize($directory)
get size of a directory or a file.
__construct()
Constructor.
static _getCommands()
get commands
static getWebspaceDir($mode="filesystem")
get webspace directory