From 97026cb743dae52d63cdcfc63190e6f5afd612fd Mon Sep 17 00:00:00 2001 From: Christoph Ludolf Date: Thu, 19 Dec 2024 12:10:21 +0100 Subject: [PATCH] Export: Adjust export option dropdown/button to conform to ilias --- .../ILIAS/Blog/classes/class.ilBlogExportOptionHTML.php | 2 +- .../classes/class.ilBlogExportOptionHTMLWithComments.php | 3 ++- .../ILIAS/Export/classes/class.ilExportExportOptionXML.php | 2 +- components/ILIAS/Export/classes/class.ilExportGUI.php | 2 +- .../ILIAS/Forum/classes/class.ilForumExportOptionHTML.php | 2 +- .../Glossary/classes/class.ilGlossaryExportOptionHTML.php | 2 +- .../classes/class.ilHTLMExportOptionHTML.php | 2 +- .../classes/class.ilLearningModuleExportOptionHTML.php | 2 +- .../classes/class.ilLearningModuleExportOptionXML.php | 2 +- .../classes/class.ilMediaPoolExportOptionXMLMaster.php | 3 ++- .../class.ilMediaPoolExportOptionXMLMasterNoMedia.php | 1 + .../OrgUnit/classes/class.ilOrgUnitExportOptionXLS.php | 3 ++- .../OrgUnit/classes/class.ilOrgUnitExportOptionXML.php | 3 ++- .../ILIAS/Test/classes/class.ilTestExportOptionARC.php | 3 ++- .../ILIAS/Test/classes/class.ilTestExportOptionXML.php | 4 +++- .../ILIAS/Test/classes/class.ilTestExportOptionXMLRES.php | 6 ++++-- .../classes/class.ilTestQuestionPoolExportOptionXML.php | 3 ++- .../ILIAS/Wiki/classes/class.ilWikiExportOptionHTML.php | 2 +- .../classes/class.ilWikiExportOptionHTMLWithComments.php | 3 ++- lang/ilias_de.lang | 3 +++ lang/ilias_en.lang | 7 ++++++- 21 files changed, 40 insertions(+), 20 deletions(-) diff --git a/components/ILIAS/Blog/classes/class.ilBlogExportOptionHTML.php b/components/ILIAS/Blog/classes/class.ilBlogExportOptionHTML.php index 7a6ca424e6b8..416f4122a23a 100644 --- a/components/ILIAS/Blog/classes/class.ilBlogExportOptionHTML.php +++ b/components/ILIAS/Blog/classes/class.ilBlogExportOptionHTML.php @@ -56,7 +56,7 @@ public function getSupportedRepositoryObjectTypes(): array public function getLabel(): string { $this->lng->loadLanguageModule('exp'); - return $this->lng->txt("exp_html"); + return $this->lng->txt("exp_format_dropdown-html"); } public function onExportOptionSelected( diff --git a/components/ILIAS/Blog/classes/class.ilBlogExportOptionHTMLWithComments.php b/components/ILIAS/Blog/classes/class.ilBlogExportOptionHTMLWithComments.php index c4d56214e880..42a7a5ded6e4 100644 --- a/components/ILIAS/Blog/classes/class.ilBlogExportOptionHTMLWithComments.php +++ b/components/ILIAS/Blog/classes/class.ilBlogExportOptionHTMLWithComments.php @@ -57,7 +57,8 @@ public function getSupportedRepositoryObjectTypes(): array public function getLabel(): string { - return "HTML (" . $this->lng->txt("blog_incl_comments") . ")"; + $this->lng->loadLanguageModule('exp'); + return $this->lng->txt("exp_format_dropdown-html") . " (" . $this->lng->txt("blog_incl_comments") . ")"; } public function onExportOptionSelected( diff --git a/components/ILIAS/Export/classes/class.ilExportExportOptionXML.php b/components/ILIAS/Export/classes/class.ilExportExportOptionXML.php index f2c932a44643..2a87877c89f8 100644 --- a/components/ILIAS/Export/classes/class.ilExportExportOptionXML.php +++ b/components/ILIAS/Export/classes/class.ilExportExportOptionXML.php @@ -76,7 +76,7 @@ public function isPublicAccessPossible(): bool public function getLabel(): string { - return $this->lng->txt("exp_create_file") . " (xml)"; + return $this->lng->txt("exp_format_dropdown-xml"); } public function onExportOptionSelected( diff --git a/components/ILIAS/Export/classes/class.ilExportGUI.php b/components/ILIAS/Export/classes/class.ilExportGUI.php index f4ccc521df44..48280d3e45fd 100755 --- a/components/ILIAS/Export/classes/class.ilExportGUI.php +++ b/components/ILIAS/Export/classes/class.ilExportGUI.php @@ -203,7 +203,7 @@ final protected function displayExportFiles(): void } if (count($infos) === 1) { $this->toolbar->addComponent($this->ui_services->factory()->button()->standard( - array_keys($infos)[0], + $this->lng->txt("exp_export_dropdown") . " " . array_keys($infos)[0], array_values($infos)[0] )); } diff --git a/components/ILIAS/Forum/classes/class.ilForumExportOptionHTML.php b/components/ILIAS/Forum/classes/class.ilForumExportOptionHTML.php index 374c113f9dd1..20c8cefb29c4 100644 --- a/components/ILIAS/Forum/classes/class.ilForumExportOptionHTML.php +++ b/components/ILIAS/Forum/classes/class.ilForumExportOptionHTML.php @@ -52,7 +52,7 @@ public function getSupportedRepositoryObjectTypes(): array public function getLabel(): string { $this->lng->loadLanguageModule('exp'); - return $this->lng->txt('exp_html'); + return $this->lng->txt('exp_format_dropdown-html'); } public function onExportOptionSelected(ilExportHandlerConsumerContextInterface $context): void diff --git a/components/ILIAS/Glossary/classes/class.ilGlossaryExportOptionHTML.php b/components/ILIAS/Glossary/classes/class.ilGlossaryExportOptionHTML.php index 34c10b6de504..d08d3a128e0d 100644 --- a/components/ILIAS/Glossary/classes/class.ilGlossaryExportOptionHTML.php +++ b/components/ILIAS/Glossary/classes/class.ilGlossaryExportOptionHTML.php @@ -56,7 +56,7 @@ public function getSupportedRepositoryObjectTypes(): array public function getLabel(): string { $this->lng->loadLanguageModule('exp'); - return $this->lng->txt("exp_html"); + return $this->lng->txt("exp_format_dropdown-html"); } public function onExportOptionSelected( diff --git a/components/ILIAS/HTMLLearningModule/classes/class.ilHTLMExportOptionHTML.php b/components/ILIAS/HTMLLearningModule/classes/class.ilHTLMExportOptionHTML.php index 3383e64c32a4..a29c5a2c4828 100644 --- a/components/ILIAS/HTMLLearningModule/classes/class.ilHTLMExportOptionHTML.php +++ b/components/ILIAS/HTMLLearningModule/classes/class.ilHTLMExportOptionHTML.php @@ -53,7 +53,7 @@ public function getSupportedRepositoryObjectTypes(): array public function getLabel(): string { $this->lng->loadLanguageModule('exp'); - return $this->lng->txt("exp_html"); + return $this->lng->txt("exp_format_dropdown-html"); } public function onExportOptionSelected( diff --git a/components/ILIAS/LearningModule/classes/class.ilLearningModuleExportOptionHTML.php b/components/ILIAS/LearningModule/classes/class.ilLearningModuleExportOptionHTML.php index 17f91bb7be65..8fc33f77f78e 100644 --- a/components/ILIAS/LearningModule/classes/class.ilLearningModuleExportOptionHTML.php +++ b/components/ILIAS/LearningModule/classes/class.ilLearningModuleExportOptionHTML.php @@ -64,7 +64,7 @@ public function getSupportedRepositoryObjectTypes(): array public function getLabel(): string { $this->lng->loadLanguageModule('exp'); - return $this->lng->txt("exp_html"); + return $this->lng->txt("exp_format_dropdown-html"); } public function onDeleteFiles( diff --git a/components/ILIAS/LearningModule/classes/class.ilLearningModuleExportOptionXML.php b/components/ILIAS/LearningModule/classes/class.ilLearningModuleExportOptionXML.php index 6406ecac55d5..ced93f15a019 100644 --- a/components/ILIAS/LearningModule/classes/class.ilLearningModuleExportOptionXML.php +++ b/components/ILIAS/LearningModule/classes/class.ilLearningModuleExportOptionXML.php @@ -63,7 +63,7 @@ public function isPublicAccessPossible(): bool public function getLabel(): string { $this->lng->loadLanguageModule('exp'); - return $this->lng->txt("exp_xml"); + return $this->lng->txt("exp_format_dropdown-xml"); } public function onExportOptionSelected(\ILIAS\Export\ExportHandler\I\Consumer\Context\HandlerInterface $context): void diff --git a/components/ILIAS/MediaPool/classes/class.ilMediaPoolExportOptionXMLMaster.php b/components/ILIAS/MediaPool/classes/class.ilMediaPoolExportOptionXMLMaster.php index 5717bea9491b..44fffbc81380 100644 --- a/components/ILIAS/MediaPool/classes/class.ilMediaPoolExportOptionXMLMaster.php +++ b/components/ILIAS/MediaPool/classes/class.ilMediaPoolExportOptionXMLMaster.php @@ -54,7 +54,8 @@ public function getSupportedRepositoryObjectTypes(): array public function getLabel(): string { - return "XML (" . $this->lng->txt("mep_master_language_only") . ")"; + $this->lng->loadLanguageModule('exp'); + return $this->lng->txt("exp_format_dropdown-xml") . " (" . $this->lng->txt("mep_master_language_only") . ")"; } public function onDownloadFiles( diff --git a/components/ILIAS/MediaPool/classes/class.ilMediaPoolExportOptionXMLMasterNoMedia.php b/components/ILIAS/MediaPool/classes/class.ilMediaPoolExportOptionXMLMasterNoMedia.php index c9bd0a72f766..01c9d35e6037 100644 --- a/components/ILIAS/MediaPool/classes/class.ilMediaPoolExportOptionXMLMasterNoMedia.php +++ b/components/ILIAS/MediaPool/classes/class.ilMediaPoolExportOptionXMLMasterNoMedia.php @@ -54,6 +54,7 @@ public function getSupportedRepositoryObjectTypes(): array public function getLabel(): string { + $this->lng->loadLanguageModule('exp'); return "XML (" . $this->lng->txt("mep_master_language_only_no_media") . ")"; } diff --git a/components/ILIAS/OrgUnit/classes/class.ilOrgUnitExportOptionXLS.php b/components/ILIAS/OrgUnit/classes/class.ilOrgUnitExportOptionXLS.php index 494a1295387e..a16dde4d3022 100644 --- a/components/ILIAS/OrgUnit/classes/class.ilOrgUnitExportOptionXLS.php +++ b/components/ILIAS/OrgUnit/classes/class.ilOrgUnitExportOptionXLS.php @@ -55,7 +55,8 @@ public function getSupportedRepositoryObjectTypes(): array public function getLabel(): string { - return $this->lng->txt('simple_xls'); + $this->lng->loadLanguageModule('exp'); + return $this->lng->txt('exp_format_dropdown-xls'); } public function isObjectSupported(ObjectId $object_id): bool diff --git a/components/ILIAS/OrgUnit/classes/class.ilOrgUnitExportOptionXML.php b/components/ILIAS/OrgUnit/classes/class.ilOrgUnitExportOptionXML.php index bed7947c1e8d..223afa6e4f2c 100644 --- a/components/ILIAS/OrgUnit/classes/class.ilOrgUnitExportOptionXML.php +++ b/components/ILIAS/OrgUnit/classes/class.ilOrgUnitExportOptionXML.php @@ -61,7 +61,8 @@ public function isObjectSupported(ObjectId $object_id): bool public function getLabel(): string { - return $this->lng->txt('simple_xml'); + $this->lng->loadLanguageModule('exp'); + return $this->lng->txt('exp_format_dropdown-xml'); } public function onExportOptionSelected(ilExportHandlerConsumerContextInterface $context): void diff --git a/components/ILIAS/Test/classes/class.ilTestExportOptionARC.php b/components/ILIAS/Test/classes/class.ilTestExportOptionARC.php index e6ffd0eb7bf7..b6166e9f6290 100644 --- a/components/ILIAS/Test/classes/class.ilTestExportOptionARC.php +++ b/components/ILIAS/Test/classes/class.ilTestExportOptionARC.php @@ -57,7 +57,8 @@ public function getSupportedRepositoryObjectTypes(): array public function getLabel(): string { - return $this->lng->txt('ass_create_export_test_archive'); + $this->lng->loadLanguageModule('exp'); + return $this->lng->txt('exp_format_dropdown-arc'); } public function onDeleteFiles( diff --git a/components/ILIAS/Test/classes/class.ilTestExportOptionXML.php b/components/ILIAS/Test/classes/class.ilTestExportOptionXML.php index 2ed200f43ceb..1a8af9f28c44 100644 --- a/components/ILIAS/Test/classes/class.ilTestExportOptionXML.php +++ b/components/ILIAS/Test/classes/class.ilTestExportOptionXML.php @@ -55,7 +55,9 @@ public function getSupportedRepositoryObjectTypes(): array public function getLabel(): string { - return $this->lng->txt('ass_create_export_file'); + $this->lng->loadLanguageModule('exp'); + $this->lng->loadLanguageModule('assessment'); + return $this->lng->txt("exp_format_dropdown-xml") . " (" . $this->lng->txt('ass_create_export_file') . ")"; } public function onDeleteFiles( diff --git a/components/ILIAS/Test/classes/class.ilTestExportOptionXMLRES.php b/components/ILIAS/Test/classes/class.ilTestExportOptionXMLRES.php index fc96c348a1bb..89b772fbad17 100644 --- a/components/ILIAS/Test/classes/class.ilTestExportOptionXMLRES.php +++ b/components/ILIAS/Test/classes/class.ilTestExportOptionXMLRES.php @@ -50,12 +50,14 @@ public function getExportOptionId(): string public function getSupportedRepositoryObjectTypes(): array { - return ['tst']; + return ['tst', 'crs']; } public function getLabel(): string { - return $this->lng->txt('ass_create_export_file_with_results'); + $this->lng->loadLanguageModule('exp'); + $this->lng->loadLanguageModule('assessment'); + return $this->lng->txt("exp_format_dropdown-xml") . " (" . $this->lng->txt('ass_create_export_file_with_results') . ")"; } public function onDeleteFiles( diff --git a/components/ILIAS/TestQuestionPool/classes/class.ilTestQuestionPoolExportOptionXML.php b/components/ILIAS/TestQuestionPool/classes/class.ilTestQuestionPoolExportOptionXML.php index 59d41fbf8896..366655f94c8e 100644 --- a/components/ILIAS/TestQuestionPool/classes/class.ilTestQuestionPoolExportOptionXML.php +++ b/components/ILIAS/TestQuestionPool/classes/class.ilTestQuestionPoolExportOptionXML.php @@ -55,7 +55,8 @@ public function getSupportedRepositoryObjectTypes(): array public function getLabel(): string { - return "{$this->lng->txt('exp_create_file')} (xml)"; + $this->lng->loadLanguageModule('exp'); + return $this->lng->txt('exp_format_dropdown-xml'); } public function onDeleteFiles( diff --git a/components/ILIAS/Wiki/classes/class.ilWikiExportOptionHTML.php b/components/ILIAS/Wiki/classes/class.ilWikiExportOptionHTML.php index d040f8c9c449..079e72be7511 100644 --- a/components/ILIAS/Wiki/classes/class.ilWikiExportOptionHTML.php +++ b/components/ILIAS/Wiki/classes/class.ilWikiExportOptionHTML.php @@ -56,7 +56,7 @@ public function getSupportedRepositoryObjectTypes(): array public function getLabel(): string { $this->lng->loadLanguageModule('exp'); - return $this->lng->txt('exp_html'); + return $this->lng->txt('exp_format_dropdown-html'); } public function onExportOptionSelected(ilExportHandlerConsumerContextInterface $context): void diff --git a/components/ILIAS/Wiki/classes/class.ilWikiExportOptionHTMLWithComments.php b/components/ILIAS/Wiki/classes/class.ilWikiExportOptionHTMLWithComments.php index 3d3229327bd3..29335971a1e5 100644 --- a/components/ILIAS/Wiki/classes/class.ilWikiExportOptionHTMLWithComments.php +++ b/components/ILIAS/Wiki/classes/class.ilWikiExportOptionHTMLWithComments.php @@ -55,7 +55,8 @@ public function getSupportedRepositoryObjectTypes(): array public function getLabel(): string { - return "HTML (" . $this->lng->txt("wiki_incl_comments") . ")"; + $this->lng->loadLanguageModule('exp'); + return $this->lng->txt("exp_format_dropdown-html") . " (" . $this->lng->txt("wiki_incl_comments") . ")"; } public function isObjectSupported(ObjectId $object_id): bool diff --git a/lang/ilias_de.lang b/lang/ilias_de.lang index 87fc7a8cf929..97d5e3d675c7 100644 --- a/lang/ilias_de.lang +++ b/lang/ilias_de.lang @@ -9757,6 +9757,9 @@ exp#:#exp_error_disabled#:#Der Export von Container-Objekten ist deaktiviert. Be exp#:#exp_error_too_many_objects#:#Der Export überschreitet die maximal erlaubte Zahl an Objekten (%1). Bitte wählen Sie eine kleinere Anzahl an Objekten. exp#:#exp_export_files#:#Exportdateien exp#:#exp_file_created#:#Eine Exportdatei wurde erstellt. +exp#:#exp_format_dropdown-csv#:#als CSV +exp#:#exp_format_dropdown-html#:#als HTML +exp#:#exp_format_dropdown-xml#:#als XML exp#:#exp_html#:#HTML exp#:#exp_import_validation_err_no_matching_xsd#:#Eine Schema Datei für Version %s existiert nicht. exp#:#exp_print_pdf#:#Drucken/PDF diff --git a/lang/ilias_en.lang b/lang/ilias_en.lang index 143e97267024..f8e2ee27f8ee 100755 --- a/lang/ilias_en.lang +++ b/lang/ilias_en.lang @@ -9756,8 +9756,14 @@ exercise#:#exc_your_submission#:#Your Submission exp#:#exp_create_file#:#Create Export File exp#:#exp_error_disabled#:#The export feature is disabled for containers. You may contact your system administrator. exp#:#exp_error_too_many_objects#:#The export exceeds the maximum number of allowerd objects (%1). Please select a lower number of objects. +exp#:#exp_export_dropdown#:#Export exp#:#exp_export_files#:#Export Files exp#:#exp_file_created#:#The export file has been created. +exp#:#exp_format_dropdown-arc#:#as ARCHIVE +exp#:#exp_format_dropdown-csv#:#as CSV +exp#:#exp_format_dropdown-html#:#as HTML +exp#:#exp_format_dropdown-xls#:#as XLS +exp#:#exp_format_dropdown-xml#:#as XML exp#:#exp_html#:#HTML exp#:#exp_import_validation_err_no_matching_xsd#:#No valid schema file for version %s exists. exp#:#exp_print_pdf#:#Print/PDF @@ -9769,7 +9775,6 @@ exp#:#export_created#:#A new export file has been created. exp#:#export_files_deleted#:#The selected export files have been deleted. exp#:#export_options#:#Export Options exp#:#export_type#:#Export Type -export#:#exp_export_dropdown#:#Export export#:#exp_file#:#File Name export#:#exp_public_access#:#Public Access export#:#exp_size#:#File Size (MB)