Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ protected function isRelevantLso(ilObjLearningSequence $obj): bool

public function getBlockType(): string
{
return 'pdlern';
return 'dash_ls';
}

public function confirmedRemove(array $ids): void
Expand All @@ -130,9 +130,4 @@ public function removeMultipleEnabled(): bool
{
return true;
}

public function getRemoveMultipleActionText(): string
{
return $this->lng->txt('pd_unsubscribe_multiple_memberships');
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -109,17 +109,7 @@ protected function getVisibleOnPDMode(): string

public function getBlockType(): string
{
return 'pdprg';
}

public function removeMultipleEnabled(): bool
{
return false;
}

public function getRemoveMultipleActionText(): string
{
return '';
return 'dash_sp';
}

protected function maybeGetCertificateLink(int $usr_id, int $prg_obj_id, int $prg_ref_id): ?string
Expand Down
26 changes: 10 additions & 16 deletions Services/Dashboard/Block/classes/class.ilDashboardBlockGUI.php
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,6 @@ public function getViewSettings(): ilPDSelectedItemsBlockViewSettings
public function init(): void
{
$this->lng->loadLanguageModule('dash');
$this->lng->loadLanguageModule('rep');
$this->lng->loadLanguageModule('pd');
$this->initViewSettings();
$this->viewSettings->parse();
Expand Down Expand Up @@ -384,7 +383,7 @@ public function addCommandActions(): void
if ($this->removeMultipleEnabled()) {
$this->addBlockCommand(
$this->ctrl->getLinkTarget($this, 'manage'),
$this->getRemoveMultipleActionText(),
$this->lng->txt('dash_' . $this->getBlockType() . '_remove_multiple'),
'',
$this->getRemoveModal()
);
Expand All @@ -395,27 +394,21 @@ public function getRemoveModal(): RoundTrip
{
$items = $this->getManageFields();
if ($items !== []) {
if ($this->viewSettings->isSelectedItemsViewActive()) {
$question = $this->lng->txt('dash_info_sure_remove_from_favs');
} else {
$this->lng->loadLanguageModule('mmbr');
$question = $this->lng->txt('mmbr_info_delete_sure_unsubscribe');
}
$modal = $this->ui->factory()->modal()->roundtrip(
$this->getRemoveMultipleActionText(),
$this->lng->txt('dash_' . $this->getBlockType() . '_remove_multiple'),
[
$this->ui->factory()->messageBox()->confirmation($question),
$this->ui->factory()->messageBox()->confirmation($this->lng->txt('dash_' . $this->getBlockType() . '_remove_info')),
$this->ui->factory()->messageBox()->info($this->lng->txt('select_one')),
],
$items,
$this->ctrl->getLinkTargetByClass([ilDashboardGUI::class, $this::class], 'confirmedRemove')
)->withSubmitLabel($this->getRemoveMultipleActionText());
)->withSubmitLabel($this->lng->txt('dash_' . $this->getBlockType() . '_remove'));

$modal = $modal->withOnLoadCode(fn($id) => "il.Dashboard.confirmModal($id)");
} else {
$modal = $this->ui->factory()->modal()->roundtrip(
$this->getRemoveMultipleActionText(),
$this->ui->factory()->messageBox()->info($this->lng->txt('pd_no_items_to_manage'))
$this->lng->txt('dash_' . $this->getBlockType() . '_remove_multiple'),
$this->ui->factory()->messageBox()->info($this->lng->txt('dash_no_items_to_manage'))
);
}

Expand Down Expand Up @@ -537,9 +530,10 @@ public function removeFromDeskObject(): void
$this->ctrl->redirectByClass(ilDashboardGUI::class, 'show');
}

abstract public function removeMultipleEnabled(): bool;

abstract public function getRemoveMultipleActionText(): string;
public function removeMultipleEnabled(): bool
{
return false;
}

/**
* @param int[] $ids
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ public function initData(): void

public function getBlockType(): string
{
return 'pdmem';
return 'dash_mem';
}

public function confirmedRemove(array $ids): void
Expand Down Expand Up @@ -114,9 +114,4 @@ public function removeMultipleEnabled(): bool
{
return true;
}

public function getRemoveMultipleActionText(): string
{
return $this->lng->txt('pd_unsubscribe_multiple_memberships');
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ public function initData(): void

public function getBlockType(): string
{
return 'pditems';
return 'dash_fav';
}

public function confirmedRemove(array $ids): void
Expand All @@ -101,9 +101,4 @@ public function removeMultipleEnabled(): bool
{
return true;
}

public function getRemoveMultipleActionText(): string
{
return $this->lng->txt('pd_remove_multiple');
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ public function initData(): void

public function getBlockType(): string
{
return 'pdrecc';
return 'dash_rc';
}

public function addCustomCommandsToActionMenu(ilObjectListGUI $itemListGui, int $ref_id): void
Expand All @@ -128,9 +128,4 @@ public function removeMultipleEnabled(): bool
{
return true;
}

public function getRemoveMultipleActionText(): string
{
return $this->lng->txt('pd_remove_multiple');
}
}
19 changes: 13 additions & 6 deletions lang/ilias_de.lang
Original file line number Diff line number Diff line change
Expand Up @@ -8075,6 +8075,18 @@ dash#:#dash_added_to_favs#:#Der Eintrag wurde zu den persönlichen Favoriten hin
dash#:#dash_avail_presentation#:#Verfügbare Präsentationen
dash#:#dash_avail_sortation#:#Verfügbare Sortierungen
dash#:#dash_click_here#:#Hier klicken
dash#:#dash_dash_fav_remove#:#Entfernen
dash#:#dash_dash_fav_remove_info#:#Wollen Sie die folgenden Objekte wirklich aus Ihren Favoriten entfernen?
dash#:#dash_dash_fav_remove_multiple#:#Mehrere Favoriten entfernen
dash#:#dash_dash_ls_remove#:#Mitgliedschaften beenden
dash#:#dash_dash_ls_remove_info#:#Wollen Sie die folgenden Mitgliedschaften für Lernsequenzen wirklich beenden?
dash#:#dash_dash_ls_remove_multiple#:#Mehrere Mitgliedschaften beenden
dash#:#dash_dash_mem_remove#:#Mitgliedschaften beenden
dash#:#dash_dash_mem_remove_info#:#Wollen Sie die folgenden Mitgliedschaften für Kurse und Gruppen wirklich beenden?
dash#:#dash_dash_mem_remove_multiple#:#Mehrere Mitgliedschaften beenden
dash#:#dash_dash_rc_remove#:#Entfernen
dash#:#dash_dash_rc_remove_info#:#Wollen Sie die folgenden Objekte wirklich aus Ihren empfohlenen Inhalten entfernen?
dash#:#dash_dash_rc_remove_multiple#:#Mehrere Inhalte entfernen
dash#:#dash_dashboard#:#Dashboard
dash#:#dash_default_presentation#:#Standardpräsentation
dash#:#dash_default_sortation#:#Standardsortierung
Expand All @@ -8088,14 +8100,14 @@ dash#:#dash_enable_recommended_content#:#Empfohlene Inhalte
dash#:#dash_enable_study_programmes#:#Studienprogramme
dash#:#dash_enable_task#:#To-Dos
dash#:#dash_favourites#:#Favoriten
dash#:#dash_info_sure_remove_from_favs#:#Sollen die folgenden Objekte wirklich aus Ihren Favoriten entfernt werden?
dash#:#dash_item_removed#:#Der Eintrag wurde aus der Liste entfernt.
dash#:#dash_learning_sequences#:#Meine Lernsequenzen
dash#:#dash_list#:#Liste
dash#:#dash_main_panel#:#Hauptbereich
dash#:#dash_make_favourite#:#Zu Favoriten hinzufügen
dash#:#dash_member_main_alt#:#Eine Ansicht der Mitgliedschaften kann auch direkt im Haupmenü eingebunden werden.
dash#:#dash_memberships#:#Meine Kurse und Gruppen
dash#:#dash_no_items_to_manage#:#Keine Objekte zum Entfernen verfügbar.
dash#:#dash_presentation#:#Präsentation
dash#:#dash_recommended_content#:#Empfohlene Inhalte
dash#:#dash_remove_from_list#:#Aus Liste entfernen
Expand Down Expand Up @@ -12490,7 +12502,6 @@ mmbr#:#info_refuse_sure#:#Sind Sie sicher, dass Sie den/die folgenden Benutzer a
mmbr#:#mmbr_awrn_my_groups_courses#:#Meine Kurse und Gruppen
mmbr#:#mmbr_awrn_my_groups_courses_info#:#Alle Mitglieder von Gruppen und Kursen eines Benutzers werden aufgelistet.
mmbr#:#mmbr_btn_mail_selected_users#:#Mail verschicken
mmbr#:#mmbr_info_delete_sure_unsubscribe#:#Wollen Sie wirklich die Mitgliedschaft für die folgenden Kurse und Gruppen beenden?
mmbr#:#mmbr_memberships#:#Mitgliedschaften
mmbr#:#mmbr_selected_users#:#Ausgewählte Teilnehmer
mmbr#:#mmbr_unsubscribed_from_objs#:#Sie wurden von den ausgewählten Objekten abgemeldet.
Expand Down Expand Up @@ -13028,7 +13039,6 @@ pd#:#pd_import_personal_data#:#Persönliche Daten importieren
pd#:#pd_my_memberships_intro#:#Welcome to Your Memberships###12 12 2023 new variable
pd#:#pd_my_memberships_intro2#:#This is your personal space for all courses and groups you participate in. Currently, there aren't any memberships assigned to you. To become a member of a course or group, there are two ways:<br /><ol><li>You can join courses or groups provided that joining them has been allowed by their administrators.</li><li>An administratrator of a course or group can assign a membership to you.</li></ol><br />In any case, the respective objects will appear automatically in this place.###12 12 2023 new variable
pd#:#pd_my_memberships_sort_default#:#Standard-Sortierung
pd#:#pd_no_items_to_manage#:#Keine Objekte zum Entfernen verfügbar.
pd#:#pd_not_dated#:#Nicht datiert
pd#:#pd_ongoing#:#Aktuell
pd#:#pd_personal_items_default_view#:#Standard-Sicht
Expand All @@ -13038,9 +13048,6 @@ pd#:#pd_presentation_mode_tile#:#Kachelansicht
pd#:#pd_private_calendars#:#Private Kalender
pd#:#pd_profile_data#:#Profildaten
pd#:#pd_remove_multi_confirm#:#Die Objekte wurden entfernt.
pd#:#pd_remove_multiple#:#Mehrere Objekte entfernen
pd#:#pd_unsubscribe_memberships#:#Mitgliedschaften beenden
pd#:#pd_unsubscribe_multiple_memberships#:#Mehrere Mitgliedschaften beenden
pd#:#pd_upcoming#:#Bevorstehend
pd#:#pd_view_select_at_least_one#:#Bitte wählen Sie mindestens eine Sicht, entweder 'Ausgewählte Angebote' und/oder 'Kurse und Gruppen'.
pdesk#:#bookmark_moved_ok#:#Bookmark wurde verschoben.
Expand Down
19 changes: 13 additions & 6 deletions lang/ilias_en.lang
Original file line number Diff line number Diff line change
Expand Up @@ -8075,6 +8075,18 @@ dash#:#dash_added_to_favs#:#Recommendation has been added to personal favourites
dash#:#dash_avail_presentation#:#Available Presentations
dash#:#dash_avail_sortation#:#Available Sortations
dash#:#dash_click_here#:#Click here
dash#:#dash_dash_fav_remove#:#Remove
dash#:#dash_dash_fav_remove_info#:#Are you sure you want to remove the following objects from your Favourites?
dash#:#dash_dash_fav_remove_multiple#:#Remove Multiple Favorites
dash#:#dash_dash_ls_remove#:#Unsubscribe
dash#:#dash_dash_ls_remove_info#:#Are you sure you want to unsubscribe from the following learning sequences?
dash#:#dash_dash_ls_remove_multiple#:#Unsubscribe Multiple Learning Sequences
dash#:#dash_dash_mem_remove#:#Unsubscribe
dash#:#dash_dash_mem_remove_info#:#Are you sure you want to unsubscribe from the following courses and groups?
dash#:#dash_dash_mem_remove_multiple#:#Unsubscribe Multiple Courses and Groups
dash#:#dash_dash_rc_remove#:#Remove
dash#:#dash_dash_rc_remove_info#:#Are you sure you want to remove the following objects from your recommended content?
dash#:#dash_dash_rc_remove_multiple#:#Remove Multiple Contents
dash#:#dash_dashboard#:#Dashboard
dash#:#dash_default_presentation#:#Default Presentation
dash#:#dash_default_sortation#:#Default Sortation
Expand All @@ -8088,14 +8100,14 @@ dash#:#dash_enable_recommended_content#:#Recommended Content
dash#:#dash_enable_study_programmes#:#Study Programmes
dash#:#dash_enable_task#:#Tasks
dash#:#dash_favourites#:#Favourites
dash#:#dash_info_sure_remove_from_favs#:#Are you sure you want to remove the following objects from your Favourites?
dash#:#dash_item_removed#:#Recommendation has been removed from the list.
dash#:#dash_learning_sequences#:#My Learning Sequences
dash#:#dash_list#:#List
dash#:#dash_main_panel#:#Main Panel
dash#:#dash_make_favourite#:#Add to Favourites
dash#:#dash_member_main_alt#:#Courses and groups can also be configured as a separate main menu entry.
dash#:#dash_memberships#:#My Courses and Groups
dash#:#dash_no_items_to_manage#:#No items available for removal.
dash#:#dash_presentation#:#Presentation
dash#:#dash_recommended_content#:#Recommended Content
dash#:#dash_remove_from_list#:#Remove from List
Expand Down Expand Up @@ -12490,7 +12502,6 @@ mmbr#:#info_refuse_sure#:#Are you sure you want to refuse the following user(s)?
mmbr#:#mmbr_awrn_my_groups_courses#:#My Groups and Courses
mmbr#:#mmbr_awrn_my_groups_courses_info#:#All members of groups or courses of the current user are listed.
mmbr#:#mmbr_btn_mail_selected_users#:#Send Mail
mmbr#:#mmbr_info_delete_sure_unsubscribe#:#Are you sure you want to unsubscribe from the following objects?
mmbr#:#mmbr_memberships#:#Memberships
mmbr#:#mmbr_selected_users#:#Selected Participants
mmbr#:#mmbr_unsubscribed_from_objs#:#You have been unsubscribed from the selected objects.
Expand Down Expand Up @@ -13028,7 +13039,6 @@ pd#:#pd_import_personal_data#:#Import Personal Data
pd#:#pd_my_memberships_intro#:#Welcome to Your Memberships
pd#:#pd_my_memberships_intro2#:#This is your personal space for all courses and groups you participate in. Currently, there aren't any memberships assigned to you. To become a member of a course or group, there are two ways:<br /><ol><li>You can join courses or groups provided that joining them has been allowed by their administrators.</li><li>An administratrator of a course or group can assign a membership to you.</li></ol><br />In any case, the respective objects will appear automatically in this place.
pd#:#pd_my_memberships_sort_default#:#Default of Sort Option
pd#:#pd_no_items_to_manage#:#No items available for removal.
pd#:#pd_not_dated#:#Not Dated
pd#:#pd_ongoing#:#Ongoing
pd#:#pd_personal_items_default_view#:#Default View
Expand All @@ -13038,9 +13048,6 @@ pd#:#pd_presentation_mode_tile#:#Tile Presentation
pd#:#pd_private_calendars#:#Private Calendars
pd#:#pd_profile_data#:#Profile Data
pd#:#pd_remove_multi_confirm#:#The objects were removed.
pd#:#pd_remove_multiple#:#Remove Multiple Objects
pd#:#pd_unsubscribe_memberships#:#Unsubscribe
pd#:#pd_unsubscribe_multiple_memberships#:#Unsubscribe Multiple
pd#:#pd_upcoming#:#Upcoming
pd#:#pd_view_select_at_least_one#:#You have to select at least one view, either ‘Selected Items’ and/or ‘My Memberships’.
pdesk#:#bookmark_moved_ok#:#Bookmark has been moved.
Expand Down