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

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 31 additions & 0 deletions components/ILIAS/Survey/Setup/class.Agent.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
<?php

/**
* This file is part of ILIAS, a powerful learning management system
* published by ILIAS open source e-Learning e.V.
*
* ILIAS is licensed with the GPL-3.0,
* see https://www.gnu.org/licenses/gpl-3.0.en.html
* You should have received a copy of said license along with the
* source code, too.
*
* If this is not the case or you just want to try ILIAS, you'll find
* us at:
* https://www.ilias.de
* https://github.com/ILIAS-eLearning
*
*********************************************************************/

declare(strict_types=1);

namespace ILIAS\Survey\Setup;

use ILIAS\Setup;

class Agent extends Setup\Agent\NullAgent
{
public function getMigrations(): array
{
return [new InitLOMForSurveyMigration()];
}
}
36 changes: 36 additions & 0 deletions components/ILIAS/Survey/Setup/class.InitLOMForSurveyMigration.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
<?php

/**
* This file is part of ILIAS, a powerful learning management system
* published by ILIAS open source e-Learning e.V.
*
* ILIAS is licensed with the GPL-3.0,
* see https://www.gnu.org/licenses/gpl-3.0.en.html
* You should have received a copy of said license along with the
* source code, too.
*
* If this is not the case or you just want to try ILIAS, you'll find
* us at:
* https://www.ilias.de
* https://github.com/ILIAS-eLearning
*
*********************************************************************/

declare(strict_types=1);

namespace ILIAS\Survey\Setup;

use ILIAS\MetaData\Setup\InitLOMForObjectTypeMigration;

class InitLOMForSurveyMigration extends InitLOMForObjectTypeMigration
{
protected function objectType(): string
{
return 'svy';
}

public function getLabel(): string
{
return 'Creates LOM sets for pre-existing Surveys.';
}
}
3 changes: 3 additions & 0 deletions components/ILIAS/Survey/Survey.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,5 +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(
$pull[\ILIAS\Refinery\Factory::class]
);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ public function getXmlExportTailDependencies(
$dependencies = [];

// service settings
$deps[] = [
$dependencies[] = [
"component" => "components/ILIAS/ILIASObject",
"entity" => "common",
"ids" => $a_ids
Expand Down
5 changes: 5 additions & 0 deletions components/ILIAS/SurveyQuestionPool/Setup/class.Agent.php
Original file line number Diff line number Diff line change
Expand Up @@ -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());
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
<?php

/**
* This file is part of ILIAS, a powerful learning management system
* published by ILIAS open source e-Learning e.V.
*
* ILIAS is licensed with the GPL-3.0,
* see https://www.gnu.org/licenses/gpl-3.0.en.html
* You should have received a copy of said license along with the
* source code, too.
*
* If this is not the case or you just want to try ILIAS, you'll find
* us at:
* https://www.ilias.de
* https://github.com/ILIAS-eLearning
*
*********************************************************************/

declare(strict_types=1);

namespace ILIAS\SurveyQuestionPool\Setup;

use ILIAS\MetaData\Setup\InitLOMForObjectTypeMigration;

class InitLOMForSurveyQuestionPoolMigration extends InitLOMForObjectTypeMigration
{
protected function objectType(): string
{
return 'spl';
}

public function getLabel(): string
{
return 'Creates LOM sets for pre-existing Survey Question Pools.';
}
}
Loading