8 require_once
"./Services/Object/classes/class.ilObject.php";
36 parent::__construct($a_id,$a_call_by_reference);
47 function update($a_skip_meta =
false)
57 $ilDB->manipulate($q =
"UPDATE file_based_lm SET ".
58 " is_online = ".$ilDB->quote(
ilUtil::tf2yn($this->getOnline()),
"text").
59 ", startfile = ".$ilDB->quote($this->
getStartFile(),
"text").
" ".
60 " WHERE id = ".$ilDB->quote($this->
getId(),
"integer"));
73 $q =
"SELECT * FROM file_based_lm WHERE id = ".$ilDB->quote($this->
getId(),
"integer");
75 $lm_rec = $ilDB->fetchAssoc(
$lm_set);
85 function create($a_skip_meta =
false)
92 $ilDB->manipulate(
"INSERT INTO file_based_lm (id, is_online, startfile) VALUES ".
93 " (".$ilDB->quote($this->getID(),
"integer").
",".
94 $ilDB->quote(
"n",
"text").
",".
95 $ilDB->quote($this->getStartfile(),
"text").
")");
105 $lm_dir = $lm_data_dir.
"/lm_".$this->
getId();
117 return $this->start_file;
125 $this->start_file = $a_file;
131 $this->online = $a_online;
146 $q =
"SELECT * FROM file_based_lm WHERE id = ".$ilDB->quote($a_id,
"integer");
148 $lm_rec = $ilDB->fetchAssoc(
$lm_set);
161 require_once(
"./Modules/HTMLLearningModule/classes/class.ilObjFileBasedLMAccess.php");
182 if (!parent::delete())
191 $ilDB->manipulate(
"DELETE FROM file_based_lm WHERE id = ".
192 $ilDB->quote($this->getID(),
"integer"));
211 preg_match(
"/.*htlm_([0-9]*)\.zip/", $a_filename, $match);
212 if (is_dir($a_dir.
"/htlm_".$match[1]))
214 $a_dir = $a_dir.
"/htlm_".$match[1];
226 public function cloneObject($a_target_id,$a_copy_id = 0, $a_omit_tree =
false)
230 $new_obj = parent::cloneObject($a_target_id,$a_copy_id, $a_omit_tree);
236 if(!$cp_options->isRootNode($this->getRefId()))
241 $new_obj->setTitle($this->
getTitle());
getDataDirectory($mode="filesystem")
static tf2yn($a_tf)
convert true/false to "y"/"n"
create($a_skip_meta=false)
create file based lm
static _lookupDiskUsage($a_id)
Returns the number of bytes used on the harddisk by the learning module with the specified object id...
static rCopy($a_sdir, $a_tdir, $preserveTimeAttributes=false)
Copies content of a directory $a_sdir recursively to a directory $a_tdir.
updateMetaData()
update meta data entry
Class ilObject Basic functions for all objects.
File Based Learning Module (HTML) object.
static _lookupOnline($a_id)
check wether content object is online
createMetaData()
create meta data entry
cloneObject($a_target_id, $a_copy_id=0, $a_omit_tree=false)
Clone HTML learning module.
setStartFile($a_file, $a_omit_file_check=false)
static _getInstance($a_copy_id)
Get instance of copy wizard options.
getId()
get object id public
getTitle()
get object title public
getDescription()
get object description
cloneMetaData($target_obj)
Copy meta data.
getDiskUsage()
Gets the disk usage of the object in bytes.
static makeDir($a_dir)
creates a new directory and inherits all filesystem permissions of the parent directory You may pass ...
update($a_skip_meta=false)
update object data
static renameExecutables($a_dir)
Rename uploaded executables for security reasons.
__construct($a_id=0, $a_call_by_reference=true)
Constructor public.
deleteMetaData()
delete meta data entry
static yn2tf($a_yn)
convert "y"/"n" to true/false
static delDir($a_dir, $a_clean_only=false)
removes a dir and all its content (subdirs and files) recursively
static getWebspaceDir($mode="filesystem")
get webspace directory
populateByDirectoy($a_dir, $a_filename="")
Populate by directory.