ILIAS  release_5-1 Revision 5.0.0-5477-g43f3e3fab5f
class.ilSCORM2004FinalAsset.php
Go to the documentation of this file.
1<?php
2/* Copyright (c) 1998-2011 ILIAS open source, Extended GPL, see docs/LICENSE */
3
4include_once("./Modules/Scorm2004/classes/class.ilSCORM2004Asset.php");
5
14{
20 function __construct($a_slm_object)
21 {
22 parent::ilSCORM2004Node($a_slm_object);
23 $this->setType("ass");
24 }
25
29 function exportScorm($a_inst, $a_target_dir, &$expLog)
30 {
31 ilUtil::makeDir($a_target_dir.'/final_page');
32
33 $a_target_dir = $a_target_dir.'/final_page';
34
35 $this->exportHTML($a_inst, $a_target_dir, $expLog, "final_asset");
36 }
37
46/* function exportHTMLPageObjects($a_inst, $a_target_dir, $expLog, $a_mode)
47 {
48 $tpl = new ilTemplate("tpl.sco.html", true, true, "Modules/Scorm2004");
49 $tpl->setCurrentBlock("page");
50 $tpl->setVariable("PAGE", "Entry Page...");
51 $content = $tpl->get();
52
53 fputs(fopen($a_target_dir.'/index.html','w+'), $content);
54 }*/
55
59 static function addFinalPageItemXML($a_writer, $a_slm_obj)
60 {
61 $a_writer->xmlStartTag("item", array(
62 "identifier" => "il_".IL_INST_ID."_final_page_".$a_slm_obj->getId(),
63 "identifierref" => "il_".IL_INST_ID."_final_page_".$a_slm_obj->getId()."_ref",
64 "isvisible" => false
65 )
66 );
67 $a_writer->xmlElement("title", array(), "Final Page");
68 $a_writer->xmlElement("imsss:sequencing", array());
69 $a_writer->xmlEndTag("item");
70 }
71
75 static function addFinalPageResourceXML($a_writer, $a_slm_obj)
76 {
77 $a_writer->xmlStartTag("resource", array(
78 "identifier" => "il_".IL_INST_ID."_final_page_".$a_slm_obj->getId()."_ref",
79 "type" => "webcontent",
80 "adlcp:scormType" => "asset",
81 "href" => "final_page/index.html"
82 )
83 );
84 $a_writer->xmlEndTag("resource");
85 }
86
87}
88?>
Class ilSCORM2004Asset.
exportHTML($a_inst, $a_target_dir, &$expLog, $a_asset_type="sco", $a_one_file="")
__construct($a_slm_object)
Constructor.
static addFinalPageItemXML($a_writer, $a_slm_obj)
Export page objects of entry asset.
exportScorm($a_inst, $a_target_dir, &$expLog)
Export special item to scorm.
static addFinalPageResourceXML($a_writer, $a_slm_obj)
Add final page resource XML to writer.
setType($a_type)
Set type.
static makeDir($a_dir)
creates a new directory and inherits all filesystem permissions of the parent directory You may pass ...