From cce904af39ec11a1cac75a7fdc7a0724e083509a Mon Sep 17 00:00:00 2001 From: Fabian Schmid Date: Mon, 21 Oct 2024 15:27:15 +0200 Subject: [PATCH 1/4] [FIX] 0042349: UI Tooltips (via Topics) ont shown on slate-triggerers in mainBar --- .../ILIAS/UI/src/Component/MainControls/Slate/Slate.php | 3 ++- .../src/Implementation/Component/MainControls/Renderer.php | 6 ++++-- .../Component/MainControls/Slate/Renderer.php | 4 +++- .../Implementation/Component/MainControls/Slate/Slate.php | 2 ++ 4 files changed, 11 insertions(+), 4 deletions(-) diff --git a/components/ILIAS/UI/src/Component/MainControls/Slate/Slate.php b/components/ILIAS/UI/src/Component/MainControls/Slate/Slate.php index c0c4f86a1688..0a4267c2b975 100755 --- a/components/ILIAS/UI/src/Component/MainControls/Slate/Slate.php +++ b/components/ILIAS/UI/src/Component/MainControls/Slate/Slate.php @@ -25,11 +25,12 @@ use ILIAS\UI\Component\Signal; use ILIAS\UI\Component\Symbol\Symbol; use ILIAS\UI\Component\Triggerer; +use ILIAS\UI\Component\HasHelpTopics; /** * This describes a Slate */ -interface Slate extends Component, JavaScriptBindable, Triggerer +interface Slate extends Component, JavaScriptBindable, Triggerer, HasHelpTopics { /** * Get the name of this slate diff --git a/components/ILIAS/UI/src/Implementation/Component/MainControls/Renderer.php b/components/ILIAS/UI/src/Implementation/Component/MainControls/Renderer.php index a3f062776162..77e63acc9acd 100755 --- a/components/ILIAS/UI/src/Implementation/Component/MainControls/Renderer.php +++ b/components/ILIAS/UI/src/Implementation/Component/MainControls/Renderer.php @@ -141,7 +141,8 @@ protected function renderMainbarEntry( $trigger_signal = $component->getTriggerSignal($mb_id, $component::ENTRY_ACTION_TRIGGER); $this->trigger_signals[] = $trigger_signal; $button = $f->button()->bulky($entry->getSymbol(), $entry->getName(), '#') - ->withOnClick($trigger_signal); + ->withOnClick($trigger_signal) + ->withHelpTopics(...$entry->getHelpTopics()); } else { //add Links/Buttons as toplevel entries $pos = array_search($k, array_keys($entries)); @@ -360,7 +361,8 @@ protected function renderTriggerButtonsAndSlates( ->withEngagedState($engaged) ->withOnClick($entry_signal) ->appendOnClick($secondary_signal) - ->withAriaRole(IBulky::MENUITEM); + ->withAriaRole(IBulky::MENUITEM) + ->withHelpTopics(...$entry->getHelpTopics()); $slate = $entry; } elseif ($entry instanceof IBulky) { diff --git a/components/ILIAS/UI/src/Implementation/Component/MainControls/Slate/Renderer.php b/components/ILIAS/UI/src/Implementation/Component/MainControls/Slate/Renderer.php index 3b919df26a05..7f59e547dc1b 100755 --- a/components/ILIAS/UI/src/Implementation/Component/MainControls/Slate/Renderer.php +++ b/components/ILIAS/UI/src/Implementation/Component/MainControls/Slate/Renderer.php @@ -60,7 +60,9 @@ protected function getCombinedSlateContents( if ($entry instanceof ISlate\Slate && !$entry instanceof ISlate\Notification) { $trigger_signal = $entry->getToggleSignal(); $triggerer = $f->button()->bulky($entry->getSymbol(), $entry->getName(), '#') - ->withOnClick($trigger_signal); + ->withOnClick($trigger_signal) + ->withHelpTopics(...$entry->getHelpTopics()) + ; $mb_id = $entry->getMainBarTreePosition(); if ($mb_id) { diff --git a/components/ILIAS/UI/src/Implementation/Component/MainControls/Slate/Slate.php b/components/ILIAS/UI/src/Implementation/Component/MainControls/Slate/Slate.php index 082f983b8d59..aef5422bb84f 100755 --- a/components/ILIAS/UI/src/Implementation/Component/MainControls/Slate/Slate.php +++ b/components/ILIAS/UI/src/Implementation/Component/MainControls/Slate/Slate.php @@ -29,12 +29,14 @@ use ILIAS\UI\Implementation\Component\JavaScriptBindable; use ILIAS\UI\Implementation\Component\ReplaceSignal as ReplaceSignalImplementation; use ILIAS\UI\Implementation\Component\Triggerer; +use ILIAS\UI\Implementation\Component\HasHelpTopics; abstract class Slate implements ISlate\Slate { use ComponentHelper; use JavaScriptBindable; use Triggerer; + use HasHelpTopics; // allowed ARIA roles public const MENU = 'menu'; From 2af515efe898fc9aeebc6b9a03cce71f67e620a8 Mon Sep 17 00:00:00 2001 From: Luka Stocker Date: Wed, 11 Dec 2024 13:50:56 +0100 Subject: [PATCH 2/4] IASS: 42932, adjust language variable for 'iass_filter_failed'. https://mantis.ilias.de/view.php?id=42932 --- lang/ilias_de.lang | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lang/ilias_de.lang b/lang/ilias_de.lang index 0fcb439a7001..6dec7b21e168 100644 --- a/lang/ilias_de.lang +++ b/lang/ilias_de.lang @@ -10535,7 +10535,7 @@ iass#:#iass_file_required#:#Pflichtangabe Prüfungsblatt iass#:#iass_file_required_info#:#Ein Prüfungsblatt muss hochgeladen werden. iass#:#iass_file_visible_examinee#:#Datei für Teilnehmer sichtbar iass#:#iass_filter_all#:#Alle -iass#:#iass_filter_failed#:#Nur nicht bestanden +iass#:#iass_filter_failed#:#Nur nicht bestandene iass#:#iass_filter_finalized#:#Nur bestandene iass#:#iass_filter_not_finalized#:#Nur nicht abgeschlossene iass#:#iass_filter_not_started#:#Nur nicht bewertete From 9764092f029e12e5ab0ba6f442555c2efdc888c3 Mon Sep 17 00:00:00 2001 From: Luka Stocker Date: Wed, 11 Dec 2024 13:39:58 +0100 Subject: [PATCH 3/4] IASS: 42933, remove duplicated colon from IASS Members GUI. https://mantis.ilias.de/view.php?id=42933 --- ...class.ilIndividualAssessmentMembersTableGUI.php | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/components/ILIAS/IndividualAssessment/classes/class.ilIndividualAssessmentMembersTableGUI.php b/components/ILIAS/IndividualAssessment/classes/class.ilIndividualAssessmentMembersTableGUI.php index 8be2b6ffd4ad..4632c9d1a35a 100755 --- a/components/ILIAS/IndividualAssessment/classes/class.ilIndividualAssessmentMembersTableGUI.php +++ b/components/ILIAS/IndividualAssessment/classes/class.ilIndividualAssessmentMembersTableGUI.php @@ -1,7 +1,5 @@ data = array_filter( $data, - fn ($record) => + fn($record) => $this->iass_access->mayEditMembers() || $this->iass_access->mayGradeUser($record->id()) || $this->iass_access->mayViewUser($record->id()) @@ -155,16 +155,16 @@ protected function getGradedByInformation(?int $graded_by_id): array } if (!ilObjUser::userExists([$graded_by_id])) { - return [$this->txt('iass_graded_by') . ":" => $this->txt("user_deleted")]; + return [$this->txt('iass_graded_by') => $this->txt("user_deleted")]; } $full_name = $this->getFullNameFor($graded_by_id); if (!$this->hasPublicProfile($graded_by_id)) { - return [$this->txt('iass_graded_by') . ":" => $full_name]; + return [$this->txt('iass_graded_by') => $full_name]; } return [ - $this->txt('iass_graded_by') . ":" => $this->getProfileLink($full_name, $graded_by_id) + $this->txt('iass_graded_by') => $this->getProfileLink($full_name, $graded_by_id) ]; } @@ -317,7 +317,7 @@ protected function getGradedInformation(?DateTimeImmutable $event_time): array return []; } $event_time_str = $this->date_formatter->format($this->current_user, $event_time, true); - return [$this->txt("iass_event_time") . ": " => $event_time_str]; + return [$this->txt("iass_event_time") => $event_time_str]; } /** From 2c0fbc4f0295157fe91da7c05074564687542200 Mon Sep 17 00:00:00 2001 From: tbongers-cat Date: Tue, 17 Dec 2024 09:54:51 +0100 Subject: [PATCH 4/4] Setup: Change documentation for objectives and migrations --- components/ILIAS/Setup/README.md | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/components/ILIAS/Setup/README.md b/components/ILIAS/Setup/README.md index 203503f4dfdb..fecdde1e99d6 100755 --- a/components/ILIAS/Setup/README.md +++ b/components/ILIAS/Setup/README.md @@ -95,6 +95,11 @@ not have any preconditions. These can be achieved, which prepares the environmen for other objectives to be achievable, until all objectives are achieved and the setup is completed. +[`DBUpdateSteps`](components/ILIAS/Database/interfaces/Setup/interface.ilDatabaseUpdateSteps.php) +are a special type of `Objective`. Their purpose is to change the database **structure** +to a desired state, i.e. adding fields or changing field types. To change database +**contents**, you can use `Migrations`. + ### On Migration @@ -102,7 +107,8 @@ Sometimes an update of an installation requires more work than simply downloadin fresh code and updating the database schema. When, e.g., the certificates where moved to a new persistant storage model, a lot of data needed to be shuffled around. This operation would potentially take a lot of time and thus was offloaded to be -triggered by single users. +triggered by single users. A `Migration` is the right tool for this case, as its +purpose is to change the database **contents** to a desired state. The setup offers functionality for components to encapsulate these kind of operations to allow administrators to monitor and also run them in a principled way. `Agent`s @@ -115,6 +121,13 @@ These steps can then be triggered via the CLI and also be monitored there. It is possible, that there are also other means to trigger the steps, such as an interaction by the user. The first user of the migrations is the [`FileObject`](components/ILIAS/File/classes/Setup/class.ilFileObjectToStorageMigration.php). +Please keep in mind that a `Migration` should only have to be executed **once** to +change existing data, which means that in parallel the code should be adapted so +that any new content is already stored in the "new" state. Besides that, the code +should also be able to handle date in the "old" state, as the `Migration` might +still be running while the system is already active. These code parts can then +safely be removed alongside the `Migration` itself with the next major version. + ### On Artifact