ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
class.ilSCORMResourceGUI.php
Go to the documentation of this file.
1<?php
2/*
3 +-----------------------------------------------------------------------------+
4 | ILIAS open source |
5 +-----------------------------------------------------------------------------+
6 | Copyright (c) 1998-2001 ILIAS open source, University of Cologne |
7 | |
8 | This program is free software; you can redistribute it and/or |
9 | modify it under the terms of the GNU General Public License |
10 | as published by the Free Software Foundation; either version 2 |
11 | of the License, or (at your option) any later version. |
12 | |
13 | This program is distributed in the hope that it will be useful, |
14 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
15 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
16 | GNU General Public License for more details. |
17 | |
18 | You should have received a copy of the GNU General Public License |
19 | along with this program; if not, write to the Free Software |
20 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. |
21 +-----------------------------------------------------------------------------+
22*/
23
24require_once("./Modules/ScormAicc/classes/SCORM/class.ilSCORMObjectGUI.php");
25require_once("./Modules/ScormAicc/classes/SCORM/class.ilSCORMResource.php");
26
36{
37 public function __construct($a_id)
38 {
39 parent::__construct();
40 $this->sc_object = new ilSCORMResource($a_id);
41 $files =&$this->sc_object->getFiles();
42 }
43
44 public function view()
45 {
46 $this->tpl = new ilTemplate("tpl.main.html", true, true);
47 $this->tpl->addBlockFile("CONTENT", "content", "tpl.scorm_obj.html", "Modules/ScormAicc");
48 $this->displayParameter(
49 $this->lng->txt("cont_import_id"),
50 $this->sc_object->getImportId()
51 );
52 $this->displayParameter(
53 $this->lng->txt("cont_resource_type"),
54 $this->sc_object->getResourceType()
55 );
56 $this->displayParameter(
57 $this->lng->txt("cont_scorm_type"),
58 $this->sc_object->getScormType()
59 );
60 $this->displayParameter(
61 $this->lng->txt("cont_href"),
62 $this->sc_object->getHref()
63 );
64 $this->displayParameter(
65 $this->lng->txt("cont_xml_base"),
66 $this->sc_object->getXmlBase()
67 );
68 $this->tpl->setCurrentBlock("partable");
69 $this->tpl->setVariable("TXT_OBJECT_TYPE", $this->lng->txt("cont_resource"));
70 $this->tpl->parseCurrentBlock();
71
72 // files
73 $files =&$this->sc_object->getFiles();
74 for ($i=0; $i<count($files); $i++) {
75 $this->displayParameter(
76 $this->lng->txt("cont_href"),
77 $files[$i]->getHRef()
78 );
79 }
80 $this->tpl->setCurrentBlock("partable");
81 $this->tpl->setVariable("TXT_OBJECT_TYPE", $this->lng->txt("cont_files"));
82 $this->tpl->parseCurrentBlock();
83
84 // dependencies
85 $deps =&$this->sc_object->getDependencies();
86 for ($i=0; $i<count($deps); $i++) {
87 $this->displayParameter(
88 $this->lng->txt("cont_id_ref"),
89 $deps[$i]->getIdentifierRef()
90 );
91 }
92 $this->tpl->setCurrentBlock("partable");
93 $this->tpl->setVariable("TXT_OBJECT_TYPE", $this->lng->txt("cont_dependencies"));
94 $this->tpl->parseCurrentBlock();
95 }
96}
$files
Definition: add-vimline.php:18
An exception for terminatinating execution or to throw for unit testing.
Parent object for SCORM GUI objects.
displayParameter($a_name, $a_value)
GUI class for SCORM Resource element.
special template class to simplify handling of ITX/PEAR
$i
Definition: disco.tpl.php:19