From eed538be988729dce2549025b89a56bf5f3f81eb Mon Sep 17 00:00:00 2001 From: nmatuschek Date: Wed, 7 Aug 2024 12:52:27 +0200 Subject: [PATCH 01/45] Feature: Design Logout Page --- .../LogoutPageLanguagesOverviewTable.php | 227 ++++++++++ .../class.ilAuthLogoutPageEditorGUI.php | 417 ++++++++++++++++++ .../class.ilAuthLogoutPageEditorSettings.php | 123 ++++++ .../classes/class.ilLogoutPage.php | 27 ++ .../classes/class.ilLogoutPageConfig.php | 30 ++ .../classes/class.ilLogoutPageGUI.php | 32 ++ .../classes/class.ilObjAuthSettingsGUI.php | 17 + components/ILIAS/Authentication/service.xml | 1 + .../ILIAS/Init/classes/class.ilStartUpGUI.php | 29 ++ .../Init/templates/default/tpl.logout.html | 19 +- lang/ilias_de.lang | 3 + lang/ilias_en.lang | 3 + 12 files changed, 920 insertions(+), 8 deletions(-) create mode 100644 components/ILIAS/Authentication/classes/LogoutPage/LogoutPageLanguagesOverviewTable.php create mode 100644 components/ILIAS/Authentication/classes/class.ilAuthLogoutPageEditorGUI.php create mode 100644 components/ILIAS/Authentication/classes/class.ilAuthLogoutPageEditorSettings.php create mode 100644 components/ILIAS/Authentication/classes/class.ilLogoutPage.php create mode 100644 components/ILIAS/Authentication/classes/class.ilLogoutPageConfig.php create mode 100644 components/ILIAS/Authentication/classes/class.ilLogoutPageGUI.php diff --git a/components/ILIAS/Authentication/classes/LogoutPage/LogoutPageLanguagesOverviewTable.php b/components/ILIAS/Authentication/classes/LogoutPage/LogoutPageLanguagesOverviewTable.php new file mode 100644 index 000000000000..1aa82bf3b5c6 --- /dev/null +++ b/components/ILIAS/Authentication/classes/LogoutPage/LogoutPageLanguagesOverviewTable.php @@ -0,0 +1,227 @@ +>|null + */ + private ?array $records = null; + + public function __construct( + private readonly ilCtrl $ctrl, + private readonly ilLanguage $lng, + \ILIAS\HTTP\Services $http, + private readonly \ILIAS\UI\Factory $ui_factory, + private readonly \ILIAS\UI\Renderer $ui_renderer + ) { + $this->request = $http->request(); + $this->data_factory = new Data\Factory(); + } + + public function getComponent(): UI\Component\Table\Data + { + $columns = $this->getColumns(); + $actions = $this->getActions(); + + return $this->ui_factory + ->table() + ->data($this->lng->txt('logout_pages'), $columns, $this) + ->withActions($actions) + ->withRequest($this->request); + } + + /** + * @return array + */ + private function getColumns(): array + { + return [ + 'language' => $this->ui_factory + ->table() + ->column() + ->text($this->lng->txt('logout_page')) + ->withIsSortable(false), + 'status_icon' => $this->ui_factory + ->table() + ->column() + ->text($this->lng->txt('active')) + ->withIsSortable(false) + ]; + } + + /** + * @return array + */ + protected function getActions(): array + { + $query_params_namespace = ['logoutpage', 'languages']; + + $overview_uri = $this->data_factory->uri( + ILIAS_HTTP_PATH . '/' . $this->ctrl->getLinkTargetByClass( + \ilAuthLogoutPageEditorGUI::class, + 'handleLogoutPageActions' + ) + ); + + $overview_url_builder = new UI\URLBuilder($overview_uri); + [ + $overview_url_builder, + $overview_action_parameter, + $overview_row_id + ] = $overview_url_builder->acquireParameters( + $query_params_namespace, + 'action', + 'key' + ); + + return [ + 'edit' => $this->ui_factory->table()->action()->single( + $this->lng->txt('edit'), + $overview_url_builder->withParameter($overview_action_parameter, 'edit'), + $overview_row_id + ), + 'activate' => $this->ui_factory->table()->action()->standard( + $this->lng->txt('page_design_activate'), + $overview_url_builder->withParameter($overview_action_parameter, 'activate'), + $overview_row_id + ), + 'deactivate' => $this->ui_factory->table()->action()->standard( + $this->lng->txt('page_design_deactivate'), + $overview_url_builder->withParameter($overview_action_parameter, 'deactivate'), + $overview_row_id + ) + ]; + } + + private function initRecords(): void + { + if ($this->records === null) { + $this->records = []; + $i = 0; + $entries = $this->lng->getInstalledLanguages(); + foreach ($entries as $langkey) { + $this->records[$i]['key'] = $langkey; + $this->records[$i]['id'] = ilLanguage::lookupId($langkey); + $status = ilAuthLogoutPageEditorSettings::getInstance()->isIliasEditorEnabled( + $langkey + ); + + $this->records[$i]['status_icon'] = $this->getStatusIcon($status); + $this->records[$i]['status'] = $status; + $this->records[$i]['language'] = $this->lng->txt('meta_l_' . $langkey); + + ++$i; + } + } + } + + private function getStatusIcon(bool $status): string + { + if ($status) { + $icon = $this->ui_renderer->render( + $this->ui_factory->symbol()->icon()->custom( + \ilUtil::getImagePath('standard/icon_ok.svg'), + $this->lng->txt('active') + ) + ); + } else { + $icon = $this->ui_renderer->render( + $this->ui_factory->symbol()->icon()->custom( + \ilUtil::getImagePath('standard/icon_not_ok.svg'), + $this->lng->txt('inactive') + ) + ); + } + + return $icon; + } + + public function getRows( + UI\Component\Table\DataRowBuilder $row_builder, + array $visible_column_ids, + Data\Range $range, + Data\Order $order, + ?array $filter_data, + ?array $additional_parameters + ): \Generator { + $records = $this->getRecords($range, $order); + + foreach ($records as $record) { + $row_id = (string) $record['key']; + $deactivate_action = (bool) $record['status'] == true ? 'activate' : 'deactivate'; + yield $row_builder->buildDataRow($row_id, $record)->withDisabledAction($deactivate_action); + } + } + + public function getTotalRowCount( + ?array $filter_data, + ?array $additional_parameters + ): ?int { + $this->initRecords(); + + return count($this->records); + } + + /** + * @return list> + */ + private function sortedRecords(Data\Order $order): array + { + $records = $this->records; + [$order_field, $order_direction] = $order->join([], fn($ret, $key, $value) => [$key, $value]); + + return ilArrayUtil::stableSortArray($records, $order_field, strtolower($order_direction)); + } + + /** + * @return list> + */ + private function getRecords(Data\Range $range, Data\Order $order): array + { + $this->initRecords(); + + $records = $this->sortedRecords($order); + + return $this->limitRecords($records, $range); + } + + /** + * @param list> $records + * @return list> + */ + private function limitRecords(array $records, Data\Range $range): array + { + return array_slice($records, $range->getStart(), $range->getLength()); + } +} \ No newline at end of file diff --git a/components/ILIAS/Authentication/classes/class.ilAuthLogoutPageEditorGUI.php b/components/ILIAS/Authentication/classes/class.ilAuthLogoutPageEditorGUI.php new file mode 100644 index 000000000000..63499999633b --- /dev/null +++ b/components/ILIAS/Authentication/classes/class.ilAuthLogoutPageEditorGUI.php @@ -0,0 +1,417 @@ +ctrl = $DIC->ctrl(); + $this->tpl = $DIC->ui()->mainTemplate(); + $this->tabs = $DIC->tabs(); + $this->toolbar = $DIC->toolbar(); + $this->rbacsystem = $DIC->rbac()->system(); + $this->setting = $DIC->settings(); + $this->ilErr = $DIC['ilErr']; + + $this->http = $DIC->http(); + $this->refinery = $DIC->refinery(); + $this->ui_factory = $DIC->ui()->factory(); + $this->ui_renderer = $DIC->ui()->renderer(); + + $this->lng = $DIC['lng']; + + $this->lng->loadLanguageModule('auth'); + $this->ref_id = $a_ref_id; + + $this->settings = ilAuthLogoutPageEditorSettings::getInstance(); + $this->content_style_domain = $DIC->contentStyle() + ->domain() + ->styleForRefId($a_ref_id); + + $query_wrapper = $DIC->http()->wrapper()->query(); + $post_wrapper = $DIC->http()->wrapper()->post(); + $is_post_request = $DIC->http()->request()->getMethod() === "POST"; + $refinery = $DIC->refinery(); + + if ($query_wrapper->has("redirectSource")) { + $this->redirect_source = $query_wrapper->retrieve("redirectSource", $refinery->kindlyTo()->string()); + } + + if ($post_wrapper->has("key")) { + $this->key = $post_wrapper->retrieve("key", $refinery->kindlyTo()->int()); + } elseif ($query_wrapper->has("key")) { + $this->key = $query_wrapper->retrieve("key", $refinery->kindlyTo()->int()); + } + + if ($is_post_request) { + if ($post_wrapper->has("visible_languages")) { + $this->visible_languages = $post_wrapper->retrieve( + "visible_languages", $refinery->kindlyTo()->listOf($refinery->kindlyTo()->string()) + ); + } + + if ($post_wrapper->has("languages")) { + $this->languages = $post_wrapper->retrieve( + "languages", $refinery->kindlyTo()->listOf($refinery->kindlyTo()->string()) + ); + } + } + } + + public function getSettings(): ilAuthLogoutPageEditorSettings + { + return $this->settings; + } + + public function getRefId(): int + { + return $this->ref_id; + } + + /** + * ilCtrl execute command + */ + public function executeCommand(): void + { + switch ($this->ctrl->getNextClass($this)) { + case 'illogoutpagegui': + $this->tabs->clearTargets(); + $this->tabs->setBackTarget( + $this->lng->txt('back'), + $this->ctrl->getLinkTarget($this, 'show'), + '_top' + ); + + if ($this->redirect_source !== 'ilinternallinkgui') { + $this->forwardToPageObject(); + } + break; + + default: + if (!$cmd = $this->ctrl->getCmd()) { + $cmd = 'show'; + } + $this->$cmd(); + break; + } + } + + /** + * Forward to page editor + */ + protected function forwardToPageObject(): void + { + $keys = $this->http->wrapper()->query()->retrieve( + 'logoutpage_languages_key', + $this->refinery->byTrying([ + $this->refinery->kindlyTo()->listOf($this->refinery->kindlyTo()->string()), + $this->refinery->always([]) + ]) + ); + + $this->key = ilLanguage::lookupId(current($keys)); + + $this->ctrl->saveParameter($this, 'key'); + + $this->lng->loadLanguageModule('content'); + + if (!ilLogoutPage::_exists('aout', $this->key)) { + // doesn't exist -> create new one + $new_page_object = new ilLogoutPage(); + $new_page_object->setParentId($this->key); + $new_page_object->setId($this->key); + $new_page_object->createFromXML(); + } + + $this->tpl->addCss(ilObjStyleSheet::getContentStylePath(0)); + $this->tpl->addCss(ilObjStyleSheet::getSyntaxStylePath()); + + $this->ctrl->setReturnByClass('illogoutpagegui', 'edit'); + $page_gui = new ilLogoutPageGUI($this->key); + + $page_gui->setTemplateTargetVar('ADM_CONTENT'); + + $page_gui->setStyleId($this->content_style_domain->getEffectiveStyleId()); + $page_gui->setTemplateOutput(false); + + $html = $this->ctrl->forwardCommand($page_gui); + + if ($html !== "") { + $this->tpl->setContent($html); + } + } + + /** + * Show current activated editor + */ + protected function show(): void + { + switch ($this->getSettings()->getMode()) { + case ilAuthLogoutPageEditorSettings::MODE_IPE: + default: + $this->showIliasEditor(); + break; + } + } + + private function handleLogoutPageActions(): void + { + $action = $this->http->wrapper()->query()->retrieve( + 'logoutpage_languages_action', + $this->refinery->byTrying([ + $this->refinery->kindlyTo()->string(), + $this->refinery->always('') + ]) + ); + + $keys = $this->http->wrapper()->query()->retrieve( + 'logoutpage_languages_key', + $this->refinery->byTrying([ + $this->refinery->kindlyTo()->listOf($this->refinery->kindlyTo()->string()), + $this->refinery->always([]) + ]) + ); + + switch ($action) { + case 'deactivate': + $this->deactivate(); + break; + case 'activate': + $this->activate(); + break; + case 'edit': + $this->ctrl->setParameter($this, 'logoutpage_languages_key', current($keys)); + $this->ctrl->setParameter($this, 'key', ilLanguage::lookupId(current($keys))); + $this->ctrl->redirectByClass('ilLogoutPageGUI', 'edit'); + break; + default: + $this->ctrl->redirect($this, 'show'); + break; + } + } + + private function getLangKeysToUpdate(): array + { + $keys = $this->http->wrapper()->query()->retrieve( + 'logoutpage_languages_key', + $this->refinery->byTrying([ + $this->refinery->kindlyTo()->listOf($this->refinery->kindlyTo()->string()), + $this->refinery->always([]) + ]) + ); + + $lang_keys = $this->lng->getInstalledLanguages(); + + if (!((string) current($keys) == 'ALL_OBJECTS')) { + $lang_keys = array_intersect($keys, $lang_keys); + } + + return $lang_keys; + } + + protected function activate(): void + { + $lang_keys = $this->getLangKeysToUpdate(); + $settings = ilAuthLogoutPageEditorSettings::getInstance(); + + foreach ($lang_keys as $lang_key) { + $settings->enableIliasEditor($lang_key, true); + } + + $settings->update(); + + $this->tpl->setOnScreenMessage('success', $this->lng->txt('settings_saved'), true); + $this->ctrl->redirect($this, 'show'); + } + + protected function deactivate(): void + { + $lang_keys = $this->getLangKeysToUpdate(); + $settings = ilAuthLogoutPageEditorSettings::getInstance(); + + foreach ($lang_keys as $lang_key) { + $settings->enableIliasEditor($lang_key, false); + } + + $settings->update(); + + $this->tpl->setOnScreenMessage('success', $this->lng->txt('settings_saved'), true); + $this->ctrl->redirect($this, 'show'); + } + + /** + * Show ILIAS page editor summary. + */ + protected function showIliasEditor(): void + { + $tbl = new \ILIAS\Authentication\LogoutPage\LogoutPageLanguagesOverviewTable( + $this->ctrl, + $this->lng, + $this->http, + $this->ui_factory, + $this->ui_renderer + ); + + $this->tpl->setContent($this->ui_renderer->render($tbl->getComponent())); + } + + protected function saveLogoutInfo(): void + { + if (!$this->rbacsystem->checkAccess("write", $this->getRefId())) { + $this->ilErr->raiseError($this->lng->txt("permission_denied"), $this->ilErr->MESSAGE); + } + + $this->initLogoutForm(); + if ($this->form->checkInput()) { + $this->logoutSettings = new ilSetting("logout_settings"); + foreach ($this->lng->getInstalledLanguages() as $lang_key) { + $settingKey = "logout_message_" . $lang_key; + if ($this->form->getInput($settingKey)) { + $this->logoutSettings->set($settingKey, $this->form->getInput($settingKey)); + } + } + + if ($this->form->getInput('default_auth_mode')) { + $this->setting->set('default_auth_mode', $this->form->getInput('default_auth_mode')); + } + + $this->tpl->setOnScreenMessage('success', $this->lng->txt("logout_information_settings_saved"), true); + } + + $this->ctrl->redirect($this, 'show'); + } + + /** + * Init logout form + */ + protected function initLogoutForm(): void + { + $this->form = new ilPropertyFormGUI(); + $this->form->setFormAction($this->ctrl->getFormAction($this, 'saveLogoutInfo')); + $this->form->setTableWidth('80%'); + $this->form->setTitle($this->lng->txt('logout_information')); + + $this->form->addCommandButton('saveLogoutInfo', $this->lng->txt('save')); + + if (!is_object($this->logoutSettings)) { + $this->logoutSettings = new ilSetting("logout_settings"); + } + + $logout_settings = $this->logoutSettings->getAll(); + $languages = $this->lng->getInstalledLanguages(); + $def_language = $this->lng->getDefaultLanguage(); + + foreach ($this->setDefLangFirst($def_language, $languages) as $lang_key) { + $add = ""; + if ($lang_key === $def_language) { + $add = " (" . $this->lng->txt("default") . ")"; + } + + $textarea = new ilTextAreaInputGUI( + $this->lng->txt("meta_l_" . $lang_key) . $add, + 'logout_message_' . $lang_key + ); + + $textarea->setRows(10); + $msg_logout_lang = "logout_message_" . $lang_key; + + if (isset($logout_settings[$msg_logout_lang])) { + $textarea->setValue($logout_settings[$msg_logout_lang]); + } + + $this->form->addItem($textarea); + + unset($logout_settings["logout_message_" . $lang_key]); + } + + foreach ($logout_settings as $key => $message) { + $lang_key = substr($key, strrpos($key, "_") + 1, strlen($key) - strrpos($key, "_")); + + $textarea = new ilTextAreaInputGUI( + $this->lng->txt("meta_l_" . $lang_key), + 'logout_message_' . $lang_key + ); + + $textarea->setRows(10); + $textarea->setValue($message); + + if (!in_array($lang_key, $languages, true)) { + $textarea->setAlert($this->lng->txt("not_installed")); + } + + $this->form->addItem($textarea); + } + } + + /** + * returns an array of all installed languages, default language at the first position + * @param string $a_def_language Default language of the current installation + * @param array $a_languages Array of all installed languages + * @return array $languages Array of the installed languages, default language at first position or + * an empty array, if $a_a_def_language is empty + * @author Michael Jansen + */ + private function setDefLangFirst(string $a_def_language, array $a_languages): array + { + $languages = []; + if ($a_def_language !== "") { + $languages[] = $a_def_language; + + foreach ($a_languages as $val) { + if (!in_array($val, $languages, true)) { + $languages[] = $val; + } + } + } + + return $languages; + } +} diff --git a/components/ILIAS/Authentication/classes/class.ilAuthLogoutPageEditorSettings.php b/components/ILIAS/Authentication/classes/class.ilAuthLogoutPageEditorSettings.php new file mode 100644 index 000000000000..470a3c7c86a2 --- /dev/null +++ b/components/ILIAS/Authentication/classes/class.ilAuthLogoutPageEditorSettings.php @@ -0,0 +1,123 @@ +lng = $DIC->language(); + + $this->storage = new ilSetting('logout_editor'); + $this->read(); + } + + public static function getInstance(): ilAuthLogoutPageEditorSettings + { + if (self::$instance) { + return self::$instance; + } + return self::$instance = new ilAuthLogoutPageEditorSettings(); + } + + protected function getStorage(): ilSetting + { + return $this->storage; + } + + public function setMode(int $a_mode): void + { + $this->mode = $a_mode; + } + + public function getMode(): int + { + return $this->mode; + } + + /** + * Get ilias editor language + * @param string $a_langkey + * @return string + */ + public function getIliasEditorLanguage(string $a_langkey): string + { + if ($this->isIliasEditorEnabled($a_langkey)) { + return $a_langkey; + } + if ($this->isIliasEditorEnabled($this->lng->getDefaultLanguage())) { + return $this->lng->getDefaultLanguage(); + } + return ''; + } + + /** + * Enable editor for language + */ + public function enableIliasEditor(string $a_langkey, bool $a_status): void + { + $this->languages[$a_langkey] = $a_status; + } + + /** + * Check if ilias editor is enabled for a language + */ + public function isIliasEditorEnabled(string $a_langkey): bool + { + return $this->languages[$a_langkey] ?? false; + } + + /** + * Update settings + */ + public function update(): void + { + $this->getStorage()->set('mode', (string) $this->getMode()); + + foreach ($this->languages as $lngkey => $stat) { + $this->storage->set($lngkey, (string) $stat); + } + } + + /** + * Read settings + */ + public function read(): void + { + $this->setMode((int) $this->getStorage()->get('mode', (string) self::MODE_IPE)); + + // Language settings + $this->languages = []; + foreach ($this->lng->getInstalledLanguages() as $lngkey) { + $this->enableIliasEditor($lngkey, (bool) $this->getStorage()->get($lngkey, "")); + } + } +} diff --git a/components/ILIAS/Authentication/classes/class.ilLogoutPage.php b/components/ILIAS/Authentication/classes/class.ilLogoutPage.php new file mode 100644 index 000000000000..832825cda7ff --- /dev/null +++ b/components/ILIAS/Authentication/classes/class.ilLogoutPage.php @@ -0,0 +1,27 @@ +setEnablePCType('LogouPageElement', true); + $this->setEnablePCType('FileList', false); + $this->setEnablePCType('Map', false); + $this->setEnableInternalLinks(true); + } +} diff --git a/components/ILIAS/Authentication/classes/class.ilLogoutPageGUI.php b/components/ILIAS/Authentication/classes/class.ilLogoutPageGUI.php new file mode 100644 index 000000000000..061bfe7856a9 --- /dev/null +++ b/components/ILIAS/Authentication/classes/class.ilLogoutPageGUI.php @@ -0,0 +1,32 @@ +ctrl->forwardCommand($lpe); break; + case 'ilauthlogoutpageeditorgui': + + $this->setSubTabs("authSettings"); + $this->tabs_gui->setTabActive('authentication_settings'); + $this->tabs_gui->setSubTabActive("logout_editor"); + + $lpe = new ilAuthLogoutPageEditorGUI($this->object->getRefId()); + $this->ctrl->forwardCommand($lpe); + break; + default: if (!$cmd) { $cmd = "authSettings"; @@ -969,6 +979,13 @@ public function setSubTabs(string $a_tab): void '' ); } + if ($this->access->checkAccess('write', '', $this->object->getRefId())) { + $this->tabs_gui->addSubTabTarget( + 'logout_editor', + $this->ctrl->getLinkTargetByClass(ilAuthLogoutPageEditorGUI::class, ''), + '' + ); + } } } diff --git a/components/ILIAS/Authentication/service.xml b/components/ILIAS/Authentication/service.xml index bb5723582b3e..ab8ba0262925 100755 --- a/components/ILIAS/Authentication/service.xml +++ b/components/ILIAS/Authentication/service.xml @@ -17,6 +17,7 @@ + diff --git a/components/ILIAS/Init/classes/class.ilStartUpGUI.php b/components/ILIAS/Init/classes/class.ilStartUpGUI.php index 6f9854f6bc60..cd8dab7b1c8c 100755 --- a/components/ILIAS/Init/classes/class.ilStartUpGUI.php +++ b/components/ILIAS/Init/classes/class.ilStartUpGUI.php @@ -28,6 +28,7 @@ /** * @ilCtrl_Calls ilStartUpGUI: ilAccountRegistrationGUI, ilPasswordAssistanceGUI, ilLoginPageGUI, ilDashboardGUI * @ilCtrl_Calls ilStartUpGUI: ilMembershipOverviewGUI, ilDerivedTasksGUI, ilAccessibilityControlConceptGUI + * @ilCtrl_Calls ilStartUpGUI: ilLogoutPageGUI */ class ilStartUpGUI implements ilCtrlBaseClassInterface, ilCtrlSecurityInterface { @@ -958,6 +959,33 @@ private function getLoginPageEditorHTML(): string return $ret; } + private function getLogoutPageEditorHTML(): string + { + $lpe = ilAuthLogoutPageEditorSettings::getInstance(); + $active_lang = $lpe->getIliasEditorLanguage($this->lng->getLangKey()); + + if (!$active_lang) { + return ''; + } + + // if page does not exist, return nothing + if (!ilPageUtil::_existsAndNotEmpty('aout', ilLanguage::lookupId($active_lang))) { + return ''; + } + + // get page object + $page_gui = new ilLogoutPageGUI(ilLanguage::lookupId($active_lang)); + + $page_gui->setStyleId(0); + + $page_gui->setPresentationTitle(''); + $page_gui->setTemplateOutput(false); + $page_gui->setHeader(''); + $ret = $page_gui->showPage(); + + return $ret; + } + private function showRegistrationLinks(string $page_editor_html): string { global $tpl; @@ -1259,6 +1287,7 @@ private function showLogout(): void $tpl->parseCurrentBlock(); } + $tpl->setVariable('LPE', $this->getLogoutPageEditorHTML()); $tpl->setVariable('TXT_PAGEHEADLINE', $this->lng->txt('logout')); $tpl->setVariable( 'TXT_LOGOUT_TEXT', diff --git a/components/ILIAS/Init/templates/default/tpl.logout.html b/components/ILIAS/Init/templates/default/tpl.logout.html index 1fa534ee150b..60f25f282868 100755 --- a/components/ILIAS/Init/templates/default/tpl.logout.html +++ b/components/ILIAS/Init/templates/default/tpl.logout.html @@ -1,10 +1,13 @@ +
+ {LPE} +
-

{TXT_LOGOUT_TEXT}

-

{TXT_LOGIN}  - - {TXT_HOME} - - - {TXT_CLIENT_LIST} - +

{TXT_LOGOUT_TEXT}

+

{TXT_LOGIN}  + + {TXT_HOME} + + + {TXT_CLIENT_LIST} +

diff --git a/lang/ilias_de.lang b/lang/ilias_de.lang index 6fce384518e4..cb36b1c514cb 100755 --- a/lang/ilias_de.lang +++ b/lang/ilias_de.lang @@ -2164,6 +2164,9 @@ auth#:#login_page#:#Sprache der Login-Seite auth#:#login_page_activate#:#Seitengestaltung aktivieren auth#:#login_page_deactivate#:#Seitengestaltung deaktivieren auth#:#login_pages#:#Login-Seiten +auth#:#logout_editor#:#Logout-Seite gestalten +auth#:#logout_page#:#Logout Seite +auth#:#logout_pages#:#Logout Seiten auth#:#lti_consumer_inactive#:#LTI-Tool-Consumer ist deaktivert auth#:#saml_tab_head_idp#:#IDP awrn#:#awareness_now_online#:#Jetzt online diff --git a/lang/ilias_en.lang b/lang/ilias_en.lang index f1eaa9fe7ec0..d9dbd1867110 100755 --- a/lang/ilias_en.lang +++ b/lang/ilias_en.lang @@ -2065,6 +2065,9 @@ auth#:#auth_info_add#:#Choose this option if you have never registered to ILIAS. auth#:#auth_info_migrate#:#If you have already an ILIAS account, enter username and password to migrate your personal data (mail, test results...). auth#:#auth_ldap_server_ds#:#LDAP-Server auth#:#auth_login_editor#:#Loginscreen Editor +auth#:#logout_editor#:#Design Logout Page +auth#:#logout_page#:#Logout Page +auth#:#logout_pages#:#Logout Pages auth#:#auth_oidc#:#OpenID Connect auth#:#auth_oidc_failed#:#Login via OpenID Connect failed auth#:#auth_oidc_login_element_info#:#Login to ILIAS via OpenID Connect From a70a1c0ef6b8d7f812b867d75beac76d0506f4b3 Mon Sep 17 00:00:00 2001 From: nmatuschek Date: Wed, 7 Aug 2024 12:59:32 +0200 Subject: [PATCH 02/45] cs fixer --- .../classes/LogoutPage/LogoutPageLanguagesOverviewTable.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/ILIAS/Authentication/classes/LogoutPage/LogoutPageLanguagesOverviewTable.php b/components/ILIAS/Authentication/classes/LogoutPage/LogoutPageLanguagesOverviewTable.php index 1aa82bf3b5c6..fc68f41cb40b 100644 --- a/components/ILIAS/Authentication/classes/LogoutPage/LogoutPageLanguagesOverviewTable.php +++ b/components/ILIAS/Authentication/classes/LogoutPage/LogoutPageLanguagesOverviewTable.php @@ -224,4 +224,4 @@ private function limitRecords(array $records, Data\Range $range): array { return array_slice($records, $range->getStart(), $range->getLength()); } -} \ No newline at end of file +} From 939a58a76576ef2eacce3bf8e22bbb3e2877bf33 Mon Sep 17 00:00:00 2001 From: Nadia Ahmad Date: Thu, 8 Aug 2024 09:30:20 +0200 Subject: [PATCH 03/45] Update components/ILIAS/Authentication/classes/class.ilAuthLogoutPageEditorSettings.php Co-authored-by: Michael Jansen --- .../classes/class.ilAuthLogoutPageEditorSettings.php | 3 --- 1 file changed, 3 deletions(-) diff --git a/components/ILIAS/Authentication/classes/class.ilAuthLogoutPageEditorSettings.php b/components/ILIAS/Authentication/classes/class.ilAuthLogoutPageEditorSettings.php index 470a3c7c86a2..b84d4c9ce21e 100644 --- a/components/ILIAS/Authentication/classes/class.ilAuthLogoutPageEditorSettings.php +++ b/components/ILIAS/Authentication/classes/class.ilAuthLogoutPageEditorSettings.php @@ -107,9 +107,6 @@ public function update(): void } } - /** - * Read settings - */ public function read(): void { $this->setMode((int) $this->getStorage()->get('mode', (string) self::MODE_IPE)); From d837e4fca0bd1acd4843efb88958c3678ed8ea64 Mon Sep 17 00:00:00 2001 From: Nadia Ahmad Date: Thu, 8 Aug 2024 09:30:26 +0200 Subject: [PATCH 04/45] Update components/ILIAS/Authentication/classes/class.ilAuthLogoutPageEditorSettings.php Co-authored-by: Michael Jansen --- .../classes/class.ilAuthLogoutPageEditorSettings.php | 1 - 1 file changed, 1 deletion(-) diff --git a/components/ILIAS/Authentication/classes/class.ilAuthLogoutPageEditorSettings.php b/components/ILIAS/Authentication/classes/class.ilAuthLogoutPageEditorSettings.php index b84d4c9ce21e..1351f6fe75ef 100644 --- a/components/ILIAS/Authentication/classes/class.ilAuthLogoutPageEditorSettings.php +++ b/components/ILIAS/Authentication/classes/class.ilAuthLogoutPageEditorSettings.php @@ -111,7 +111,6 @@ public function read(): void { $this->setMode((int) $this->getStorage()->get('mode', (string) self::MODE_IPE)); - // Language settings $this->languages = []; foreach ($this->lng->getInstalledLanguages() as $lngkey) { $this->enableIliasEditor($lngkey, (bool) $this->getStorage()->get($lngkey, "")); From 0ea9701484f137a0840fedd30244dac4ac95ae13 Mon Sep 17 00:00:00 2001 From: Nadia Ahmad Date: Thu, 8 Aug 2024 09:30:33 +0200 Subject: [PATCH 05/45] Update components/ILIAS/Authentication/classes/class.ilAuthLogoutPageEditorSettings.php Co-authored-by: Michael Jansen --- .../classes/class.ilAuthLogoutPageEditorSettings.php | 3 --- 1 file changed, 3 deletions(-) diff --git a/components/ILIAS/Authentication/classes/class.ilAuthLogoutPageEditorSettings.php b/components/ILIAS/Authentication/classes/class.ilAuthLogoutPageEditorSettings.php index 1351f6fe75ef..178fa6cbfda0 100644 --- a/components/ILIAS/Authentication/classes/class.ilAuthLogoutPageEditorSettings.php +++ b/components/ILIAS/Authentication/classes/class.ilAuthLogoutPageEditorSettings.php @@ -95,9 +95,6 @@ public function isIliasEditorEnabled(string $a_langkey): bool return $this->languages[$a_langkey] ?? false; } - /** - * Update settings - */ public function update(): void { $this->getStorage()->set('mode', (string) $this->getMode()); From 87573f2009c56bda0eac76dee802c3a79d9a3d22 Mon Sep 17 00:00:00 2001 From: Nadia Ahmad Date: Thu, 8 Aug 2024 09:31:03 +0200 Subject: [PATCH 06/45] Update components/ILIAS/Authentication/classes/class.ilAuthLogoutPageEditorSettings.php Co-authored-by: Michael Jansen --- .../classes/class.ilAuthLogoutPageEditorSettings.php | 3 --- 1 file changed, 3 deletions(-) diff --git a/components/ILIAS/Authentication/classes/class.ilAuthLogoutPageEditorSettings.php b/components/ILIAS/Authentication/classes/class.ilAuthLogoutPageEditorSettings.php index 178fa6cbfda0..5a4d4c7658a1 100644 --- a/components/ILIAS/Authentication/classes/class.ilAuthLogoutPageEditorSettings.php +++ b/components/ILIAS/Authentication/classes/class.ilAuthLogoutPageEditorSettings.php @@ -79,9 +79,6 @@ public function getIliasEditorLanguage(string $a_langkey): string return ''; } - /** - * Enable editor for language - */ public function enableIliasEditor(string $a_langkey, bool $a_status): void { $this->languages[$a_langkey] = $a_status; From da259f6066c303f35a5efc8000485cc7b39768a8 Mon Sep 17 00:00:00 2001 From: Nadia Ahmad Date: Thu, 8 Aug 2024 09:31:34 +0200 Subject: [PATCH 07/45] Update components/ILIAS/Authentication/classes/class.ilObjAuthSettingsGUI.php Co-authored-by: Michael Jansen --- .../ILIAS/Authentication/classes/class.ilObjAuthSettingsGUI.php | 1 + 1 file changed, 1 insertion(+) diff --git a/components/ILIAS/Authentication/classes/class.ilObjAuthSettingsGUI.php b/components/ILIAS/Authentication/classes/class.ilObjAuthSettingsGUI.php index 65b66793871a..3af6a8913227 100755 --- a/components/ILIAS/Authentication/classes/class.ilObjAuthSettingsGUI.php +++ b/components/ILIAS/Authentication/classes/class.ilObjAuthSettingsGUI.php @@ -979,6 +979,7 @@ public function setSubTabs(string $a_tab): void '' ); } + if ($this->access->checkAccess('write', '', $this->object->getRefId())) { $this->tabs_gui->addSubTabTarget( 'logout_editor', From c1b87a4351d610a475003b64f08965b6c5c9edd2 Mon Sep 17 00:00:00 2001 From: Nadia Ahmad Date: Thu, 8 Aug 2024 09:31:43 +0200 Subject: [PATCH 08/45] Update components/ILIAS/Authentication/classes/class.ilAuthLogoutPageEditorSettings.php Co-authored-by: Michael Jansen --- .../classes/class.ilAuthLogoutPageEditorSettings.php | 3 --- 1 file changed, 3 deletions(-) diff --git a/components/ILIAS/Authentication/classes/class.ilAuthLogoutPageEditorSettings.php b/components/ILIAS/Authentication/classes/class.ilAuthLogoutPageEditorSettings.php index 5a4d4c7658a1..e79afe47ea98 100644 --- a/components/ILIAS/Authentication/classes/class.ilAuthLogoutPageEditorSettings.php +++ b/components/ILIAS/Authentication/classes/class.ilAuthLogoutPageEditorSettings.php @@ -84,9 +84,6 @@ public function enableIliasEditor(string $a_langkey, bool $a_status): void $this->languages[$a_langkey] = $a_status; } - /** - * Check if ilias editor is enabled for a language - */ public function isIliasEditorEnabled(string $a_langkey): bool { return $this->languages[$a_langkey] ?? false; From a85904e1a0ff10133dcaca480da7dd57cf68d8b0 Mon Sep 17 00:00:00 2001 From: Nadia Ahmad Date: Thu, 8 Aug 2024 09:32:16 +0200 Subject: [PATCH 09/45] Update components/ILIAS/Authentication/classes/class.ilObjAuthSettingsGUI.php Co-authored-by: Michael Jansen --- .../Authentication/classes/class.ilObjAuthSettingsGUI.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/components/ILIAS/Authentication/classes/class.ilObjAuthSettingsGUI.php b/components/ILIAS/Authentication/classes/class.ilObjAuthSettingsGUI.php index 3af6a8913227..77cb42ed7c47 100755 --- a/components/ILIAS/Authentication/classes/class.ilObjAuthSettingsGUI.php +++ b/components/ILIAS/Authentication/classes/class.ilObjAuthSettingsGUI.php @@ -983,8 +983,7 @@ public function setSubTabs(string $a_tab): void if ($this->access->checkAccess('write', '', $this->object->getRefId())) { $this->tabs_gui->addSubTabTarget( 'logout_editor', - $this->ctrl->getLinkTargetByClass(ilAuthLogoutPageEditorGUI::class, ''), - '' + $this->ctrl->getLinkTargetByClass(ilAuthLogoutPageEditorGUI::class) ); } } From 6c94c84fc12b5a065060a5b6f0ee77ddf3028d4a Mon Sep 17 00:00:00 2001 From: Nadia Ahmad Date: Thu, 8 Aug 2024 09:34:01 +0200 Subject: [PATCH 10/45] Update components/ILIAS/Authentication/classes/class.ilAuthLogoutPageEditorGUI.php Co-authored-by: Michael Jansen --- .../Authentication/classes/class.ilAuthLogoutPageEditorGUI.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/ILIAS/Authentication/classes/class.ilAuthLogoutPageEditorGUI.php b/components/ILIAS/Authentication/classes/class.ilAuthLogoutPageEditorGUI.php index 63499999633b..d727a282b0d9 100644 --- a/components/ILIAS/Authentication/classes/class.ilAuthLogoutPageEditorGUI.php +++ b/components/ILIAS/Authentication/classes/class.ilAuthLogoutPageEditorGUI.php @@ -272,7 +272,7 @@ protected function activate(): void $this->ctrl->redirect($this, 'show'); } - protected function deactivate(): void + private function deactivate(): void { $lang_keys = $this->getLangKeysToUpdate(); $settings = ilAuthLogoutPageEditorSettings::getInstance(); From afa8ef8c353853e98187ba582fc538403c490b01 Mon Sep 17 00:00:00 2001 From: Nadia Ahmad Date: Thu, 8 Aug 2024 09:34:23 +0200 Subject: [PATCH 11/45] Update components/ILIAS/Authentication/classes/class.ilAuthLogoutPageEditorSettings.php Co-authored-by: Michael Jansen --- .../classes/class.ilAuthLogoutPageEditorSettings.php | 5 ----- 1 file changed, 5 deletions(-) diff --git a/components/ILIAS/Authentication/classes/class.ilAuthLogoutPageEditorSettings.php b/components/ILIAS/Authentication/classes/class.ilAuthLogoutPageEditorSettings.php index e79afe47ea98..9b7fabf00ae6 100644 --- a/components/ILIAS/Authentication/classes/class.ilAuthLogoutPageEditorSettings.php +++ b/components/ILIAS/Authentication/classes/class.ilAuthLogoutPageEditorSettings.php @@ -63,11 +63,6 @@ public function getMode(): int return $this->mode; } - /** - * Get ilias editor language - * @param string $a_langkey - * @return string - */ public function getIliasEditorLanguage(string $a_langkey): string { if ($this->isIliasEditorEnabled($a_langkey)) { From cd16f4d24d46e81add24af932ad10634a88e7506 Mon Sep 17 00:00:00 2001 From: Nadia Ahmad Date: Thu, 8 Aug 2024 09:34:40 +0200 Subject: [PATCH 12/45] Update components/ILIAS/Authentication/classes/LogoutPage/LogoutPageLanguagesOverviewTable.php Co-authored-by: Michael Jansen --- .../classes/LogoutPage/LogoutPageLanguagesOverviewTable.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/components/ILIAS/Authentication/classes/LogoutPage/LogoutPageLanguagesOverviewTable.php b/components/ILIAS/Authentication/classes/LogoutPage/LogoutPageLanguagesOverviewTable.php index fc68f41cb40b..d7db446927bc 100644 --- a/components/ILIAS/Authentication/classes/LogoutPage/LogoutPageLanguagesOverviewTable.php +++ b/components/ILIAS/Authentication/classes/LogoutPage/LogoutPageLanguagesOverviewTable.php @@ -31,8 +31,8 @@ class LogoutPageLanguagesOverviewTable implements UI\Component\Table\DataRetrieval { - protected ServerRequestInterface $request; - protected Data\Factory $data_factory; + private ServerRequestInterface $request; + private Data\Factory $data_factory; /** * @var list>|null */ From 4b86cca1344a8100095f2973ab591da9a34276d8 Mon Sep 17 00:00:00 2001 From: Nadia Ahmad Date: Thu, 8 Aug 2024 09:35:12 +0200 Subject: [PATCH 13/45] Update components/ILIAS/Init/classes/class.ilStartUpGUI.php Co-authored-by: Michael Jansen --- components/ILIAS/Init/classes/class.ilStartUpGUI.php | 1 - 1 file changed, 1 deletion(-) diff --git a/components/ILIAS/Init/classes/class.ilStartUpGUI.php b/components/ILIAS/Init/classes/class.ilStartUpGUI.php index cd8dab7b1c8c..e64c929f8e0a 100755 --- a/components/ILIAS/Init/classes/class.ilStartUpGUI.php +++ b/components/ILIAS/Init/classes/class.ilStartUpGUI.php @@ -973,7 +973,6 @@ private function getLogoutPageEditorHTML(): string return ''; } - // get page object $page_gui = new ilLogoutPageGUI(ilLanguage::lookupId($active_lang)); $page_gui->setStyleId(0); From fc2288e9ad27d8a74634b103e9f12f6d56ca20cc Mon Sep 17 00:00:00 2001 From: Nadia Ahmad Date: Thu, 8 Aug 2024 09:35:33 +0200 Subject: [PATCH 14/45] Update components/ILIAS/Init/classes/class.ilStartUpGUI.php Co-authored-by: Michael Jansen --- components/ILIAS/Init/classes/class.ilStartUpGUI.php | 1 - 1 file changed, 1 deletion(-) diff --git a/components/ILIAS/Init/classes/class.ilStartUpGUI.php b/components/ILIAS/Init/classes/class.ilStartUpGUI.php index e64c929f8e0a..71b5f40ce424 100755 --- a/components/ILIAS/Init/classes/class.ilStartUpGUI.php +++ b/components/ILIAS/Init/classes/class.ilStartUpGUI.php @@ -968,7 +968,6 @@ private function getLogoutPageEditorHTML(): string return ''; } - // if page does not exist, return nothing if (!ilPageUtil::_existsAndNotEmpty('aout', ilLanguage::lookupId($active_lang))) { return ''; } From c3fcd8b66ac3ce4100dfdcd8cf61e98791e9fb27 Mon Sep 17 00:00:00 2001 From: Nadia Ahmad Date: Thu, 8 Aug 2024 09:35:54 +0200 Subject: [PATCH 15/45] Update components/ILIAS/Authentication/classes/class.ilAuthLogoutPageEditorGUI.php Co-authored-by: Michael Jansen --- .../Authentication/classes/class.ilAuthLogoutPageEditorGUI.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/ILIAS/Authentication/classes/class.ilAuthLogoutPageEditorGUI.php b/components/ILIAS/Authentication/classes/class.ilAuthLogoutPageEditorGUI.php index d727a282b0d9..83702ce29da6 100644 --- a/components/ILIAS/Authentication/classes/class.ilAuthLogoutPageEditorGUI.php +++ b/components/ILIAS/Authentication/classes/class.ilAuthLogoutPageEditorGUI.php @@ -41,7 +41,7 @@ class ilAuthLogoutPageEditorGUI private int $ref_id; private ilAuthLogoutPageEditorSettings $settings; private ?ilSetting $logoutSettings = null; - protected \ILIAS\Style\Content\Object\ObjectFacade $content_style_domain; + private \ILIAS\Style\Content\Object\ObjectFacade $content_style_domain; //variables from requests private ?string $redirect_source = null; From b4c84a5dc7db131c533f9b02e035e5683e6a1796 Mon Sep 17 00:00:00 2001 From: Nadia Ahmad Date: Thu, 8 Aug 2024 09:36:15 +0200 Subject: [PATCH 16/45] Update components/ILIAS/Authentication/classes/class.ilAuthLogoutPageEditorGUI.php Co-authored-by: Michael Jansen --- .../Authentication/classes/class.ilAuthLogoutPageEditorGUI.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/ILIAS/Authentication/classes/class.ilAuthLogoutPageEditorGUI.php b/components/ILIAS/Authentication/classes/class.ilAuthLogoutPageEditorGUI.php index 83702ce29da6..942c4878fb9d 100644 --- a/components/ILIAS/Authentication/classes/class.ilAuthLogoutPageEditorGUI.php +++ b/components/ILIAS/Authentication/classes/class.ilAuthLogoutPageEditorGUI.php @@ -36,7 +36,7 @@ class ilAuthLogoutPageEditorGUI private \ILIAS\HTTP\Services $http; private \ILIAS\Refinery\Factory $refinery; private \ILIAS\UI\Factory $ui_factory; - protected \ILIAS\UI\Renderer $ui_renderer; + private \ILIAS\UI\Renderer $ui_renderer; private int $ref_id; private ilAuthLogoutPageEditorSettings $settings; From 5984b37a2bf8f34b69ae5c7547bf5edc60f4d9b2 Mon Sep 17 00:00:00 2001 From: Nadia Ahmad Date: Thu, 8 Aug 2024 09:36:37 +0200 Subject: [PATCH 17/45] Update components/ILIAS/Authentication/classes/class.ilAuthLogoutPageEditorGUI.php Co-authored-by: Michael Jansen --- .../Authentication/classes/class.ilAuthLogoutPageEditorGUI.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/ILIAS/Authentication/classes/class.ilAuthLogoutPageEditorGUI.php b/components/ILIAS/Authentication/classes/class.ilAuthLogoutPageEditorGUI.php index 942c4878fb9d..03479d195ee8 100644 --- a/components/ILIAS/Authentication/classes/class.ilAuthLogoutPageEditorGUI.php +++ b/components/ILIAS/Authentication/classes/class.ilAuthLogoutPageEditorGUI.php @@ -24,7 +24,7 @@ */ class ilAuthLogoutPageEditorGUI { - private ilCtrl $ctrl; + private ilCtrlInterface $ctrl; private ilLanguage $lng; private ilGlobalTemplateInterface $tpl; private ilTabsGUI $tabs; From 05c4ca55b7c7ca9a74ba149c9fb4df188b68328e Mon Sep 17 00:00:00 2001 From: Nadia Ahmad Date: Thu, 8 Aug 2024 09:36:56 +0200 Subject: [PATCH 18/45] Update components/ILIAS/Authentication/classes/class.ilAuthLogoutPageEditorGUI.php Co-authored-by: Michael Jansen --- .../Authentication/classes/class.ilAuthLogoutPageEditorGUI.php | 1 - 1 file changed, 1 deletion(-) diff --git a/components/ILIAS/Authentication/classes/class.ilAuthLogoutPageEditorGUI.php b/components/ILIAS/Authentication/classes/class.ilAuthLogoutPageEditorGUI.php index 03479d195ee8..fa05010953a6 100644 --- a/components/ILIAS/Authentication/classes/class.ilAuthLogoutPageEditorGUI.php +++ b/components/ILIAS/Authentication/classes/class.ilAuthLogoutPageEditorGUI.php @@ -43,7 +43,6 @@ class ilAuthLogoutPageEditorGUI private ?ilSetting $logoutSettings = null; private \ILIAS\Style\Content\Object\ObjectFacade $content_style_domain; - //variables from requests private ?string $redirect_source = null; private ?int $key = null; private array $visible_languages = []; From cf3bfd5130117bc9e11ab06a9b90f0d4548b9422 Mon Sep 17 00:00:00 2001 From: Nadia Ahmad Date: Thu, 8 Aug 2024 09:37:14 +0200 Subject: [PATCH 19/45] Update components/ILIAS/Authentication/classes/class.ilAuthLogoutPageEditorGUI.php Co-authored-by: Michael Jansen --- .../Authentication/classes/class.ilAuthLogoutPageEditorGUI.php | 3 --- 1 file changed, 3 deletions(-) diff --git a/components/ILIAS/Authentication/classes/class.ilAuthLogoutPageEditorGUI.php b/components/ILIAS/Authentication/classes/class.ilAuthLogoutPageEditorGUI.php index fa05010953a6..6766a0e3f88c 100644 --- a/components/ILIAS/Authentication/classes/class.ilAuthLogoutPageEditorGUI.php +++ b/components/ILIAS/Authentication/classes/class.ilAuthLogoutPageEditorGUI.php @@ -115,9 +115,6 @@ public function getRefId(): int return $this->ref_id; } - /** - * ilCtrl execute command - */ public function executeCommand(): void { switch ($this->ctrl->getNextClass($this)) { From 396139d2a55a7def2c22e145d1d9e3680eea3d27 Mon Sep 17 00:00:00 2001 From: Nadia Ahmad Date: Thu, 8 Aug 2024 09:37:36 +0200 Subject: [PATCH 20/45] Update components/ILIAS/Authentication/classes/class.ilAuthLogoutPageEditorGUI.php Co-authored-by: Michael Jansen --- .../Authentication/classes/class.ilAuthLogoutPageEditorGUI.php | 3 --- 1 file changed, 3 deletions(-) diff --git a/components/ILIAS/Authentication/classes/class.ilAuthLogoutPageEditorGUI.php b/components/ILIAS/Authentication/classes/class.ilAuthLogoutPageEditorGUI.php index 6766a0e3f88c..b73455fafa9c 100644 --- a/components/ILIAS/Authentication/classes/class.ilAuthLogoutPageEditorGUI.php +++ b/components/ILIAS/Authentication/classes/class.ilAuthLogoutPageEditorGUI.php @@ -140,9 +140,6 @@ public function executeCommand(): void } } - /** - * Forward to page editor - */ protected function forwardToPageObject(): void { $keys = $this->http->wrapper()->query()->retrieve( From 53c7ad11c16f8367f19523138ba85958a414c6c3 Mon Sep 17 00:00:00 2001 From: Nadia Ahmad Date: Thu, 8 Aug 2024 09:37:50 +0200 Subject: [PATCH 21/45] Update components/ILIAS/Authentication/classes/class.ilAuthLogoutPageEditorGUI.php Co-authored-by: Michael Jansen --- .../Authentication/classes/class.ilAuthLogoutPageEditorGUI.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/ILIAS/Authentication/classes/class.ilAuthLogoutPageEditorGUI.php b/components/ILIAS/Authentication/classes/class.ilAuthLogoutPageEditorGUI.php index b73455fafa9c..e0c98271450f 100644 --- a/components/ILIAS/Authentication/classes/class.ilAuthLogoutPageEditorGUI.php +++ b/components/ILIAS/Authentication/classes/class.ilAuthLogoutPageEditorGUI.php @@ -185,7 +185,7 @@ protected function forwardToPageObject(): void /** * Show current activated editor */ - protected function show(): void + private function show(): void { switch ($this->getSettings()->getMode()) { case ilAuthLogoutPageEditorSettings::MODE_IPE: From 4726454d08e0b861cf3892c2dd0589f4a3c7a52e Mon Sep 17 00:00:00 2001 From: Nadia Ahmad Date: Thu, 8 Aug 2024 09:38:03 +0200 Subject: [PATCH 22/45] Update components/ILIAS/Authentication/classes/class.ilAuthLogoutPageEditorGUI.php Co-authored-by: Michael Jansen --- .../Authentication/classes/class.ilAuthLogoutPageEditorGUI.php | 3 --- 1 file changed, 3 deletions(-) diff --git a/components/ILIAS/Authentication/classes/class.ilAuthLogoutPageEditorGUI.php b/components/ILIAS/Authentication/classes/class.ilAuthLogoutPageEditorGUI.php index e0c98271450f..8e85d106f626 100644 --- a/components/ILIAS/Authentication/classes/class.ilAuthLogoutPageEditorGUI.php +++ b/components/ILIAS/Authentication/classes/class.ilAuthLogoutPageEditorGUI.php @@ -182,9 +182,6 @@ protected function forwardToPageObject(): void } } - /** - * Show current activated editor - */ private function show(): void { switch ($this->getSettings()->getMode()) { From d5c1bf5faa4c2c6e8202fc23480c76588e9387c2 Mon Sep 17 00:00:00 2001 From: Nadia Ahmad Date: Thu, 8 Aug 2024 09:38:16 +0200 Subject: [PATCH 23/45] Update components/ILIAS/Authentication/classes/class.ilAuthLogoutPageEditorGUI.php Co-authored-by: Michael Jansen --- .../Authentication/classes/class.ilAuthLogoutPageEditorGUI.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/ILIAS/Authentication/classes/class.ilAuthLogoutPageEditorGUI.php b/components/ILIAS/Authentication/classes/class.ilAuthLogoutPageEditorGUI.php index 8e85d106f626..3070de3bcc0f 100644 --- a/components/ILIAS/Authentication/classes/class.ilAuthLogoutPageEditorGUI.php +++ b/components/ILIAS/Authentication/classes/class.ilAuthLogoutPageEditorGUI.php @@ -140,7 +140,7 @@ public function executeCommand(): void } } - protected function forwardToPageObject(): void + private function forwardToPageObject(): void { $keys = $this->http->wrapper()->query()->retrieve( 'logoutpage_languages_key', From d497a791e469696eefe43187b42c01dc053ae5c7 Mon Sep 17 00:00:00 2001 From: Nadia Ahmad Date: Thu, 8 Aug 2024 09:38:27 +0200 Subject: [PATCH 24/45] Update components/ILIAS/Authentication/classes/class.ilAuthLogoutPageEditorGUI.php Co-authored-by: Michael Jansen --- .../Authentication/classes/class.ilAuthLogoutPageEditorGUI.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/ILIAS/Authentication/classes/class.ilAuthLogoutPageEditorGUI.php b/components/ILIAS/Authentication/classes/class.ilAuthLogoutPageEditorGUI.php index 3070de3bcc0f..7f7aecd9b3ba 100644 --- a/components/ILIAS/Authentication/classes/class.ilAuthLogoutPageEditorGUI.php +++ b/components/ILIAS/Authentication/classes/class.ilAuthLogoutPageEditorGUI.php @@ -247,7 +247,7 @@ private function getLangKeysToUpdate(): array return $lang_keys; } - protected function activate(): void + private function activate(): void { $lang_keys = $this->getLangKeysToUpdate(); $settings = ilAuthLogoutPageEditorSettings::getInstance(); From a7b0b3d9e84c89615b33bf67ee9aef4c98cbf1e6 Mon Sep 17 00:00:00 2001 From: Nadia Ahmad Date: Thu, 8 Aug 2024 09:38:57 +0200 Subject: [PATCH 25/45] Update components/ILIAS/Authentication/classes/class.ilAuthLogoutPageEditorGUI.php Co-authored-by: Michael Jansen --- .../Authentication/classes/class.ilAuthLogoutPageEditorGUI.php | 3 --- 1 file changed, 3 deletions(-) diff --git a/components/ILIAS/Authentication/classes/class.ilAuthLogoutPageEditorGUI.php b/components/ILIAS/Authentication/classes/class.ilAuthLogoutPageEditorGUI.php index 7f7aecd9b3ba..fb285a0ec39c 100644 --- a/components/ILIAS/Authentication/classes/class.ilAuthLogoutPageEditorGUI.php +++ b/components/ILIAS/Authentication/classes/class.ilAuthLogoutPageEditorGUI.php @@ -319,9 +319,6 @@ protected function saveLogoutInfo(): void $this->ctrl->redirect($this, 'show'); } - /** - * Init logout form - */ protected function initLogoutForm(): void { $this->form = new ilPropertyFormGUI(); From 46fc83dc14e07b401658d108af440ed737fcaac4 Mon Sep 17 00:00:00 2001 From: Nadia Ahmad Date: Thu, 8 Aug 2024 09:39:41 +0200 Subject: [PATCH 26/45] Update components/ILIAS/Authentication/classes/class.ilAuthLogoutPageEditorGUI.php Co-authored-by: Michael Jansen --- .../Authentication/classes/class.ilAuthLogoutPageEditorGUI.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/ILIAS/Authentication/classes/class.ilAuthLogoutPageEditorGUI.php b/components/ILIAS/Authentication/classes/class.ilAuthLogoutPageEditorGUI.php index fb285a0ec39c..08a5c62d9195 100644 --- a/components/ILIAS/Authentication/classes/class.ilAuthLogoutPageEditorGUI.php +++ b/components/ILIAS/Authentication/classes/class.ilAuthLogoutPageEditorGUI.php @@ -280,7 +280,7 @@ private function deactivate(): void /** * Show ILIAS page editor summary. */ - protected function showIliasEditor(): void + private function showIliasEditor(): void { $tbl = new \ILIAS\Authentication\LogoutPage\LogoutPageLanguagesOverviewTable( $this->ctrl, From c23a3fed6e5943f1a2a9015015eb891ed6cbd9c8 Mon Sep 17 00:00:00 2001 From: Nadia Ahmad Date: Thu, 8 Aug 2024 09:39:58 +0200 Subject: [PATCH 27/45] Update components/ILIAS/Authentication/classes/class.ilAuthLogoutPageEditorGUI.php Co-authored-by: Michael Jansen --- .../Authentication/classes/class.ilAuthLogoutPageEditorGUI.php | 3 --- 1 file changed, 3 deletions(-) diff --git a/components/ILIAS/Authentication/classes/class.ilAuthLogoutPageEditorGUI.php b/components/ILIAS/Authentication/classes/class.ilAuthLogoutPageEditorGUI.php index 08a5c62d9195..1f285ba8329e 100644 --- a/components/ILIAS/Authentication/classes/class.ilAuthLogoutPageEditorGUI.php +++ b/components/ILIAS/Authentication/classes/class.ilAuthLogoutPageEditorGUI.php @@ -277,9 +277,6 @@ private function deactivate(): void $this->ctrl->redirect($this, 'show'); } - /** - * Show ILIAS page editor summary. - */ private function showIliasEditor(): void { $tbl = new \ILIAS\Authentication\LogoutPage\LogoutPageLanguagesOverviewTable( From 275b70521c003ca01a59afbfe8dc3d56c4f3457b Mon Sep 17 00:00:00 2001 From: Nadia Ahmad Date: Thu, 8 Aug 2024 09:40:12 +0200 Subject: [PATCH 28/45] Update components/ILIAS/Authentication/classes/class.ilAuthLogoutPageEditorGUI.php Co-authored-by: Michael Jansen --- .../Authentication/classes/class.ilAuthLogoutPageEditorGUI.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/ILIAS/Authentication/classes/class.ilAuthLogoutPageEditorGUI.php b/components/ILIAS/Authentication/classes/class.ilAuthLogoutPageEditorGUI.php index 1f285ba8329e..a7ca25545189 100644 --- a/components/ILIAS/Authentication/classes/class.ilAuthLogoutPageEditorGUI.php +++ b/components/ILIAS/Authentication/classes/class.ilAuthLogoutPageEditorGUI.php @@ -290,7 +290,7 @@ private function showIliasEditor(): void $this->tpl->setContent($this->ui_renderer->render($tbl->getComponent())); } - protected function saveLogoutInfo(): void + private function saveLogoutInfo(): void { if (!$this->rbacsystem->checkAccess("write", $this->getRefId())) { $this->ilErr->raiseError($this->lng->txt("permission_denied"), $this->ilErr->MESSAGE); From 1cef9a7e23ba4333dab7e5db5f62970b3cccb32e Mon Sep 17 00:00:00 2001 From: Nadia Ahmad Date: Thu, 8 Aug 2024 09:40:27 +0200 Subject: [PATCH 29/45] Update components/ILIAS/Authentication/classes/class.ilAuthLogoutPageEditorGUI.php Co-authored-by: Michael Jansen --- .../Authentication/classes/class.ilAuthLogoutPageEditorGUI.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/ILIAS/Authentication/classes/class.ilAuthLogoutPageEditorGUI.php b/components/ILIAS/Authentication/classes/class.ilAuthLogoutPageEditorGUI.php index a7ca25545189..ef8d4ce86020 100644 --- a/components/ILIAS/Authentication/classes/class.ilAuthLogoutPageEditorGUI.php +++ b/components/ILIAS/Authentication/classes/class.ilAuthLogoutPageEditorGUI.php @@ -316,7 +316,7 @@ private function saveLogoutInfo(): void $this->ctrl->redirect($this, 'show'); } - protected function initLogoutForm(): void + private function initLogoutForm(): void { $this->form = new ilPropertyFormGUI(); $this->form->setFormAction($this->ctrl->getFormAction($this, 'saveLogoutInfo')); From abf5a4ba9ef5fe9d8cf5f5ea4b9d03aacfa4ae08 Mon Sep 17 00:00:00 2001 From: nmatuschek Date: Thu, 8 Aug 2024 11:03:19 +0200 Subject: [PATCH 30/45] Code improvement --- .../class.ilAuthLogoutPageEditorGUI.php | 68 +++++++++---------- .../class.ilAuthLogoutPageEditorSettings.php | 26 +------ 2 files changed, 34 insertions(+), 60 deletions(-) diff --git a/components/ILIAS/Authentication/classes/class.ilAuthLogoutPageEditorGUI.php b/components/ILIAS/Authentication/classes/class.ilAuthLogoutPageEditorGUI.php index ef8d4ce86020..978ff7805492 100644 --- a/components/ILIAS/Authentication/classes/class.ilAuthLogoutPageEditorGUI.php +++ b/components/ILIAS/Authentication/classes/class.ilAuthLogoutPageEditorGUI.php @@ -77,29 +77,31 @@ public function __construct(int $a_ref_id) $query_wrapper = $DIC->http()->wrapper()->query(); $post_wrapper = $DIC->http()->wrapper()->post(); - $is_post_request = $DIC->http()->request()->getMethod() === "POST"; + $is_post_request = $DIC->http()->request()->getMethod() === 'POST'; $refinery = $DIC->refinery(); - if ($query_wrapper->has("redirectSource")) { - $this->redirect_source = $query_wrapper->retrieve("redirectSource", $refinery->kindlyTo()->string()); + if ($query_wrapper->has('redirectSource')) { + $this->redirect_source = $query_wrapper->retrieve('redirectSource', $refinery->kindlyTo()->string()); } - if ($post_wrapper->has("key")) { - $this->key = $post_wrapper->retrieve("key", $refinery->kindlyTo()->int()); - } elseif ($query_wrapper->has("key")) { - $this->key = $query_wrapper->retrieve("key", $refinery->kindlyTo()->int()); + if ($post_wrapper->has('key')) { + $this->key = $post_wrapper->retrieve('key', $refinery->kindlyTo()->int()); + } elseif ($query_wrapper->has('key')) { + $this->key = $query_wrapper->retrieve('key', $refinery->kindlyTo()->int()); } if ($is_post_request) { - if ($post_wrapper->has("visible_languages")) { + if ($post_wrapper->has('visible_languages')) { $this->visible_languages = $post_wrapper->retrieve( - "visible_languages", $refinery->kindlyTo()->listOf($refinery->kindlyTo()->string()) + 'visible_languages', + $refinery->kindlyTo()->listOf($refinery->kindlyTo()->string()) ); } - if ($post_wrapper->has("languages")) { + if ($post_wrapper->has('languages')) { $this->languages = $post_wrapper->retrieve( - "languages", $refinery->kindlyTo()->listOf($refinery->kindlyTo()->string()) + 'languages', + $refinery->kindlyTo()->listOf($refinery->kindlyTo()->string()) ); } } @@ -117,8 +119,8 @@ public function getRefId(): int public function executeCommand(): void { - switch ($this->ctrl->getNextClass($this)) { - case 'illogoutpagegui': + switch (strtolower($this->ctrl->getNextClass($this))) { + case strtolower(ilLogoutPageGUI::class): $this->tabs->clearTargets(); $this->tabs->setBackTarget( $this->lng->txt('back'), @@ -126,7 +128,7 @@ public function executeCommand(): void '_top' ); - if ($this->redirect_source !== 'ilinternallinkgui') { + if ($this->redirect_source !== strtolower(ilInternalLinkGUI::class)) { $this->forwardToPageObject(); } break; @@ -167,7 +169,7 @@ private function forwardToPageObject(): void $this->tpl->addCss(ilObjStyleSheet::getContentStylePath(0)); $this->tpl->addCss(ilObjStyleSheet::getSyntaxStylePath()); - $this->ctrl->setReturnByClass('illogoutpagegui', 'edit'); + $this->ctrl->setReturnByClass(ilLogoutPageGUI::class, 'edit'); $page_gui = new ilLogoutPageGUI($this->key); $page_gui->setTemplateTargetVar('ADM_CONTENT'); @@ -177,19 +179,14 @@ private function forwardToPageObject(): void $html = $this->ctrl->forwardCommand($page_gui); - if ($html !== "") { + if ($html !== '') { $this->tpl->setContent($html); } } private function show(): void { - switch ($this->getSettings()->getMode()) { - case ilAuthLogoutPageEditorSettings::MODE_IPE: - default: - $this->showIliasEditor(); - break; - } + $this->showIliasEditor(); } private function handleLogoutPageActions(): void @@ -220,7 +217,7 @@ private function handleLogoutPageActions(): void case 'edit': $this->ctrl->setParameter($this, 'logoutpage_languages_key', current($keys)); $this->ctrl->setParameter($this, 'key', ilLanguage::lookupId(current($keys))); - $this->ctrl->redirectByClass('ilLogoutPageGUI', 'edit'); + $this->ctrl->redirectByClass(ilLogoutPageGUI::class, 'edit'); break; default: $this->ctrl->redirect($this, 'show'); @@ -292,15 +289,15 @@ private function showIliasEditor(): void private function saveLogoutInfo(): void { - if (!$this->rbacsystem->checkAccess("write", $this->getRefId())) { - $this->ilErr->raiseError($this->lng->txt("permission_denied"), $this->ilErr->MESSAGE); + if (!$this->rbacsystem->checkAccess('write', $this->getRefId())) { + $this->ilErr->raiseError($this->lng->txt('permission_denied'), $this->ilErr->MESSAGE); } $this->initLogoutForm(); if ($this->form->checkInput()) { - $this->logoutSettings = new ilSetting("logout_settings"); + $this->logoutSettings = new ilSetting('logout_settings'); foreach ($this->lng->getInstalledLanguages() as $lang_key) { - $settingKey = "logout_message_" . $lang_key; + $settingKey = 'logout_message_' . $lang_key; if ($this->form->getInput($settingKey)) { $this->logoutSettings->set($settingKey, $this->form->getInput($settingKey)); } @@ -310,7 +307,7 @@ private function saveLogoutInfo(): void $this->setting->set('default_auth_mode', $this->form->getInput('default_auth_mode')); } - $this->tpl->setOnScreenMessage('success', $this->lng->txt("logout_information_settings_saved"), true); + $this->tpl->setOnScreenMessage('success', $this->lng->txt('logout_information_settings_saved'), true); } $this->ctrl->redirect($this, 'show'); @@ -326,7 +323,7 @@ private function initLogoutForm(): void $this->form->addCommandButton('saveLogoutInfo', $this->lng->txt('save')); if (!is_object($this->logoutSettings)) { - $this->logoutSettings = new ilSetting("logout_settings"); + $this->logoutSettings = new ilSetting('logout_settings'); } $logout_settings = $this->logoutSettings->getAll(); @@ -368,7 +365,7 @@ private function initLogoutForm(): void $textarea->setValue($message); if (!in_array($lang_key, $languages, true)) { - $textarea->setAlert($this->lng->txt("not_installed")); + $textarea->setAlert($this->lng->txt('not_installed')); } $this->form->addItem($textarea); @@ -376,17 +373,14 @@ private function initLogoutForm(): void } /** - * returns an array of all installed languages, default language at the first position - * @param string $a_def_language Default language of the current installation - * @param array $a_languages Array of all installed languages - * @return array $languages Array of the installed languages, default language at first position or - * an empty array, if $a_a_def_language is empty - * @author Michael Jansen + * @param string $a_def_language + * @param array $a_languages + * @return array */ private function setDefLangFirst(string $a_def_language, array $a_languages): array { $languages = []; - if ($a_def_language !== "") { + if ($a_def_language !== '') { $languages[] = $a_def_language; foreach ($a_languages as $val) { diff --git a/components/ILIAS/Authentication/classes/class.ilAuthLogoutPageEditorSettings.php b/components/ILIAS/Authentication/classes/class.ilAuthLogoutPageEditorSettings.php index 9b7fabf00ae6..209e389480df 100644 --- a/components/ILIAS/Authentication/classes/class.ilAuthLogoutPageEditorSettings.php +++ b/components/ILIAS/Authentication/classes/class.ilAuthLogoutPageEditorSettings.php @@ -20,15 +20,12 @@ class ilAuthLogoutPageEditorSettings { - public const MODE_IPE = 2; + private static ?ilAuthLogoutPageEditorSettings $instance = null; private array $languages = []; - private static ?ilAuthLogoutPageEditorSettings $instance = null; private ilSetting $storage; - private int $mode = 0; - private ilLanguage $lng; public function __construct() @@ -42,10 +39,7 @@ public function __construct() public static function getInstance(): ilAuthLogoutPageEditorSettings { - if (self::$instance) { - return self::$instance; - } - return self::$instance = new ilAuthLogoutPageEditorSettings(); + return self::$instance ?? new ilAuthLogoutPageEditorSettings(); } protected function getStorage(): ilSetting @@ -53,16 +47,6 @@ protected function getStorage(): ilSetting return $this->storage; } - public function setMode(int $a_mode): void - { - $this->mode = $a_mode; - } - - public function getMode(): int - { - return $this->mode; - } - public function getIliasEditorLanguage(string $a_langkey): string { if ($this->isIliasEditorEnabled($a_langkey)) { @@ -86,8 +70,6 @@ public function isIliasEditorEnabled(string $a_langkey): bool public function update(): void { - $this->getStorage()->set('mode', (string) $this->getMode()); - foreach ($this->languages as $lngkey => $stat) { $this->storage->set($lngkey, (string) $stat); } @@ -95,11 +77,9 @@ public function update(): void public function read(): void { - $this->setMode((int) $this->getStorage()->get('mode', (string) self::MODE_IPE)); - $this->languages = []; foreach ($this->lng->getInstalledLanguages() as $lngkey) { - $this->enableIliasEditor($lngkey, (bool) $this->getStorage()->get($lngkey, "")); + $this->enableIliasEditor($lngkey, (bool) $this->getStorage()->get($lngkey, '')); } } } From 2ee1d4ce17df64710b3a61c627fb4f08fa136fe3 Mon Sep 17 00:00:00 2001 From: nmatuschek Date: Thu, 8 Aug 2024 11:05:29 +0200 Subject: [PATCH 31/45] Code improvement --- .../Authentication/classes/class.ilAuthLogoutPageEditorGUI.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/components/ILIAS/Authentication/classes/class.ilAuthLogoutPageEditorGUI.php b/components/ILIAS/Authentication/classes/class.ilAuthLogoutPageEditorGUI.php index 978ff7805492..b32caef4972f 100644 --- a/components/ILIAS/Authentication/classes/class.ilAuthLogoutPageEditorGUI.php +++ b/components/ILIAS/Authentication/classes/class.ilAuthLogoutPageEditorGUI.php @@ -225,6 +225,9 @@ private function handleLogoutPageActions(): void } } + /** + * @return array + */ private function getLangKeysToUpdate(): array { $keys = $this->http->wrapper()->query()->retrieve( From b36ba364992870c7eae2b35f126a0f146ac33e7e Mon Sep 17 00:00:00 2001 From: Nadia Ahmad Date: Thu, 8 Aug 2024 11:53:25 +0200 Subject: [PATCH 32/45] Update components/ILIAS/Authentication/classes/class.ilAuthLogoutPageEditorGUI.php Co-authored-by: Michael Jansen --- .../Authentication/classes/class.ilAuthLogoutPageEditorGUI.php | 1 - 1 file changed, 1 deletion(-) diff --git a/components/ILIAS/Authentication/classes/class.ilAuthLogoutPageEditorGUI.php b/components/ILIAS/Authentication/classes/class.ilAuthLogoutPageEditorGUI.php index b32caef4972f..95462a4bfd7f 100644 --- a/components/ILIAS/Authentication/classes/class.ilAuthLogoutPageEditorGUI.php +++ b/components/ILIAS/Authentication/classes/class.ilAuthLogoutPageEditorGUI.php @@ -376,7 +376,6 @@ private function initLogoutForm(): void } /** - * @param string $a_def_language * @param array $a_languages * @return array */ From 5993e0d56167657ab01b3d1650d6ddacf1a5207a Mon Sep 17 00:00:00 2001 From: Nadia Ahmad Date: Thu, 8 Aug 2024 11:53:39 +0200 Subject: [PATCH 33/45] Update components/ILIAS/Authentication/classes/class.ilAuthLogoutPageEditorGUI.php Co-authored-by: Michael Jansen --- .../Authentication/classes/class.ilAuthLogoutPageEditorGUI.php | 1 - 1 file changed, 1 deletion(-) diff --git a/components/ILIAS/Authentication/classes/class.ilAuthLogoutPageEditorGUI.php b/components/ILIAS/Authentication/classes/class.ilAuthLogoutPageEditorGUI.php index 95462a4bfd7f..63263fd07b62 100644 --- a/components/ILIAS/Authentication/classes/class.ilAuthLogoutPageEditorGUI.php +++ b/components/ILIAS/Authentication/classes/class.ilAuthLogoutPageEditorGUI.php @@ -37,7 +37,6 @@ class ilAuthLogoutPageEditorGUI private \ILIAS\Refinery\Factory $refinery; private \ILIAS\UI\Factory $ui_factory; private \ILIAS\UI\Renderer $ui_renderer; - private int $ref_id; private ilAuthLogoutPageEditorSettings $settings; private ?ilSetting $logoutSettings = null; From ce706f65c08d20b993d8491ea91b49dba6fc55e3 Mon Sep 17 00:00:00 2001 From: Nadia Ahmad Date: Thu, 8 Aug 2024 11:54:05 +0200 Subject: [PATCH 34/45] Update components/ILIAS/Authentication/classes/class.ilAuthLogoutPageEditorGUI.php Co-authored-by: Michael Jansen --- .../Authentication/classes/class.ilAuthLogoutPageEditorGUI.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/components/ILIAS/Authentication/classes/class.ilAuthLogoutPageEditorGUI.php b/components/ILIAS/Authentication/classes/class.ilAuthLogoutPageEditorGUI.php index 63263fd07b62..2f3243ac570b 100644 --- a/components/ILIAS/Authentication/classes/class.ilAuthLogoutPageEditorGUI.php +++ b/components/ILIAS/Authentication/classes/class.ilAuthLogoutPageEditorGUI.php @@ -123,8 +123,7 @@ public function executeCommand(): void $this->tabs->clearTargets(); $this->tabs->setBackTarget( $this->lng->txt('back'), - $this->ctrl->getLinkTarget($this, 'show'), - '_top' + $this->ctrl->getLinkTarget($this, 'show') ); if ($this->redirect_source !== strtolower(ilInternalLinkGUI::class)) { From f742253fac9aa96a6a6ef61390dcef898fa447f0 Mon Sep 17 00:00:00 2001 From: Nadia Ahmad Date: Thu, 8 Aug 2024 11:54:15 +0200 Subject: [PATCH 35/45] Update components/ILIAS/Authentication/classes/class.ilAuthLogoutPageEditorGUI.php Co-authored-by: Michael Jansen --- .../Authentication/classes/class.ilAuthLogoutPageEditorGUI.php | 1 - 1 file changed, 1 deletion(-) diff --git a/components/ILIAS/Authentication/classes/class.ilAuthLogoutPageEditorGUI.php b/components/ILIAS/Authentication/classes/class.ilAuthLogoutPageEditorGUI.php index 2f3243ac570b..6618e21fcdf5 100644 --- a/components/ILIAS/Authentication/classes/class.ilAuthLogoutPageEditorGUI.php +++ b/components/ILIAS/Authentication/classes/class.ilAuthLogoutPageEditorGUI.php @@ -41,7 +41,6 @@ class ilAuthLogoutPageEditorGUI private ilAuthLogoutPageEditorSettings $settings; private ?ilSetting $logoutSettings = null; private \ILIAS\Style\Content\Object\ObjectFacade $content_style_domain; - private ?string $redirect_source = null; private ?int $key = null; private array $visible_languages = []; From d5de4bd1ef2a37e28987396bd1c647daafe6ac03 Mon Sep 17 00:00:00 2001 From: Nadia Ahmad Date: Thu, 8 Aug 2024 11:56:39 +0200 Subject: [PATCH 36/45] Update components/ILIAS/Authentication/classes/class.ilAuthLogoutPageEditorSettings.php Co-authored-by: Michael Jansen --- .../classes/class.ilAuthLogoutPageEditorSettings.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/components/ILIAS/Authentication/classes/class.ilAuthLogoutPageEditorSettings.php b/components/ILIAS/Authentication/classes/class.ilAuthLogoutPageEditorSettings.php index 209e389480df..8b350fed411f 100644 --- a/components/ILIAS/Authentication/classes/class.ilAuthLogoutPageEditorSettings.php +++ b/components/ILIAS/Authentication/classes/class.ilAuthLogoutPageEditorSettings.php @@ -37,9 +37,9 @@ public function __construct() $this->read(); } - public static function getInstance(): ilAuthLogoutPageEditorSettings + public static function getInstance(): self { - return self::$instance ?? new ilAuthLogoutPageEditorSettings(); + return self::$instance ?? (self::$instance = new self()); } protected function getStorage(): ilSetting From 0dd353212d7f101922988c172b42269ce2ceaa4d Mon Sep 17 00:00:00 2001 From: Nadia Ahmad Date: Thu, 8 Aug 2024 12:03:27 +0200 Subject: [PATCH 37/45] Update components/ILIAS/Authentication/classes/class.ilAuthLogoutPageEditorSettings.php Co-authored-by: Michael Jansen --- .../classes/class.ilAuthLogoutPageEditorSettings.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/ILIAS/Authentication/classes/class.ilAuthLogoutPageEditorSettings.php b/components/ILIAS/Authentication/classes/class.ilAuthLogoutPageEditorSettings.php index 8b350fed411f..572bdeb002ae 100644 --- a/components/ILIAS/Authentication/classes/class.ilAuthLogoutPageEditorSettings.php +++ b/components/ILIAS/Authentication/classes/class.ilAuthLogoutPageEditorSettings.php @@ -28,7 +28,7 @@ class ilAuthLogoutPageEditorSettings private ilLanguage $lng; - public function __construct() + private function __construct() { global $DIC; $this->lng = $DIC->language(); From 20ce8a5a6b042b8a85d02ad63783a1c97e0077ed Mon Sep 17 00:00:00 2001 From: nmatuschek Date: Fri, 9 Aug 2024 09:13:53 +0200 Subject: [PATCH 38/45] Code improvement --- .../class.ilAuthLogoutPageEditorGUI.php | 33 ++++++------------- .../class.ilAuthLogoutPageEditorSettings.php | 2 ++ .../ILIAS/Init/classes/class.ilStartUpGUI.php | 8 +++++ 3 files changed, 20 insertions(+), 23 deletions(-) diff --git a/components/ILIAS/Authentication/classes/class.ilAuthLogoutPageEditorGUI.php b/components/ILIAS/Authentication/classes/class.ilAuthLogoutPageEditorGUI.php index 6618e21fcdf5..d9edb0457abb 100644 --- a/components/ILIAS/Authentication/classes/class.ilAuthLogoutPageEditorGUI.php +++ b/components/ILIAS/Authentication/classes/class.ilAuthLogoutPageEditorGUI.php @@ -75,7 +75,6 @@ public function __construct(int $a_ref_id) $query_wrapper = $DIC->http()->wrapper()->query(); $post_wrapper = $DIC->http()->wrapper()->post(); - $is_post_request = $DIC->http()->request()->getMethod() === 'POST'; $refinery = $DIC->refinery(); if ($query_wrapper->has('redirectSource')) { @@ -87,22 +86,6 @@ public function __construct(int $a_ref_id) } elseif ($query_wrapper->has('key')) { $this->key = $query_wrapper->retrieve('key', $refinery->kindlyTo()->int()); } - - if ($is_post_request) { - if ($post_wrapper->has('visible_languages')) { - $this->visible_languages = $post_wrapper->retrieve( - 'visible_languages', - $refinery->kindlyTo()->listOf($refinery->kindlyTo()->string()) - ); - } - - if ($post_wrapper->has('languages')) { - $this->languages = $post_wrapper->retrieve( - 'languages', - $refinery->kindlyTo()->listOf($refinery->kindlyTo()->string()) - ); - } - } } public function getSettings(): ilAuthLogoutPageEditorSettings @@ -208,14 +191,17 @@ private function handleLogoutPageActions(): void case 'deactivate': $this->deactivate(); break; + case 'activate': $this->activate(); break; + case 'edit': $this->ctrl->setParameter($this, 'logoutpage_languages_key', current($keys)); $this->ctrl->setParameter($this, 'key', ilLanguage::lookupId(current($keys))); $this->ctrl->redirectByClass(ilLogoutPageGUI::class, 'edit'); break; + default: $this->ctrl->redirect($this, 'show'); break; @@ -331,18 +317,19 @@ private function initLogoutForm(): void $def_language = $this->lng->getDefaultLanguage(); foreach ($this->setDefLangFirst($def_language, $languages) as $lang_key) { - $add = ""; + $add = ''; + if ($lang_key === $def_language) { - $add = " (" . $this->lng->txt("default") . ")"; + $add = ' (' . $this->lng->txt('default') . ')'; } $textarea = new ilTextAreaInputGUI( - $this->lng->txt("meta_l_" . $lang_key) . $add, + $this->lng->txt('meta_l_' . $lang_key) . $add, 'logout_message_' . $lang_key ); $textarea->setRows(10); - $msg_logout_lang = "logout_message_" . $lang_key; + $msg_logout_lang = 'logout_message_' . $lang_key; if (isset($logout_settings[$msg_logout_lang])) { $textarea->setValue($logout_settings[$msg_logout_lang]); @@ -350,14 +337,14 @@ private function initLogoutForm(): void $this->form->addItem($textarea); - unset($logout_settings["logout_message_" . $lang_key]); + unset($logout_settings['logout_message_' . $lang_key]); } foreach ($logout_settings as $key => $message) { $lang_key = substr($key, strrpos($key, "_") + 1, strlen($key) - strrpos($key, "_")); $textarea = new ilTextAreaInputGUI( - $this->lng->txt("meta_l_" . $lang_key), + $this->lng->txt('meta_l_' . $lang_key), 'logout_message_' . $lang_key ); diff --git a/components/ILIAS/Authentication/classes/class.ilAuthLogoutPageEditorSettings.php b/components/ILIAS/Authentication/classes/class.ilAuthLogoutPageEditorSettings.php index 572bdeb002ae..0ebd3ee71240 100644 --- a/components/ILIAS/Authentication/classes/class.ilAuthLogoutPageEditorSettings.php +++ b/components/ILIAS/Authentication/classes/class.ilAuthLogoutPageEditorSettings.php @@ -52,9 +52,11 @@ public function getIliasEditorLanguage(string $a_langkey): string if ($this->isIliasEditorEnabled($a_langkey)) { return $a_langkey; } + if ($this->isIliasEditorEnabled($this->lng->getDefaultLanguage())) { return $this->lng->getDefaultLanguage(); } + return ''; } diff --git a/components/ILIAS/Init/classes/class.ilStartUpGUI.php b/components/ILIAS/Init/classes/class.ilStartUpGUI.php index 71b5f40ce424..884335cb8f04 100755 --- a/components/ILIAS/Init/classes/class.ilStartUpGUI.php +++ b/components/ILIAS/Init/classes/class.ilStartUpGUI.php @@ -214,6 +214,7 @@ private function showLoginPageOrStartupPage(): void ] ); } + $this->logger->debug('Show login page'); if (isset($messages) && count($messages) > 0) { foreach ($messages as $type => $content) { @@ -247,15 +248,18 @@ private function showLoginPage(ILIAS\UI\Component\Input\Container\Form\Form $for 'ext_uid', $this->refinery->byTrying([$this->refinery->kindlyTo()->string(), $this->refinery->always('')]) ); + $soapPw = $this->http->wrapper()->query()->retrieve( 'soap_pw', $this->refinery->byTrying([$this->refinery->kindlyTo()->string(), $this->refinery->always('')]) ); + $credentials = new ilAuthFrontendCredentialsSoap( $GLOBALS['DIC']->http()->request(), $this->ctrl, $this->setting ); + $credentials->setUsername($extUid); $credentials->setPassword($soapPw); $credentials->tryAuthenticationOnLoginPage(); @@ -294,6 +298,7 @@ private function showLoginPage(ILIAS\UI\Component\Input\Container\Form\Form $for $this->lng->txt($message_key) ); } + if ($page_editor_html !== '') { $tpl->setVariable('LPE', $page_editor_html); } @@ -1203,6 +1208,7 @@ private function doMigrationNewAccount(): void $credentials, [$provider] ); + if ($frontend->migrateAccountNew()) { ilInitialisation::redirectToStartingPage(); } @@ -1255,6 +1261,7 @@ private function doMigration(array $migration_request_data): void $credentials, [$provider] ); + if ($frontend->migrateAccount($GLOBALS['DIC']['ilAuthSession'])) { ilInitialisation::redirectToStartingPage(); } @@ -1795,6 +1802,7 @@ private function doSamlAuthentication(): void if (isset($params['target']) && !isset($params['returnTo'])) { $params['returnTo'] = $params['target']; } + if (isset($params['returnTo'])) { $auth->storeParam('target', $params['returnTo']); } From 856b70d74f417861fc04384bed2f0fd735a0a18b Mon Sep 17 00:00:00 2001 From: nmatuschek Date: Fri, 9 Aug 2024 10:20:15 +0200 Subject: [PATCH 39/45] Code style --- .../classes/class.ilAuthLogoutPageEditorGUI.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/components/ILIAS/Authentication/classes/class.ilAuthLogoutPageEditorGUI.php b/components/ILIAS/Authentication/classes/class.ilAuthLogoutPageEditorGUI.php index d9edb0457abb..57813ac947f3 100644 --- a/components/ILIAS/Authentication/classes/class.ilAuthLogoutPageEditorGUI.php +++ b/components/ILIAS/Authentication/classes/class.ilAuthLogoutPageEditorGUI.php @@ -39,7 +39,7 @@ class ilAuthLogoutPageEditorGUI private \ILIAS\UI\Renderer $ui_renderer; private int $ref_id; private ilAuthLogoutPageEditorSettings $settings; - private ?ilSetting $logoutSettings = null; + private ?ilSetting $logout_settings = null; private \ILIAS\Style\Content\Object\ObjectFacade $content_style_domain; private ?string $redirect_source = null; private ?int $key = null; @@ -281,11 +281,11 @@ private function saveLogoutInfo(): void $this->initLogoutForm(); if ($this->form->checkInput()) { - $this->logoutSettings = new ilSetting('logout_settings'); + $this->logout_settings = new ilSetting('logout_settings'); foreach ($this->lng->getInstalledLanguages() as $lang_key) { $settingKey = 'logout_message_' . $lang_key; if ($this->form->getInput($settingKey)) { - $this->logoutSettings->set($settingKey, $this->form->getInput($settingKey)); + $this->logout_settings->set($settingKey, $this->form->getInput($settingKey)); } } @@ -308,11 +308,11 @@ private function initLogoutForm(): void $this->form->addCommandButton('saveLogoutInfo', $this->lng->txt('save')); - if (!is_object($this->logoutSettings)) { - $this->logoutSettings = new ilSetting('logout_settings'); + if (!is_object($this->logout_settings)) { + $this->logout_settings = new ilSetting('logout_settings'); } - $logout_settings = $this->logoutSettings->getAll(); + $logout_settings = $this->logout_settings->getAll(); $languages = $this->lng->getInstalledLanguages(); $def_language = $this->lng->getDefaultLanguage(); From 443a65dad67fc0b2501c24939d8ba28048a68d81 Mon Sep 17 00:00:00 2001 From: nmatuschek Date: Fri, 9 Aug 2024 10:25:26 +0200 Subject: [PATCH 40/45] Removed unused properties --- .../classes/class.ilAuthLogoutPageEditorGUI.php | 4 ---- 1 file changed, 4 deletions(-) diff --git a/components/ILIAS/Authentication/classes/class.ilAuthLogoutPageEditorGUI.php b/components/ILIAS/Authentication/classes/class.ilAuthLogoutPageEditorGUI.php index 57813ac947f3..c683ceb3f7a6 100644 --- a/components/ILIAS/Authentication/classes/class.ilAuthLogoutPageEditorGUI.php +++ b/components/ILIAS/Authentication/classes/class.ilAuthLogoutPageEditorGUI.php @@ -28,7 +28,6 @@ class ilAuthLogoutPageEditorGUI private ilLanguage $lng; private ilGlobalTemplateInterface $tpl; private ilTabsGUI $tabs; - private ilToolbarGUI $toolbar; private ilRbacSystem $rbacsystem; private ilSetting $setting; private ilErrorHandling $ilErr; @@ -43,8 +42,6 @@ class ilAuthLogoutPageEditorGUI private \ILIAS\Style\Content\Object\ObjectFacade $content_style_domain; private ?string $redirect_source = null; private ?int $key = null; - private array $visible_languages = []; - private array $languages = []; public function __construct(int $a_ref_id) { @@ -53,7 +50,6 @@ public function __construct(int $a_ref_id) $this->ctrl = $DIC->ctrl(); $this->tpl = $DIC->ui()->mainTemplate(); $this->tabs = $DIC->tabs(); - $this->toolbar = $DIC->toolbar(); $this->rbacsystem = $DIC->rbac()->system(); $this->setting = $DIC->settings(); $this->ilErr = $DIC['ilErr']; From a91b3f067c3990a63eef7258f30f1dd06d48f5a1 Mon Sep 17 00:00:00 2001 From: nmatuschek Date: Fri, 9 Aug 2024 11:28:57 +0200 Subject: [PATCH 41/45] code style --- .../classes/class.ilAuthLogoutPageEditorGUI.php | 2 +- .../classes/class.ilAuthLogoutPageEditorSettings.php | 7 +++---- .../classes/class.ilObjAuthSettingsGUI.php | 12 ++++++------ components/ILIAS/Init/classes/class.ilStartUpGUI.php | 6 ++---- 4 files changed, 12 insertions(+), 15 deletions(-) diff --git a/components/ILIAS/Authentication/classes/class.ilAuthLogoutPageEditorGUI.php b/components/ILIAS/Authentication/classes/class.ilAuthLogoutPageEditorGUI.php index c683ceb3f7a6..bc3d28ccd6c7 100644 --- a/components/ILIAS/Authentication/classes/class.ilAuthLogoutPageEditorGUI.php +++ b/components/ILIAS/Authentication/classes/class.ilAuthLogoutPageEditorGUI.php @@ -337,7 +337,7 @@ private function initLogoutForm(): void } foreach ($logout_settings as $key => $message) { - $lang_key = substr($key, strrpos($key, "_") + 1, strlen($key) - strrpos($key, "_")); + $lang_key = substr($key, strrpos($key, '_') + 1, strlen($key) - strrpos($key, '_')); $textarea = new ilTextAreaInputGUI( $this->lng->txt('meta_l_' . $lang_key), diff --git a/components/ILIAS/Authentication/classes/class.ilAuthLogoutPageEditorSettings.php b/components/ILIAS/Authentication/classes/class.ilAuthLogoutPageEditorSettings.php index 0ebd3ee71240..5d4ee8f099e1 100644 --- a/components/ILIAS/Authentication/classes/class.ilAuthLogoutPageEditorSettings.php +++ b/components/ILIAS/Authentication/classes/class.ilAuthLogoutPageEditorSettings.php @@ -20,20 +20,19 @@ class ilAuthLogoutPageEditorSettings { - private static ?ilAuthLogoutPageEditorSettings $instance = null; + private static ?self $instance = null; private array $languages = []; - private ilSetting $storage; - private ilLanguage $lng; private function __construct() { global $DIC; - $this->lng = $DIC->language(); + $this->lng = $DIC->language(); $this->storage = new ilSetting('logout_editor'); + $this->read(); } diff --git a/components/ILIAS/Authentication/classes/class.ilObjAuthSettingsGUI.php b/components/ILIAS/Authentication/classes/class.ilObjAuthSettingsGUI.php index 77cb42ed7c47..2d39619edd56 100755 --- a/components/ILIAS/Authentication/classes/class.ilObjAuthSettingsGUI.php +++ b/components/ILIAS/Authentication/classes/class.ilObjAuthSettingsGUI.php @@ -842,9 +842,9 @@ public function executeCommand(): void case 'ilauthloginpageeditorgui': - $this->setSubTabs("authSettings"); + $this->setSubTabs('authSettings'); $this->tabs_gui->setTabActive('authentication_settings'); - $this->tabs_gui->setSubTabActive("auth_login_editor"); + $this->tabs_gui->setSubTabActive('auth_login_editor'); $lpe = new ilAuthLoginPageEditorGUI($this->object->getRefId()); $this->ctrl->forwardCommand($lpe); @@ -852,9 +852,9 @@ public function executeCommand(): void case 'ilauthlogoutpageeditorgui': - $this->setSubTabs("authSettings"); + $this->setSubTabs('authSettings'); $this->tabs_gui->setTabActive('authentication_settings'); - $this->tabs_gui->setSubTabActive("logout_editor"); + $this->tabs_gui->setSubTabActive('logout_editor'); $lpe = new ilAuthLogoutPageEditorGUI($this->object->getRefId()); $this->ctrl->forwardCommand($lpe); @@ -862,9 +862,9 @@ public function executeCommand(): void default: if (!$cmd) { - $cmd = "authSettings"; + $cmd = 'authSettings'; } - $cmd .= "Object"; + $cmd .= 'Object'; $this->$cmd(); break; diff --git a/components/ILIAS/Init/classes/class.ilStartUpGUI.php b/components/ILIAS/Init/classes/class.ilStartUpGUI.php index 884335cb8f04..c72582f6a1aa 100755 --- a/components/ILIAS/Init/classes/class.ilStartUpGUI.php +++ b/components/ILIAS/Init/classes/class.ilStartUpGUI.php @@ -959,9 +959,8 @@ private function getLoginPageEditorHTML(): string $page_gui->setPresentationTitle(''); $page_gui->setTemplateOutput(false); $page_gui->setHeader(''); - $ret = $page_gui->showPage(); - return $ret; + return $page_gui->showPage(); } private function getLogoutPageEditorHTML(): string @@ -984,9 +983,8 @@ private function getLogoutPageEditorHTML(): string $page_gui->setPresentationTitle(''); $page_gui->setTemplateOutput(false); $page_gui->setHeader(''); - $ret = $page_gui->showPage(); - return $ret; + return $page_gui->showPage(); } private function showRegistrationLinks(string $page_editor_html): string From 1b6738a514e72ef0a38961e32d87fd3732066825 Mon Sep 17 00:00:00 2001 From: Nadia Ahmad Date: Fri, 9 Aug 2024 11:31:32 +0200 Subject: [PATCH 42/45] Update components/ILIAS/Authentication/classes/class.ilAuthLogoutPageEditorSettings.php Co-authored-by: Michael Jansen --- .../classes/class.ilAuthLogoutPageEditorSettings.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/components/ILIAS/Authentication/classes/class.ilAuthLogoutPageEditorSettings.php b/components/ILIAS/Authentication/classes/class.ilAuthLogoutPageEditorSettings.php index 5d4ee8f099e1..b45fef0b9c41 100644 --- a/components/ILIAS/Authentication/classes/class.ilAuthLogoutPageEditorSettings.php +++ b/components/ILIAS/Authentication/classes/class.ilAuthLogoutPageEditorSettings.php @@ -22,6 +22,9 @@ class ilAuthLogoutPageEditorSettings { private static ?self $instance = null; + /** + * @var array + */ private array $languages = []; private ilSetting $storage; private ilLanguage $lng; From a6fc036f23ce5937e5d0cbd6350e2e539c54f8b5 Mon Sep 17 00:00:00 2001 From: Nadia Ahmad Date: Mon, 12 Aug 2024 10:37:44 +0200 Subject: [PATCH 43/45] Update components/ILIAS/Authentication/classes/class.ilAuthLogoutPageEditorGUI.php Co-authored-by: Michael Jansen --- .../Authentication/classes/class.ilAuthLogoutPageEditorGUI.php | 1 - 1 file changed, 1 deletion(-) diff --git a/components/ILIAS/Authentication/classes/class.ilAuthLogoutPageEditorGUI.php b/components/ILIAS/Authentication/classes/class.ilAuthLogoutPageEditorGUI.php index bc3d28ccd6c7..de56f648094d 100644 --- a/components/ILIAS/Authentication/classes/class.ilAuthLogoutPageEditorGUI.php +++ b/components/ILIAS/Authentication/classes/class.ilAuthLogoutPageEditorGUI.php @@ -135,7 +135,6 @@ private function forwardToPageObject(): void $this->lng->loadLanguageModule('content'); if (!ilLogoutPage::_exists('aout', $this->key)) { - // doesn't exist -> create new one $new_page_object = new ilLogoutPage(); $new_page_object->setParentId($this->key); $new_page_object->setId($this->key); From 75396b7efbf157a21fe1292218d7a450f8bb4f0b Mon Sep 17 00:00:00 2001 From: nmatuschek Date: Mon, 12 Aug 2024 10:41:32 +0200 Subject: [PATCH 44/45] Added missing strtolower --- .../Authentication/classes/class.ilAuthLogoutPageEditorGUI.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/ILIAS/Authentication/classes/class.ilAuthLogoutPageEditorGUI.php b/components/ILIAS/Authentication/classes/class.ilAuthLogoutPageEditorGUI.php index de56f648094d..948103d6e013 100644 --- a/components/ILIAS/Authentication/classes/class.ilAuthLogoutPageEditorGUI.php +++ b/components/ILIAS/Authentication/classes/class.ilAuthLogoutPageEditorGUI.php @@ -104,7 +104,7 @@ public function executeCommand(): void $this->ctrl->getLinkTarget($this, 'show') ); - if ($this->redirect_source !== strtolower(ilInternalLinkGUI::class)) { + if (strtolower($this->redirect_source) !== strtolower(ilInternalLinkGUI::class)) { $this->forwardToPageObject(); } break; From dfabd352a7435058ee539372521e86e14a6158fc Mon Sep 17 00:00:00 2001 From: nmatuschek Date: Wed, 14 Aug 2024 10:26:43 +0200 Subject: [PATCH 45/45] Fixed lang vars --- .../LoginPage/LoginPageLanguagesOverviewTable.php | 4 ++-- lang/ilias_de.lang | 10 +++++----- lang/ilias_en.lang | 14 +++++++------- 3 files changed, 14 insertions(+), 14 deletions(-) diff --git a/components/ILIAS/Authentication/classes/LoginPage/LoginPageLanguagesOverviewTable.php b/components/ILIAS/Authentication/classes/LoginPage/LoginPageLanguagesOverviewTable.php index 7a5fa365a503..6eb680943d0f 100644 --- a/components/ILIAS/Authentication/classes/LoginPage/LoginPageLanguagesOverviewTable.php +++ b/components/ILIAS/Authentication/classes/LoginPage/LoginPageLanguagesOverviewTable.php @@ -115,12 +115,12 @@ protected function getActions(): array $overview_row_id ), self::ACTIVATE => $this->ui_factory->table()->action()->standard( - $this->lng->txt('login_page_activate'), + $this->lng->txt('page_design_activate'), $overview_url_builder->withParameter($overview_action_parameter, self::ACTIVATE), $overview_row_id ), self::DEACTIVATE => $this->ui_factory->table()->action()->standard( - $this->lng->txt('login_page_deactivate'), + $this->lng->txt('page_design_deactivate'), $overview_url_builder->withParameter($overview_action_parameter, self::DEACTIVATE), $overview_row_id ) diff --git a/lang/ilias_de.lang b/lang/ilias_de.lang index cb36b1c514cb..954c5aa9782b 100755 --- a/lang/ilias_de.lang +++ b/lang/ilias_de.lang @@ -2070,7 +2070,7 @@ auth#:#auth_err_login_attempts_deactivation#:#Das ILIAS-Konto wurde wegen zu vie auth#:#auth_info_add#:#Wählen Sie diese Einstellung, falls Sie sich noch nie für ILIAS registriert haben. In diesem Fall wird ein neues ILIAS-Konto angelegt. auth#:#auth_info_migrate#:#Wenn Sie bereits ein ILIAS-Konto besitzen, geben Sie bitte den Anmeldenamen und das Passwort ein, um Ihre persönlichen Daten (Mails, Testergebnisse ...) zu übernehmen. auth#:#auth_ldap_server_ds#:#LDAP-Server -auth#:#auth_login_editor#:#Loginseite bearbeiten +auth#:#auth_login_editor#:#Login-Seite gestalten auth#:#auth_oidc#:#OpenID Connect auth#:#auth_oidc_failed#:#Login mittels OpenID Connect fehlgeschlagen auth#:#auth_oidc_login_element_info#:#Bei ILIAS anmelden über OpenID Connect @@ -2161,13 +2161,13 @@ auth#:#err_auth_saml_failed#:#Die Anmeldung ist fehlgeschlagen. Bitte kontaktier auth#:#err_auth_saml_no_ilias_user#:#Die Anmeldung ist fehlgeschlagen. Bitte kontaktieren Sie Ihre technische Betreuung. auth#:#language_does_not_exist#:#Die gewählte Sprache existiert leider nicht. auth#:#login_page#:#Sprache der Login-Seite -auth#:#login_page_activate#:#Seitengestaltung aktivieren -auth#:#login_page_deactivate#:#Seitengestaltung deaktivieren auth#:#login_pages#:#Login-Seiten auth#:#logout_editor#:#Logout-Seite gestalten -auth#:#logout_page#:#Logout Seite -auth#:#logout_pages#:#Logout Seiten +auth#:#logout_page#:#Sprache der Logout-Seite +auth#:#logout_pages#:#Logout-Seiten auth#:#lti_consumer_inactive#:#LTI-Tool-Consumer ist deaktivert +auth#:#page_design_activate#:#Seitengestaltung aktivieren +auth#:#page_design_deactivate#:#Seitengestaltung deaktivieren auth#:#saml_tab_head_idp#:#IDP awrn#:#awareness_now_online#:#Jetzt online awrn#:#awareness_settings#:#Einstellungen diff --git a/lang/ilias_en.lang b/lang/ilias_en.lang index d9dbd1867110..016b523ebb7b 100755 --- a/lang/ilias_en.lang +++ b/lang/ilias_en.lang @@ -2064,10 +2064,7 @@ auth#:#auth_err_login_attempts_deactivation#:#This user account has been deactiv auth#:#auth_info_add#:#Choose this option if you have never registered to ILIAS. A new account will be created. auth#:#auth_info_migrate#:#If you have already an ILIAS account, enter username and password to migrate your personal data (mail, test results...). auth#:#auth_ldap_server_ds#:#LDAP-Server -auth#:#auth_login_editor#:#Loginscreen Editor -auth#:#logout_editor#:#Design Logout Page -auth#:#logout_page#:#Logout Page -auth#:#logout_pages#:#Logout Pages +auth#:#auth_login_editor#:#Design Login Page auth#:#auth_oidc#:#OpenID Connect auth#:#auth_oidc_failed#:#Login via OpenID Connect failed auth#:#auth_oidc_login_element_info#:#Login to ILIAS via OpenID Connect @@ -2156,11 +2153,14 @@ auth#:#err_auth_ldap_failed#:#Authentication failed. Please contact your ILIAS a auth#:#err_auth_saml_failed#:#Authentication failed. Please contact your system administrator. auth#:#err_auth_saml_no_ilias_user#:#Authentication failed. Please contact your system administrator. auth#:#language_does_not_exist#:#The selected language does not exist. -auth#:#login_page#:#Login-Page -auth#:#login_page_activate#:#Activate Page Design -auth#:#login_page_deactivate#:#Deactivate Page Design +auth#:#login_page#:#Language of Login-Page auth#:#login_pages#:#Login-Pages +auth#:#logout_editor#:#Logout-Seite gestalten +auth#:#logout_page#:#Language of Logout-Page +auth#:#logout_pages#:#Logout-Pages auth#:#lti_consumer_inactive#:#LTI tool consumer is disabled. +auth#:#page_design_activate#:#Activate Page Design +auth#:#page_design_deactivate#:#Deactivate Page Design auth#:#saml_tab_head_idp#:#IDP awrn#:#awareness_now_online#:#Online Now awrn#:#awareness_settings#:#Settings