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];
351 if(!$cp_options->isRootNode($this->getRefId()))
356 $new_obj->setTitle($this->
getTitle());