ILIAS  release_9 Revision v9.13-25-g2c18ec4c24f
ilTest9DBUpdateSteps Class Reference
+ Inheritance diagram for ilTest9DBUpdateSteps:
+ Collaboration diagram for ilTest9DBUpdateSteps:

Public Member Functions

 prepare (ilDBInterface $db)
 
 step_1 ()
 
 step_2 ()
 
 step_3 ()
 Drop the test settings for the special character seletor. More...
 
 step_4 ()
 
 step_5 ()
 
 step_6 ()
 
 step_7 ()
 
 step_8 ()
 
 step_9 ()
 
 step_10 ()
 
 step_11 ()
 
 step_12 ()
 
 step_13 ()
 
 step_14 ()
 
 step_15 ()
 
 step_16 ()
 
 step_17 ()
 
 step_18 ()
 
 step_19 ()
 
 step_20 ()
 
 step_21 ()
 
 step_22 ()
 
 step_23 ()
 
- Public Member Functions inherited from ilDatabaseUpdateSteps
 prepare (\ilDBInterface $db)
 Prepare the execution of the steps. More...
 

Protected Attributes

ilDBInterface $db
 

Detailed Description

Definition at line 21 of file class.ilTest9DBUpdateSteps.php.

Member Function Documentation

◆ prepare()

ilTest9DBUpdateSteps::prepare ( ilDBInterface  $db)

Definition at line 25 of file class.ilTest9DBUpdateSteps.php.

References $db.

25  : void
26  {
27  $this->db = $db;
28  }

◆ step_1()

ilTest9DBUpdateSteps::step_1 ( )

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

30  : void
31  {
32  if ($this->db->tableColumnExists('tst_tests', 'show_examview_pdf')) {
33  $this->db->dropTableColumn('tst_tests', 'show_examview_pdf');
34  }
35  }

◆ step_10()

ilTest9DBUpdateSteps::step_10 ( )

Definition at line 196 of file class.ilTest9DBUpdateSteps.php.

196  : void
197  {
198  if ($this->db->tableColumnExists('tst_tests', 'sign_submission')) {
199  $this->db->dropTableColumn(
200  'tst_tests',
201  'sign_submission'
202  );
203  }
204  }

◆ step_11()

ilTest9DBUpdateSteps::step_11 ( )

Definition at line 206 of file class.ilTest9DBUpdateSteps.php.

206  : void
207  {
208  if ($this->db->tableColumnExists('tst_tests', 'show_summary')) {
209  $this->db->renameTableColumn(
210  'tst_tests',
211  'show_summary',
212  'usr_pass_overview_mode'
213  );
214  }
215  }

◆ step_12()

ilTest9DBUpdateSteps::step_12 ( )

Definition at line 217 of file class.ilTest9DBUpdateSteps.php.

217  : void
218  {
219  if (!$this->db->tableColumnExists('tst_tests', 'show_questionlist')) {
220  $this->db->addTableColumn(
221  'tst_tests',
222  'show_questionlist',
223  [
224  'type' => 'integer',
225  'length' => 1
226  ]
227  );
228  }
229  }

◆ step_13()

ilTest9DBUpdateSteps::step_13 ( )

Definition at line 231 of file class.ilTest9DBUpdateSteps.php.

231  : void
232  {
233  if (!$this->db->tableColumnExists('tst_tests', 'hide_info_tab')) {
234  $this->db->addTableColumn('tst_tests', 'hide_info_tab', [
235  'type' => 'integer',
236  'length' => 1,
237  'default' => 0,
238  'notnull' => true
239  ]);
240  }
241 
242  if (!$this->db->tableColumnExists('tst_tests', 'conditions_checkbox_enabled')) {
243  $this->db->addTableColumn('tst_tests', 'conditions_checkbox_enabled', [
244  'type' => 'integer',
245  'length' => 1,
246  'default' => 0,
247  'notnull' => true
248  ]);
249  }
250  }

◆ step_14()

ilTest9DBUpdateSteps::step_14 ( )

Definition at line 252 of file class.ilTest9DBUpdateSteps.php.

252  : void
253  {
254  if ($this->db->tableColumnExists('tst_tests', 'hide_info_tab')) {
255  $this->db->modifyTableColumn('tst_tests', 'hide_info_tab', [
256  'type' => 'integer',
257  'length' => 1,
258  'default' => 0,
259  'notnull' => true
260  ]);
261  }
262 
263  if ($this->db->tableColumnExists('tst_tests', 'conditions_checkbox_enabled')) {
264  $this->db->modifyTableColumn('tst_tests', 'conditions_checkbox_enabled', [
265  'type' => 'integer',
266  'length' => 1,
267  'default' => 0,
268  'notnull' => true
269  ]);
270  }
271  }

◆ step_15()

ilTest9DBUpdateSteps::step_15 ( )

Definition at line 273 of file class.ilTest9DBUpdateSteps.php.

