ILIAS  release_4-3 Revision
 All Data Structures Namespaces Files Functions Variables Groups Pages
class.ilSCORM2004EntryAsset.php
Go to the documentation of this file.
1 <?php
2 /* Copyright (c) 1998-2011 ILIAS open source, Extended GPL, see docs/LICENSE */
3 
4 include_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.'/entry_page');
32 
33  $a_target_dir = $a_target_dir.'/entry_page';
34 
35  $this->exportHTML($a_inst, $a_target_dir, $expLog, "entry_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 addEntryPageItemXML($a_writer, $a_slm_obj)
60  {
61  $a_writer->xmlStartTag("item", array(
62  "identifier" => "il_".IL_INST_ID."_entry_page_".$a_slm_obj->getId(),
63  "identifierref" => "il_".IL_INST_ID."_entry_page_".$a_slm_obj->getId()."_ref",
64  "isvisible" => false
65  )
66  );
67  $a_writer->xmlElement("title", array(), "Entry Page");
68  $a_writer->xmlElement("imsss:sequencing", array());
69  $a_writer->xmlEndTag("item");
70  }
71 
75  static function addEntryPageResourceXML($a_writer, $a_slm_obj)
76  {
77  $a_writer->xmlStartTag("resource", array(
78  "identifier" => "il_".IL_INST_ID."_entry_page_".$a_slm_obj->getId()."_ref",
79  "type" => "webcontent",
80  "adlcp:scormType" => "asset",
81  "href" => "entry_page/index.html"
82  )
83  );
84  $a_writer->xmlEndTag("resource");
85  }
86 
87 }
88 ?>