Skip to content
Open
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
43 changes: 43 additions & 0 deletions components/ILIAS/Course/Setup/UpdateStepsV12.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
<?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\Course\Setup;

use ilDatabaseUpdateSteps;
use ilDBInterface;
use ilDBConstants;

class UpdateStepsV12 implements ilDatabaseUpdateSteps
{
private ilDBInterface $db;

public function prepare(ilDBInterface $db): void
{
$this->db = $db;
}

public function step_1(): void
{
$this->db->modifyTableColumn('crs_settings', 'target_group', [
'type' => ilDBConstants::T_CLOB,
'length' => 4000,
]);
}
}
9 changes: 8 additions & 1 deletion components/ILIAS/Course/Setup/ilCourseSetupAgent.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,21 @@
use ILIAS\Setup\Config;
use ILIAS\Setup;
use ILIAS\Refinery\Transformation;
use ILIAS\Setup\ObjectiveCollection;
use ILIAS\Course\Setup\UpdateStepsV12;

class ilCourseSetupAgent extends NullAgent
{
use Setup\Agent\HasNoNamedObjective;

public function getUpdateObjective(?ILIAS\Setup\Config $config = null): Objective
{
return new ilDatabaseUpdateStepsExecutedObjective(new ilCourseDBUpdateSteps());
return new ObjectiveCollection(
'Update Course component',
false,
new ilDatabaseUpdateStepsExecutedObjective(new ilCourseDBUpdateSteps()),
new ilDatabaseUpdateStepsExecutedObjective(new UpdateStepsV12())
);
}

public function getStatusObjective(Metrics\Storage $storage): Objective
Expand Down
Loading