5include_once(
"./Services/Object/classes/class.ilObjectAccess.php");
 
   33        function _checkAccess($a_cmd, $a_permission, $a_ref_id, $a_obj_id, $a_user_id = 
"")
 
   42                switch ($a_permission)
 
   46                                        (!$rbacsystem->checkAccessOfUser($a_user_id,
'write', $a_ref_id)))
 
   56                                        && !$rbacsystem->checkAccessOfUser($a_user_id,
'write',$a_ref_id)) ||
 
   85                        array(
"permission" => 
"read", 
"cmd" => 
"view", 
"lang_var" => 
"show",
 
   87                        array(
"permission" => 
"write", 
"cmd" => 
"edit", 
"lang_var" => 
"edit_content"),
 
   88                        array(
"permission" => 
"write", 
"cmd" => 
"properties", 
"lang_var" => 
"settings")
 
  105                if (isset(self::$online[$a_id]))
 
  107                        return self::$online[$a_id];
 
  109                $q = 
"SELECT is_online FROM file_based_lm WHERE id = ".$ilDB->quote($a_id, 
"integer");
 
  110                $set = 
$ilDB->query($q);
 
  111                $rec = 
$ilDB->fetchAssoc($set);
 
  115                return self::$online[$a_id];
 
  125                if (isset(self::$startfile[$a_id]))
 
  127                        $start_file = self::$startfile[$a_id];
 
  131                        $q = 
"SELECT startfile FROM file_based_lm WHERE id = ".$ilDB->quote($a_id, 
"integer");
 
  132                        $set = 
$ilDB->query($q);
 
  133                        $rec = 
$ilDB->fetchAssoc($set);
 
  134                        $start_file = $rec[
"startfile"];
 
  135                        self::$startfile[$a_id] = $start_file.
"";
 
  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]) ||
 
  172                        $ilAccess->checkAccess(
"read", 
"", $t_arr[1]))
 
  187                $lm_dir = $lm_data_dir.DIRECTORY_SEPARATOR.
"lm_".$a_id;
 
  214                $q = 
"SELECT id, is_online, startfile FROM file_based_lm WHERE ".
 
  215                        $ilDB->in(
"id", $a_obj_ids, 
false, 
"integer");
 
  220                        self::$online[$rec[
"id"]] = 
ilUtil::yn2tf($rec[
"is_online"]);
 
  221                        self::$startfile[$rec[
"id"]] = $rec[
"startfile"].
"";
 
An exception for terminatinating execution or to throw for unit testing.
const IL_NO_OBJECT_ACCESS
Class ilFileBasedLMAccess.
static _isOffline($a_obj_id)
Type-specific implementation of general status.
static _lookupOnline($a_id)
check wether learning module is online
_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
static _determineStartUrl($a_id)
check wether learning module is online
static _getCommands()
get commands
static _lookupDiskUsage($a_id)
Returns the number of bytes used on the harddisk by the learning module with the specified object id.
static getWebspaceDir($mode="filesystem")
get webspace directory
static yn2tf($a_yn)
convert "y"/"n" to true/false
static dirsize($directory)
get size of a directory or a file.