19 declare(strict_types=1);
29 protected \ilDBInterface
$db;
38 if (!$this->db->tableColumnExists(
'tst_tests',
'ip_range_from')) {
39 $this->db->addTableColumn(
48 if (!$this->db->tableColumnExists(
'tst_tests',
'ip_range_to')) {
49 $this->db->addTableColumn(
88 'interaction_type' => [
93 'modification_ts' => [
98 'additional_data' => [
128 'interaction_type' => [
133 'modification_ts' => [
138 'additional_data' => [
174 'interaction_type' => [
179 'modification_ts' => [
184 'additional_data' => [
220 'interaction_type' => [
225 'modification_ts' => [
230 'additional_data' => [
263 'interaction_type' => [
268 'modification_ts' => [
288 if (!$this->db->tableColumnExists(
'tst_invited_user',
'ip_range_from')) {
289 $this->db->addTableColumn(
298 if (!$this->db->tableColumnExists(
'tst_invited_user',
'ip_range_to')) {
299 $this->db->addTableColumn(
310 if ($this->db->tableColumnExists(
'tst_invited_user',
'clientip')) {
311 $this->db->manipulate(
'UPDATE tst_invited_user SET ip_range_from = clientip, ip_range_to = clientip WHERE ip_range_from IS NULL AND ip_range_to IS NULL');
312 $this->db->dropTableColumn(
'tst_invited_user',
'clientip');
318 if (!$this->db->tableColumnExists(
'tst_addtime',
'user_fi')) {
319 $this->db->addTableColumn(
329 if (!$this->db->tableColumnExists(
'tst_addtime',
'test_fi')) {
330 $this->db->addTableColumn(
341 if ($this->db->tableColumnExists(
'tst_addtime',
'active_fi')) {
342 $this->db->manipulate(
344 UPDATE tst_addtime INNER JOIN tst_active ON tst_active.active_id = tst_addtime.active_fi 345 SET tst_addtime.test_fi = tst_active.test_fi, tst_addtime.user_fi = tst_active.user_fi' 348 $this->db->dropTableColumn(
'tst_addtime',
'active_fi');
351 if (!$this->db->primaryExistsByFields(
'tst_addtime', [
'user_fi',
'test_fi'])) {
352 $this->db->addPrimaryKey(
'tst_addtime', [
'user_fi',
'test_fi']);
358 if ($this->db->tableColumnExists(
'tst_tests',
'broken')) {
359 $this->db->dropTableColumn(
'tst_tests',
'broken');
365 if ($this->db->tableColumnExists(
'tst_tests',
'obligations_enabled')) {
366 $this->db->dropTableColumn(
'tst_tests',
'obligations_enabled');
369 if ($this->db->tableColumnExists(
'tst_pass_result',
'obligations_answered')) {
370 $this->db->dropTableColumn(
'tst_pass_result',
'obligations_answered');
373 if ($this->db->tableColumnExists(
'tst_test_question',
'obligatory')) {
374 $this->db->dropTableColumn(
'tst_test_question',
'obligatory');
377 if ($this->db->tableColumnExists(
'tst_result_cache',
'obligations_answered')) {
378 $this->db->dropTableColumn(
'tst_result_cache',
'obligations_answered');
384 if (!$this->db->tableColumnExists(
'tst_pass_result',
'finalized_by')) {
385 $this->db->addTableColumn(
399 $this->db->manipulate(
'DELETE FROM rbac_operations WHERE operation = "tst_statistics"');
404 if ($this->db->tableColumnExists(
'tst_tests',
'author')) {
405 $this->db->dropTableColumn(
'tst_tests',
'author');
411 if ($this->db->tableColumnExists(
'tst_tests',
'enable_processing_time')) {
412 $this->db->manipulateF(
413 'UPDATE tst_tests SET enable_processing_time = %s WHERE enable_processing_time IS NULL',
417 $this->db->modifyTableColumn(
419 'enable_processing_time',
const QUESTION_ADMINISTRATION_LOG_TABLE
prepare(\ilDBInterface $db)
Prepare the execution of the steps.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
const TEST_ADMINISTRATION_LOG_TABLE
const PARTICIPANT_LOG_TABLE