4 include_once(
"./Services/Export/classes/class.ilXmlImporter.php");
20 include_once(
"./Modules/Glossary/classes/class.ilGlossaryDataSet.php");
22 $this->ds->setDSPrefix(
"ds");
23 $this->config = $this->
getImport()->getConfig(
"Modules/Glossary");
34 if ($a_entity ==
"glo") {
36 if ($new_id = $a_mapping->getMapping(
'Services/Container',
'objs', $a_id)) {
43 $GLOBALS[
'ilLog']->write(__METHOD__ .
': Using XML file ' . $xml_file);
46 if (file_exists($xml_file)) {
47 if (!is_object($newObj)) {
49 include_once(
"./Modules/Glossary/classes/class.ilObjGlossary.php");
51 $newObj->setType(
"glo");
53 $newObj->create(
true);
56 include_once
'./Modules/LearningModule/classes/class.ilContObjParser.php';
63 $contParser->startParsing();
68 $term_map = $contParser->getGlossaryTermMap();
69 foreach ($term_map as $k => $v) {
70 $a_mapping->addMapping(
78 $a_mapping->addMapping(
85 $a_mapping->addMapping(
86 "Services/AdvancedMetaData",
93 $a_mapping->addMapping(
"Modules/Glossary",
"glo", $a_id, $newObj->getId());
94 $a_mapping->addMapping(
"Services/AdvancedMetaData",
"parent", $a_id, $newObj->getId());
96 $this->current_glo = $newObj;
100 include_once(
"./Services/DataSet/classes/class.ilDataSetImportParser.php");
124 include_once(
"./Services/Taxonomy/classes/class.ilObjTaxonomy.php");
125 $maps = $a_mapping->getMappingsOfEntity(
"Modules/Glossary",
"glo");
127 if (
$old !=
"new_id" && (
int)
$old > 0) {
129 $new_tax_ids = $a_mapping->getMapping(
"Services/Taxonomy",
"tax_usage_of_obj",
$old);
130 if ($new_tax_ids !==
false) {
131 $tax_ids = explode(
":", $new_tax_ids);
132 foreach ($tax_ids as $tid) {
139 include_once(
"./Modules/Glossary/classes/class.ilGlossaryAdvMetaDataAdapter.php");
140 $advmdco = $a_mapping->getMappingsOfEntity(
"Modules/Glossary",
"advmd_col_order");
141 foreach ($advmdco as
$id => $order) {
143 $field_glo_id =
$id[0];
145 if ($field_glo_id ==
$old) {
147 $new_local_id = $a_mapping->getMapping(
"Services/AdvancedMetaData",
"lfld", $field_id);
149 $field_id = $new_local_id;
getSchemaVersion()
Get schema version.
getImportDirectory()
Get import directory.
Importer class for files.
$GLOBALS['loaded']
Global hash that tracks already loaded includes.
if(!array_key_exists('StateId', $_REQUEST)) $id
Manifest parser for ILIAS standard export files.
importXmlRepresentation($a_entity, $a_id, $a_xml, $a_mapping)
Import XML.
exportedFromSameInstallation()
Is exporting and importing installation identical?
finalProcessing($a_mapping)
Final processing.
static getInstanceByObjId($a_obj_id, $stop_on_error=true)
get an instance of an Ilias object by object id
static saveUsage($a_tax_id, $a_obj_id)
Save Usage.
static _writeImportId($a_obj_id, $a_import_id)
write import id to db (static)