From 3fde68eb56ed56bfae7e99e88755bc278ccf889a Mon Sep 17 00:00:00 2001 From: Tim Schmitz Date: Thu, 30 Nov 2023 12:52:59 +0100 Subject: [PATCH] StudyProgramme: fix internal links in custom md (28060) --- .../classes/class.ilObjStudyProgrammeGUI.php | 20 ++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/Modules/StudyProgramme/classes/class.ilObjStudyProgrammeGUI.php b/Modules/StudyProgramme/classes/class.ilObjStudyProgrammeGUI.php index cc8de0366556..01136599bf1c 100644 --- a/Modules/StudyProgramme/classes/class.ilObjStudyProgrammeGUI.php +++ b/Modules/StudyProgramme/classes/class.ilObjStudyProgrammeGUI.php @@ -36,6 +36,7 @@ * @ilCtrl_Calls ilObjStudyProgrammeGUI: ilObjectTranslationGUI * @ilCtrl_Calls ilObjStudyProgrammeGUI: ilCertificateGUI * @ilCtrl_Calls ilObjStudyProgrammeGUI: ilObjStudyProgrammeAutoCategoriesGUI + * @ilCtrl_Calls ilObjStudyProgrammeGUI: ilPropertyFormGUI */ class ilObjStudyProgrammeGUI extends ilContainerGUI { @@ -229,7 +230,24 @@ public function executeCommand(): void $output_gui = $guiFactory->create($this->object); $this->ctrl->forwardCommand($output_gui); break; - + case strtolower(ilPropertyFormGUI::class): + /* + * Only used for async loading of the repository tree in custom md + * internal links (see #28060, #37974). This is necessary since StudyProgrammes don't + * use ilObjectMetaDataGUI. + */ + $form = $this->initAdvancedSettingsForm(); + $gui = new ilAdvancedMDRecordGUI( + ilAdvancedMDRecordGUI::MODE_EDITOR, + 'prg', + $this->object->getId(), + 'prg_type', + $this->object->getSettings()->getTypeSettings()->getTypeId() + ); + $gui->setPropertyForm($form); + $gui->parse(); + $this->ctrl->forwardCommand($form); + break; case false: $this->getSubTabs($cmd); switch ($cmd) {