4 include_once(
"./Services/DataSet/classes/class.ilDataSet.php");
29 return array(
"4.1.0");
32 return array(
"4.1.0");
44 return "http://www.ilias.de/xml/Modules/Wiki/".$a_entity;
53 protected function getTypes($a_entity, $a_version)
55 if ($a_entity ==
"wiki")
63 "Description" =>
"text",
64 "StartPage" =>
"text",
66 "Introduction" =>
"text",
67 "Rating" =>
"integer");
71 if ($a_entity ==
"wpg")
79 "WikiId" =>
"integer");
91 function readData($a_entity, $a_version, $a_ids, $a_field =
"")
95 if (!is_array($a_ids))
97 $a_ids = array($a_ids);
100 if ($a_entity ==
"wiki")
106 " startpage start_page, short, rating, introduction".
107 " FROM il_wiki_data JOIN object_data ON (il_wiki_data.id = object_data.obj_id) ".
109 $ilDB->in(
"id", $a_ids,
false,
"integer"));
114 if ($a_entity ==
"wpg")
120 " FROM il_wiki_page ".
122 $ilDB->in(
"wiki_id", $a_ids,
false,
"integer"));
138 "wpg" => array(
"ids" => $a_rec[
"Id"])
152 function importRecord($a_entity, $a_types, $a_rec, $a_mapping, $a_schema_version)
161 include_once(
"./Modules/Wiki/classes/class.ilObjWiki.php");
162 if($new_id = $a_mapping->getMapping(
'Services/Container',
'objs',$a_rec[
'Id']))
169 $newObj->setType(
"wiki");
170 $newObj->create(
true);
173 $newObj->setTitle($a_rec[
"Title"]);
174 $newObj->setDescription($a_rec[
"Description"]);
175 $newObj->setShortTitle($a_rec[
"Short"]);
176 $newObj->setStartPage($a_rec[
"StartPage"]);
177 $newObj->setRating($a_rec[
"Rating"]);
178 $newObj->setIntroduction($a_rec[
"Introduction"]);
179 $newObj->update(
true);
180 $this->current_obj = $newObj;
181 $a_mapping->addMapping(
"Modules/Wiki",
"wiki", $a_rec[
"Id"], $newObj->getId());
185 $wiki_id = $a_mapping->getMapping(
"Modules/Wiki",
"wiki", $a_rec[
"WikiId"]);
186 include_once(
"./Modules/Wiki/classes/class.ilWikiPage.php");
188 $wpage->setWikiId($wiki_id);
189 $wpage->setTitle($a_rec[
"Title"]);
190 $wpage->create(
true);
192 $a_mapping->addMapping(
"Modules/Wiki",
"wpg", $a_rec[
"Id"], $wpage->getId());
193 $a_mapping->addMapping(
"Services/COPage",
"pg",
"wpg:".$a_rec[
"Id"],
"wpg:".$wpage->getId());