36 $this->log = $DIC[
"ilLog"];
38 $this->spl_import_manager = $DIC->surveyQuestionPool()
45 public function init(): void
48 $this->ds->setDSPrefix(
"ds");
49 $this->ds->setImport($this);
62 self::$survey = $a_val;
82 if ($a_entity ===
"svy") {
85 if ($new_id = $a_mapping->
getMapping(
'components/ILIAS/Container',
'objs', $a_id)) {
89 $newObj->setType(
'svy');
90 $newObj->setTitle(
"dummy");
91 $newObj->create(
true);
93 $a_mapping->
addMapping(
'components/ILIAS/Survey',
'svy', $a_id, (
string) $newObj->getId());
99 if (!file_exists($xml_file)) {
100 $GLOBALS[
'ilLog']->write(__METHOD__ .
': Cannot find xml definition: ' . $xml_file);
103 $GLOBALS[
'ilLog']->write(
"getQuestionPoolID = " . $this->
getImport()->getConfig(
"components/ILIAS/Survey")->getQuestionPoolID());
106 $this->
getImport()->getConfig(
"components/ILIAS/Survey")->getQuestionPoolID(),
112 $import->setSurveyObject($newObj);
113 $import->startParsing();
115 $a_mapping->
addMapping(
"components/ILIAS/Survey",
"svy", (
int) $a_id, $newObj->getId());
117 "components/ILIAS/MetaData",
120 $newObj->getId() .
":0:svy"
static getLogger(string $a_component_id)
Get component logger.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
addMapping(string $a_comp, string $a_entity, string $a_old_id, string $a_new_id)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
setSurvey(ilObjSurvey $a_val)
Set current survey object (being imported).
getMapping(string $a_comp, string $a_entity, string $a_old_id)
static ilObjSurvey $survey
parseXmlFileNames()
Create qti and xml file name.
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)
Import XML.
static getInstanceByObjId(?int $obj_id, bool $stop_on_error=true)
get an instance of an Ilias object by object id
__construct(Container $dic, ilPlugin $plugin)
ILIAS SurveyQuestionPool Export ImportManager $spl_import_manager