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") {
51 "Description" =>
"text",
52 "StartFile" =>
"text",
53 "Dir" =>
"directory");
64 public function readData($a_entity, $a_version, $a_ids, $a_field =
"")
68 if (!is_array($a_ids)) {
69 $a_ids =
array($a_ids);
72 if ($a_entity ==
"htlm") {
76 " startfile start_file " .
77 " FROM file_based_lm JOIN object_data ON (file_based_lm.id = object_data.obj_id) " .
79 $ilDB->in(
"id", $a_ids,
false,
"integer"));
102 include_once(
"./Modules/HTMLLearningModule/classes/class.ilObjFileBasedLM.php");
104 $dir = $lm->getDataDirectory();
105 $a_set[
"Dir"] = $dir;
116 public function importRecord($a_entity, $a_types, $a_rec, $a_mapping, $a_schema_version)
124 include_once(
"./Modules/HTMLLearningModule/classes/class.ilObjFileBasedLM.php");
125 if ($new_id = $a_mapping->getMapping(
'Services/Container',
'objs', $a_rec[
'Id'])) {
129 $newObj->setType(
"htlm");
130 $newObj->create(
true);
133 $newObj->setTitle($a_rec[
"Title"]);
134 $newObj->setDescription($a_rec[
"Description"]);
135 $newObj->setStartFile($a_rec[
"StartFile"],
true);
136 $newObj->update(
true);
137 $this->current_obj = $newObj;
139 $dir = str_replace(
"..",
"", $a_rec[
"Dir"]);
142 $target_dir = $newObj->getDataDirectory();
146 $a_mapping->addMapping(
"Modules/HTMLLearningModule",
"htlm", $a_rec[
"Id"], $newObj->getId());
147 $a_mapping->addMapping(
150 $a_rec[
"Id"] .
":0:htlm",
151 $newObj->getId() .
":0:htlm" readData($a_entity, $a_version, $a_ids, $a_field="")
Read data.
getDirectDataFromQuery($a_query, $a_convert_to_leading_upper=true, $a_set=true)
Get data from query.This is a standard procedure, all db field names are directly mapped to abstract ...
static rCopy($a_sdir, $a_tdir, $preserveTimeAttributes=false)
Copies content of a directory $a_sdir recursively to a directory $a_tdir.
File Based Learning Module (HTML) object.
getXmlRecord($a_entity, $a_version, $a_set)
Get xml record.
getImportDirectory()
Get import directory.
getSupportedVersions()
Get supported versions.
getXmlNamespace($a_entity, $a_schema_version)
Get xml namespace.
importRecord($a_entity, $a_types, $a_rec, $a_mapping, $a_schema_version)
Import record.
static getInstanceByObjId($a_obj_id, $stop_on_error=true)
get an instance of an Ilias object by object id
getDependencies($a_entity, $a_version, $a_rec, $a_ids)
Determine the dependent sets of data.
Create styles array
The data for the language used.
getTypes($a_entity, $a_version)
Get field types for entity.
HTML learning module data set class.
A dataset contains in data in a common structure that can be shared and transformed for different pur...