4 include_once 
'./Services/Export/classes/class.ilExportOptions.php';
 
   43                 $this->sxml = simplexml_load_string($this->xml);
 
   45                 foreach($this->sxml->Item as $item)
 
   47                         $this->
initItem($item,$this->mapping->getTargetId());
 
   57         protected function initItem($item, $a_parent_node)
 
   59                 $title = (string) $item[
'Title'];
 
   60                 $ref_id = (string) $item[
'RefId'];
 
   61                 $obj_id = (string) $item[
'Id'];
 
   62                 $type = (string) $item[
'Type'];
 
   67                 foreach($item->Timing as $timing)
 
   69                         $this->
parseTiming($new_ref,$a_parent_node,$timing);
 
   72                 foreach($item->Item as $subitem)
 
   85         protected function parseTiming($a_ref_id,$a_parent_id,$timing)
 
   87                 $type = (string) $timing[
'Type'];
 
   88                 $visible = (string) $timing[
'Visible'];
 
   89                 $changeable = (string) $timing[
'Changeable'];
 
   91                 include_once 
'./Modules/Course/classes/class.ilCourseItems.php';
 
   93                 $crs_items->setTimingType($type);
 
   94                 $crs_items->toggleVisible((
bool) $visible);
 
   95                 $crs_items->toggleChangeable((
bool) $changeable);
 
   96                 $crs_items->setItemId($a_ref_id);
 
   98                 foreach($timing->children() as $sub)
 
  100                         switch((
string) $sub->getName())
 
  112                                 case 'SuggestionStart':
 
  114                                         $crs_items->setSuggestionStart($dt->get(
IL_CAL_UNIX));
 
  117                                 case 'SuggestionEnd':
 
  119                                         $crs_items->setSuggestionEnd($dt->get(
IL_CAL_UNIX));
 
  122                                 case 'EarliestStart':
 
  124                                         $crs_items->setEarliestStart($dt->get(
IL_CAL_UNIX));
 
  135                 if($crs_items->getTimingStart())
 
  137                         $crs_items->update($a_ref_id);
 
  152                 global $objDefinition;
 
  155                 $new_obj_id = $this->
getMapping()->getMapping(
'Services/Container', 
'objs', $obj_id);
 
  158                         include_once 
'./classes/class.ilObjectFactory.php';
 
  162                                 $obj->createReference();
 
  163                                 $obj->putInTree($parent_node);
 
  164                                 $obj->setPermissions($parent_node);
 
  165                                 $this->mapping->addMapping(
'Services/Container',
'refs',
$ref_id,$obj->getRefId());
 
  166                                 return $obj->getRefId();
 
  170                 $class_name = 
"ilObj".$objDefinition->getClassName($type);
 
  171                 $location = $objDefinition->getLocation($type);
 
  173                 include_once(
$location.
"/class.".$class_name.
".php");
 
  174                 $new = 
new $class_name();
 
  177                 $new->createReference();
 
  178                 $new->putInTree($parent_node);
 
  179                 $new->setPermissions($parent_node);
 
  181                 $this->mapping->addMapping(
'Services/Container',
'objs', $obj_id, $new->getId());
 
  182                 $this->mapping->addMapping(
'Services/Container',
'refs',
$ref_id,$new->getRefId());
 
  187                         $this->mapping->addMapping(
'Services/Container', 
'spl', $new->getId(), $pool->getRefId());
 
  190                 return $new->getRefId();
 
  201                 global $objDefinition;
 
  203                 $class_name = 
"ilObj".$objDefinition->getClassName(
'spl');
 
  204                 $location = $objDefinition->getLocation(
'spl');
 
  206                 include_once(
$location.
"/class.".$class_name.
".php");
 
  207                 $new = 
new $class_name();
 
  210                 $new->createReference();
 
  211                 $new->putInTree($parent_node);
 
  212                 $new->setPermissions($parent_node);