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");
69 $lm_set = $ilDB->query($q);
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");
149 $lm_set = $ilDB->query($q);
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];
340 $new_obj->setTitle($this->
getTitle());