This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Learning e.V.  
 More...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Learning e.V. 
ILIAS is licensed with the GPL-3.0, see https://www.gnu.org/licenses/gpl-3.0.en.html You should have received a copy of said license along with the source code, too.
If this is not the case or you just want to try ILIAS, you'll find us at: https://www.ilias.de https://github.com/ILIAS-eLearning 
- Author
 - Alexander Killing killi.nosp@m.ng@l.nosp@m.eifos.nosp@m..de 
 
Definition at line 22 of file class.ilObjFileBasedLMAccess.php.
 
◆ __construct()
      
        
          | ilObjFileBasedLMAccess::__construct  | 
          ( | 
           | ) | 
           | 
        
      
 
 
◆ _checkAccess()
      
        
          | ilObjFileBasedLMAccess::_checkAccess  | 
          ( | 
          string  | 
          $cmd,  | 
        
        
           | 
           | 
          string  | 
          $permission,  | 
        
        
           | 
           | 
          int  | 
          $ref_id,  | 
        
        
           | 
           | 
          int  | 
          $obj_id,  | 
        
        
           | 
           | 
          ?int  | 
          $user_id = null  | 
        
        
           | 
          ) | 
           |  | 
        
      
 
 
◆ _checkGoto()
  
  
      
        
          | static ilObjFileBasedLMAccess::_checkGoto  | 
          ( | 
          string  | 
          $target | ) | 
           | 
         
       
   | 
  
static   | 
  
 
Definition at line 132 of file class.ilObjFileBasedLMAccess.php.
References $DIC.
  136         $ilAccess = $DIC->access();
   138         $t_arr = explode(
"_", $target);
   140         if ($t_arr[0] !== 
"htlm" || ((
int) $t_arr[1]) <= 0) {
   144         if ($ilAccess->checkAccess(
"visible", 
"", $t_arr[1]) ||
   145             $ilAccess->checkAccess(
"read", 
"", $t_arr[1])) {
 
 
 
 
◆ _determineStartUrl()
  
  
      
        
          | static ilObjFileBasedLMAccess::_determineStartUrl  | 
          ( | 
          int  | 
          $a_id | ) | 
           | 
         
       
   | 
  
static   | 
  
 
Definition at line 74 of file class.ilObjFileBasedLMAccess.php.
References $DIC, $ilDB, $q, and ilFileUtils\getWebspaceDir().
Referenced by ilObjFileBasedLMListGUI\getProperties(), ilObjFileBasedLMGUI\getSettingsFormValues(), ilObjFileBasedLMGUI\getTabs(), ilObjFileBasedLMGUI\initSettingsForm(), and ilObjFileBasedLMGUI\setStartFile().
   83         $ilDB = $DIC->database();
    85         $q = 
"SELECT startfile, rid FROM file_based_lm WHERE id = " . 
$ilDB->quote($a_id, 
"integer");
    87         $rec = 
$ilDB->fetchAssoc($set);
    88         $start_file = $rec[
"startfile"] ?? 
'';
    91         if (!empty($rec[
'rid'])) {
    93             $rid = $DIC->resourceStorage()->manageContainer()->find($rec[
'rid']);
    97             $zip = $DIC->resourceStorage()->consume()->containerZIP($rid)->getZIP();
    98             foreach ($zip->getFiles() as $file) {
    99                 if ($file === $start_file) {
   109         if (($start_file !== 
"") && (is_file($dir . 
"/" . $start_file))) {
   111                 realpath(__DIR__ . 
'/../../../../public/'),
   113                 $dir . 
"/" . $start_file
   117         if (is_file($dir . 
"/index.html")) {
   119                 realpath(__DIR__ . 
'/../../../../public/'),
   125         if (is_file($dir . 
"/index.htm")) {
   126             return $startfile[$a_id] = str_replace(realpath(__DIR__ . 
'/../../../../public/'), 
"", $dir . 
"/index.htm");
 static getWebspaceDir(string $mode="filesystem")
get webspace directory 
 
 
 
 
◆ _getCommands()
  
  
      
        
          | static ilObjFileBasedLMAccess::_getCommands  | 
          ( | 
           | ) | 
           | 
         
       
   | 
  
static   | 
  
 
Definition at line 58 of file class.ilObjFileBasedLMAccess.php.
Referenced by ilObjFileBasedLMListGUI\init().
   62                 "permission" => 
"read", 
"cmd" => 
"view", 
"lang_var" => 
"show",
    65             [
"permission" => 
"write", 
"cmd" => 
"edit", 
"lang_var" => 
"edit_content"],
    66             [
"permission" => 
"write", 
"cmd" => 
"properties", 
"lang_var" => 
"settings"]
  
 
 
◆ _lookupDiskUsage()
  
  
      
        
          | static ilObjFileBasedLMAccess::_lookupDiskUsage  | 
          ( | 
          int  | 
          $a_id | ) | 
           | 
         
       
   | 
  
static   | 
  
 
Returns the number of bytes used on the harddisk by the learning module with the specified object id. 
Definition at line 155 of file class.ilObjFileBasedLMAccess.php.
References ilFileUtils\dirsize(), and ilFileUtils\getWebspaceDir().
  158         $lm_dir = $lm_data_dir . DIRECTORY_SEPARATOR . 
"lm_" . $a_id;
 static getWebspaceDir(string $mode="filesystem")
get webspace directory 
 
static dirsize(string $directory)
get size of a directory or a file. 
 
 
 
 
◆ _preloadData()
  
  
      
        
          | static ilObjFileBasedLMAccess::_preloadData  | 
          ( | 
          array  | 
          $obj_ids,  | 
         
        
           | 
           | 
          array  | 
          $ref_ids  | 
         
        
           | 
          ) | 
           |  | 
         
       
   | 
  
static   | 
  
 
 
◆ isInfoEnabled()
  
  
      
        
          | static ilObjFileBasedLMAccess::isInfoEnabled  | 
          ( | 
          int  | 
          $obj_id | ) | 
           | 
         
       
   | 
  
static   | 
  
 
 
◆ $access
◆ $lng
◆ $rbacsystem
◆ $startfile
  
  
      
        
          | array ilObjFileBasedLMAccess::$startfile = [] | 
         
       
   | 
  
static   | 
  
 
 
◆ $user
The documentation for this class was generated from the following file: