ILIAS  Release_4_4_x_branch Revision 61816
 All Data Structures Namespaces Files Functions Variables Groups Pages
class.ilSAHSEditGUI.php
Go to the documentation of this file.
1 <?php
2 
3 /* Copyright (c) 1998-2012 ILIAS open source, Extended GPL, see docs/LICENSE */
4 
19 {
20  var $ilias;
21  var $tpl;
22  var $lng;
23 
24  function ilSAHSEditGUI()
25  {
26  global $ilias, $tpl, $lng, $ilCtrl;
27 
28  $this->ilias =& $ilias;
29  $this->tpl =& $tpl;
30  $this->lng =& $lng;
31  $this->ctrl =& $ilCtrl;
32 
33  $this->ctrl->saveParameter($this, "ref_id");
34  }
35 
39  function &executeCommand()
40  {
41  global $lng, $ilAccess, $ilNavigationHistory, $ilias;
42 
43  include_once "./Modules/ScormAicc/classes/class.ilObjSAHSLearningModule.php";
44 
45  $lng->loadLanguageModule("content");
46 
47  // permission
48  if (!$ilAccess->checkAccess("write", "", $_GET["ref_id"]))
49  {
50  $this->ilias->raiseError($lng->txt("permission_denied"),$ilias->error_obj->MESSAGE);
51  }
52 
53  // add entry to navigation history
54  $ilNavigationHistory->addItem($_GET["ref_id"],
55  "ilias.php?baseClass=ilSAHSEditGUI&ref_id=".$_GET["ref_id"], "lm");
56 
57  $next_class = $this->ctrl->getNextClass($this);
58  $cmd = $this->ctrl->getCmd();
59 
60 
61  $obj_id = ilObject::_lookupObjectId($_GET['ref_id']);
63 
64  switch($type)
65  {
66 
67  case "scorm2004":
68  include_once("./Modules/Scorm2004/classes/class.ilObjSCORM2004LearningModuleGUI.php");
69  $this->slm_gui = new ilObjSCORM2004LearningModuleGUI("", $_GET["ref_id"],true,false);
70  break;
71 
72  case "scorm":
73  include_once("./Modules/ScormAicc/classes/class.ilObjSCORMLearningModuleGUI.php");
74  $this->slm_gui = new ilObjSCORMLearningModuleGUI("", $_GET["ref_id"],true,false);
75  break;
76 
77  case "aicc":
78  include_once("./Modules/ScormAicc/classes/class.ilObjAICCLearningModuleGUI.php");
79  $this->slm_gui = new ilObjAICCLearningModuleGUI("", $_GET["ref_id"],true,false);
80  break;
81 
82  case "hacp":
83  include_once("./Modules/ScormAicc/classes/class.ilObjHACPLearningModuleGUI.php");
84  $this->slm_gui = new ilObjHACPLearningModuleGUI("", $_GET["ref_id"],true,false);
85  break;
86  }
87 
88  if ($next_class == "")
89  {
90  switch($type)
91  {
92 
93  case "scorm2004":
94  $this->ctrl->setCmdClass("ilobjscorm2004learningmodulegui");
95  break;
96 
97  case "scorm":
98  $this->ctrl->setCmdClass("ilobjscormlearningmodulegui");
99  break;
100 
101  case "aicc":
102  $this->ctrl->setCmdClass("ilobjaicclearningmodulegui");
103  break;
104 
105  case "hacp":
106  $this->ctrl->setCmdClass("ilobjhacplearningmodulegui");
107  break;
108  }
109  $next_class = $this->ctrl->getNextClass($this);
110  }
111 
112  switch($next_class)
113  {
114  case "ilobjscormlearningmodulegui":
115  case "ilobjscorm2004learningmodulegui":
116  $ret =& $this->ctrl->forwardCommand($this->slm_gui);
117  break;
118 
119  case "ilobjaicclearningmodulegui":
120  $ret =& $this->ctrl->forwardCommand($this->slm_gui);
121  break;
122 
123  case "ilobjhacplearningmodulegui":
124  $ret =& $this->ctrl->forwardCommand($this->slm_gui);
125  break;
126 
127  default:
128  die ("ilSAHSEdit: Class $next_class not found.");;
129  }
130 
131  $this->tpl->show();
132  }
133 }
134 ?>