62 : void
63 {
65
66 $DIC->globalScreen()->tool()->context()->claim()->repository();
67
69 $ilAccess =
$DIC->access();
70 $ilNavigationHistory =
$DIC[
'ilNavigationHistory'];
71 $ilCtrl =
$DIC->ctrl();
74 $ilLog->debug(
"bc:" .
$DIC->http()->wrapper()->query()->retrieve(
'baseClass',
$DIC->refinery()->kindlyTo()->string()) .
"; nc:" . $this->ctrl->getNextClass($this) .
"; cmd:" . $this->ctrl->getCmd());
75
77
78
79 if (!$ilAccess->checkAccess("write", "", $this->refId)) {
81 }
82
83
84 $ilNavigationHistory->addItem(
85 $this->refId,
86 "ilias.php?baseClass=ilSAHSEditGUI&ref_id=" . $this->refId,
87 "lm"
88 );
89
90 $next_class = $this->
ctrl->getNextClass($this) ??
'';
91 $cmd = $this->
ctrl->getCmd() ??
'';
92
95
96 if ($next_class === '') {
97 switch ($type) {
98 case "scorm":
99 $this->
ctrl->redirectByClass(ilObjSCORMLearningModuleGUI::class);
100
101 case "scorm2004":
102 $this->
ctrl->redirectByClass(ilObjSCORM2004LearningModuleGUI::class);
103 }
104 }
105
106 switch ($type) {
107 case "scorm":
109 break;
110
111 case "scorm2004":
113 break;
114 }
115
116 switch ($next_class) {
117 case "ilobjscormlearningmodulegui":
118 case "ilobjscorm2004learningmodulegui":
119 $ret = $this->
ctrl->forwardCommand($this->slm_gui);
120 break;
121
122 case "ilexportgui":
124 if ($cmd === "create_xml") {
126 $exp->exportObject( 'sahs', (int)$obj_id );
127 } elseif ($cmd === "download") {
128 $file = $this->wrapper->query()->retrieve(
'file', $this->
refinery->kindlyTo()->string());
129 $ftmp = explode(":", $file);
130 $fileName = (string) $ftmp[1];
133 } elseif ($cmd === "confirmDeletion") {
135
136 $files = $this->wrapper->post()->retrieve(
'file', $this->
refinery->kindlyTo()->listOf($this->refinery->kindlyTo()->string()));
137 foreach ($files as $file) {
138 $file = explode(":", $file);
139 $file[1] = basename($file[1]);
140 $exp_file = $exportDir . "/" . str_replace("..", "", $file[1]);
141 if (@is_file($exp_file)) {
142 unlink($exp_file);
143 }
144 }
145 }
146
147 ilUtil::redirect(
"ilias.php?baseClass=ilSAHSEditGUI&cmd=export&ref_id=" . $this->refId);
148 break;
149
150
151 default:
152 die("ilSAHSEdit: Class $next_class not found.");
153 }
154
155 $this->tpl->printToStdout();
156 }
static _getExportDirectory(int $a_obj_id, string $a_type="xml", string $a_obj_type="", string $a_entity="")
@depricated Get export directory for an repository object
static deliverFileLegacy(string $a_file, ?string $a_filename=null, ?string $a_mime=null, ?bool $isInline=false, ?bool $removeAfterDelivery=false, ?bool $a_exit_after=true)
loadLanguageModule(string $a_module)
Load language module.
txt(string $a_topic, string $a_default_lang_fallback_mod="")
gets the text for a given topic if the topic is not in the list, the topic itself with "-" will be re...
static getLogger(string $a_component_id)
Get component logger.
static _lookupSubType(int $a_obj_id)
lookup subtype id (scorm, )
Class ilObjSCORMLearningModuleGUI.
Class ilObjSCORMLearningModuleGUI.
static _lookupObjectId(int $ref_id)
static redirect(string $a_script)