From fd3a131429f83c329a91a716aed8582aebfc6207 Mon Sep 17 00:00:00 2001 From: Stephan Kergomard Date: Mon, 30 Sep 2024 17:08:51 +0200 Subject: [PATCH 1/4] Test: Fix Length of Title Field Part 2 --- .../ILIAS/TestQuestionPool/classes/class.assQuestionGUI.php | 1 - 1 file changed, 1 deletion(-) diff --git a/components/ILIAS/TestQuestionPool/classes/class.assQuestionGUI.php b/components/ILIAS/TestQuestionPool/classes/class.assQuestionGUI.php index a5ed47346b39..ccf97c7b22ef 100755 --- a/components/ILIAS/TestQuestionPool/classes/class.assQuestionGUI.php +++ b/components/ILIAS/TestQuestionPool/classes/class.assQuestionGUI.php @@ -24,7 +24,6 @@ use ILIAS\TestQuestionPool\Questions\SuggestedSolution\SuggestedSolution; use ILIAS\TestQuestionPool\Questions\SuggestedSolution\SuggestedSolutionsDatabaseRepository; use ILIAS\TestQuestionPool\Questions\GeneralQuestionPropertiesRepository; - use ILIAS\Refinery\Factory as Refinery; use ILIAS\Notes\GUIService; From ce47a93dd12f97aca64f34063f7da90ecff181e8 Mon Sep 17 00:00:00 2001 From: Stephan Kergomard Date: Mon, 30 Sep 2024 16:50:29 +0200 Subject: [PATCH 2/4] Test: Show Results Ordered by Objectives See: https://mantis.ilias.de/view.php?id=42048 --- .../classes/class.ilTestQuestionRelatedObjectivesList.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/components/ILIAS/Test/classes/class.ilTestQuestionRelatedObjectivesList.php b/components/ILIAS/Test/classes/class.ilTestQuestionRelatedObjectivesList.php index c75cc3f6b192..519e70d1aacb 100755 --- a/components/ILIAS/Test/classes/class.ilTestQuestionRelatedObjectivesList.php +++ b/components/ILIAS/Test/classes/class.ilTestQuestionRelatedObjectivesList.php @@ -90,8 +90,8 @@ public function loadObjectivesTitles() */ public function getQuestionRelatedObjectiveTitles($questionId): string { - if (!isset($this->objectivesByQuestion['questionId']) - || !is_array($this->objectivesByQuestion['questionId'])) { + if (!isset($this->objectivesByQuestion[$questionId]) + || !is_array($this->objectivesByQuestion[$questionId])) { return ''; } @@ -137,8 +137,8 @@ public function getObjectives(): array public function isQuestionRelatedToObjective($questionId, $objectiveId): bool { - if (!isset($this->objectivesByQuestion['questionId']) - || !is_array($this->objectivesByQuestion['questionId'])) { + if (!isset($this->objectivesByQuestion[$questionId]) + || !is_array($this->objectivesByQuestion[$questionId])) { return false; } From 527167a79eb98893453be4411c7bbd0ad0191b3c Mon Sep 17 00:00:00 2001 From: Alex Killing Date: Mon, 30 Sep 2024 17:11:45 +0200 Subject: [PATCH 3/4] 42008: Category no longer accessible after having changed presentation of an item object from tile to list view --- .../ILIAS/Container/Content/class.ItemRenderer.php | 1 - .../Content/class.ilContainerRenderer.php | 14 +++++++++++++- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/components/ILIAS/Container/Content/class.ItemRenderer.php b/components/ILIAS/Container/Content/class.ItemRenderer.php index f374ac8cba1a..34bbcd1f79db 100755 --- a/components/ILIAS/Container/Content/class.ItemRenderer.php +++ b/components/ILIAS/Container/Content/class.ItemRenderer.php @@ -80,7 +80,6 @@ public function renderItem( if (!$ilAccess->checkAccess('visible', '', $a_item_data['ref_id'], $a_item_data['type'], $a_item_data['obj_id'], $a_item_data['tree'])) { return ''; }*/ - $view_mode = $this->view_mode; if ($item_group_list_presentation != "") { $view_mode = ($item_group_list_presentation === "tile") diff --git a/components/ILIAS/Container/Content/class.ilContainerRenderer.php b/components/ILIAS/Container/Content/class.ilContainerRenderer.php index e4cf5fabb55b..96ec7e1f1f7c 100755 --- a/components/ILIAS/Container/Content/class.ilContainerRenderer.php +++ b/components/ILIAS/Container/Content/class.ilContainerRenderer.php @@ -514,6 +514,13 @@ protected function getViewModeOfItemGroup(int $ref_id): int } return $view_mode; } + + protected function getListPresentationOfItemGroup(int $ref_id): string + { + $item_group = new ilObjItemGroup($ref_id); + return $item_group->getListPresentation(); + } + /** * @param mixed $a_block_id */ @@ -919,11 +926,16 @@ public function renderItemBlockSequence( } $item_group_list_presentation = ""; if ($block->getBlock() instanceof \ILIAS\Container\Content\ItemGroupBlock) { - if ($this->getViewModeOfItemGroup((int) $block_id) === ilContainerContentGUI::VIEW_MODE_TILE) { + if ($this->getListPresentationOfItemGroup((int) $block_id) === "tile") { if (!$this->admin_panel && !$this->active_block_ordering) { $item_group_list_presentation = "tile"; } } + if ($this->getListPresentationOfItemGroup((int) $block_id) === "list") { + if (!$this->admin_panel && !$this->active_block_ordering) { + $item_group_list_presentation = "list"; + } + } } $html = $this->item_renderer->renderItem( $item_data, From 45c80fea0c1d1ccee67dd1edaac0e822503292bd Mon Sep 17 00:00:00 2001 From: Alex Killing Date: Mon, 30 Sep 2024 17:44:23 +0200 Subject: [PATCH 4/4] reduce number of completion calls --- .../ILIAS/MediaCast/resources/video_widget.js | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/components/ILIAS/MediaCast/resources/video_widget.js b/components/ILIAS/MediaCast/resources/video_widget.js index c5743e9acdd7..cc8595e7e3a5 100644 --- a/components/ILIAS/MediaCast/resources/video_widget.js +++ b/components/ILIAS/MediaCast/resources/video_widget.js @@ -338,11 +338,14 @@ il.VideoPlaylist = il.VideoPlaylist || {}; perc = 100 / duration * current_time; if (t.playlist[list_wrapper].completed_cb !== '') { if (perc > t.playlist[list_wrapper].percentage) { - t.playlist[list_wrapper].items[i].completed = true; - $.ajax({ - type: 'GET', - url: `${t.playlist[list_wrapper].completed_cb}&mob_id=${v.id}`, - }); + if (!t.playlist[list_wrapper].items[i].completed) { + t.playlist[list_wrapper].items[i].completed = true; + console.log('sending completed cb'); + $.ajax({ + type: 'GET', + url: `${t.playlist[list_wrapper].completed_cb}&mob_id=${v.id}`, + }); + } } } }