@@ -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
0 commit comments