Skip to content

Commit 2571e93

Browse files
Fix Mantis #45578: Broken Export of SCORM modules (#11377)
1 parent acdcd2f commit 2571e93

2 files changed

Lines changed: 3 additions & 33 deletions

File tree

components/ILIAS/ScormAicc/Editing/classes/class.ilSAHSEditGUI.php

Lines changed: 3 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -96,10 +96,10 @@ public function executeCommand(): void
9696
if ($next_class === '') {
9797
switch ($type) {
9898
case "scorm":
99-
$this->ctrl->redirectByClass(ilObjSCORMLearningModuleGUI::class);
99+
$this->ctrl->redirectByClass(ilObjSCORMLearningModuleGUI::class, $cmd);
100100

101101
case "scorm2004":
102-
$this->ctrl->redirectByClass(ilObjSCORM2004LearningModuleGUI::class);
102+
$this->ctrl->redirectByClass(ilObjSCORM2004LearningModuleGUI::class, $cmd);
103103
}
104104
}
105105

@@ -120,30 +120,7 @@ public function executeCommand(): void
120120
break;
121121

122122
case "ilexportgui":
123-
$obj_id = ilObject::_lookupObjectId($this->refId);
124-
if ($cmd === "create_xml") {
125-
$exp = new ilExport();
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];
131-
$exportDir = ilExport::_getExportDirectory($obj_id);
132-
ilFileDelivery::deliverFileLegacy($exportDir . "/" . $fileName, $fileName, "zip");
133-
} elseif ($cmd === "confirmDeletion") {
134-
$exportDir = ilExport::_getExportDirectory($obj_id);
135-
// $files = $_POST['file'];
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-
123+
$this->slm_gui->export();
147124
ilUtil::redirect("ilias.php?baseClass=ilSAHSEditGUI&cmd=export&ref_id=" . $this->refId);
148125
break;
149126

components/ILIAS/ScormAicc/classes/class.ilScormAiccDataSet.php

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -186,16 +186,9 @@ public function getExtendedXmlRepresentation(
186186

187187
$this->_archive['files'] = [
188188
"properties" => "properties.xml",
189-
"manifest" => 'manifest.xml',
190189
'scormFile' => "content.zip"
191190
];
192191

193-
// build manifest xml file
194-
file_put_contents(
195-
$exportArchiveDir . "/" . $this->_archive['files']['manifest'],
196-
$this->buildManifest()
197-
);
198-
199192
// build content zip file
200193
if (isset($this->_archive['files']['scormFile'])) {
201194
$lmDir = './' . ILIAS_WEB_DIR . "/" . CLIENT_ID . "/lm_data/lm_" . $id;

0 commit comments

Comments
 (0)