ILIAS  trunk Revision v11.0_alpha-2662-g519ff7d528f
ILIAS\Test\Setup\ilTestNoHintsDBUpdateSteps Class Reference
+ Inheritance diagram for ILIAS\Test\Setup\ilTestNoHintsDBUpdateSteps:
+ Collaboration diagram for ILIAS\Test\Setup\ilTestNoHintsDBUpdateSteps:

Public Member Functions

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

Protected Attributes

ilDBInterface $db
 

Private Member Functions

 dropCols ($table, $cols)
 

Detailed Description

Definition at line 23 of file class.ilTestNoHintsDBUpdateSteps.php.

Member Function Documentation

◆ dropCols()

ILIAS\Test\Setup\ilTestNoHintsDBUpdateSteps::dropCols (   $table,
  $cols 
)
private

Definition at line 32 of file class.ilTestNoHintsDBUpdateSteps.php.

Referenced by ILIAS\Test\Setup\ilTestNoHintsDBUpdateSteps\step_1(), ILIAS\Test\Setup\ilTestNoHintsDBUpdateSteps\step_2(), ILIAS\Test\Setup\ilTestNoHintsDBUpdateSteps\step_3(), and ILIAS\Test\Setup\ilTestNoHintsDBUpdateSteps\step_4().

32  : void
33  {
34  foreach ($cols as $col) {
35  if ($this->db->tableColumnExists($table, $col)) {
36  $this->db->dropTableColumn($table, $col);
37  }
38  }
39  }
+ Here is the caller graph for this function:

◆ prepare()

ILIAS\Test\Setup\ilTestNoHintsDBUpdateSteps::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 27 of file class.ilTestNoHintsDBUpdateSteps.php.

References ILIAS\Test\Setup\ilTestNoHintsDBUpdateSteps\$db.

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

◆ step_1()

ILIAS\Test\Setup\ilTestNoHintsDBUpdateSteps::step_1 ( )

Definition at line 41 of file class.ilTestNoHintsDBUpdateSteps.php.

References ILIAS\Test\Setup\ilTestNoHintsDBUpdateSteps\dropCols().

41  : void
42  {
43  $this->dropCols('tst_tests', [
44  'offer_question_hints',
45  'highscore_hints'
46  ]);
47  }
+ Here is the call graph for this function:

◆ step_2()

ILIAS\Test\Setup\ilTestNoHintsDBUpdateSteps::step_2 ( )

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

References ILIAS\Test\Setup\ilTestNoHintsDBUpdateSteps\dropCols().

49  : void
50  {
51  $this->dropCols('tst_test_result', [
52  'hint_count',
53  'hint_points'
54  ]);
55  }
+ Here is the call graph for this function:

◆ step_3()

ILIAS\Test\Setup\ilTestNoHintsDBUpdateSteps::step_3 ( )

Definition at line 57 of file class.ilTestNoHintsDBUpdateSteps.php.

References ILIAS\Test\Setup\ilTestNoHintsDBUpdateSteps\dropCols().

57  : void
58  {
59  $this->dropCols('tst_pass_result', [
60  'hint_count',
61  'hint_points'
62  ]);
63  }
+ Here is the call graph for this function:

◆ step_4()

ILIAS\Test\Setup\ilTestNoHintsDBUpdateSteps::step_4 ( )

Definition at line 65 of file class.ilTestNoHintsDBUpdateSteps.php.

References ILIAS\Test\Setup\ilTestNoHintsDBUpdateSteps\dropCols().

65  : void
66  {
67  $this->dropCols('tst_result_cache', [
68  'hint_count',
69  'hint_points'
70  ]);
71  }
+ Here is the call graph for this function:

◆ step_5()

ILIAS\Test\Setup\ilTestNoHintsDBUpdateSteps::step_5 ( )

Definition at line 73 of file class.ilTestNoHintsDBUpdateSteps.php.

73  : void
74  {
75  if ($this->db->tableExists('qpl_hint_tracking')) {
76  $this->db->dropTable('qpl_hint_tracking');
77  }
78  if ($this->db->tableExists('qpl_hint_tracking_seq')) {
79  $this->db->dropTable('qpl_hint_tracking_seq');
80  }
81  }

◆ step_6()

ILIAS\Test\Setup\ilTestNoHintsDBUpdateSteps::step_6 ( )

Definition at line 83 of file class.ilTestNoHintsDBUpdateSteps.php.

83  : void
84  {
85  if ($this->db->tableExists('qpl_hints')) {
86  $this->db->dropTable('qpl_hints');
87  }
88  }

◆ step_7()

ILIAS\Test\Setup\ilTestNoHintsDBUpdateSteps::step_7 ( )

Definition at line 90 of file class.ilTestNoHintsDBUpdateSteps.php.

90  : void
91  {
92  $query = "DELETE FROM page_object WHERE parent_type = 'qht'";
93  $this->db->manipulate($query);
94  }

Field Documentation

◆ $db

ilDBInterface ILIAS\Test\Setup\ilTestNoHintsDBUpdateSteps::$db
protected

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