32 if ($new_id = $a_mapping->getMapping(
'components/ILIAS/Container',
'objs', $a_id)) {
36 $new_id = $newObj->create();
41 if (file_exists($xml_file)) {
42 $GLOBALS[
'ilLog']->write(__METHOD__ .
': Cannot find xml definition: ' . $xml_file);
44 $newObj->importObject($xml_file);
48 $import->setXMLContent($a_xml);
49 $import->startParsing();
50 $a_mapping->addMapping(
51 "components/ILIAS/SurveyQuestionPool",
56 $a_mapping->addMapping(
57 'components/ILIAS/MetaData',
60 $newObj->getId() .
':0:spl'
66 $basename = basename($this->getImportDirectory());
67 return $this->getImportDirectory() .
'/' . $basename .
'.xml';
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
Class ilObjSurveyQuestionPool.
static getInstanceByObjId(?int $obj_id, bool $stop_on_error=true)
get an instance of an Ilias object by object id
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
importXmlRepresentation(string $a_entity, string $a_id, string $a_xml, ilImportMapping $a_mapping)
if(!file_exists('../ilias.ini.php'))