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

Modules/ScormAicc/classes/class.ilSAHSEditGUI.php

Go to the documentation of this file.
00001 <?php
00002 /*
00003         +-----------------------------------------------------------------------------+
00004         | ILIAS open source                                                           |
00005         +-----------------------------------------------------------------------------+
00006         | Copyright (c) 1998-2006 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 
00038 class ilSAHSEditGUI
00039 {
00040         var $ilias;
00041         var $tpl;
00042         var $lng;
00043 
00044         function ilSAHSEditGUI()
00045         {
00046                 global $ilias, $tpl, $lng, $ilCtrl;
00047 
00048                 $this->ilias =& $ilias;
00049                 $this->tpl =& $tpl;
00050                 $this->lng =& $lng;
00051                 $this->ctrl =& $ilCtrl;
00052                 
00053                 $this->ctrl->saveParameter($this, "ref_id");
00054         }
00055         
00059         function &executeCommand()
00060         {
00061                 global $lng, $ilAccess, $ilNavigationHistory;
00062 
00063                 include_once "./Modules/ScormAicc/classes/class.ilObjSAHSLearningModule.php";
00064 
00065                 $lng->loadLanguageModule("content");
00066 
00067                 // permission
00068                 if (!$ilAccess->checkAccess("write", "", $_GET["ref_id"]))
00069                 {
00070                         $ilias->raiseError($lng->txt("permission_denied"),$ilias->error_obj->MESSAGE);
00071                 }
00072                 
00073                 // add entry to navigation history
00074                 $ilNavigationHistory->addItem($_GET["ref_id"],
00075                         "ilias.php?baseClass=ilSAHSEditGUI&ref_id=".$_GET["ref_id"], "lm");
00076 
00077                 $next_class = $this->ctrl->getNextClass($this);
00078                 $cmd = $this->ctrl->getCmd();
00079 
00080                 $obj_id = ilObject::_lookupObjectId($_GET['ref_id']);
00081                 $type = ilObjSAHSLearningModule::_lookupSubType($obj_id);
00082 
00083                 switch($type)
00084                 {
00085                         
00086                         case "scorm2004":
00087                                 include_once("./Modules/Scorm2004/classes/class.ilObjSCORM2004LearningModuleGUI.php");
00088                                 $this->slm_gui = new ilObjSCORM2004LearningModuleGUI("", $_GET["ref_id"],true,false);
00089                                 break;
00090                                 
00091                         case "scorm":
00092                                 include_once("./Modules/ScormAicc/classes/class.ilObjSCORMLearningModuleGUI.php");
00093                                 $this->slm_gui = new ilObjSCORMLearningModuleGUI("", $_GET["ref_id"],true,false);
00094                                 break;
00095 
00096                         case "aicc":
00097                                 include_once("./Modules/ScormAicc/classes/class.ilObjAICCLearningModuleGUI.php");
00098                                 $this->slm_gui = new ilObjAICCLearningModuleGUI("", $_GET["ref_id"],true,false);
00099                                 break;
00100                                 
00101                         case "hacp":
00102                                 include_once("./Modules/ScormAicc/classes/class.ilObjHACPLearningModuleGUI.php");
00103                                 $this->slm_gui = new ilObjHACPLearningModuleGUI("", $_GET["ref_id"],true,false);
00104                                 break;
00105                 }
00106 
00107                 if ($next_class == "")
00108                 {
00109                         switch($type)
00110                         {
00111                                 
00112                                 case "scorm2004":
00113                                         $this->ctrl->setCmdClass("ilobjscorm2004learningmodulegui");
00114                                         break;
00115                                         
00116                                 case "scorm":
00117                                         $this->ctrl->setCmdClass("ilobjscormlearningmodulegui");
00118                                         break;
00119         
00120                                 case "aicc":
00121                                         $this->ctrl->setCmdClass("ilobjaicclearningmodulegui");
00122                                         break;
00123                                         
00124                                 case "hacp":
00125                                         $this->ctrl->setCmdClass("ilobjhacplearningmodulegui");
00126                                         break;
00127                         }
00128                         $next_class = $this->ctrl->getNextClass($this);
00129                 }
00130 
00131                 switch($next_class)
00132                 {
00133                         case "ilobjscormlearningmodulegui":
00134                         case "ilobjscorm2004learningmodulegui":
00135                                 $ret =& $this->ctrl->forwardCommand($this->slm_gui);
00136                                 break;
00137 
00138                         case "ilobjaicclearningmodulegui":
00139                                 $ret =& $this->ctrl->forwardCommand($this->slm_gui);
00140                                 break;
00141 
00142                         case "ilobjhacplearningmodulegui":
00143                                 $ret =& $this->ctrl->forwardCommand($this->slm_gui);
00144                                 break;
00145 
00146                         default:
00147                                 die ("ilSAHSEdit: Class $next_class not found.");;
00148                 }
00149                 
00150                 $this->tpl->show();
00151         }
00152 }
00153 ?>

Generated on Fri Dec 13 2013 17:56:52 for ILIAS Release_3_9_x_branch .rev 46835 by  doxygen 1.7.1