3declare(strict_types=0);
38 $this->
logger = $DIC->logger()->crs();
41 public function init(): void
52 if ($new_id = $a_mapping->getMapping(
'Services/Container',
'objs', $a_id)) {
56 elseif ($new_id = $a_mapping->getMapping(
'Services/Container',
'refs',
'0')) {
60 $this->course->create(
true);
63 if ($a_entity == self::ENTITY_OBJECTIVE) {
69 $parser->setMapping($a_mapping);
76 $parser->setXMLContent($a_xml);
77 $parser->startParsing();
80 $this->course->setOfflineStatus(
true);
81 $this->course->update();
83 $a_mapping->addMapping(
'Modules/Course',
'crs', $a_id, (
string) $this->course->getId());
85 $this->
logger->error(
'Parsing failed with message, "' . $e->getMessage() .
'".');
91 foreach ($this->final_processing_info as $info) {
94 $parser->setMapping($mapping);
95 $parser->parseObjectDependencies();
102 $this->final_processing_info[] = array(
103 'course' => $a_course,
104 'entity' => $a_entity,
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
array $final_processing_info
afterContainerImportProcessing(\ilImportMapping $mapping)
importXmlRepresentation(string $a_entity, string $a_id, string $a_xml, ilImportMapping $a_mapping)
@noinspection PhpFieldAssignmentTypeMismatchInspection
addFinalProcessingInfo($a_course, $a_entity, $a_xml)
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...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
Component logger with individual log levels by component id.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
static getInstanceByRefId(int $ref_id, bool $stop_on_error=true)
get an instance of an Ilias object by reference id
static _getAllReferences(int $id)
get all reference ids for object ID
SaxParserException thrown by ilSaxParser if property throwException is set.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
if(!file_exists(getcwd() . '/ilias.ini.php'))
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...