34     public function init(): void
    37         $this->ds->setDSPrefix(
"ds");
    41         $this->config = $this->
getImport()->getConfig(
"Modules/LearningModule");
    42         if ($this->config->getTranslationImportMode()) {
    43             $this->ds->setTranslationImportMode(
    44                 $this->config->getTranslationLM(),
    45                 $this->config->getTranslationLang()
    47             $cop_config = $this->
getImport()->getConfig(
"Services/COPage");
    48             $cop_config->setUpdateIfExists(
true);
    49             $cop_config->setForceLanguage($this->config->getTranslationLang());
    50             $cop_config->setReuseOriginallyExportedMedia(
true);
    51             $cop_config->setSkipInternalLinkResolve(
true);
    53             $mob_config = $this->
getImport()->getConfig(
"Services/MediaObjects");
    54             $mob_config->setUsePreviousImportIds(
true);
    65         $this->log->debug(
"import XML Representation");
    68         if ($new_id = $a_mapping->
getMapping(
'Services/Container', 
'objs', $a_id)) {
    70             $newObj->createLMTree();
    71             $this->log->debug(
"got mapping, new id is: " . $new_id);
    82         if (file_exists($xml_file)) {
    83             throw new ilLMOldExportFileException(
"This file seems to be from ILIAS version 5.0.x or lower. Import is not supported anymore.");
    85             $this->log->debug(
"create ilDataSetIportParser instance");
    96         $this->log->debug(
"import qti data");
    98         $this->qtis = array();
    99         if (is_file($qti_file)) {
   106             $result = $qtiParser->startParsing();
   107             $founditems = &$qtiParser->getFoundItems();
   109             if (count($founditems) > 0) {
   111                 $qtiParser->setTestObject($testObj);
   112                 $result = $qtiParser->startParsing();
   113                 $this->qtis = array_merge($this->qtis, $qtiParser->getImportMapping());
   122         $this->log->debug(
"pg map entries: " . count($pg_map));
   123         foreach ($pg_map as $pg_id) {
   126             $this->log->debug(
"write parent id, pg id: " . $pg_id . 
", lm id: " . $lm_id);
   130         foreach ($a_mapping->
getMappingsOfEntity(
"Modules/LearningModule", 
"lm_header_page") as $old_id => $dummy) {
   131             $new_page_id = (
int) $a_mapping->
getMapping(
"Modules/LearningModule", 
"pg", $old_id);
   132             if ($new_page_id > 0) {
   137         foreach ($a_mapping->
getMappingsOfEntity(
"Modules/LearningModule", 
"lm_footer_page") as $old_id => $dummy) {
   138             $new_page_id = (
int) $a_mapping->
getMapping(
"Modules/LearningModule", 
"pg", $old_id);
   139             if ($new_page_id > 0) {
   148         foreach ($pages as $p) {
   149             $id = explode(
":", $p);
   150             if (count(
$id) == 3) {
   153                     $new_page->buildDom();
   156                     $updated = $new_page->resolveQuestionReferences($this->qtis);
   160                     if ($this->config->getTranslationImportMode()) {
   161                         $il = $new_page->resolveIntLinks($link_map);
   168                         $new_page->update(
false, 
true);
   188         foreach ($lm_map as $old_lm_id => $new_lm_id) {
   194         foreach ($lm_map as $old_lm_id => $new_lm_id) {
   195             $this->reading_time_manager->updateReadingTime($new_lm_id);
 
static getLogger(string $a_component_id)
Get component logger. 
 
static writeFooterPage(int $a_lm_id, int $a_page_id)
 
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
 
Importer class for files. 
 
importXmlRepresentation(string $a_entity, string $a_id, string $a_xml, ilImportMapping $a_mapping)
 
static _writeParentId(string $a_parent_type, int $a_pg_id, int $a_par_id)
 
static writeHeaderPage(int $a_lm_id, int $a_page_id)
 
Manifest parser for ILIAS standard export files. 
 
ReadingTimeManager $reading_time_manager
 
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
 
getMapping(string $a_comp, string $a_entity, string $a_old_id)
 
getMappingsOfEntity(string $a_comp, string $a_entity)
 
static _exists(string $a_parent_type, int $a_id, string $a_lang="", bool $a_no_cache=false)
Checks whether page exists. 
 
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
 
ilLearningModuleDataSet $ds
 
finalProcessing(ilImportMapping $a_mapping)
 
static getInstanceByObjId(?int $obj_id, bool $stop_on_error=true)
get an instance of an Ilias object by object id 
 
LearningModule Data set class. 
 
$id
plugin.php for ilComponentBuildPluginInfoObjectiveTest::testAddPlugins 
 
static _lookupContObjID(int $a_id)
get learning module id for lm object 
 
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
 
static getInstance(string $a_parent_type, int $a_id=0, int $a_old_nr=0, string $a_lang="-")
Get page object instance. 
 
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...