Go to the documentation of this file.00001 <?php
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
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
00068 if (!$ilAccess->checkAccess("write", "", $_GET["ref_id"]))
00069 {
00070 $ilias->raiseError($lng->txt("permission_denied"),$ilias->error_obj->MESSAGE);
00071 }
00072
00073
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 ?>