diff --git a/Modules/Forum/classes/class.ilForumExportGUI.php b/Modules/Forum/classes/class.ilForumExportGUI.php index db923cf200c7..f9bae8189782 100755 --- a/Modules/Forum/classes/class.ilForumExportGUI.php +++ b/Modules/Forum/classes/class.ilForumExportGUI.php @@ -374,6 +374,12 @@ public function exportHTML(): void 'thread_ids', $this->refinery->kindlyTo()->listOf($this->refinery->kindlyTo()->int()) ); + } else { + $obj_id = $this->ilObjDataCache->lookupObjId($this->ref_id); + $topics = ilForum::getSortedThreadSubjects($obj_id); + if(count($topics) > 0) { + $thread_ids = array_keys($topics); + } } array_walk($thread_ids, function (int $threadId) use (&$threads, $isModerator): void { $thread = new ilForumTopic($threadId, $isModerator); diff --git a/Modules/Forum/classes/class.ilObjForumGUI.php b/Modules/Forum/classes/class.ilObjForumGUI.php index ee4aafaf91c7..48eab4c5f555 100755 --- a/Modules/Forum/classes/class.ilObjForumGUI.php +++ b/Modules/Forum/classes/class.ilObjForumGUI.php @@ -492,6 +492,16 @@ public function executeCommand(): void $this->tabs_gui->activateTab('export'); $exp = new ilExportGUI($this); $exp->addFormat('xml'); + $exp->addFormat('html'); + if($cmd === 'createExportFile') { + if($this->http->wrapper()->post()->has('format')) { + $format = $this->http->wrapper()->post()->retrieve('format', $this->refinery->kindlyTo()->string()); + if($format === 'html') { + $fex_gui = new ilForumExportGUI(); + $fex_gui->exportHTML(); + } + } + } $this->ctrl->forwardCommand($exp); break;