4 require_once(
"./Modules/Scorm2004/classes/class.ilSCORM2004Node.php");
42 $this->tpl = $DIC[
"tpl"];
43 $this->lng = $DIC->language();
44 $this->ctrl = $DIC->ctrl();
45 parent::__construct($a_slm_object, $a_id);
52 public function delete($a_delete_meta_data =
true)
54 $node_data = $this->tree->getNodeData($this->
getId());
56 $this->tree->deleteTree($node_data);
57 parent::deleteSeqInfo();
63 public function create($a_upload =
false, $a_template =
false)
65 include_once(
"./Modules/Scorm2004/classes/seq_editor/class.ilSCORM2004Item.php");
66 include_once(
"./Modules/Scorm2004/classes/seq_editor/class.ilSCORM2004Objective.php");
67 parent::create($a_upload);
91 $childs = $this->tree->getChilds($this->
getId());
92 foreach ($childs as $child) {
94 if (is_object($obj)) {
95 if ($obj->getType() ==
"page") {
96 $obj->delete($a_delete_meta_data);
101 parent::delete($a_delete_meta_data);
107 public function copy($a_target_slm)
111 if ($this->
getSLMId() != $a_target_slm->getId()) {
112 $ass->setImportId(
"il__ass_" . $this->
getId());
114 $ass->setSLMId($a_target_slm->getId());
115 $ass->setType($this->
getType());
118 $a_copied_nodes[$this->
getId()] = $ass->getId();
121 include_once(
"Services/MetaData/classes/class.ilMD.php");
123 $new_md = $md->cloneMD($a_target_slm->getId(), $ass->getId(), $this->
getType());
130 public function exportScorm($a_inst, $a_target_dir, $ver, &$expLog)
132 copy(
'./xml/ilias_co_3_7.dtd', $a_target_dir .
'/ilias_co_3_7.dtd');
133 copy(
'./Modules/Scorm2004/templates/xsl/sco.xsl', $a_target_dir .
'/sco.xsl');
139 $metadata_xml = $a_xml_writer->xmlDumpMem(
false);
140 $a_xml_writer->_XmlWriter;
141 $xsl = file_get_contents(
"./Modules/Scorm2004/templates/xsl/metadata.xsl");
142 $args = array(
'/_xml' => $metadata_xml ,
'/_xsl' => $xsl );
144 $output = xslt_process($xh,
"arg:/_xml",
"arg:/_xsl", null, $args, null);
146 file_put_contents($a_target_dir .
'/indexMD.xml',
$output);
150 $a_xml_writer->
xmlSetDtdDef(
"<!DOCTYPE ContentObject SYSTEM \"http://www.ilias.de/download/dtd/ilias_co_3_7.dtd\">");
153 $a_xml_writer->xmlSetGenCmt(
"Export of ILIAS Content Module " . $this->
getId() .
" of installation " . $a_inst .
".");
156 $a_xml_writer->xmlHeader();
158 $a_xml_writer->xmlStartTag(
"ContentObject", array(
"Type" =>
"SCORM2004SCO"));
166 $this->
exportHTML($a_inst, $a_target_dir, $expLog);
170 copy(
'./Modules/Scorm2004/scripts/scorm_12.js', $a_target_dir .
'/js/scorm.js');
173 $a_xml_writer->xmlEndTag(
"ContentObject");
175 $a_xml_writer->xmlDumpFile($a_target_dir .
'/index.xml',
false);
177 $a_xml_writer->_XmlWriter;
180 if ($this->
getType() ==
"sco") {
181 $objectives_text =
"";
185 foreach ($tr_data as
$data) {
186 $objectives_text .= $data->getObjectiveID();
188 $a_xml_writer->xmlStartTag(
"sco");
189 $a_xml_writer->xmlElement(
"objective", null, $objectives_text);
190 $a_xml_writer->xmlEndTag(
"sco");
191 $a_xml_writer->xmlDumpFile($a_target_dir .
'/sco.xml',
false);
192 $a_xml_writer->_XmlWriter;
201 $a_asset_type =
"sco",
204 $this->slm_object->prepareHTMLExporter($a_target_dir);
224 public function exportPDF($a_inst, $a_target_dir, &$expLog)
230 $a_xml_writer->
xmlStartTag(
"ContentObject", array(
"Type" =>
"SCORM2004SCO"));
232 $a_xml_writer->xmlEndTag(
"ContentObject");
233 include_once
'Services/Transformation/classes/class.ilXML2FO.php';
235 $xml2FO->setXSLTLocation(
'./Modules/Scorm2004/templates/xsl/contentobject2fo.xsl');
236 $xml2FO->setXMLString($a_xml_writer->xmlDumpMem());
237 $xml2FO->setXSLTParams(array(
'target_dir' => $a_target_dir));
238 $xml2FO->transform();
239 $fo_string = $xml2FO->getFOString();
240 $fo_xml = simplexml_load_string($fo_string);
241 $fo_ext = $fo_xml->xpath(
"//fo:declarations");
242 $fo_ext = $fo_ext[0];
244 include_once
"./Services/Utilities/classes/class.ilFileUtils.php";
248 $e = $fo_ext->addChild(
"fox:embedded-file",
"",
"http://xml.apache.org/fop/extensions");
250 $e->addAttribute(
"name", $value);
251 $e->addAttribute(
"desc",
"");
254 $fo_string = $fo_xml->asXML();
255 $a_xml_writer->_XmlWriter;
269 include_once
"./Modules/Scorm2004/classes/class.ilSCORM2004PageNode.php";
270 include_once
"./Modules/Scorm2004/classes/class.ilSCORM2004Page.php";
273 $tree->setTableNames(
'sahs_sc13_tree',
'sahs_sc13_tree_node');
274 $tree->setTreeTablePK(
"slm_id");
275 foreach (
$tree->getSubTree(
$tree->getNodeData($this->getId()),
true,
'page') as $page) {
278 include_once(
"./Services/COPage/classes/class.ilPCQuestion.php");
280 if (count($q_ids) > 0) {
281 include_once(
"./Modules/TestQuestionPool/classes/class.assQuestion.php");
282 foreach ($q_ids as $q_id) {
284 $qti_file =
fopen($a_target_dir .
"/qti_" . $q_id .
".xml",
"w");
285 fwrite($qti_file, $q_obj->toXML());
287 $x = file_get_contents($a_target_dir .
"/qti_" . $q_id .
".xml");
288 $x = str_replace(
'<?xml version="1.0" encoding="utf-8"?>',
'',
$x);
289 $a_xml_writer->appendXML(
$x);
304 $a_asset_type =
"sco",
308 include_once
"./Modules/Scorm2004/classes/class.ilSCORM2004PageGUI.php";
309 include_once
"./Modules/Scorm2004/classes/class.ilObjSCORM2004LearningModuleGUI.php";
310 include_once
"./Services/MetaData/classes/class.ilMD.php";
313 $tree->setTableNames(
'sahs_sc13_tree',
'sahs_sc13_tree_node');
314 $tree->setTreeTablePK(
"slm_id");
329 $sco_tpl =
new ilTemplate(
"tpl.sco.html",
true,
true,
"Modules/Scorm2004");
336 if ($mode !=
'pdf' && $a_one_file ==
"") {
337 include_once(
"./Services/COPage/classes/class.ilCOPageHTMLExport.php");
339 $pg_exp->getPreparedMainTemplate($sco_tpl);
343 $sco_tpl->setCurrentBlock(
"init");
344 include_once(
"./Services/COPage/classes/class.ilPCQuestion.php");
345 $sco_tpl->setVariable(
349 $sco_tpl->parseCurrentBlock();
352 $styles = array(
"./css/yahoo/container.css",
353 "./css/question_handling.css");
354 foreach ($styles as
$style) {
355 $sco_tpl->setCurrentBlock(
"css_file");
356 $sco_tpl->setVariable(
"CSS_FILE", $style);
357 $sco_tpl->parseCurrentBlock();
361 $scripts = array(
"./js/scorm.js",
362 "./js/pager.js",
"./js/pure.js",
363 "./js/questions_" . $this->
getId() .
".js");
364 foreach ($scripts as $script) {
365 $sco_tpl->setCurrentBlock(
"js_file");
366 $sco_tpl->setVariable(
"JS_FILE", $script);
367 $sco_tpl->parseCurrentBlock();
370 if ($a_asset_type !=
"entry_asset" && $a_asset_type !=
"final_asset") {
371 self::renderNavigation($sco_tpl,
"./images/spacer.png", $lk);
374 $sco_tpl->touchBlock(
"finish");
377 $sco_tpl->setCurrentBlock(
"head");
378 $sco_tpl->setVariable(
"SCO_TITLE", $this->
getTitle());
379 $sco_tpl->parseCurrentBlock();
380 $sco_tpl->touchBlock(
"tail");
383 self::renderMetaPage($sco_tpl, $this, $a_asset_type, $mode);
384 if ($a_one_file !=
"") {
385 fputs($a_one_file,
"<a name='sco" . $this->
getId() .
"'></a>");
386 fputs($a_one_file, $sco_tpl->get(
"meta_page"));
390 require_once
'./Modules/Scorm2004/classes/class.ilQuestionExporter.php';
397 include_once(
"./Modules/Scorm2004/classes/class.ilSCORM2004ScoGUI.php");
398 $pages =
$tree->getSubTree(
$tree->getNodeData($this->getId()),
true,
'page');
399 $sco_q_ids = array();
400 foreach ($pages as $page) {
406 $this->slm_object->getId()
410 $page_obj->setStyleId($this->slm_object->getStyleSheetId());
411 if (count($terms) > 1) {
412 $page_obj->setGlossaryOverviewInfo(
418 $page_output = $page_obj->showPage(
"export");
421 $mob_ids = $page_obj->getSCORM2004Page()->collectMediaObjects(
false);
422 foreach ($mob_ids as $mob_id) {
423 $this->mob_ids[$mob_id] = $mob_id;
425 if ($media_obj->hasFullscreenItem()) {
426 $media_obj->exportMediaFullscreen($a_target_dir, $page_obj->getPageObject());
431 $int_links = $page_obj->getPageObject()->getInternalLinks(
true);
432 include_once(
"./Services/Link/classes/class.ilInternalLink.php");
433 include_once(
"./Modules/Glossary/classes/class.ilGlossaryDefinition.php");
434 if (is_array($int_links)) {
435 foreach ($int_links as $k => $e) {
437 if ($e[
"Type"] ==
"GlossaryItem") {
438 $karr = explode(
":", $k);
441 foreach ($dids as $did) {
442 include_once(
"./Modules/Glossary/classes/class.ilGlossaryDefPage.php");
445 $mob_ids = $def_pg->collectMediaObjects(
false);
446 foreach ($mob_ids as $mob_id) {
447 $this->mob_ids[$mob_id] = $mob_id;
450 if ($media_obj->hasFullscreenItem()) {
451 $media_obj->exportMediaFullscreen($a_target_dir, $def_pg);
454 include_once(
"./Services/COPage/classes/class.ilPCFileList.php");
457 foreach ($file_ids as $file_id) {
458 $this->file_ids[$file_id] = $file_id;
466 include_once(
"./Services/COPage/classes/class.ilPCFileList.php");
468 foreach ($file_ids as $file_id) {
469 $this->file_ids[$file_id] = $file_id;
472 if ($mode ==
'pdf') {
473 include_once(
"./Services/COPage/classes/class.ilPCQuestion.php");
475 foreach ($q_ids as $q_id) {
476 include_once(
"./Modules/TestQuestionPool/classes/class.assQuestionGUI.php");
479 $q_gui->outAdditionalOutput();
480 $html = $q_gui->getPreview(
true);
481 $page_output = preg_replace(
"/{{{{{Question;il__qst_" . $q_id .
"}}}}}/i",
$html, $page_output);
484 $sco_tpl->touchBlock(
"pdf_pg_break");
487 $sco_tpl->setCurrentBlock(
"page");
488 $sco_tpl->setVariable(
"PAGE", $page_output);
489 $sco_tpl->parseCurrentBlock();
492 if ($a_one_file !=
"") {
493 include_once(
"./Services/COPage/classes/class.ilPCQuestion.php");
495 foreach ($q_ids as
$i) {
496 if (!in_array($i, $sco_q_ids)) {
504 if ($mode !=
'pdf') {
505 $sco_tpl->setVariable(
511 if ($a_one_file ==
"") {
514 $output = $sco_tpl->get(
"page");
517 if ($mode ==
'pdf') {
518 $output = preg_replace(
"/<div class=\"ilc_page_title_PageTitle\">(.*?)<\/div>/i",
"<h2>$1</h2>",
$output);
521 $output = preg_replace(
"/mobs\/mm_(\d+)\/([^\"]+)/i",
"./objects/il_" . IL_INST_ID .
"_mob_$1/$2",
$output);
522 $output = preg_replace(
"/\.\/files\/file_(\d+)\/([^\"]+)/i",
"./objects/il_" . IL_INST_ID .
"_file_$1/$2",
$output);
523 $output = preg_replace(
"/\.\/Services\/MediaObjects\/flash_mp3_player/i",
"./players",
$output);
524 $output = preg_replace(
"/file=..\/..\/..\/.\//i",
"file=../",
$output);
526 if ($mode !=
'pdf') {
527 $output = preg_replace_callback(
"/href=\"&mob_id=(\d+)&pg_id=(\d+)\"/", array(get_class($this),
'fixFullscreeenLink'),
$output);
529 $output = preg_replace_callback(
"/href=\"fullscreen_(\d+)\.html\"/", array(get_class($this),
'fixFullscreeenLink'),
$output);
530 $output = preg_replace_callback(
"/{{{{{(Question;)(il__qst_[0-9]+)}}}}}/", array(get_class($this),
'insertQuestion'),
$output);
531 $q_handling = file_get_contents(
'./Modules/Scorm2004/scripts/questions/question_handling.js');
534 "./Modules/Scorm2004/templates/default/question_handling.css",
535 $a_target_dir .
'/css/question_handling.css' 539 if ($a_one_file !=
"") {
541 if (count($sco_q_ids) > 0) {
542 $output .=
'<script type="text/javascript">';
543 foreach ($sco_q_ids as
$i) {
545 $output .=
"ilias.questions.showCorrectAnswers(" . $i .
"); \n";
553 $this->mob_ids[$mob_id] = $mob_id;
559 if ($a_one_file !=
"") {
562 fputs(
fopen($a_target_dir .
'/index.html',
'w+'),
$output);
578 $lng = $DIC->language();
580 if ($a_spacer_img ==
"") {
584 $a_lang =
$lng->getLangKey();
587 $a_tpl->setCurrentBlock(
"ilLMNavigation");
588 $a_tpl->setVariable(
"TXT_PREVIOUS",
$lng->txtlng(
"content",
'scplayer_previous', $a_lang));
589 $a_tpl->setVariable(
"SRC_SPACER", $a_spacer_img);
590 $a_tpl->setVariable(
"TXT_NEXT",
$lng->txtlng(
"content",
'scplayer_next', $a_lang));
591 $a_tpl->parseCurrentBlock();
592 $a_tpl->setCurrentBlock(
"ilLMNavigation2");
593 $a_tpl->setVariable(
"TXT_PREVIOUS",
$lng->txtlng(
"content",
'scplayer_previous', $a_lang));
594 $a_tpl->setVariable(
"SRC_SPACER", $a_spacer_img);
595 $a_tpl->setVariable(
"TXT_NEXT",
$lng->txtlng(
"content",
'scplayer_next', $a_lang));
596 $a_tpl->parseCurrentBlock();
607 public static function renderMetaPage($a_tpl, $a_sco, $a_asset_type =
"", $mode =
"")
611 $lng = $DIC->language();
613 if ($a_sco->getType() !=
"sco" || $a_sco->getHideObjectivePage()) {
617 if ($a_asset_type !=
"entry_asset" && $a_asset_type !=
"final_asset") {
618 $meta =
new ilMD($a_sco->getSLMId(), $a_sco->getId(), $a_sco->getType());
619 $desc_ids = $meta->
getGeneral()->getDescriptionIds();
620 $sco_description = $meta->getGeneral()->getDescription($desc_ids[0])->getDescription();
623 if ($mode !=
'pdf') {
625 if ($a_asset_type !=
"entry_asset" && $a_asset_type !=
"final_asset") {
626 $a_tpl->setCurrentBlock(
"title");
627 $a_tpl->setVariable(
"SCO_TITLE", $a_sco->getTitle());
628 $a_tpl->parseCurrentBlock();
632 $a_tpl->setCurrentBlock(
"pdf_title");
633 $a_tpl->setVariable(
"SCO_TITLE", $a_sco->getTitle());
634 $a_tpl->parseCurrentBlock();
635 $a_tpl->touchBlock(
"pdf_break");
639 if (trim($sco_description) !=
"") {
640 $a_tpl->setCurrentBlock(
"sco_desc");
641 $a_tpl->setVariable(
"TXT_DESC",
$lng->txt(
"description"));
642 include_once(
"./Services/COPage/classes/class.ilPCParagraph.php");
643 $a_tpl->setVariable(
"VAL_DESC", self::convertLists($sco_description));
644 $a_tpl->parseCurrentBlock();
647 if ($a_asset_type ==
"sco") {
649 $objs = $a_sco->getObjectives();
650 if (count($objs) > 0) {
651 foreach ($objs as $objective) {
652 $a_tpl->setCurrentBlock(
"sco_obj");
653 $a_tpl->setVariable(
"VAL_OBJECTIVE", self::convertLists($objective->getObjectiveID()));
654 $a_tpl->parseCurrentBlock();
656 $a_tpl->setCurrentBlock(
"sco_objs");
657 $a_tpl->setVariable(
"TXT_OBJECTIVES",
$lng->txt(
"sahs_objectives"));
658 $a_tpl->parseCurrentBlock();
661 $a_tpl->setCurrentBlock(
"meta_page");
662 $a_tpl->parseCurrentBlock();
674 include_once(
"./Services/COPage/classes/class.ilPCParagraph.php");
675 $a_text = nl2br($a_text);
676 $a_text = str_replace(array(
"\n",
"\r"),
"", $a_text);
677 $a_text = str_replace(
"<br>",
"<br />", $a_text);
679 $a_text = str_replace(
680 array(
"<SimpleBulletList>",
"</SimpleBulletList>",
681 "<SimpleListItem>",
"</SimpleListItem>",
682 "<SimpleNumberedList>",
"</SimpleNumberedList>" 684 array(
"<ul class='ilc_list_u_BulletedList'>",
"</ul>",
685 "<li class='ilc_list_item_StandardListItem'>",
"</li>",
686 "<ol class='ilc_list_o_NumberedList'>",
"</ol>" 696 if ($media_obj->hasFullscreenItem()) {
697 return "href=\"./objects/il_" . IL_INST_ID .
"_mob_" . $matches[1] .
"/fullscreen.html\"";
707 $ret = $q_exporter->exportQuestion($matches[2],
"./objects/",
"offline");
714 include_once
"./Modules/Scorm2004/classes/class.ilSCORM2004PageNode.php";
715 include_once
"./Modules/Scorm2004/classes/class.ilSCORM2004Page.php";
718 $tree->setTableNames(
'sahs_sc13_tree',
'sahs_sc13_tree_node');
719 $tree->setTreeTablePK(
"slm_id");
721 $pages =
$tree->getSubTree(
$tree->getNodeData($this->getId()),
true,
'page');
722 foreach ($pages as $page) {
723 $expLog->write(date(
"[y-m-d H:i:s] ") .
"Page Object " . $page[
"obj_id"]);
727 $page_obj->exportXML($a_xml_writer,
"normal", $a_inst);
730 $mob_ids = $page_obj->getMediaObjectIds();
731 foreach ($mob_ids as $mob_id) {
732 $this->mob_ids[$mob_id] = $mob_id;
736 $file_ids = $page_obj->getFileItemIds();
737 foreach ($file_ids as $file_id) {
738 $this->file_ids[$file_id] = $file_id;
741 include_once(
"./Services/COPage/classes/class.ilPCQuestion.php");
743 if (count($q_ids) > 0) {
744 include_once(
"./Modules/TestQuestionPool/classes/class.assQuestion.php");
745 foreach ($q_ids as $q_id) {
748 if (is_object($q_obj)) {
749 $qti_file =
fopen($a_target_dir .
"/qti_" . $q_id .
".xml",
"w");
750 fwrite($qti_file, $q_obj->toXML());
762 include_once(
"./Services/MediaObjects/classes/class.ilObjMediaObject.php");
763 include_once(
"./Modules/File/classes/class.ilObjFile.php");
764 $linked_mobs = array();
765 if (is_array($this->mob_ids)) {
767 foreach ($this->mob_ids as $mob_id) {
769 $expLog->write(date(
"[y-m-d H:i:s] ") .
"Media Object " . $mob_id);
771 $media_obj->exportXML($a_xml_writer, $a_inst);
772 $lmobs = $media_obj->getLinkedMediaObjects($this->mob_ids);
773 $linked_mobs = array_merge($linked_mobs, $lmobs);
779 foreach ($linked_mobs as $mob_id) {
781 $expLog->write(date(
"[y-m-d H:i:s] ") .
"Media Object " . $mob_id);
783 $media_obj->exportXML($a_xml_writer, $a_inst);
788 if (is_array($this->file_ids)) {
789 foreach ($this->file_ids as $file_id) {
791 $expLog->write(date(
"[y-m-d H:i:s] ") .
"File Item " . $file_id);
792 $file_obj =
new ilObjFile($file_id,
false);
793 $file_obj->export($a_target_dir);
806 include_once(
"./Modules/File/classes/class.ilObjFile.php");
807 if (is_array($this->file_ids)) {
808 foreach ($this->file_ids as $file_id) {
809 $expLog->write(date(
"[y-m-d H:i:s] ") .
"File Item " . $file_id);
811 $file_obj =
new ilObjFile($file_id,
false);
812 $file_obj->export($a_target_dir);
815 $expLog->write(date(
"[y-m-d H:i:s] ") .
"File Item not found, ID: " . $file_id);
820 include_once(
"./Services/MediaObjects/classes/class.ilObjMediaObject.php");
821 $linked_mobs = array();
822 if (is_array($this->mob_ids)) {
824 foreach ($this->mob_ids as $mob_id) {
826 $expLog->write(date(
"[y-m-d H:i:s] ") .
"Media Object " . $mob_id);
828 $media_obj->exportFiles($a_target_dir, $expLog);
829 $lmobs = $media_obj->getLinkedMediaObjects($this->mob_ids);
830 $linked_mobs = array_merge($linked_mobs, $lmobs);
837 foreach ($linked_mobs as $mob_id) {
839 $expLog->write(date(
"[y-m-d H:i:s] ") .
"Media Object " . $mob_id);
841 $media_obj->exportFiles($a_target_dir);
848 foreach ($this->q_media as $media) {
851 if (is_file($media)) {
852 copy($media, $a_target_dir .
"/objects/" . basename($media));
865 include_once(
"Services/MetaData/classes/class.ilMD2XML.php");
867 $md2xml->setExportMode(
true);
868 $md2xml->startExport();
869 $a_xml_writer->appendXML($md2xml->getXML());
876 require_once(
"./Modules/Scorm2004/classes/class.ilSCORM2004Export.php");
878 $export =
new ilSCORM2004Export($this);
879 foreach ($export->getSupportedExportTypes() as
$type) {
880 $dir = $export->getExportDirectoryForType(
$type);
882 if (!@is_dir($dir)
or !is_writeable($dir)) {
889 while ($entry = $cdir->read()) {
890 if ($entry !=
"." and 893 preg_match(
"~^[0-9]{10}_{2}[0-9]+_{2}(" . $this->
getType() .
"_)" . $this->
getId() .
"+\.zip\$~", $entry)
or 894 preg_match(
"~^[0-9]{10}_{2}[0-9]+_{2}(" . $this->
getType() .
"_)" . $this->
getId() .
"+\.pdf\$~", $entry)
or 895 preg_match(
"~^[0-9]{10}_{2}[0-9]+_{2}(" . $this->
getType() .
"_)" . $this->
getId() .
"+\.iso\$~", $entry)
897 $file[$entry .
$type] = array(
"type" =>
$type,
"file" => $entry,
898 "size" => filesize($dir .
"/" . $entry));
920 include_once(
"./Modules/Glossary/classes/class.ilGlossaryTerm.php");
921 $childs = $this->tree->getChilds($this->
getId());
923 foreach ($childs as
$c) {
929 if ($l[
"type"] ==
"git" && (
int) $l[
"inst"] == 0 && !isset($ids[$l[
"id"]])) {
exportPDF($a_inst, $a_target_dir, &$expLog)
static getJSTextInitCode($a_lang)
Get js txt init code.
Class ilSCORM2004Condition.
exportHTMLPageObjects( $a_inst, $a_target_dir, &$expLog, $mode, $a_asset_type="sco", $a_one_file="", $a_sco_tpl=null)
Export HTML pages of SCO.
static _instanciateQuestion($question_id)
Creates an instance of a question with a given question id.
Scorm 2004 Question Exporter.
xmlStartTag($tag, $attrs=null, $empty=false, $encode=true, $escape=true)
Writes a starttag.
static getDefinitionList($a_term_id)
static
static fixFullscreeenLink($matches)
static _getQuestionIdsForPage($a_parent_type, $a_page_id, $a_lang="-")
Get all questions of a page.
xmlSetDtdDef($dtdDef)
Sets dtd definition.
HTML export class for pages.
static _exists($a_id, $a_reference=false, $a_type=null)
checks if an object exists in object_data
static _extractObjIdOfTarget($a_target)
Extract object id out of target.
__construct($a_slm_object, $a_id=0)
Constructor.
static renderMetaPage($a_tpl, $a_sco, $a_asset_type="", $mode="")
Render meta page (description/objectives at beginning)
create($a_upload=false, $a_template=false)
Create asset.
static convertLists($a_text)
Convert * and # to lists.
static getGlossaryOverviewId()
Get sco glossary overlay id.
exportFileItems($a_target_dir, &$expLog)
export files of file itmes
getSLMId()
Get ID of parent Scorm Learning Module Object.
getGlossaryTermIds()
Get glossary term ids in sco.
static input2xmlReplaceLists($a_text)
Converts xml from DB to output in edit textarea.
static getInstance($a_slm_object, $a_id=0, $a_halt=true)
static getImagePath($img, $module_path="", $mode="output", $offline=false)
get image path (for images located in a template directory)
static _getQuestionGUI($question_type, $question_id=-1)
Creates a question gui representation and returns the alias to the question gui note: please do not u...
special template class to simplify handling of ITX/PEAR
static collectFileItems($a_page, $a_domdoc)
Get all file items that are used within the page.
insertDefaultSequencingItem()
Insert default sequencing item.
exportXMLMediaObjects(&$a_xml_writer, $a_inst, $a_target_dir, &$expLog)
setPresentationTitle($a_title="")
delete_rec($a_delete_meta_data=true)
Delete Nested Page Objects.
exportHTML( $a_inst, $a_target_dir, &$expLog, $a_asset_type="sco", $a_one_file="")
static _getTargetsOfSource($a_source_type, $a_source_id, $a_source_lang="-")
Get all targets of a source object (e.g., a page)
getDescription()
Get description.
Glossary definition page object.
exportPDFPrepareXmlNFiles($a_inst, $a_target_dir, &$expLog, &$a_xml_writer)
Tree class data representation in hierachical trees using the Nested Set Model with Gaps by Joe Celco...
static _lookupType($a_id, $a_reference=false)
lookup object type
static _instantiateQuestion($question_id)
static makeDir($a_dir)
creates a new directory and inherits all filesystem permissions of the parent directory You may pass ...
exportHTML4PDF($a_inst, $a_target_dir, &$expLog)
static renderNavigation($a_tpl, $a_spacer_img="", $a_lang="")
Render navigation.
static insertQuestion($matches)
exportXMLPageObjects($a_target_dir, &$a_xml_writer, $a_inst, &$expLog)
Class ilSCORM2004Page GUI class.
static recursive_dirscan($dir, &$arr)
Recursively scans a given directory and writes path and filename into referenced array.
static getGlossaryHTML($a_sco)
Get glossary html (only in export mode)
copy($a_target_slm)
Copy sco.
static getAffectiveLocalization($a_id)
Get affective localization.
setType($a_type)
Set type.
const RENDER_PURPOSE_PREVIEW
static _lookGlossaryTerm($term_id)
get glossary term
exportScorm($a_inst, $a_target_dir, $ver, &$expLog)
exportXMLMetaData(&$a_xml_writer)
static questionsJS(array $a_qids=null)
static initExport()
Init export.