diff options
| author | André Noack <noack@data-quest.de> | 2023-12-28 11:12:49 +0000 |
|---|---|---|
| committer | André Noack <noack@data-quest.de> | 2023-12-28 11:12:49 +0000 |
| commit | 3d3eaee568091a6fbed6e635d7d386481c06a135 (patch) | |
| tree | 878024ef58f64322d84858d1f88b0710c533d0c9 /db | |
| parent | e45e4fedd665297df01b329059aecf224847b7c9 (diff) | |
Resolve #3344 "Testergebnisse aus ILIAS in das Stud.IP Gradebook importieren"
Closes #3344
Merge request studip/studip!2271
Diffstat (limited to 'db')
| -rw-r--r-- | db/migrations/5.5.15_step3344_ilias_results.php | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/db/migrations/5.5.15_step3344_ilias_results.php b/db/migrations/5.5.15_step3344_ilias_results.php new file mode 100644 index 0000000..20bb33a --- /dev/null +++ b/db/migrations/5.5.15_step3344_ilias_results.php @@ -0,0 +1,32 @@ +<?php +require_once 'lib/cronjobs/import_ilias_testresults.php'; +final class Step3344IliasResults extends Migration +{ + + use DatabaseMigrationTrait; + + public function description() + { + return 'adds column passed to table `grading_instances`, add cronjob'; + } + + protected function up() + { + if (!$this->columnExists('grading_instances', 'passed')) { + DBManager::get()->exec("ALTER TABLE `grading_instances` ADD + `passed` TINYINT NOT NULL DEFAULT 0 AFTER `feedback`"); + + } + ImportIliasTestresults::register()->schedulePeriodic(45, 1); + } + + protected function down() + { + if ($this->columnExists('grading_instances', 'passed')) { + DBManager::get()->exec("ALTER TABLE `grading_instances` DROP + `passed`"); + } + ImportIliasTestresults::unregister(); + } + +} |
