8 require_once
"./Services/Object/classes/class.ilObject.php";
34 $this->
ilObject($a_id,$a_call_by_reference);
51 $ilDB->manipulate(
"UPDATE file_based_lm SET ".
52 " is_online = ".$ilDB->quote(
ilUtil::tf2yn($this->getOnline()),
"text").
",".
53 " startfile = ".$ilDB->quote($this->
getStartFile(),
"text").
" ".
54 " WHERE id = ".$ilDB->quote($this->
getId(),
"integer"));
68 $q =
"SELECT * FROM file_based_lm WHERE id = ".$ilDB->quote($this->
getId(),
"integer");
70 $lm_rec = $ilDB->fetchAssoc(
$lm_set);
81 include_once(
"./Modules/LearningModule/classes/class.ilBibItem.php");
84 $this->bib_obj->read();
100 $ilDB->manipulate(
"INSERT INTO file_based_lm (id, is_online, startfile) VALUES ".
101 " (".$ilDB->quote($this->getID(),
"integer").
",".
102 $ilDB->quote(
"n",
"text").
",".
103 $ilDB->quote($this->getStartfile(),
"text").
")");
111 $lm_dir = $lm_data_dir.
"/lm_".$this->
getId();
123 return $this->start_file;
128 $this->start_file = $a_file;
133 $this->online = $a_online;
138 return $this->online;
148 $q =
"SELECT * FROM file_based_lm WHERE id = ".$ilDB->quote($a_id,
"integer");
150 $lm_rec = $ilDB->fetchAssoc(
$lm_set);
163 require_once(
"./Modules/HTMLLearningModule/classes/class.ilObjFileBasedLMAccess.php");
184 if (!parent::delete())
200 include_once(
"./Services/Xml/classes/class.ilNestedSetXML.php");
202 $nested->init($this->
getId(),
"bib");
203 $nested->deleteAllDBData();
206 $ilDB->manipulate(
"DELETE FROM file_based_lm WHERE id = ".
207 $ilDB->quote($this->getID(),
"integer"));
238 return $roles ? $roles : array();
254 function notify($a_event,$a_ref_id,$a_parent_non_rbac_id,$a_node_id,$a_params = 0)
294 if ($a_node_id==
$_GET[
"ref_id"])
296 $parent_obj =& $this->
ilias->obj_factory->getInstanceByRefId($a_node_id);
297 $parent_type = $parent_obj->getType();
298 if($parent_type == $this->
getType())
300 $a_node_id = (int) $tree->getParentId($a_node_id);
304 parent::notify($a_event,$a_ref_id,$a_parent_non_rbac_id,$a_node_id,$a_params);
318 preg_match(
"/.*htlm_([0-9]*)\.zip/", $a_filename, $match);
319 if (is_dir($a_dir.
"/htlm_".$match[1]))
321 $a_dir = $a_dir.
"/htlm_".$match[1];
337 $new_obj = parent::cloneObject($a_target_id,$a_copy_id);
340 $new_obj->setTitle($this->
getTitle());
getDataDirectory($mode="filesystem")
static tf2yn($a_tf)
convert true/false to "y"/"n"
Class NestedSetXML functions for storing XML-Data into nested-set-database-strcture.
static rCopy($a_sdir, $a_tdir, $preserveTimeAttributes=false)
Copies content of a directory $a_sdir recursively to a directory $a_tdir.
_lookupDiskUsage($a_id)
Returns the number of bytes used on the harddisk by the learning module with the specified object id...
updateMetaData()
update meta data entry
update()
update object data
Class ilObject Basic functions for all objects.
File Based Learning Module (HTML) object.
createMetaData()
create meta data entry
ilObject($a_id=0, $a_reference=true)
Constructor public.
notify($a_event, $a_ref_id, $a_parent_non_rbac_id, $a_node_id, $a_params=0)
notifys an object about an event occured Based on the event happend, each object may decide how it re...
getId()
get object id public
getTitle()
get object title public
getDescription()
get object description
redirection script todo: (a better solution should control the processing via a xml file) ...
cloneMetaData($target_obj)
Copy meta data.
cloneObject($a_target_id, $a_copy_id=0)
Clone HTML learning module.
getDiskUsage()
Gets the disk usage of the object in bytes.
initBibItemObject()
init bib object (contains all bib item data)
getType()
get object type public
create()
create file based lm
static makeDir($a_dir)
creates a new directory and inherits all filesystem permissions of the parent directory You may pass ...
static renameExecutables($a_dir)
Rename uploaded executables for security reasons.
initDefaultRoles()
init default roles settings
deleteMetaData()
delete meta data entry
_lookupOnline($a_id)
check wether content object is online
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
ilObjFileBasedLM($a_id=0, $a_call_by_reference=true)
Constructor public.
populateByDirectoy($a_dir, $a_filename="")
Populate by directory.