8require_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 ".
60 ", startfile = ".$ilDB->quote($this->getStartFile(),
"text").
" ".
61 ", show_lic = ".$ilDB->quote($this->getShowLicense(),
"integer").
" ".
62 ", show_bib = ".$ilDB->quote($this->getShowBibliographicalData(),
"integer").
" ".
63 " WHERE id = ".$ilDB->quote($this->getId(),
"integer"));
76 $q =
"SELECT * FROM file_based_lm WHERE id = ".$ilDB->quote($this->
getId(),
"integer");
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");
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());
static _getInstance($a_copy_id)
Get instance of copy wizard options.
Class NestedSetXML functions for storing XML-Data into nested-set-database-strcture.
_lookupDiskUsage($a_id)
Returns the number of bytes used on the harddisk by the learning module with the specified object id.
File Based Learning Module (HTML) object.
ilObjFileBasedLM($a_id=0, $a_call_by_reference=true)
Constructor @access public.
create()
create file based lm
getDiskUsage()
Gets the disk usage of the object in bytes.
setStartFile($a_file, $a_omit_file_check=false)
_lookupOnline($a_id)
check wether content object is online
cloneObject($a_target_id, $a_copy_id=0)
Clone HTML learning module.
initBibItemObject()
init bib object (contains all bib item data)
update()
update object data
setShowBibliographicalData($a_value)
populateByDirectoy($a_dir, $a_filename="")
Populate by directory.
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...
getShowBibliographicalData()
getDataDirectory($mode="filesystem")
Class ilObject Basic functions for all objects.
getType()
get object type @access public
ilObject($a_id=0, $a_reference=true)
Constructor @access public.
deleteMetaData()
delete meta data entry
updateMetaData()
update meta data entry
createMetaData()
create meta data entry
getDescription()
get object description
cloneMetaData($target_obj)
Copy meta data.
getId()
get object id @access public
getTitle()
get object title @access public
static delDir($a_dir, $a_clean_only=false)
removes a dir and all its content (subdirs and files) recursively
static tf2yn($a_tf)
convert true/false to "y"/"n"
static getWebspaceDir($mode="filesystem")
get webspace directory
static rCopy($a_sdir, $a_tdir, $preserveTimeAttributes=false)
Copies content of a directory $a_sdir recursively to a directory $a_tdir.
static yn2tf($a_yn)
convert "y"/"n" to true/false
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.
redirection script todo: (a better solution should control the processing via a xml file)