ILIAS
release_8 Revision v8.23
◀ ilDoc Overview
ilStudyProgrammeAssignmentTableUpdateSteps.php
Go to the documentation of this file.
1
<?php
2
3
declare(strict_types=1);
4
21
class
ilStudyProgrammeAssignmentTableUpdateSteps
implements
ilDatabaseUpdateSteps
22
{
23
public
const
TABLE_NAME
=
'prg_usr_assignments'
;
24
25
protected
ilDBInterface
$db
;
26
27
public
function
prepare
(
ilDBInterface
$db): void
28
{
29
$this->db =
$db
;
30
}
31
32
public
function
step_1
(): void
33
{
34
$column_name =
'assigned_manually'
;
35
36
if
(!$this->db->tableColumnExists(self::TABLE_NAME, $column_name)) {
37
$this->db->addTableColumn(
38
self::TABLE_NAME,
39
$column_name,
40
[
41
'type'
=>
'integer'
,
42
'length'
=> 1,
43
'default'
=> 0,
44
'notnull'
=>
false
45
]
46
);
47
}
48
49
$query
=
'UPDATE '
. self::TABLE_NAME
50
.
' JOIN object_data ON last_change_by = object_data.obj_id'
51
.
' SET '
. $column_name .
' = 1'
52
.
' WHERE type = "usr";'
53
;
54
$this->db->manipulate(
$query
);
55
}
56
}
ilStudyProgrammeAssignmentTableUpdateSteps\step_1
step_1()
Definition:
ilStudyProgrammeAssignmentTableUpdateSteps.php:32
ilStudyProgrammeAssignmentTableUpdateSteps\$db
ilDBInterface $db
Definition:
ilStudyProgrammeAssignmentTableUpdateSteps.php:25
ilDBInterface
$query
$query
Definition:
proxy_ylocal.php:13
ilDatabaseUpdateSteps
ilStudyProgrammeAssignmentTableUpdateSteps\TABLE_NAME
const TABLE_NAME
Definition:
ilStudyProgrammeAssignmentTableUpdateSteps.php:23
ilStudyProgrammeAssignmentTableUpdateSteps
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
Definition:
ilStudyProgrammeAssignmentTableUpdateSteps.php:21
ilStudyProgrammeAssignmentTableUpdateSteps\prepare
prepare(ilDBInterface $db)
Definition:
ilStudyProgrammeAssignmentTableUpdateSteps.php:27
Modules
StudyProgramme
classes
Setup
ilStudyProgrammeAssignmentTableUpdateSteps.php
Generated on Wed Sep 3 2025 22:01:39 for ILIAS by
1.8.13 (using
Doxyfile
)