ILIAS  release_9 Revision v9.13-25-g2c18ec4c24f
ilStudyProgrammeSettingsTableUpdateSteps 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 ilStudyProgrammeSettingsTableUpdateSteps:
+ Collaboration diagram for ilStudyProgrammeSettingsTableUpdateSteps:

Public Member Functions

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

Data Fields

const TABLE_NAME = 'prg_settings'
 
const TABLE_PROGRESSES = 'prg_usr_progress'
 

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 22 of file ilStudyProgrammeSettingsTableUpdateSteps.php.

Member Function Documentation

◆ prepare()

ilStudyProgrammeSettingsTableUpdateSteps::prepare ( ilDBInterface  $db)

Definition at line 29 of file ilStudyProgrammeSettingsTableUpdateSteps.php.

References $db.

29  : void
30  {
31  $this->db = $db;
32  }

◆ step_1()

ilStudyProgrammeSettingsTableUpdateSteps::step_1 ( )

Definition at line 34 of file ilStudyProgrammeSettingsTableUpdateSteps.php.

34  : void
35  {
36  $column_name = 'vq_restart_recheck';
37 
38  if (!$this->db->tableColumnExists(self::TABLE_NAME, $column_name)) {
39  $this->db->addTableColumn(
40  self::TABLE_NAME,
41  $column_name,
42  [
43  'type' => 'integer',
44  'length' => 1,
45  'default' => 0,
46  'notnull' => false
47  ]
48  );
49  }
50  }

◆ step_2()

ilStudyProgrammeSettingsTableUpdateSteps::step_2 ( )

Definition at line 52 of file ilStudyProgrammeSettingsTableUpdateSteps.php.

52  : void
53  {
54  $this->db->dropPrimaryKey(self::TABLE_PROGRESSES);
55  $this->db->addPrimaryKey(
56  self::TABLE_PROGRESSES,
57  [
58  'assignment_id',
59  'prg_id',
60  'usr_id'
61  ]
62  );
63  }

Field Documentation

◆ $db

ilDBInterface ilStudyProgrammeSettingsTableUpdateSteps::$db
protected

Definition at line 27 of file ilStudyProgrammeSettingsTableUpdateSteps.php.

Referenced by prepare().

◆ TABLE_NAME

const ilStudyProgrammeSettingsTableUpdateSteps::TABLE_NAME = 'prg_settings'

Definition at line 24 of file ilStudyProgrammeSettingsTableUpdateSteps.php.

◆ TABLE_PROGRESSES

const ilStudyProgrammeSettingsTableUpdateSteps::TABLE_PROGRESSES = 'prg_usr_progress'

Definition at line 25 of file ilStudyProgrammeSettingsTableUpdateSteps.php.


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