From 8169f5d229bf273e873f86554dcfb9a2965e2eb5 Mon Sep 17 00:00:00 2001 From: abrahammordev Date: Thu, 4 Jun 2026 11:35:07 +0200 Subject: [PATCH 1/3] fix: adapt import survey pool structure --- components/ILIAS/Survey/Survey.php | 1 + .../Export/class.ilSurveyQuestionPoolExporter.php | 2 +- components/ILIAS/SurveyQuestionPool/Setup/class.Agent.php | 5 +++++ 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/components/ILIAS/Survey/Survey.php b/components/ILIAS/Survey/Survey.php index ad72be6ccc39..3dc8cb752aba 100644 --- a/components/ILIAS/Survey/Survey.php +++ b/components/ILIAS/Survey/Survey.php @@ -34,5 +34,6 @@ public function init( ): void { $contribute[Component\Resource\PublicAsset::class] = fn() => new Component\Resource\ComponentCSS($this, "survey.css"); + $contribute[\ILIAS\Setup\Agent::class] = static fn() => new \ILIAS\Survey\Setup\Agent(); } } diff --git a/components/ILIAS/SurveyQuestionPool/Export/class.ilSurveyQuestionPoolExporter.php b/components/ILIAS/SurveyQuestionPool/Export/class.ilSurveyQuestionPoolExporter.php index 7a1f40c3d33c..ddcd384594af 100755 --- a/components/ILIAS/SurveyQuestionPool/Export/class.ilSurveyQuestionPoolExporter.php +++ b/components/ILIAS/SurveyQuestionPool/Export/class.ilSurveyQuestionPoolExporter.php @@ -45,7 +45,7 @@ public function getXmlExportTailDependencies( $dependencies = []; // service settings - $deps[] = [ + $dependencies[] = [ "component" => "components/ILIAS/ILIASObject", "entity" => "common", "ids" => $a_ids diff --git a/components/ILIAS/SurveyQuestionPool/Setup/class.Agent.php b/components/ILIAS/SurveyQuestionPool/Setup/class.Agent.php index 7635b7667289..61105f74bdad 100644 --- a/components/ILIAS/SurveyQuestionPool/Setup/class.Agent.php +++ b/components/ILIAS/SurveyQuestionPool/Setup/class.Agent.php @@ -31,6 +31,11 @@ public function getUpdateObjective(?Setup\Config $config = null): Setup\Objectiv return new \ilDatabaseUpdateStepsExecutedObjective(new SurveyQuestionPoolDBUpdateSteps()); } + public function getMigrations(): array + { + return [new InitLOMForSurveyQuestionPoolMigration()]; + } + public function getStatusObjective(Metrics\Storage $storage): Objective { return new \ilDatabaseUpdateStepsMetricsCollectedObjective($storage, new SurveyQuestionPoolDBUpdateSteps()); From e43fc3ee3010879f637b83cb6312fbeb0cd4cfe9 Mon Sep 17 00:00:00 2001 From: abrahammordev Date: Thu, 4 Jun 2026 11:43:57 +0200 Subject: [PATCH 2/3] update: Include LOM basic structure --- components/ILIAS/Survey/Setup/class.Agent.php | 31 ++++++++++++++++ .../Setup/class.InitLOMForSurveyMigration.php | 36 +++++++++++++++++++ ....InitLOMForSurveyQuestionPoolMigration.php | 36 +++++++++++++++++++ 3 files changed, 103 insertions(+) create mode 100644 components/ILIAS/Survey/Setup/class.Agent.php create mode 100644 components/ILIAS/Survey/Setup/class.InitLOMForSurveyMigration.php create mode 100644 components/ILIAS/SurveyQuestionPool/Setup/class.InitLOMForSurveyQuestionPoolMigration.php diff --git a/components/ILIAS/Survey/Setup/class.Agent.php b/components/ILIAS/Survey/Setup/class.Agent.php new file mode 100644 index 000000000000..0cb20375ec94 --- /dev/null +++ b/components/ILIAS/Survey/Setup/class.Agent.php @@ -0,0 +1,31 @@ + Date: Thu, 4 Jun 2026 11:48:06 +0200 Subject: [PATCH 3/3] fix: improve survey initialization --- components/ILIAS/Survey/Survey.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/components/ILIAS/Survey/Survey.php b/components/ILIAS/Survey/Survey.php index 3dc8cb752aba..809d87d6adff 100644 --- a/components/ILIAS/Survey/Survey.php +++ b/components/ILIAS/Survey/Survey.php @@ -34,6 +34,8 @@ public function init( ): void { $contribute[Component\Resource\PublicAsset::class] = fn() => new Component\Resource\ComponentCSS($this, "survey.css"); - $contribute[\ILIAS\Setup\Agent::class] = static fn() => new \ILIAS\Survey\Setup\Agent(); + $contribute[\ILIAS\Setup\Agent::class] = static fn() => new \ILIAS\Survey\Setup\Agent( + $pull[\ILIAS\Refinery\Factory::class] + ); } }