273  : void
274  {
275  if ($this->db->tableColumnExists('tst_tests', 'result_tax_filters')) {
276  $this->db->dropTableColumn('tst_tests', 'result_tax_filters');
277  }
278  }

◆ step_16()

ilTest9DBUpdateSteps::step_16 ( )

Definition at line 280 of file class.ilTest9DBUpdateSteps.php.

280  : void
281  {
282  $this->db->modifyTableColumn(
283  'tst_tests',
284  'show_cancel',
285  [
286  'type' => 'text',
287  'length' => 1,
288  'default' => '0'
289  ]
290  );
291  }

◆ step_17()

ilTest9DBUpdateSteps::step_17 ( )

Definition at line 293 of file class.ilTest9DBUpdateSteps.php.

293  : void
294  {
295  $this->db->modifyTableColumn(
296  'tst_tests',
297  'use_previous_answers',
298  [
299  'type' => 'text',
300  'length' => 1,
301  'default' => '0'
302  ]
303  );
304  }

◆ step_18()

ilTest9DBUpdateSteps::step_18 ( )

Definition at line 307 of file class.ilTest9DBUpdateSteps.php.

307  : void
308  {
309  $this->db->renameTableColumn(
310  'tst_tests',
311  'show_cancel',
312  'suspend_test_allowed'
313  );
314  }

◆ step_19()

ilTest9DBUpdateSteps::step_19 ( )

Definition at line 316 of file class.ilTest9DBUpdateSteps.php.

316  : void
317  {
318  if (!$this->db->tableExists('tst_qst_var_presented')) {
319  $this->db->createTable('tst_qst_var_presented', [
320  'question_id' => [
321  'type' => 'integer',
322  'length' => 8,
323  'notnull' => true
324  ],
325  'active_id' => [
326  'type' => 'integer',
327  'length' => 8,
328  'notnull' => true
329  ],
330  'pass' => [
331  'type' => 'integer',
332  'length' => 8,
333  'notnull' => true
334  ],
335  'variable' => [
336  'type' => 'text',
337  'length' => 32,
338  'notnull' => true
339  ],
340  'value' => [
341  'type' => 'text',
342  'length' => 64,
343  'notnull' => true
344  ]
345  ]);
346  $this->db->addPrimaryKey(
347  'tst_qst_var_presented',
348  ['question_id','active_id','pass','variable']
349  );
350  }
351  }

◆ step_2()

ilTest9DBUpdateSteps::step_2 ( )

Definition at line 37 of file class.ilTest9DBUpdateSteps.php.

37  : void
38  {
39  if (!$this->db->tableExists('manscoring_done')) {
40  $this->db->createTable('manscoring_done', [
41  'active_id' => [
42  'type' => 'integer',
43  'length' => 8,
44  'notnull' => true
45  ],
46  'done' => [
47  'type' => 'integer',
48  'length' => 1,
49  'notnull' => true,
50  'default' => 0
51  ]
52  ]);
53  $this->db->addPrimaryKey('manscoring_done', ['active_id']);
54  }
55  }

◆ step_20()

ilTest9DBUpdateSteps::step_20 ( )

Definition at line 353 of file class.ilTest9DBUpdateSteps.php.

References ilDBConstants\T_CLOB.

353  : void
354  {
355  $this->db->modifyTableColumn('ass_log', 'logtext', ['type' => \ilDBConstants::T_CLOB]);
356  }

◆ step_21()

ilTest9DBUpdateSteps::step_21 ( )

Definition at line 358 of file class.ilTest9DBUpdateSteps.php.

358  : void
359  {
360  $this->db->manipulate('UPDATE tst_pass_result SET points = 0 WHERE points < 0');
361  $this->db->manipulate('UPDATE tst_result_cache SET reached_points = 0 WHERE reached_points < 0');
362  }

◆ step_22()

ilTest9DBUpdateSteps::step_22 ( )

Definition at line 364 of file class.ilTest9DBUpdateSteps.php.

364  : void
365  {
366  $this->db->modifyTableColumn(
367  'tst_tests',
368  'starting_time',
369  [
370  'length' => 8
371  ]
372  );
373  $this->db->modifyTableColumn(
374  'tst_tests',
375  'ending_time',
376  [
377  'length' => 8
378  ]
379  );
380  }

◆ step_23()

ilTest9DBUpdateSteps::step_23 ( )

Definition at line 382 of file class.ilTest9DBUpdateSteps.php.

382  : void
383  {
384  $this->db->manipulate(
385  'DELETE FROM settings WHERE module="assessment" AND keyword="assessment_man_scoring_fix_run"'
386  );
387  }

◆ step_3()

ilTest9DBUpdateSteps::step_3 ( )

Drop the test settings for the special character seletor.

Definition at line 60 of file class.ilTest9DBUpdateSteps.php.

60  : void
61  {
62  if ($this->db->tableColumnExists('tst_tests', 'char_selector_availability')) {
63  $this->db->dropTableColumn('tst_tests', 'char_selector_availability');
64  }
65 
66  if ($this->db->tableColumnExists('tst_tests', 'char_selector_definition')) {
67  $this->db->dropTableColumn('tst_tests', 'char_selector_definition');
68  }
69  }

