8 require_once
"./Services/Object/classes/class.ilObject.php";
38 $this->
ilObject($a_id,$a_call_by_reference);
58 $ilDB->manipulate($q =
"UPDATE file_based_lm SET ".
59 " is_online = ".$ilDB->quote(
ilUtil::tf2yn($this->getOnline()),
"text").
60 ", startfile = ".$ilDB->quote($this->
getStartFile(),
"text").
" ".
61 ", show_lic = ".$ilDB->quote($this->
getShowLicense(),
"integer").
" ".
63 " WHERE id = ".$ilDB->quote($this->
getId(),
"integer"));
76 $q =
"SELECT * FROM file_based_lm WHERE id = ".$ilDB->quote($this->
getId(),
"integer");
78 $lm_rec = $ilDB->fetchAssoc(
$lm_set);
90 include_once(
"./Modules/LearningModule/classes/class.ilBibItem.php");
93 $this->bib_obj->read();
109 $ilDB->manipulate(
"INSERT INTO file_based_lm (id, is_online, startfile) VALUES ".
110 " (".$ilDB->quote($this->getID(),
"integer").
",".
111 $ilDB->quote(
"n",
"text").
",".
112 $ilDB->quote($this->getStartfile(),
"text").
")");
120 $lm_dir = $lm_data_dir.
"/lm_".$this->
getId();
132 return $this->start_file;
140 $this->start_file = $a_file;
146 $this->online = $a_online;
156 $this->show_license = (bool)$a_value;
166 $this->show_bib = (bool)$a_value;
181 $q =
"SELECT * FROM file_based_lm WHERE id = ".$ilDB->quote($a_id,
"integer");
183 $lm_rec = $ilDB->fetchAssoc(
$lm_set);
196 require_once(
"./Modules/HTMLLearningModule/classes/class.ilObjFileBasedLMAccess.php");
217 if (!parent::delete())
233 include_once(
"./Services/Xml/classes/class.ilNestedSetXML.php");
235 $nested->init($this->
getId(),
"bib");
236 $nested->deleteAllDBData();
239 $ilDB->manipulate(
"DELETE FROM file_based_lm WHERE id = ".
240 $ilDB->quote($this->getID(),
"integer"));
262 function notify($a_event,$a_ref_id,$a_parent_non_rbac_id,$a_node_id,$a_params = 0)
302 if ($a_node_id==
$_GET[
"ref_id"])
304 $parent_obj =& $this->
ilias->obj_factory->getInstanceByRefId($a_node_id);
305 $parent_type = $parent_obj->getType();
306 if($parent_type == $this->
getType())
308 $a_node_id = (int) $tree->getParentId($a_node_id);
312 parent::notify($a_event,$a_ref_id,$a_parent_non_rbac_id,$a_node_id,$a_params);
326 preg_match(
"/.*htlm_([0-9]*)\.zip/", $a_filename, $match);
327 if (is_dir($a_dir.
"/htlm_".$match[1]))
329 $a_dir = $a_dir.
"/htlm_".$match[1];
345 $new_obj = parent::cloneObject($a_target_id,$a_copy_id);
351 if(!$cp_options->isRootNode($this->getRefId()))
356 $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.
setStartFile($a_file, $a_omit_file_check=false)
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...
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
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.
setShowBibliographicalData($a_value)
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.
getShowBibliographicalData()