• Main Page
  • Related Pages
  • Modules
  • Namespaces
  • Data Structures
  • Files
  • File List
  • Globals

content/classes/SCORM/class.ilSCORMObjectGUI.php

Go to the documentation of this file.
00001 <?php
00002 /*
00003         +-----------------------------------------------------------------------------+
00004         | ILIAS open source                                                           |
00005         +-----------------------------------------------------------------------------+
00006         | Copyright (c) 1998-2001 ILIAS open source, University of Cologne            |
00007         |                                                                             |
00008         | This program is free software; you can redistribute it and/or               |
00009         | modify it under the terms of the GNU General Public License                 |
00010         | as published by the Free Software Foundation; either version 2              |
00011         | of the License, or (at your option) any later version.                      |
00012         |                                                                             |
00013         | This program is distributed in the hope that it will be useful,             |
00014         | but WITHOUT ANY WARRANTY; without even the implied warranty of              |
00015         | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the               |
00016         | GNU General Public License for more details.                                |
00017         |                                                                             |
00018         | You should have received a copy of the GNU General Public License           |
00019         | along with this program; if not, write to the Free Software                 |
00020         | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA. |
00021         +-----------------------------------------------------------------------------+
00022 */
00023 
00024 require_once("content/classes/SCORM/class.ilSCORMObject.php");
00025 require_once("content/classes/SCORM/class.ilSCORMItemGUI.php");
00026 require_once("content/classes/SCORM/class.ilSCORMOrganizationsGUI.php");
00027 require_once("content/classes/SCORM/class.ilSCORMOrganizationGUI.php");
00028 require_once("content/classes/SCORM/class.ilSCORMResourcesGUI.php");
00029 require_once("content/classes/SCORM/class.ilSCORMResourceGUI.php");
00030 require_once("content/classes/SCORM/class.ilSCORMManifestGUI.php");
00031 
00041 class ilSCORMObjectGUI
00042 {
00043         var $sc_object;
00044         var $tpl;
00045         var $lng;
00046 
00047 
00048         function ilSCORMObjectGUI($a_id = 0)
00049         {
00050                 global $tpl, $lng;
00051 
00052                 if($a_id != 0)
00053                 {
00054                         $this->sc_object =& new ilSCORMItem($a_id);
00055                 }
00056                 $this->tpl =& $tpl;
00057                 $this->lng =& $lng;
00058         }
00059 
00065         function &getInstance($a_id)
00066         {
00067                 $object = new ilSCORMObject($a_id);
00068                 switch($object->getType())
00069                 {
00070                         case "sit":                                     // item
00071                                 $item =& new ilSCORMItemGUI($a_id);
00072                                 return $item;
00073                                 break;
00074 
00075                         case "sos":                                     // organizations
00076                                 $sos_gui =& new ilSCORMOrganizationsGUI($a_id);
00077                                 return $sos_gui;
00078                                 break;
00079 
00080                         case "sor":                                     // organization
00081                                 $sor_gui =& new ilSCORMOrganizationGUI($a_id);
00082                                 return $sor_gui;
00083                                 break;
00084 
00085                         case "sma":                                     // manifest
00086                                 $sma_gui =& new ilSCORMManifestGUI($a_id);
00087                                 return $sma_gui;
00088                                 break;
00089 
00090                         case "srs":                                     // resources
00091                                 $srs_gui =& new ilSCORMResourcesGUI($a_id);
00092                                 return $srs_gui;
00093                                 break;
00094 
00095                         case "sre":                                     // resource
00096                                 $sre_gui =& new ilSCORMResourceGUI($a_id);
00097                                 return $sre_gui;
00098                                 break;
00099                 }
00100         }
00101 
00102 
00103         function displayParameter($a_name, $a_value)
00104         {
00105                 $this->tpl->setCurrentBlock("parameter");
00106                 $this->tpl->setVariable("TXT_PARAMETER_NAME", $a_name);
00107                 $this->tpl->setVariable("TXT_PARAMETER_VALUE", $a_value);
00108                 $this->tpl->parseCurrentBlock();
00109         }
00110 }
00111 ?>

Generated on Fri Dec 13 2013 13:52:10 for ILIAS Release_3_7_x_branch .rev 46817 by  doxygen 1.7.1