5 require_once(
"./Modules/Scorm2004/classes/class.ilSCORM2004Node.php");
35 function delete($a_delete_meta_data =
true)
37 $node_data = $this->tree->getNodeData($this->
getId());
39 $this->tree->deleteTree($node_data);
46 function create($a_upload =
false,$a_template =
false)
48 include_once(
"./Modules/Scorm2004/classes/seq_editor/class.ilSCORM2004Item.php");
49 include_once(
"./Modules/Scorm2004/classes/seq_editor/class.ilSCORM2004Objective.php");
55 $obj->setObjectiveID(
"Objective SCO ".$this->
getId());
56 $obj->setId(
"local_obj_".$this->getID().
"_0");
66 $childs = $this->tree->getChilds($this->
getId());
67 foreach ($childs as $child)
72 if ($obj->getType() ==
"page")
74 $obj->delete($a_delete_meta_data);
85 function copy($a_target_slm)
89 if ($this->
getSLMId() != $a_target_slm->getId())
91 $sco->setImportId(
"il__sco_".$this->
getId());
93 $sco->setSLMId($a_target_slm->getId());
94 $sco->setType($this->
getType());
97 $a_copied_nodes[$this->
getId()] = $sco->getId();
100 include_once(
"Services/MetaData/classes/class.ilMD.php");
102 $new_md =& $md->cloneMD($a_target_slm->getId(), $sco->getId(), $this->
getType());
111 copy(
'./xml/ilias_co_3_7.dtd',$a_target_dir.
'/ilias_co_3_7.dtd');
112 copy(
'./Modules/Scorm2004/templates/xsl/sco.xsl',$a_target_dir.
'/sco.xsl');
118 $metadata_xml = $a_xml_writer->xmlDumpMem(
false);
119 $a_xml_writer->_XmlWriter;
121 $xsl = file_get_contents(
"./Modules/Scorm2004/templates/xsl/metadata.xsl");
122 $args = array(
'/_xml' => $metadata_xml ,
'/_xsl' => $xsl );
124 $output =
xslt_process($xh,
"arg:/_xml",
"arg:/_xsl",NULL,$args,NULL);
126 file_put_contents($a_target_dir.
'/indexMD.xml',$output);
130 $a_xml_writer->
xmlSetDtdDef(
"<!DOCTYPE ContentObject SYSTEM \"http://www.ilias.de/download/dtd/ilias_co_3_7.dtd\">");
133 $a_xml_writer->xmlSetGenCmt(
"Export of ILIAS Content Module ". $this->
getId().
" of installation ".$a_inst.
".");
136 $a_xml_writer->xmlHeader();
140 $a_xml_writer->xmlStartTag(
"ContentObject", array(
"Type"=>
"SCORM2004SCO"));
148 $this->
exportHTML($a_inst, $a_target_dir, $expLog);
152 copy(
'./Modules/Scorm2004/scripts/scorm_12.js',$a_target_dir.
'/js/scorm.js');
154 $a_xml_writer->xmlEndTag(
"ContentObject");
156 $a_xml_writer->xmlDumpFile($a_target_dir.
'/index.xml',
false);
158 $a_xml_writer->_XmlWriter;
161 $objectives_text =
"";
165 foreach ($tr_data as
$data)
167 $objectives_text.= $data->getObjectiveID();
169 $a_xml_writer->xmlStartTag(
"sco");
170 $a_xml_writer->xmlElement(
"objective", null, $objectives_text);
171 $a_xml_writer->xmlEndTag(
"sco");
172 $a_xml_writer->xmlDumpFile($a_target_dir.
'/sco.xml',
false);
173 $a_xml_writer->_XmlWriter;
185 copy(
'./Services/MediaObjects/flash_flv_player/flvplayer.swf', $a_target_dir.
'/players/flvplayer.swf');
186 copy(
'./Services/MediaObjects/flash_mp3_player/mp3player.swf', $a_target_dir.
'/players/mp3player.swf');
187 copy(
'./Modules/Scorm2004/scripts/scorm_2004.js',$a_target_dir.
'/js/scorm.js');
188 copy(
'./Modules/Scorm2004/scripts/pager.js',$a_target_dir.
'/js/pager.js');
189 copy(
'./Modules/Scorm2004/scripts/questions/pure.js',$a_target_dir.
'/js/pure.js');
190 copy(
'./Modules/Scorm2004/scripts/questions/jquery.js',$a_target_dir.
'/js/jquery.js');
191 copy(
'./Modules/Scorm2004/scripts/questions/jquery-ui-min.js',$a_target_dir.
'/js/jquery-ui-min.js');
195 include_once(
"./Services/YUI/classes/class.ilYuiUtil.php");
201 copy(
'./Services/Accordion/js/accordion.js',$a_target_dir.
'/js/accordion.js');
202 copy(
'./Services/Accordion/css/accordion.css',$a_target_dir.
'/css/accordion.css');
203 copy(
'./Services/JavaScript/js/Basic.js',$a_target_dir.
'/js/Basic.js');
204 copy(
'./Services/UIComponent/Overlay/js/ilOverlay.js',$a_target_dir.
'/js/ilOverlay.js');
206 include_once(
"./Services/Style/classes/class.ilObjStyleSheet.php");
208 $active_css = split(@
'\?',$active_css,2);
209 $css = fread(fopen($active_css[0],
'r'),filesize($active_css[0]));
210 preg_match_all(
"/url\(([^\)]*)\)/",$css,
$files);
212 chdir(dirname($active_css[0]));
213 foreach (array_unique(
$files[1]) as $fileref)
215 if (is_file($fileref))
217 copy($fileref,$a_target_dir.
"/images/".basename($fileref));
219 $css = str_replace($fileref,
"../images/".basename($fileref),$css);
222 fwrite(fopen($a_target_dir.
'/css/style.css',
'w'),$css);
226 preg_match_all(
"/url\(([^\)]*)\)/",$css,
$files);
229 foreach (array_unique(
$files[1]) as $fileref)
231 if(file_exists($fileref))
233 copy($fileref,$a_target_dir.
"/images/".basename($fileref));
234 $css = str_replace($fileref,
"../images/".basename($fileref),$css);
237 copy(
'images/spacer.gif',$a_target_dir.
"/images/spacer.gif");
238 copy(
'images/enlarge.gif',$a_target_dir.
"/images/enlarge.gif");
240 fwrite(fopen($a_target_dir.
'/css/system.css',
'w'),$css);
261 $a_xml_writer->
xmlStartTag(
"ContentObject", array(
"Type"=>
"SCORM2004SCO"));
263 $a_xml_writer->xmlEndTag(
"ContentObject");
264 copy(
'./templates/default/images/icon_attachment_s.png',$a_target_dir.
"/icon_attachment_s.png");
265 include_once
'Services/Transformation/classes/class.ilXML2FO.php';
267 $xml2FO->setXSLTLocation(
'./Modules/Scorm2004/templates/xsl/contentobject2fo.xsl');
268 $xml2FO->setXMLString($a_xml_writer->xmlDumpMem());
269 $xml2FO->setXSLTParams(array (
'target_dir' => $a_target_dir));
270 $xml2FO->transform();
271 $fo_string = $xml2FO->getFOString();
272 $fo_xml = simplexml_load_string($fo_string);
273 $fo_ext = $fo_xml->xpath(
"//fo:declarations");
274 $fo_ext = $fo_ext[0];
276 include_once
"./Services/Utilities/classes/class.ilFileUtils.php";
280 foreach (
$results[
"file"] as $key => $value)
282 $e = $fo_ext->addChild(
"fox:embedded-file",
"",
"http://xml.apache.org/fop/extensions");
283 $e->addAttribute(
"src",
$results[path][$key].$value);
284 $e->addAttribute(
"name",$value);
285 $e->addAttribute(
"desc",
"");
288 $fo_string = $fo_xml->asXML();
289 $a_xml_writer->_XmlWriter;
302 include_once
"./Modules/Scorm2004/classes/class.ilSCORM2004PageNode.php";
303 include_once
"./Modules/Scorm2004/classes/class.ilSCORM2004Page.php";
305 $tree =
new ilTree($this->slm_id);
306 $tree->setTableNames(
'sahs_sc13_tree',
'sahs_sc13_tree_node');
307 $tree->setTreeTablePK(
"slm_id");
308 foreach($tree->getSubTree($tree->getNodeData($this->getId()),
true,
'page') as $page)
312 if (count($q_ids) > 0)
314 include_once(
"./Modules/TestQuestionPool/classes/class.assQuestion.php");
315 foreach ($q_ids as $q_id)
318 $qti_file = fopen($a_target_dir.
"/qti_".$q_id.
".xml",
"w");
319 fwrite($qti_file, $q_obj->toXML());
321 $x = file_get_contents($a_target_dir.
"/qti_".$q_id.
".xml");
322 $x = str_replace(
'<?xml version="1.0" encoding="utf-8"?>',
'',
$x);
323 $a_xml_writer->appendXML(
$x);
334 include_once
"./Modules/Scorm2004/classes/class.ilSCORM2004PageGUI.php";
335 include_once
"./Modules/Scorm2004/classes/class.ilObjSCORM2004LearningModuleGUI.php";
336 include_once
"./Services/MetaData/classes/class.ilMD.php";
339 $tree =
new ilTree($this->slm_id);
340 $tree->setTableNames(
'sahs_sc13_tree',
'sahs_sc13_tree_node');
341 $tree->setTreeTablePK(
"slm_id");
344 $desc_ids = $meta->getGeneral()->getDescriptionIds();
345 $sco_description = $meta->getGeneral()->getDescription($desc_ids[0])->getDescription();
359 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
360 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
361 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
363 <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
364 <meta http-equiv="X-UA-Compatible" content="IE=7" />
365 <link rel="stylesheet" type="text/css" href="./css/system.css" />
366 <link rel="stylesheet" type="text/css" href="./css/style.css" />
367 <link rel="stylesheet" type="text/css" href="./css/accordion.css" />
368 <link rel="stylesheet" type="text/css" href="./css/yahoo/container.css" />
369 <script src="./js/scorm.js" type="text/javascript" language="JavaScript1.2"></script>
370 <script src="./js/jquery.js" type="text/javascript" language="JavaScript1.2"></script>
371 <script src="./js/jquery-ui-min.js" type="text/javascript" language="JavaScript1.2"></script>
372 <script src="./js/pager.js" type="text/javascript" language="JavaScript1.2"></script>
373 <script src="./js/pure.js" type="text/javascript" language="JavaScript1.2"></script>
374 <script src="./js/yahoo/yahoo-min.js" type="text/javascript" language="JavaScript1.2"></script>
375 <script src="./js/yahoo/yahoo-dom-event.js" type="text/javascript" language="JavaScript1.2"></script>
376 <script src="./js/yahoo/container_core-min.js" type="text/javascript" language="JavaScript1.2"></script>
377 <script src="./js/yahoo/animation-min.js" type="text/javascript" language="JavaScript1.2"></script>
378 <script src="./js/Basic.js" type="text/javascript" language="JavaScript1.2"></script>
379 <script src="./js/ilOverlay.js" type="text/javascript" language="JavaScript1.2"></script>
380 <script src="./js/questions_'. $this->
getId().
'.js" type="text/javascript" language="JavaScript1.2"></script>
381 <script type="text/javascript" language="JavaScript1.2">
382 ilAddOnLoad(function () {init(0);
383 ilias.questions.txt.wrong_answers = "'.$lng->txt(
"cont_wrong_answers").
'";
384 ilias.questions.txt.tries_remaining = "'.$lng->txt(
"cont_tries_remaining").
'";
385 ilias.questions.txt.please_try_again = "'.$lng->txt(
"cont_please_try_again").
'";
386 ilias.questions.txt.all_answers_correct = "'.$lng->txt(
"cont_all_answers_correct").
'";
387 ilias.questions.txt.nr_of_tries_exceeded = "'.$lng->txt(
"cont_nr_of_tries_exceeded").
'";
388 ilias.questions.txt.correct_answers_shown = "'.$lng->txt(
"cont_correct_answers_shown").
'";
391 <script src="./js/accordion.js" type="text/javascript" language="JavaScript1.2"></script>
392 <title>'.$this->
getTitle().
'</title>
394 <body class="yui-skin-sam" onunload="finish();">';
400 $output .=
'<!-- BEGIN ilLMNavigation -->
401 <div class="ilc_page_tnav_TopNavigation">
402 <!-- BEGIN ilLMNavigation_Prev -->
403 <div class="ilc_page_lnav_LeftNavigation">
404 <a class="ilc_page_lnavlink_LeftNavigationLink">
405 <img class="ilc_page_lnavimage_LeftNavigationImage" border="0" src="./images/spacer.gif" alt="" title="" /> '.$lng->txt(
'scplayer_previous').
'</a>
407 <!-- END ilLMNavigation_Prev -->
408 <!-- BEGIN ilLMNavigation_Next -->
409 <div class="ilc_page_rnav_RightNavigation">
410 <a class="ilc_page_rnavlink_RightNavigationLink">'.$lng->txt(
'scplayer_next').
' <img class="ilc_page_rnavimage_RightNavigationImage" border="0" src="./images/spacer.gif" alt="" title="" /></a>
412 <!-- END ilLMNavigation_Next -->
413 <div style="clear:both;"></div>
415 <!-- END ilLMNavigation -->';
417 $output .=
'<table class="ilc_page_cont_PageContainer" width="100%" cellspacing="0" cellpadding="0" style="display: table;">
418 <tbody><tr><td><div class="ilc_page_Page">';
420 $output .=
'<div class="ilc_sco_title_Title">'.$this->getTitle().
'</div>';
422 $output .=
'<h1>'.$this->getTitle().
'</h1>';
425 if (trim($sco_description) !=
"")
427 $output .=
'<div class="ilc_sco_desct_DescriptionTop">'.$lng->txt(
"description").
'</div>';
428 $output .=
'<div class="ilc_sco_desc_Description">'.$sco_description.
'</div>';
433 if (count($objs) > 0)
435 $output .=
'<div class="ilc_sco_objt_ObjectiveTop">'.$lng->txt(
"sahs_objectives").
'</div>';
436 foreach ($objs as $objective)
438 $output .=
'<div class="ilc_sco_obj_Objective">'.nl2br($objective->getObjectiveID()).
'</div>';
442 $output .=
'</td><tr></table>';
445 require_once
'./Modules/Scorm2004/classes/class.ilQuestionExporter.php';
448 if($mode==
'pdf') $output .=
'<!-- PAGE BREAK -->';
454 include_once(
"./Modules/Scorm2004/classes/class.ilSCORM2004ScoGUI.php");
455 foreach($tree->getSubTree($tree->getNodeData($this->getId()),
true,
'page') as $page)
459 $page_obj->setPresentationTitle($page[
"title"]);
461 $page_obj->setStyleId($this->slm_object->getStyleSheetId());
462 if (count($terms) > 1)
464 $page_obj->setGlossaryOverviewInfo(
467 $output .=
'<table class="ilc_page_cont_PageContainer" width="100%" cellspacing="0" cellpadding="0" style="display: table;"><tbody><tr><td><div class="ilc_page_Page">'.$page_obj->showPage(
"export").
"</div></td></tr></table>";
468 if($mode==
'pdf') $output .=
'<!-- PAGE BREAK -->';
470 $ilBench->start(
"ContentObjectExport",
"exportPageObject_CollectMedia");
471 $mob_ids = $page_obj->getSCORM2004Page()->collectMediaObjects(
false);
472 foreach($mob_ids as $mob_id)
474 $this->mob_ids[$mob_id] = $mob_id;
476 if($media_obj->hasFullscreenItem())
477 $media_obj->exportMediaFullscreen($a_target_dir, $page_obj->getPageObject());
479 $ilBench->stop(
"ContentObjectExport",
"exportPageObject_CollectMedia");
482 $int_links = $page_obj->getPageObject()->getInternalLinks(
true);
483 include_once(
"./Services/COPage/classes/class.ilInternalLink.php");
484 include_once(
"./Modules/Glossary/classes/class.ilGlossaryDefinition.php");
485 include_once(
"./Services/COPage/classes/class.ilPageObject.php");
486 if (is_array($int_links))
488 foreach ($int_links as $k => $e)
491 if ($e[
"Type"] ==
"GlossaryItem")
493 $karr = explode(
":", $k);
496 foreach ($dids as $did)
500 $mob_ids = $def_pg->collectMediaObjects(
false);
501 foreach($mob_ids as $mob_id)
503 $this->mob_ids[$mob_id] = $mob_id;
506 if($media_obj->hasFullscreenItem())
507 $media_obj->exportMediaFullscreen($a_target_dir, $def_pg);
509 $file_ids = $def_pg->collectFileItems();
510 foreach($file_ids as $file_id)
512 $this->file_ids[$file_id] = $file_id;
520 $ilBench->start(
"ContentObjectExport",
"exportPageObject_CollectFileItems");
521 $file_ids = $page_obj->getSCORM2004Page()->collectFileItems();
522 foreach($file_ids as $file_id)
524 $this->file_ids[$file_id] = $file_id;
526 $ilBench->stop(
"ContentObjectExport",
"exportPageObject_CollectFileItems");
531 foreach ($q_ids as $q_id)
533 include_once(
"./Modules/TestQuestionPool/classes/class.assQuestionGUI.php");
535 $q_gui->outAdditionalOutput();
536 $html = $q_gui->getPreview(TRUE);
537 $output = preg_replace(
"/{{{{{Question;il__qst_".$q_id.
"}}}}}/i",$html,$output);
546 $output .=
'<!-- BEGIN ilLMNavigation2 -->
547 <div class="ilc_page_bnav_BottomNavigation">
548 <!-- BEGIN ilLMNavigation_Prev -->
549 <div class="ilc_page_lnav_LeftNavigation">
550 <a class="ilc_page_lnavlink_LeftNavigationLink">
551 <img class="ilc_page_lnavimage_LeftNavigationImage" border="0" src="./images/spacer.gif" alt="" title="" /> '.$lng->txt(
'scplayer_previous').
'</a>
553 <!-- END ilLMNavigation_Prev -->
554 <!-- BEGIN ilLMNavigation_Next -->
555 <div class="ilc_page_rnav_RightNavigation">
556 <a class="ilc_page_rnavlink_RightNavigationLink">'.$lng->txt(
'scplayer_next').
' <img class="ilc_page_rnavimage_RightNavigationImage" border="0" src="./images/spacer.gif" alt="" title="" /></a>
558 <!-- END ilLMNavigation_Next -->
559 <div style="clear:both;"></div>
561 <!-- END ilLMNavigation2 -->';
563 $output .=
'</body></html>';
566 $output = preg_replace(
"/<div class=\"ilc_page_title_PageTitle\">(.*?)<\/div>/i",
"<h2>$1</h2>",$output);
569 $output = preg_replace(
"/mobs\/mm_(\d+)\/([^\"]+)/i",
"./objects/il_".IL_INST_ID.
"_mob_$1/$2",$output);
570 $output = preg_replace(
"/\.\/files\/file_(\d+)\/([^\"]+)/i",
"./objects/il_".IL_INST_ID.
"_file_$1/$2",$output);
571 $output = preg_replace(
"/\.\/Services\/MediaObjects\/flash_mp3_player/i",
"./players",$output);
572 $output = preg_replace(
"/\.\/Services\/MediaObjects\/flash_flv_player/i",
"./players",$output);
573 $output = preg_replace(
"/file=..\/..\/..\/.\//i",
"file=../",$output);
576 $output = preg_replace_callback(
"/href=\"&mob_id=(\d+)&pg_id=(\d+)\"/",array(get_class($this),
'fixFullscreeenLink'),$output);
578 $output = preg_replace_callback(
"/href=\"fullscreen_(\d+)\.html\"/",array(get_class($this),
'fixFullscreeenLink'),$output);
579 $output = preg_replace_callback(
"/(Question;)(il__qst_[0-9]+)/",array(get_class($this),
'insertQuestion'),$output);
580 $output = preg_replace(
"/{/",
"",$output);
581 $output = preg_replace(
"/}/",
"",$output);
582 $q_handling = file_get_contents(
'./Modules/Scorm2004/scripts/questions/question_handling.js');
586 $this->mob_ids[$mob_id] = $mob_id;
592 fputs(fopen($a_target_dir.
'/index.html',
'w+'),$output);
601 if($media_obj->hasFullscreenItem())
603 return "href=\"./objects/il_".IL_INST_ID.
"_mob_".$matches[1].
"/fullscreen.html\"";
611 return $q_exporter->exportQuestion($matches[2]);
618 include_once
"./Modules/Scorm2004/classes/class.ilSCORM2004PageNode.php";
619 include_once
"./Modules/Scorm2004/classes/class.ilSCORM2004Page.php";
621 $tree =
new ilTree($this->slm_id);
622 $tree->setTableNames(
'sahs_sc13_tree',
'sahs_sc13_tree_node');
623 $tree->setTreeTablePK(
"slm_id");
624 foreach($tree->getSubTree($tree->getNodeData($this->getId()),
true,
'page') as $page)
626 $ilBench->start(
"ContentObjectExport",
"exportPageObject");
627 $expLog->write(date(
"[y-m-d H:i:s] ").
"Page Object ".$page[
"obj_id"]);
630 $ilBench->start(
"ContentObjectExport",
"exportPageObject_getLMPageObject");
632 $ilBench->stop(
"ContentObjectExport",
"exportPageObject_getLMPageObject");
633 $ilBench->start(
"ContentObjectExport",
"exportPageObject_XML");
635 $page_obj->exportXML($a_xml_writer,
"normal", $a_inst);
636 $ilBench->stop(
"ContentObjectExport",
"exportPageObject_XML");
639 $ilBench->start(
"ContentObjectExport",
"exportPageObject_CollectMedia");
640 $mob_ids = $page_obj->getMediaObjectIds();
641 foreach($mob_ids as $mob_id)
643 $this->mob_ids[$mob_id] = $mob_id;
645 $ilBench->stop(
"ContentObjectExport",
"exportPageObject_CollectMedia");
648 $ilBench->start(
"ContentObjectExport",
"exportPageObject_CollectFileItems");
649 $file_ids = $page_obj->getFileItemIds();
650 foreach($file_ids as $file_id)
652 $this->file_ids[$file_id] = $file_id;
654 $ilBench->stop(
"ContentObjectExport",
"exportPageObject_CollectFileItems");
657 if (count($q_ids) > 0)
659 include_once(
"./Modules/TestQuestionPool/classes/class.assQuestion.php");
660 foreach ($q_ids as $q_id)
663 $qti_file = fopen($a_target_dir.
"/qti_".$q_id.
".xml",
"w");
664 fwrite($qti_file, $q_obj->toXML());
671 $ilBench->stop(
"ContentObjectExport",
"exportPageObject");
677 include_once(
"./Services/MediaObjects/classes/class.ilObjMediaObject.php");
678 include_once(
"./Modules/File/classes/class.ilObjFile.php");
679 $linked_mobs = array();
680 if(is_array($this->mob_ids ))
683 foreach ($this->mob_ids as $mob_id)
687 $expLog->write(date(
"[y-m-d H:i:s] ").
"Media Object ".$mob_id);
689 $media_obj->exportXML($a_xml_writer, $a_inst);
690 $lmobs = $media_obj->getLinkedMediaObjects($this->mob_ids);
691 $linked_mobs = array_merge($linked_mobs, $lmobs);
697 foreach ($linked_mobs as $mob_id)
701 $expLog->write(date(
"[y-m-d H:i:s] ").
"Media Object ".$mob_id);
703 $media_obj->exportXML($a_xml_writer, $a_inst);
708 if(is_array($this->file_ids))
709 foreach ($this->file_ids as $file_id)
711 $expLog->write(date(
"[y-m-d H:i:s] ").
"File Item ".$file_id);
712 $file_obj =
new ilObjFile($file_id,
false);
713 $file_obj->export($a_target_dir);
725 include_once(
"./Modules/File/classes/class.ilObjFile.php");
726 if(is_array($this->file_ids))
727 foreach ($this->file_ids as $file_id)
729 $expLog->write(date(
"[y-m-d H:i:s] ").
"File Item ".$file_id);
730 $file_obj =
new ilObjFile($file_id,
false);
731 $file_obj->export($a_target_dir);
735 include_once(
"./Services/MediaObjects/classes/class.ilObjMediaObject.php");
736 $linked_mobs = array();
737 if(is_array($this->mob_ids ))
740 foreach ($this->mob_ids as $mob_id)
744 $expLog->write(date(
"[y-m-d H:i:s] ").
"Media Object ".$mob_id);
746 $media_obj->exportFiles($a_target_dir, $expLog);
747 $lmobs = $media_obj->getLinkedMediaObjects($this->mob_ids);
748 $linked_mobs = array_merge($linked_mobs, $lmobs);
755 foreach ($linked_mobs as $mob_id)
759 $expLog->write(date(
"[y-m-d H:i:s] ").
"Media Object ".$mob_id);
761 $media_obj->exportFiles($a_target_dir);
768 foreach ($this->q_media as $media) {
771 copy($media, $a_target_dir.
"/objects/".basename($media));
783 include_once(
"Services/MetaData/classes/class.ilMD2XML.php");
785 $md2xml->setExportMode(
true);
786 $md2xml->startExport();
787 $a_xml_writer->appendXML($md2xml->getXML());
794 require_once(
"./Modules/Scorm2004/classes/class.ilSCORM2004Export.php");
796 $export =
new ilSCORM2004Export($this);
797 foreach ($export->getSupportedExportTypes() as
$type)
799 $dir = $export->getExportDirectoryForType(
$type);
801 if (!@is_dir(
$dir) or !is_writeable(
$dir))
809 while ($entry = $cdir->read())
811 if ($entry !=
"." and
814 ereg(
"^[0-9]{10}_{2}[0-9]+_{2}(".$this->
getType().
"_)".$this->
getId().
"+\.zip\$", $entry) or
815 ereg(
"^[0-9]{10}_{2}[0-9]+_{2}(".$this->
getType().
"_)".$this->
getId().
"+\.pdf\$", $entry) or
816 ereg(
"^[0-9]{10}_{2}[0-9]+_{2}(".$this->
getType().
"_)".$this->
getId().
"+\.iso\$", $entry)
819 $file[$entry.$type] = array(
"type" =>
$type,
"file" => $entry,
820 "size" => filesize(
$dir.
"/".$entry));
842 include_once(
"./Modules/Glossary/classes/class.ilGlossaryTerm.php");
843 $childs = $this->tree->getChilds($this->
getId());
845 foreach ($childs as $c)
849 foreach ($links as
$l)
851 if ($l[
"type"] ==
"git" && (
int) $l[
"inst"] == 0 && !isset($ids[$l[
"id"]]))