◆ step_4()

ilTest9DBUpdateSteps::step_4 ( )

Definition at line 71 of file class.ilTest9DBUpdateSteps.php.

71  : void
72  {
73  if (!$this->db->tableColumnExists('tst_tests', 'introduction_page_id')) {
74  $this->db->addTableColumn(
75  'tst_tests',
76  'introduction_page_id',
77  [
78  'type' => 'integer',
79  'length' => 8
80  ]
81  );
82  }
83  if (!$this->db->tableColumnExists('tst_tests', 'concluding_remarks_page_id')) {
84  $this->db->addTableColumn(
85  'tst_tests',
86  'concluding_remarks_page_id',
87  [
88  'type' => 'integer',
89  'length' => 8
90  ]
91  );
92  }
93  }

◆ step_5()

ilTest9DBUpdateSteps::step_5 ( )

Definition at line 95 of file class.ilTest9DBUpdateSteps.php.

95  : void
96  {
97  if ($this->db->tableColumnExists('tst_tests', 'show_examview_html')) {
98  $this->db->dropTableColumn(
99  'tst_tests',
100  'show_examview_html'
101  );
102  }
103  if ($this->db->tableColumnExists('tst_tests', 'showinfo')) {
104  $this->db->dropTableColumn(
105  'tst_tests',
106  'showinfo'
107  );
108  }
109  if ($this->db->tableColumnExists('tst_tests', 'forcejs')) {
110  $this->db->dropTableColumn(
111  'tst_tests',
112  'forcejs'
113  );
114  }
115  if ($this->db->tableColumnExists('tst_tests', 'enable_archiving')) {
116  $this->db->dropTableColumn(
117  'tst_tests',
118  'enable_archiving'
119  );
120  }
121  if ($this->db->tableColumnExists('tst_tests', 'customstyle')) {
122  $this->db->dropTableColumn(
123  'tst_tests',
124  'customstyle'
125  );
126  }
127  if ($this->db->tableColumnExists('tst_tests', 'enabled_view_mode')) {
128  $this->db->dropTableColumn(
129  'tst_tests',
130  'enabled_view_mode'
131  );
132  }
133  }

◆ step_6()

ilTest9DBUpdateSteps::step_6 ( )

Definition at line 135 of file class.ilTest9DBUpdateSteps.php.

135  : void
136  {
137  if ($this->db->tableColumnExists('tst_tests', 'allowedusers')) {
138  $this->db->dropTableColumn('tst_tests', 'allowedusers');
139  }
140 
141  if ($this->db->tableColumnExists('tst_tests', 'alloweduserstimegap')) {
142  $this->db->dropTableColumn('tst_tests', 'alloweduserstimegap');
143  }
144 
145  if ($this->db->tableColumnExists('tst_tests', 'limit_users_enabled')) {
146  $this->db->dropTableColumn('tst_tests', 'limit_users_enabled');
147  }
148  }

◆ step_7()

ilTest9DBUpdateSteps::step_7 ( )

Definition at line 150 of file class.ilTest9DBUpdateSteps.php.

150  : void
151  {
152  if ($this->db->tableExists('tst_dyn_quest_set_cfg')) {
153  $this->db->dropTable('tst_dyn_quest_set_cfg');
154  }
155  if ($this->db->tableExists('tst_seq_qst_tracking')) {
156  $this->db->dropTable('tst_seq_qst_tracking');
157  }
158  if ($this->db->tableExists('tst_seq_qst_answstatus')) {
159  $this->db->dropTable('tst_seq_qst_answstatus');
160  }
161  if ($this->db->tableExists('tst_seq_qst_postponed')) {
162  $this->db->dropTable('tst_seq_qst_postponed');
163  }
164  }

◆ step_8()

ilTest9DBUpdateSteps::step_8 ( )

Definition at line 166 of file class.ilTest9DBUpdateSteps.php.

166  : void
167  {
168  if ($this->db->tableColumnExists('tst_tests', 'redirection_url')) {
169  $this->db->modifyTableColumn(
170  'tst_tests',
171  'redirection_url',
172  [
173  'type' => 'text',
174  'length' => 4000,
175  'notnull' => false,
176  'default' => null
177  ]
178  );
179  }
180  }

◆ step_9()

ilTest9DBUpdateSteps::step_9 ( )

Definition at line 182 of file class.ilTest9DBUpdateSteps.php.

182  : void
183  {
184  if (!$this->db->tableColumnExists('tst_tests', 'show_questionlist')) {
185  $this->db->addTableColumn(
186  'tst_tests',
187  'show_questionlist',
188  [
189  'type' => 'integer',
190  'length' => 1
191  ]
192  );
193  }
194  }

Field Documentation

◆ $db

ilDBInterface ilTest9DBUpdateSteps::$db
protected

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

Referenced by prepare().


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