30 bool $a_call_by_reference =
true 37 $this->db = $DIC->database();
43 public function update(
bool $a_skip_meta =
false): bool
52 $ilDB->manipulate($q =
"UPDATE file_based_lm SET " .
53 " startfile = " .
$ilDB->quote($this->getStartFile(),
"text") .
" " .
54 " WHERE id = " .
$ilDB->quote($this->getId(),
"integer"));
58 public function read(): void
64 $q =
"SELECT * FROM file_based_lm WHERE id = " .
$ilDB->quote($this->
getId(),
"integer");
70 public function create(
bool $a_skip_meta =
false):
int 74 $id = parent::create();
77 $ilDB->manipulate(
"INSERT INTO file_based_lm (id, startfile) VALUES " .
78 " (" .
$ilDB->quote($this->getId(),
"integer") .
"," .
79 $ilDB->quote($this->getStartFile(),
"text") .
")");
89 $lm_dir = $lm_data_dir .
"/lm_" . $this->
getId();
106 bool $a_omit_file_check =
false 109 (file_exists($this->
getDataDirectory() .
"/" . $a_file) || $a_omit_file_check)) {
110 $this->start_file = $a_file;
115 public function delete():
bool 120 if (!parent::delete()) {
128 $ilDB->manipulate(
"DELETE FROM file_based_lm WHERE id = " .
129 $ilDB->quote($this->getId(),
"integer"));
145 string $a_filename =
"" 147 preg_match(
"/.*htlm_([0-9]*)\.zip/", $a_filename, $match);
148 if (is_dir($a_dir .
"/htlm_" . ($match[1] ??
""))) {
149 $a_dir .=
"/htlm_" . ($match[1] ??
"");
155 public function cloneObject(
int $target_id,
int $copy_id = 0,
bool $omit_tree =
false): ?
ilObject 158 $new_obj = parent::cloneObject($target_id, $copy_id, $omit_tree);
164 if (!$cp_options->isRootNode($this->getRefId())) {
167 $new_obj->setOfflineStatus(
true);
static getWebspaceDir(string $mode="filesystem")
get webspace directory
__construct(int $a_id=0, bool $a_call_by_reference=true)
update(bool $a_skip_meta=false)
getDataDirectory(string $mode="filesystem")
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
static rCopy(string $a_sdir, string $a_tdir, bool $preserveTimeAttributes=false)
Copies content of a directory $a_sdir recursively to a directory $a_tdir.
static renameExecutables(string $a_dir)
setStartFile(string $a_file, bool $a_omit_file_check=false)
static isInfoEnabled(int $obj_id)
cloneMetaData(ilObject $target_obj)
Copy meta data.
static delDir(string $a_dir, bool $a_clean_only=false)
removes a dir and all its content (subdirs and files) recursively
setOfflineStatus(bool $status)
create(bool $a_skip_meta=false)
__construct(Container $dic, ilPlugin $plugin)
static _getInstance(int $a_copy_id)
static makeDir(string $a_dir)
creates a new directory and inherits all filesystem permissions of the parent directory You may pass ...
populateByDirectoy(string $a_dir, string $a_filename="")
Populate by directory.