4 include_once(
"./Services/Export/classes/class.ilXmlExporter.php");
64 $parts = explode(
":", $a_id);
65 if(
sizeof($parts) != 2)
73 include_once(
'Services/AdvancedMetaData/classes/class.ilAdvancedMDValues.php');
82 foreach($raw as $item)
84 $sub_items[$item[
"sub_type"]][] = $item[
"sub_id"];
89 foreach($sub_items as $sub_type => $sub_ids)
91 foreach(array_unique($sub_ids) as $sub_id)
94 $defs = $values_record->getDefinitions();
95 $values_record->read();
96 foreach($values_record->getADTGroup()->getElements() as $element_id => $element)
98 if(!$element->isNull())
100 $def = $defs[$element_id];
101 $items[$rec_id][] =
array(
102 'id' => $def->generateImportId($def->getFieldId()),
103 'sub_type' => $sub_type,
105 'value' => $def->getValueForXML($element)
113 $local_recs =
array();
115 if($rec_obj->getParentObject())
118 $rec_obj->toXML($xml);
121 $local_recs[$rec_obj->getRecordId()] = base64_encode($xml);
129 foreach($items as $record_id => $record_items)
133 $is_local = array_key_exists($record_id, $local_recs);
139 if(!array_key_exists($record_id, self::$local_recs_done))
143 array(
'local_id' => $record_id),
144 $local_recs[$record_id]
147 self::$local_recs_done[] = $record_id;
151 foreach($record_items as $item)
155 'sub_type' => $item[
'sub_type'],
156 'sub_id' => $item[
'sub_id']
161 $att[
'local_rec_id'] = $record_id;
171 $xml->xmlEndTag(
'AdvancedMetaData');
174 return $xml->xmlDumpMem(
false);
189 "namespace" =>
"http://www.ilias.de/Services/AdvancedMetaData/advmd/4_4",
190 "xsd_file" =>
"ilias_advmd_4_4.xsd",
191 "uses_dataset" =>
true,
xmlStartTag($tag, $attrs=NULL, $empty=FALSE, $encode=TRUE, $escape=TRUE)
Writes a starttag.
static findByObjectId($a_obj_id)
Find all entries for object (regardless of sub-type/sub-id)
Create styles array
The data for the language used.
xmlDumpMem($format=TRUE)
Returns xml document from memory.