4 include_once(
"./Services/DataSet/classes/class.ilDataSet.php");
26 return array(
"4.1.0");
38 return "http://www.ilias.de/xml/Modules/HTMLLearningModule/".$a_entity;
47 protected function getTypes($a_entity, $a_version)
49 if ($a_entity ==
"htlm")
57 "Description" =>
"text",
58 "StartFile" =>
"text",
59 "Dir" =>
"directory");
71 function readData($a_entity, $a_version, $a_ids, $a_field =
"")
75 if (!is_array($a_ids))
77 $a_ids = array($a_ids);
80 if ($a_entity ==
"htlm")
86 " startfile start_file ".
87 " FROM file_based_lm JOIN object_data ON (file_based_lm.id = object_data.obj_id) ".
89 $ilDB->in(
"id", $a_ids,
false,
"integer"));
113 include_once(
"./Modules/HTMLLearningModule/classes/class.ilObjFileBasedLM.php");
115 $dir = $lm->getDataDirectory();
116 $a_set[
"Dir"] =
$dir;
127 function importRecord($a_entity, $a_types, $a_rec, $a_mapping, $a_schema_version)
136 include_once(
"./Modules/HTMLLearningModule/classes/class.ilObjFileBasedLM.php");
137 if($new_id = $a_mapping->getMapping(
'Services/Container',
'objs',$a_rec[
'Id']))
144 $newObj->setType(
"htlm");
145 $newObj->create(
true);
148 $newObj->setTitle($a_rec[
"Title"]);
149 $newObj->setDescription($a_rec[
"Description"]);
150 $newObj->setStartFile($a_rec[
"StartFile"]);
152 $this->current_obj = $newObj;
154 $dir = str_replace(
"..",
"", $a_rec[
"Dir"]);
158 $target_dir = $newObj->getDataDirectory();
162 $a_mapping->addMapping(
"Modules/HTMLLearningModule",
"htlm", $a_rec[
"Id"], $newObj->getId());
163 $a_mapping->addMapping(
"Services/MetaData",
"md",
164 $a_rec[
"Id"].
":0:htlm", $newObj->getId().
":0:htlm");