Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/trunk' into trunk
Browse files Browse the repository at this point in the history
  • Loading branch information
mjansenDatabay committed Dec 17, 2024
2 parents a2e5c16 + 2c0fbc4 commit 8e3351a
Show file tree
Hide file tree
Showing 7 changed files with 33 additions and 13 deletions.
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
<?php

declare(strict_types=1);

/**
* This file is part of ILIAS, a powerful learning management system
* published by ILIAS open source e-Learning e.V.
Expand All @@ -18,6 +16,8 @@
*
*********************************************************************/

declare(strict_types=1);

use ILIAS\UI\Factory;
use ILIAS\UI\Renderer;
use ILIAS\UI\Component\Table\PresentationRow;
Expand Down Expand Up @@ -67,7 +67,7 @@ public function setData(array $data): void
{
$this->data = array_filter(
$data,
fn ($record) =>
fn($record) =>
$this->iass_access->mayEditMembers()
|| $this->iass_access->mayGradeUser($record->id())
|| $this->iass_access->mayViewUser($record->id())
Expand Down Expand Up @@ -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)
];
}

Expand Down Expand Up @@ -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];
}

/**
Expand Down
15 changes: 14 additions & 1 deletion components/ILIAS/Setup/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -95,14 +95,20 @@ 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

Sometimes an update of an installation requires more work than simply downloading
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
Expand All @@ -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

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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));
Expand Down Expand Up @@ -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) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down
2 changes: 1 addition & 1 deletion lang/ilias_de.lang
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 8e3351a

Please sign in to comment.