/** * Export SCORM package to HTML */ function exportHTML($a_inst, $a_target_dir, &$expLog, $a_one_file = "") { // $a_xml_writer = new ilXmlWriter; // set dtd definition // $a_xml_writer->xmlSetDtdDef("<!DOCTYPE ContentObject SYSTEM \"http://www.ilias.de/download/dtd/ilias_co_3_7.dtd\">"); // set generated comment // $a_xml_writer->xmlSetGenCmt("Export of ILIAS Content Module ". $this->getId()." of installation ".$a_inst."."); // set xml header // $a_xml_writer->xmlHeader(); // global $ilBench; // $a_xml_writer->xmlStartTag("ContentObject", array("Type"=>"SCORM2004LearningModule")); // $expLog->write(date("[y-m-d H:i:s] ")."Start Export Sco Objects"); $this->exportHTMLScoObjects($a_inst, $a_target_dir, $expLog, $a_one_file); // $expLog->write(date("[y-m-d H:i:s] ")."Finished Export Sco Objects"); // $a_xml_writer->xmlEndTag("ContentObject"); /*$toc_tpl = new ilTemplate("tpl.main.html", true, true, false); $style_name = $ilUser->prefs["style"].".css"; $tpl->setCurrentBlock("css_file"); $tpl->setVariable("CSS_FILE", $style_name); $tpl->parseCurrentBlock();*/ if ($a_one_file == "") { include_once "./Modules/Scorm2004/classes/class.ilContObjectManifestBuilder.php"; $manifestBuilder = new ilContObjectManifestBuilder($this); $manifestBuilder->buildManifest('12'); include_once "Services/Frameset/classes/class.ilFramesetGUI.php"; $fs_gui = new ilFramesetGUI(); $fs_gui->setFramesetTitle($this->getTitle()); $fs_gui->setMainFrameSource(""); $fs_gui->setSideFrameSource("toc.html"); $fs_gui->setMainFrameName("content"); $fs_gui->setSideFrameName("toc"); $output = $fs_gui->get(); fputs(fopen($a_target_dir . '/index.html', 'w+'), $output); $xsl = file_get_contents("./Modules/Scorm2004/templates/xsl/module.xsl"); $xml = simplexml_load_string($manifestBuilder->writer->xmlDumpMem()); $args = array('/_xml' => $xml->organizations->organization->asXml(), '/_xsl' => $xsl); $xh = xslt_create(); $output = xslt_process($xh, "arg:/_xml", "arg:/_xsl", NULL, $args, NULL); xslt_free($xh); fputs(fopen($a_target_dir . '/toc.html', 'w+'), $output); } // $a_xml_writer->_XmlWriter; }