ILIAS  release_8 Revision v8.19
All Data Structures Namespaces Files Functions Variables Modules Pages
ILIAS\Exercise\Setup\ilExerciseDBUpdateSteps Class Reference
+ Inheritance diagram for ILIAS\Exercise\Setup\ilExerciseDBUpdateSteps:
+ Collaboration diagram for ILIAS\Exercise\Setup\ilExerciseDBUpdateSteps:

Public Member Functions

 prepare (\ilDBInterface $db)
 Prepare the execution of the steps. More...
 
 step_1 ()
 
 step_2 ()
 
 step_3 ()
 
 step_4 ()
 
 step_5 ()
 

Protected Attributes

ilDBInterface $db
 

Detailed Description

Author
Alexander Killing killi.nosp@m.ng@l.nosp@m.eifos.nosp@m..de

Definition at line 26 of file class.ilExerciseDBUpdateSteps.php.

Member Function Documentation

◆ prepare()

ILIAS\Exercise\Setup\ilExerciseDBUpdateSteps::prepare ( \ilDBInterface  $db)

Prepare the execution of the steps.

Do not use anything from the globals or the DIC inside your steps, only use the instance of the database provided here.

Implements ilDatabaseUpdateSteps.

Definition at line 30 of file class.ilExerciseDBUpdateSteps.php.

References ILIAS\Exercise\Setup\ilExerciseDBUpdateSteps\$db.

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

◆ step_1()

ILIAS\Exercise\Setup\ilExerciseDBUpdateSteps::step_1 ( )

Definition at line 35 of file class.ilExerciseDBUpdateSteps.php.

35  : void
36  {
37  if (!$this->db->indexExistsByFields('exc_assignment', ['exc_id'])) {
38  $this->db->addIndex('exc_assignment', ['exc_id'], 'i1');
39  }
40  }

◆ step_2()

ILIAS\Exercise\Setup\ilExerciseDBUpdateSteps::step_2 ( )

Definition at line 42 of file class.ilExerciseDBUpdateSteps.php.

42  : void
43  {
44  if (!$this->db->indexExistsByFields('exc_members', ['usr_id'])) {
45  $this->db->addIndex('exc_members', ['usr_id'], 'i1');
46  }
47  }

◆ step_3()

ILIAS\Exercise\Setup\ilExerciseDBUpdateSteps::step_3 ( )

Definition at line 49 of file class.ilExerciseDBUpdateSteps.php.

49  : void
50  {
51  if (!$this->db->indexExistsByFields('exc_assignment', ['deadline_mode', 'exc_id'])) {
52  $this->db->addIndex('exc_assignment', ['deadline_mode', 'exc_id'], 'i2');
53  }
54  }

◆ step_4()

ILIAS\Exercise\Setup\ilExerciseDBUpdateSteps::step_4 ( )

Definition at line 56 of file class.ilExerciseDBUpdateSteps.php.

56  : void
57  {
58  if (!$this->db->indexExistsByFields('exc_ass_file_order', ['assignment_id'])) {
59  $this->db->addIndex('exc_ass_file_order', ['assignment_id'], 'i1');
60  }
61  }

◆ step_5()

ILIAS\Exercise\Setup\ilExerciseDBUpdateSteps::step_5 ( )

Definition at line 63 of file class.ilExerciseDBUpdateSteps.php.

63  : void
64  {
65  if (!$this->db->indexExistsByFields('il_exc_team', ['id'])) {
66  $this->db->addIndex('il_exc_team', ['id'], 'i1');
67  }
68  }

Field Documentation

◆ $db

ilDBInterface ILIAS\Exercise\Setup\ilExerciseDBUpdateSteps::$db
protected

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