diff --git a/components/ILIAS/Chatroom/classes/class.ilChatroomFormFactory.php b/components/ILIAS/Chatroom/classes/class.ilChatroomFormFactory.php index 49fa8b4f7960..f030b027d7b2 100755 --- a/components/ILIAS/Chatroom/classes/class.ilChatroomFormFactory.php +++ b/components/ILIAS/Chatroom/classes/class.ilChatroomFormFactory.php @@ -263,33 +263,6 @@ public function getUserChatNameSelectionForm(array $name_options): ilPropertyFor return $form; } - /** - * Returns session form with period set by given $sessions. - */ - public function getSessionForm(array $sessions): ilPropertyFormGUI - { - $form = new ilPropertyFormGUI(); - $form->setPreventDoubleSubmission(false); - $list = new ilSelectInputGUI($this->lng->txt('session'), 'session'); - - $options = []; - - foreach ($sessions as $session) { - $start = new ilDateTime($session['connected'], IL_CAL_UNIX); - $end = new ilDateTime($session['disconnected'], IL_CAL_UNIX); - - $options[$session['connected'] . ',' . - $session['disconnected']] = ilDatePresentation::formatPeriod($start, $end); - } - - $list->setOptions($options); - $list->setRequired(true); - - $form->addItem($list); - - return $form; - } - public function getClientSettingsForm(): ilPropertyFormGUI { $form = new ilPropertyFormGUI(); diff --git a/components/ILIAS/Chatroom/classes/class.ilChatroomTabGUIFactory.php b/components/ILIAS/Chatroom/classes/class.ilChatroomTabGUIFactory.php index 5edf056c3a95..17cf1e7bfae7 100755 --- a/components/ILIAS/Chatroom/classes/class.ilChatroomTabGUIFactory.php +++ b/components/ILIAS/Chatroom/classes/class.ilChatroomTabGUIFactory.php @@ -302,18 +302,6 @@ public function getTabsForCommand(string $command): void 'link' => $DIC->ctrl()->getLinkTarget($this->gui, 'history-byday'), 'permission' => 'read', 'enabled' => $room ? $room->getSetting('enable_history') : false, - 'subtabs' => [ - 'byday' => [ - 'lng' => 'history_by_day', - 'link' => $DIC->ctrl()->getLinkTarget($this->gui, 'history-byday'), - 'permission' => 'read' - ], - 'bysession' => [ - 'lng' => 'history_by_session', - 'link' => $DIC->ctrl()->getLinkTarget($this->gui, 'history-bysession'), - 'permission' => 'read' - ] - ] ], 'info' => [ 'lng' => 'info_short', diff --git a/components/ILIAS/Chatroom/classes/gui/class.ilChatroomHistoryGUI.php b/components/ILIAS/Chatroom/classes/gui/class.ilChatroomHistoryGUI.php index 0a2640755ba1..c6b575d9506a 100755 --- a/components/ILIAS/Chatroom/classes/gui/class.ilChatroomHistoryGUI.php +++ b/components/ILIAS/Chatroom/classes/gui/class.ilChatroomHistoryGUI.php @@ -18,13 +18,6 @@ declare(strict_types=1); -/** - * Class ilChatroom - * Keeps methods to prepare and display the history task. - * @author Jan Posselt - * @version $Id$ - * @ingroup components\ILIASChatroom - */ class ilChatroomHistoryGUI extends ilChatroomGUIHandler { /** @@ -100,6 +93,7 @@ public function byDay(bool $export = false): void if ($submit_request) { if ($durationForm->checkInput()) { + /** @var ilDateDurationInputGUI $period */ $period = $durationForm->getItemByPostVar('timeperiod'); $messages = $room->getHistory( @@ -218,67 +212,6 @@ private function showMessages( $this->mainTpl->setVariable('ADM_CONTENT', $roomTpl->get()); } - public function bySessionExport(): void - { - $this->tabs->activateSubTab('bysession'); - $this->bySession(true); - } - - public function bySession(bool $export = false): void - { - $room = ilChatroom::byObjectId($this->gui->getObject()->getId()); - $this->exitIfNoRoomExists($room); - - $scope = $room->getRoomId(); - - $chat_user = new ilChatroomUser($this->ilUser, $room); - - $formFactory = new ilChatroomFormFactory(); - $durationForm = $formFactory->getSessionForm($room->getSessions($chat_user)); - $durationForm->setTitle($this->ilLng->txt('history_bysession_title')); - $durationForm->addCommandButton('history-bySessionExport', $this->ilLng->txt('export')); - $durationForm->addCommandButton('history-bySession', $this->ilLng->txt('show')); - $durationForm->setFormAction( - $this->ilCtrl->getFormAction($this->gui, 'history-bySession') - ); - - if (strtolower($this->http->request()->getServerParams()['REQUEST_METHOD']) === 'post') { - $session = $this->getRequestValue('session', $this->refinery->kindlyTo()->string()); - $durationForm->checkInput(); - $postVals = explode(',', (string) $session); - $durationForm->setValuesByArray([ - 'session' => $session - ]); - - $messages = $room->getHistory( - $from = new ilDateTime($postVals[0], IL_CAL_UNIX), - $to = new ilDateTime($postVals[1], IL_CAL_UNIX), - $chat_user->getUserId() - ); - } else { - $last_session = $room->getLastSession($chat_user); - - if ($last_session) { - $from = new ilDateTime($last_session['connected'], IL_CAL_UNIX); - $to = new ilDateTime($last_session['disconnected'], IL_CAL_UNIX); - } else { - $from = null; - $to = null; - } - - $messages = $room->getHistory( - $from, - $to, - $chat_user->getUserId() - ); - } - - $from = new ilDateTime(); - $to = new ilDateTime(); - - $this->showMessages($messages, $durationForm, $export, $from, $to); - } - public function executeDefault(string $requestedMethod): void { $this->byDay(); diff --git a/lang/ilias_de.lang b/lang/ilias_de.lang index 3dbb0b4e9471..211f7e040147 100755 --- a/lang/ilias_de.lang +++ b/lang/ilias_de.lang @@ -2981,10 +2981,7 @@ chatroom#:#end_whisper#:#Beenden chatroom#:#enter#:#Chat beitreten chatroom#:#error_log#:#Chatserver Error-Log-File chatroom#:#hint_display_past_msgs#:#Anzahl vergangener Beiträge, die beim Betreten des Chatraums angezeigt werden. Durch die Eingabe von „0“ wird die Anzeige deaktiviert. -chatroom#:#history_by_day#:#Tagesverlauf -chatroom#:#history_by_session#:#Sitzungverlauf chatroom#:#history_byday_title#:#Zeitraum auswählen -chatroom#:#history_bysession_title#:#Sitzung auswählen chatroom#:#history_cleared#:#Der Nachrichtenverlauf wurde durch die Moderation gelöscht.###Modified as part of gender mainstreaming activities for ILIAS 8 chatroom#:#history_title_general#:#Unterhaltungen im Chatraum „%s“ chatroom#:#ilias_chatserver_connection#:#Verbindung ILIAS zum Server diff --git a/lang/ilias_en.lang b/lang/ilias_en.lang index fbb0443b76ef..2b29316b9708 100755 --- a/lang/ilias_en.lang +++ b/lang/ilias_en.lang @@ -2983,10 +2983,7 @@ chatroom#:#end_whisper#:#Cancel chatroom#:#enter#:#Enter Chat Room chatroom#:#error_log#:#Chatserver Error-Log chatroom#:#hint_display_past_msgs#:#Number of previous messages shown when chat room is entered. A value of ‘0’ disables this feature. -chatroom#:#history_by_day#:#Daily History -chatroom#:#history_by_session#:#Session History chatroom#:#history_byday_title#:#Show Conversation per Day -chatroom#:#history_bysession_title#:#Show Conversation per Session chatroom#:#history_cleared#:#The message history was deleted by a moderator. chatroom#:#history_title_general#:#Conversation in Chat Room "%s" chatroom#:#ilias_chatserver_connection#:#ILIAS to Server Connection