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") {
84 if (!($new_id = $a_mapping->
getMapping(
'components/ILIAS/Container',
'objs', $a_id))) {
85 $new_id = $a_mapping->
getMapping(
"components/ILIAS/Survey",
"svy", 0);
94 if (!file_exists($xml_file)) {
95 $GLOBALS[
'ilLog']->write(__METHOD__ .
': Cannot find xml definition: ' . $xml_file);
98 $GLOBALS[
'ilLog']->write(
"getQuestionPoolID = " . $this->
getImport()->getConfig(
"components/ILIAS/Survey")->getQuestionPoolID());
101 $this->
getImport()->getConfig(
"components/ILIAS/Survey")->getQuestionPoolID(),
107 $import->setSurveyObject($newObj);
108 $import->startParsing();
110 $a_mapping->
addMapping(
"components/ILIAS/Survey",
"svy", (
int) $a_id, $newObj->getId());
112 "components/ILIAS/MetaData",
115 $newObj->getId() .
":0:svy"
static getLogger(string $a_component_id)
Get component logger.
importXmlRepresentation(string $a_entity, string $a_id, string $a_xml, ilImportMapping $a_mapping)
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...
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