ILIAS  release_8 Revision v8.24
ilStudyProgrammeAssignmentTableUpdateSteps Class Reference

This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Learning e.V. More...

+ Inheritance diagram for ilStudyProgrammeAssignmentTableUpdateSteps:
+ Collaboration diagram for ilStudyProgrammeAssignmentTableUpdateSteps:

Public Member Functions

 prepare (ilDBInterface $db)
 
 step_1 ()
 
- Public Member Functions inherited from ilDatabaseUpdateSteps
 prepare (\ilDBInterface $db)
 Prepare the execution of the steps. More...
 

Data Fields

const TABLE_NAME = 'prg_usr_assignments'
 

Protected Attributes

ilDBInterface $db
 

Detailed Description

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

Definition at line 21 of file ilStudyProgrammeAssignmentTableUpdateSteps.php.

Member Function Documentation

◆ prepare()

ilStudyProgrammeAssignmentTableUpdateSteps::prepare ( ilDBInterface  $db)

Definition at line 27 of file ilStudyProgrammeAssignmentTableUpdateSteps.php.

27 : void
28 {
29 $this->db = $db;
30 }

References $db.

◆ step_1()

ilStudyProgrammeAssignmentTableUpdateSteps::step_1 ( )

Definition at line 32 of file ilStudyProgrammeAssignmentTableUpdateSteps.php.

32 : 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 }
$query

References $query.

Field Documentation

◆ $db

ilDBInterface ilStudyProgrammeAssignmentTableUpdateSteps::$db
protected

Definition at line 25 of file ilStudyProgrammeAssignmentTableUpdateSteps.php.

Referenced by prepare().

◆ TABLE_NAME

const ilStudyProgrammeAssignmentTableUpdateSteps::TABLE_NAME = 'prg_usr_assignments'

The documentation for this class was generated from the following file: