4 include_once(
"./Services/DataSet/classes/class.ilDataSet.php");
23 return array(
"4.1.0");
34 return "http://www.ilias.de/xml/Modules/HTMLLearningModule/".$a_entity;
43 protected function getTypes($a_entity, $a_version)
45 if ($a_entity ==
"htlm")
53 "Description" =>
"text",
54 "StartFile" =>
"text",
55 "Dir" =>
"directory");
67 function readData($a_entity, $a_version, $a_ids, $a_field =
"")
71 if (!is_array($a_ids))
73 $a_ids = array($a_ids);
76 if ($a_entity ==
"htlm")
82 " startfile start_file ".
83 " FROM file_based_lm JOIN object_data ON (file_based_lm.id = object_data.obj_id) ".
85 $ilDB->in(
"id", $a_ids,
false,
"integer"));
109 include_once(
"./Modules/HTMLLearningModule/classes/class.ilObjFileBasedLM.php");
111 $dir = $lm->getDataDirectory();
112 $a_set[
"Dir"] = $dir;
123 function importRecord($a_entity, $a_types, $a_rec, $a_mapping, $a_schema_version)
132 include_once(
"./Modules/HTMLLearningModule/classes/class.ilObjFileBasedLM.php");
133 if($new_id = $a_mapping->getMapping(
'Services/Container',
'objs',$a_rec[
'Id']))
140 $newObj->setType(
"htlm");
141 $newObj->create(
true);
144 $newObj->setTitle($a_rec[
"Title"]);
145 $newObj->setDescription($a_rec[
"Description"]);
146 $newObj->setStartFile($a_rec[
"StartFile"]);
148 $this->current_obj = $newObj;
150 $dir = str_replace(
"..",
"", $a_rec[
"Dir"]);
154 $target_dir = $newObj->getDataDirectory();
158 $a_mapping->addMapping(
"Modules/HTMLLearningModule",
"htlm", $a_rec[
"Id"], $newObj->getId());
159 $a_mapping->addMapping(
"Services/MetaData",
"md",
160 $a_rec[
"Id"].
":0:htlm", $newObj->getId().
":0:htlm");