ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
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 $DIC;
26 $ilias = $DIC['ilias'];
27 $tpl = $DIC['tpl'];
28 $lng = $DIC['lng'];
29 $ilCtrl = $DIC['ilCtrl'];
30
31 $this->ilias = $ilias;
32 $this->tpl = $tpl;
33 $this->lng = $lng;
34 $this->ctrl = $ilCtrl;
35
36 $this->ctrl->saveParameter($this, "ref_id");
37 }
global $ilCtrl
Definition: ilias.php:18
redirection script todo: (a better solution should control the processing via a xml file)
global $DIC
Definition: saml.php:7

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

Member Function Documentation

◆ executeCommand()

ilSAHSEditGUI::executeCommand ( )

execute command

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

43 {
44 global $DIC;
45 $lng = $DIC['lng'];
46 $ilAccess = $DIC['ilAccess'];
47 $ilNavigationHistory = $DIC['ilNavigationHistory'];
48 $ilias = $DIC['ilias'];
49 $ilCtrl = $DIC['ilCtrl'];
50 $GLOBALS['DIC']["ilLog"]->write("bc:" . $_GET["baseClass"] . "; nc:" . $this->ctrl->getNextClass($this) . "; cmd:" . $this->ctrl->getCmd());
51
52 include_once "./Modules/ScormAicc/classes/class.ilObjSAHSLearningModule.php";
53
54 $lng->loadLanguageModule("content");
55
56 // permission
57 if (!$ilAccess->checkAccess("write", "", $_GET["ref_id"])) {
58 $this->ilias->raiseError($lng->txt("permission_denied"), $ilias->error_obj->MESSAGE);
59 }
60
61 // add entry to navigation history
62 $ilNavigationHistory->addItem(
63 $_GET["ref_id"],
64 "ilias.php?baseClass=ilSAHSEditGUI&ref_id=" . $_GET["ref_id"],
65 "lm"
66 );
67
68 $next_class = $this->ctrl->getNextClass($this);
69 $cmd = $this->ctrl->getCmd();
70
71 $obj_id = ilObject::_lookupObjectId($_GET['ref_id']);
73
74 switch ($type) {
75
76 case "scorm2004":
77 include_once("./Modules/Scorm2004/classes/class.ilObjSCORM2004LearningModuleGUI.php");
78 $this->slm_gui = new ilObjSCORM2004LearningModuleGUI("", $_GET["ref_id"], true, false);
79 break;
80
81 case "scorm":
82 include_once("./Modules/ScormAicc/classes/class.ilObjSCORMLearningModuleGUI.php");
83 $this->slm_gui = new ilObjSCORMLearningModuleGUI("", $_GET["ref_id"], true, false);
84 break;
85 }
86
87 if ($next_class == "") {
88 switch ($type) {
89
90 case "scorm2004":
91 $this->ctrl->setCmdClass("ilobjscorm2004learningmodulegui");
92 break;
93
94 case "scorm":
95 $this->ctrl->setCmdClass("ilobjscormlearningmodulegui");
96 break;
97 }
98 $next_class = $this->ctrl->getNextClass($this);
99 }
100
101 switch ($next_class) {
102 case "ilobjscormlearningmodulegui":
103 case "ilobjscorm2004learningmodulegui":
104 $ret = $this->ctrl->forwardCommand($this->slm_gui);
105 break;
106
107 case "ilexportgui":
108 $obj_id = ilObject::_lookupObjectId($_GET["ref_id"]);
109 if ($cmd == "create_xml") {
110 require_once("Modules/ScormAicc/classes/class.ilScormAiccExporter.php");
111 $exporter = new ilScormAiccExporter();
112 $xml = $exporter->getXmlRepresentation("sahs", "5.1.0", ilObject::_lookupObjectId($_GET["ref_id"]));
113 } elseif ($cmd == "download") {
114 $file = $_GET["file"];
115 $ftmp = explode(":", $file);
116 $fileName = $ftmp[1];
117 require_once("./Services/Export/classes/class.ilExport.php");
118 $exportDir = ilExport::_getExportDirectory($obj_id);
119 ilUtil::deliverFile($exportDir . "/" . $fileName, $fileName);
120 } elseif ($cmd == "confirmDeletion") {
121 }
122 $this->ctrl->setCmd("export");
123 ilUtil::redirect("ilias.php?baseClass=ilSAHSEditGUI&cmd=export&ref_id=" . $_GET["ref_id"]);
124 break;
125
126
127 default:
128 die("ilSAHSEdit: Class $next_class not found.");;
129 }
130
131 $this->tpl->show();
132 }
$_GET["client_id"]
static _getExportDirectory($a_obj_id, $a_type="xml", $a_obj_type="", $a_entity="")
Get export directory for an repository object.
static _lookupSubType($a_obj_id)
lookup subtype id (scorm, )
Class ilObjSCORMLearningModuleGUI.
static _lookupObjectId($a_ref_id)
lookup object id
static redirect($a_script)
static deliverFile( $a_file, $a_filename, $a_mime='', $isInline=false, $removeAfterDelivery=false, $a_exit_after=true)
deliver file for download via browser.
$GLOBALS['JPEG_Segment_Names']
Global Variable: XMP_tag_captions.
$ret
Definition: parser.php:6
$type

References $_GET, $DIC, $GLOBALS, $ilCtrl, $ilias, $lng, $ret, $type, $xml, 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: