ILIAS  release_5-2 Revision v5.2.25-18-g3f80b828510
ilSAHSEditGUI Class Reference

Class ilSAHSPresentationGUI. More...

+ Collaboration diagram for ilSAHSEditGUI:

Public Member Functions

 __construct ()
 
 executeCommand ()
 execute command More...
 

Data Fields

 $ilias
 
 $tpl
 
 $lng
 

Detailed Description

Constructor & Destructor Documentation

◆ __construct()

ilSAHSEditGUI::__construct ( )

Definition at line 23 of file class.ilSAHSEditGUI.php.

24 {
25 global $ilias, $tpl, $lng, $ilCtrl;
26
27 $this->ilias = $ilias;
28 $this->tpl = $tpl;
29 $this->lng = $lng;
30 $this->ctrl = $ilCtrl;
31
32 $this->ctrl->saveParameter($this, "ref_id");
33 }
global $ilCtrl
Definition: ilias.php:18
redirection script todo: (a better solution should control the processing via a xml file)

References $ilCtrl, $ilias, $lng, and $tpl.

Member Function Documentation

◆ executeCommand()

ilSAHSEditGUI::executeCommand ( )

execute command

Definition at line 38 of file class.ilSAHSEditGUI.php.

39 {
40 global $lng, $ilAccess, $ilNavigationHistory, $ilias, $ilCtrl;
41 $GLOBALS["ilLog"]->write ("bc:".$_GET["baseClass"]."; nc:".$this->ctrl->getNextClass($this)."; cmd:".$this->ctrl->getCmd());
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 $obj_id = ilObject::_lookupObjectId($_GET['ref_id']);
62
63 switch($type)
64 {
65
66 case "scorm2004":
67 include_once("./Modules/Scorm2004/classes/class.ilObjSCORM2004LearningModuleGUI.php");
68 $this->slm_gui = new ilObjSCORM2004LearningModuleGUI("", $_GET["ref_id"],true,false);
69 break;
70
71 case "scorm":
72 include_once("./Modules/ScormAicc/classes/class.ilObjSCORMLearningModuleGUI.php");
73 $this->slm_gui = new ilObjSCORMLearningModuleGUI("", $_GET["ref_id"],true,false);
74 break;
75
76 case "aicc":
77 include_once("./Modules/ScormAicc/classes/class.ilObjAICCLearningModuleGUI.php");
78 $this->slm_gui = new ilObjAICCLearningModuleGUI("", $_GET["ref_id"],true,false);
79 break;
80
81 case "hacp":
82 include_once("./Modules/ScormAicc/classes/class.ilObjHACPLearningModuleGUI.php");
83 $this->slm_gui = new ilObjHACPLearningModuleGUI("", $_GET["ref_id"],true,false);
84 break;
85 }
86
87 if ($next_class == "")
88 {
89 switch($type)
90 {
91
92 case "scorm2004":
93 $this->ctrl->setCmdClass("ilobjscorm2004learningmodulegui");
94 break;
95
96 case "scorm":
97 $this->ctrl->setCmdClass("ilobjscormlearningmodulegui");
98 break;
99
100 case "aicc":
101 $this->ctrl->setCmdClass("ilobjaicclearningmodulegui");
102 break;
103
104 case "hacp":
105 $this->ctrl->setCmdClass("ilobjhacplearningmodulegui");
106 break;
107 }
108 $next_class = $this->ctrl->getNextClass($this);
109 }
110
111 switch($next_class)
112 {
113 case "ilobjscormlearningmodulegui":
114 case "ilobjscorm2004learningmodulegui":
115 $ret = $this->ctrl->forwardCommand($this->slm_gui);
116 break;
117
118 case "ilobjaicclearningmodulegui":
119 $ret = $this->ctrl->forwardCommand($this->slm_gui);
120 break;
121
122 case "ilobjhacplearningmodulegui":
123 $ret = $this->ctrl->forwardCommand($this->slm_gui);
124 break;
125 case "ilexportgui":
126 $obj_id = ilObject::_lookupObjectId($_GET["ref_id"]);
127 if ($cmd == "create_xml")
128 {
129 require_once("Modules/ScormAicc/classes/class.ilScormAiccExporter.php");
130 $exporter = new ilScormAiccExporter();
131 $xml = $exporter->getXmlRepresentation("sahs", "5.1.0", $_GET["ref_id"]);
132 }
133 else if ($cmd == "download")
134 {
135 $file = $_GET["file"];
136 $ftmp = explode (":", $file);
137 $fileName = $ftmp[1];
138 require_once ("./Services/Export/classes/class.ilExport.php");
139 $exportDir = ilExport::_getExportDirectory($obj_id);
140 ilUtil::deliverFile ($exportDir . "/" . $fileName, $fileName);
141 }
142 else if ($cmd == "confirmDeletion")
143 {
144 }
145 $this->ctrl->setCmd ("export");
146 ilUtil::redirect("ilias.php?baseClass=ilSAHSEditGUI&cmd=export&ref_id=".$_GET["ref_id"]);
147 break;
148
149
150 default:
151 die ("ilSAHSEdit: Class $next_class not found.");;
152 }
153
154 $this->tpl->show();
155 }
$_GET["client_id"]
static _getExportDirectory($a_obj_id, $a_type="xml", $a_obj_type="", $a_entity="")
Get export directory for an repository object.
Class ilObjAICCLearningModuleGUI.
Class ilObjHACPLearningModuleGUI.
static _lookupSubType($a_obj_id)
lookup subtype id (scorm, aicc, hacp)
Class ilObjSCORMLearningModuleGUI.
static _lookupObjectId($a_ref_id)
lookup object id
static redirect($a_script)
http redirect to other script
static deliverFile($a_file, $a_filename, $a_mime='', $isInline=false, $removeAfterDelivery=false, $a_exit_after=true)
deliver file for download via browser.
$GLOBALS['loaded']
Global hash that tracks already loaded includes.
$ret
Definition: parser.php:6
if(!file_exists("$old.txt")) if( $old===$new) if(file_exists("$new.txt")) $file
$cmd
Definition: sahs_server.php:35

References $_GET, $cmd, $file, $GLOBALS, $ilCtrl, $ilias, $lng, $ret, ilExport\_getExportDirectory(), ilObject\_lookupObjectId(), ilObjSAHSLearningModule\_lookupSubType(), ilUtil\deliverFile(), and ilUtil\redirect().

+ Here is the call graph for this function:

Field Documentation

◆ $ilias

ilSAHSEditGUI::$ilias

Definition at line 19 of file class.ilSAHSEditGUI.php.

Referenced by __construct(), and executeCommand().

◆ $lng

ilSAHSEditGUI::$lng

Definition at line 21 of file class.ilSAHSEditGUI.php.

Referenced by __construct(), and executeCommand().

◆ $tpl

ilSAHSEditGUI::$tpl

Definition at line 20 of file class.ilSAHSEditGUI.php.

Referenced by __construct().


The documentation for this class was generated from the following file: