27        $this->ds->setDSPrefix(
"ds");
 
   31        $this->config = $this->
getImport()->getConfig(
"Modules/LearningModule");
 
   32        if ($this->config->getTranslationImportMode()) {
 
   33            $this->ds->setTranslationImportMode(
 
   34                $this->config->getTranslationLM(),
 
   35                $this->config->getTranslationLang()
 
   37            $cop_config = $this->
getImport()->getConfig(
"Services/COPage");
 
   38            $cop_config->setUpdateIfExists(
true);
 
   39            $cop_config->setForceLanguage($this->config->getTranslationLang());
 
   40            $cop_config->setReuseOriginallyExportedMedia(
true);
 
   41            $cop_config->setSkipInternalLinkResolve(
true);
 
   43            $mob_config = $this->
getImport()->getConfig(
"Services/MediaObjects");
 
   44            $mob_config->setUsePreviousImportIds(
true);
 
   57        $this->log->debug(
"import XML Representation");
 
   60        if ($new_id = $a_mapping->getMapping(
'Services/Container', 
'objs', $a_id)) {
 
   62            $newObj->createLMTree();
 
   63            $this->log->debug(
"got mapping, new id is: " . $new_id);
 
   74        if (file_exists($xml_file)) {
 
   77            $this->log->debug(
"imported from directory ($mess)");
 
   78            $a_mapping->addMapping(
"Modules/LearningModule", 
"lm", $a_id, $newObj->getId());
 
   79            $a_mapping->addMapping(
"Services/Object", 
"obj", $a_id, $newObj->getId());
 
   81            $this->log->debug(
"create ilDataSetIportParser instance");
 
   92        $this->log->debug(
"import qti data");
 
   94        $this->qtis = array();
 
   95        if (is_file($qti_file)) {
 
  102            $result = $qtiParser->startParsing();
 
  103            $founditems = &$qtiParser->getFoundItems();
 
  105            if (count($founditems) > 0) {
 
  107                $qtiParser->setTestObject($testObj);
 
  108                $result = $qtiParser->startParsing();
 
  109                $this->qtis = array_merge($this->qtis, $qtiParser->getImportMapping());
 
  121        $pg_map = $a_mapping->getMappingsOfEntity(
"Modules/LearningModule", 
"pg");
 
  123        $this->log->debug(
"pg map entries: " . count($pg_map));
 
  124        foreach ($pg_map as $pg_id) {
 
  127            $this->log->debug(
"write parent id, pg id: " . $pg_id . 
", lm id: " . $lm_id);
 
  131        foreach ($a_mapping->getMappingsOfEntity(
"Modules/LearningModule", 
"lm_header_page") as $old_id => $dummy) {
 
  132            $new_page_id = (int) $a_mapping->getMapping(
"Modules/LearningModule", 
"pg", $old_id);
 
  133            if ($new_page_id > 0) {
 
  138        foreach ($a_mapping->getMappingsOfEntity(
"Modules/LearningModule", 
"lm_footer_page") as $old_id => $dummy) {
 
  139            $new_page_id = (int) $a_mapping->getMapping(
"Modules/LearningModule", 
"pg", $old_id);
 
  140            if ($new_page_id > 0) {
 
  147        $link_map = $a_mapping->getMappingsOfEntity(
"Modules/LearningModule", 
"link");
 
  148        $pages = $a_mapping->getMappingsOfEntity(
"Services/COPage", 
"pgl");
 
  149        foreach ($pages as $p) {
 
  150            $id = explode(
":", $p);
 
  151            if (count($id) == 3) {
 
  154                    $new_page->buildDom();
 
  157                    $updated = $new_page->resolveQuestionReferences($this->qtis);
 
  161                    if ($this->config->getTranslationImportMode()) {
 
  162                        $il = $new_page->resolveIntLinks($link_map);
 
  169                        $new_page->update(
false, 
true);
 
  176        $alls_map = $a_mapping->getMappingsOfEntity(
"Modules/LearningModule", 
"lm_style");
 
  177        foreach ($alls_map as $new_lm_id => $old_style_id) {
 
  178            $new_style_id = (int) $a_mapping->getMapping(
"Services/Style", 
"sty", $old_style_id);
 
  179            if ($new_lm_id > 0 && $new_style_id > 0) {
 
  181                $lm->writeStyleSheetId($new_style_id);
 
  186        $ref_mapping = $a_mapping->getMappingsOfEntity(
'Services/Container', 
'refs');
 
  187        $lm_map = $a_mapping->getMappingsOfEntity(
"Modules/LearningModule", 
"lm");
 
  188        foreach ($lm_map as $old_lm_id => $new_lm_id) {
 
An exception for terminatinating execution or to throw for unit testing.
Manifest parser for ILIAS standard export files.
static _lookupContObjID($a_id)
get learning module / digibook id for lm object
LearningModule Data set class.
Importer class for files.
importXmlRepresentation($a_entity, $a_id, $a_xml, $a_mapping)
Import XML.
finalProcessing($a_mapping)
Final processing.
static getLogger($a_component_id)
Get component logger.
static writeHeaderPage($a_lm_id, $a_page_id)
Write header page.
static writeFooterPage($a_lm_id, $a_page_id)
Write footer page.
Class ilObjLearningModule.
static getInstanceByObjId($a_obj_id, $stop_on_error=true)
get an instance of an Ilias object by object id
static getInstance($a_parent_type, $a_id=0, $a_old_nr=0, $a_lang="-")
Get page object instance.
static _exists($a_parent_type, $a_id, $a_lang="", $a_no_cache=false)
Checks whether page exists.
static _writeParentId($a_parent_type, $a_pg_id, $a_par_id)
Write parent id.
getSchemaVersion()
Get schema version.
getImportDirectory()
Get import directory.