folder xml importer
More...
folder xml importer
- Author
- Stefan Meyer meyer.nosp@m.@lei.nosp@m.fos.c.nosp@m.om
- Version
- $Id$
Definition at line 15 of file class.ilCourseImporter.php.
◆ importXmlRepresentation()
ilCourseImporter::importXmlRepresentation |
( |
|
$a_entity, |
|
|
|
$a_id, |
|
|
|
$a_xml, |
|
|
|
$a_mapping |
|
) |
| |
Import XML.
- Parameters
-
Definition at line 30 of file class.ilCourseImporter.php.
References $GLOBALS, ilObject\_getAllReferences(), and ilObjectFactory\getInstanceByRefId().
32 include_once
'./Modules/Course/classes/class.ilCourseXMLParser.php';
33 include_once
'./Modules/Course/classes/class.ilObjCourse.php';
36 if($new_id = $a_mapping->getMapping(
'Services/Container',
'objs',$a_id))
40 #$this->course = ilObjectFactory::getInstanceByObjId($new_id,false); 43 elseif($new_id = $a_mapping->getMapping(
'Services/Container',
'refs',0))
49 $this->course =
new ilObjCourse();
50 $this->course->create(
true);
56 $parser->setXMLContent($a_xml);
57 $parser->startParsing();
58 $a_mapping->addMapping(
'Modules/Course',
'crs',$a_id,$this->course->getId());
62 $GLOBALS[
'ilLog']->write(__METHOD__.
': Parsing failed with message, "'.$e->getMessage().
'".');
66 $GLOBALS[
'ilLog']->write(__METHOD__.
': Parsing failed with message, "'.$e->getMessage().
'".');
getInstanceByRefId($a_ref_id, $stop_on_error=true)
get an instance of an Ilias object by reference id
SaxParserException thrown by ilSaxParser if property throwException is set.
static _getAllReferences($a_id)
get all reference ids of object
◆ init()
ilCourseImporter::init |
( |
| ) |
|
◆ $course
ilCourseImporter::$course = null |
|
private |
The documentation for this class was generated from the following file: