ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
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 
24 require_once("./Modules/ScormAicc/classes/SCORM/class.ilSCORMObjectGUI.php");
25 require_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 }
Parent object for SCORM GUI objects.
$files
Definition: metarefresh.php:49
GUI class for SCORM Resource element.
special template class to simplify handling of ITX/PEAR
displayParameter($a_name, $a_value)
$i
Definition: disco.tpl.php:19