ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
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 $this->ilias->raiseError($lng->txt("permission_denied"), $ilias->error_obj->MESSAGE);
50 }
51
52 // add entry to navigation history
53 $ilNavigationHistory->addItem(
54 $_GET["ref_id"],
55 "ilias.php?baseClass=ilSAHSEditGUI&ref_id=" . $_GET["ref_id"],
56 "lm"
57 );
58
59 $next_class = $this->ctrl->getNextClass($this);
60 $cmd = $this->ctrl->getCmd();
61
62 $obj_id = ilObject::_lookupObjectId($_GET['ref_id']);
64
65 switch ($type) {
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
78 if ($next_class == "") {
79 switch ($type) {
80
81 case "scorm2004":
82 $this->ctrl->setCmdClass("ilobjscorm2004learningmodulegui");
83 break;
84
85 case "scorm":
86 $this->ctrl->setCmdClass("ilobjscormlearningmodulegui");
87 break;
88 }
89 $next_class = $this->ctrl->getNextClass($this);
90 }
91
92 switch ($next_class) {
93 case "ilobjscormlearningmodulegui":
94 case "ilobjscorm2004learningmodulegui":
95 $ret = $this->ctrl->forwardCommand($this->slm_gui);
96 break;
97
98 case "ilexportgui":
99 $obj_id = ilObject::_lookupObjectId($_GET["ref_id"]);
100 if ($cmd == "create_xml") {
101 require_once("Modules/ScormAicc/classes/class.ilScormAiccExporter.php");
102 $exporter = new ilScormAiccExporter();
103 $xml = $exporter->getXmlRepresentation("sahs", "5.1.0", ilObject::_lookupObjectId($_GET["ref_id"]));
104 } elseif ($cmd == "download") {
105 $file = $_GET["file"];
106 $ftmp = explode(":", $file);
107 $fileName = $ftmp[1];
108 require_once("./Services/Export/classes/class.ilExport.php");
109 $exportDir = ilExport::_getExportDirectory($obj_id);
110 ilUtil::deliverFile($exportDir . "/" . $fileName, $fileName);
111 } elseif ($cmd == "confirmDeletion") {
112 }
113 $this->ctrl->setCmd("export");
114 ilUtil::redirect("ilias.php?baseClass=ilSAHSEditGUI&cmd=export&ref_id=" . $_GET["ref_id"]);
115 break;
116
117
118 default:
119 die("ilSAHSEdit: Class $next_class not found.");;
120 }
121
122 $this->tpl->show();
123 }
$_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['loaded']
Global hash that tracks already loaded includes.
$xml
Definition: metadata.php:240
$ret
Definition: parser.php:6
$type
if(!file_exists("$old.txt")) if( $old===$new) if(file_exists("$new.txt")) $file

References $_GET, $file, $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: