ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
ilLTIConsumerDatabaseUpdateSteps Class Reference
+ Inheritance diagram for ilLTIConsumerDatabaseUpdateSteps:
+ Collaboration diagram for ilLTIConsumerDatabaseUpdateSteps:

Public Member Functions

 prepare (ilDBInterface $db)
 
 step_1 ()
 
 step_2 ()
 
 step_3 ()
 
 step_4 ()
 
 step_5 ()
 
 step_6 ()
 
 step_7 ()
 
 step_8 ()
 
 step_9 ()
 
 step_10 ()
 
 step_11 ()
 
 step_12 ()
 
 step_13 ()
 
 step_14 ()
 
 step_15 ()
 
- 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.ilLTIConsumerDatabaseUpdateSteps.php.

Member Function Documentation

◆ prepare()

ilLTIConsumerDatabaseUpdateSteps::prepare ( ilDBInterface  $db)

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

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

References $db.

◆ step_1()

ilLTIConsumerDatabaseUpdateSteps::step_1 ( )

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

30 : void
31 {
32 if (!$this->db->tableColumnExists('lti_ext_provider', 'instructor_send_name')) {
33 $this->db->addTableColumn('lti_ext_provider', 'instructor_send_name', [
34 'type' => 'integer',
35 'length' => 1,
36 'notnull' => true,
37 'default' => '0'
38 ]);
39 }
40 }

◆ step_10()

ilLTIConsumerDatabaseUpdateSteps::step_10 ( )

Definition at line 127 of file class.ilLTIConsumerDatabaseUpdateSteps.php.

127 : void
128 {
129 if (!$this->db->tableColumnExists('lti_ext_provider', 'content_item')) {
130 $this->db->addTableColumn('lti_ext_provider', 'content_item', [
131 'type' => 'integer',
132 'length' => 1,
133 'notnull' => true,
134 'default' => '0'
135 ]);
136 }
137 }

◆ step_11()

ilLTIConsumerDatabaseUpdateSteps::step_11 ( )

Definition at line 139 of file class.ilLTIConsumerDatabaseUpdateSteps.php.

139 : void
140 {
141 if (!$this->db->tableColumnExists('lti_ext_provider', 'content_item_url')) {
142 $this->db->addTableColumn('lti_ext_provider', 'content_item_url', [
143 'type' => 'text',
144 'length' => 510,
145 'notnull' => false
146 ]);
147 }
148 }

◆ step_12()

ilLTIConsumerDatabaseUpdateSteps::step_12 ( )

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

150 : void
151 {
152 if (!$this->db->tableColumnExists('lti_ext_provider', 'grade_synchronization')) {
153 $this->db->addTableColumn('lti_ext_provider', 'grade_synchronization', [
154 'type' => 'integer',
155 'length' => 1,
156 'notnull' => true,
157 'default' => '0'
158 ]);
159 }
160 }

◆ step_13()

ilLTIConsumerDatabaseUpdateSteps::step_13 ( )

Definition at line 162 of file class.ilLTIConsumerDatabaseUpdateSteps.php.

162 : void
163 {
164 if (!$this->db->tableColumnExists('lti_ext_provider', 'lti_version')) {
165 $this->db->addTableColumn('lti_ext_provider', 'lti_version', [
166 'type' => 'text',
167 'length' => 10,
168 'notnull' => true,
169 'default' => 'LTI-1p0'
170 ]);
171 }
172 }

◆ step_14()

ilLTIConsumerDatabaseUpdateSteps::step_14 ( )

Definition at line 174 of file class.ilLTIConsumerDatabaseUpdateSteps.php.

174 : void
175 {
176 if (!$this->db->tableColumnExists('lti_consumer_settings', 'custom_params')) {
177 $this->db->addTableColumn('lti_consumer_settings', 'custom_params', [
178 'type' => 'text',
179 'length' => 255,
180 'notnull' => true,
181 'default' => ''
182 ]);
183 }
184 }

◆ step_15()

ilLTIConsumerDatabaseUpdateSteps::step_15 ( )

Definition at line 186 of file class.ilLTIConsumerDatabaseUpdateSteps.php.

186 : void
187 {
188 if (!$this->db->tableExists('lti_consumer_grades')) {
189 $values = array(
190 'id' => array(
191 'type' => 'integer',
192 'length' => 4,
193 'notnull' => true
194 ),
195 'obj_id' => array(
196 'type' => 'integer',
197 'length' => 4,
198 'notnull' => true
199 ),
200 'usr_id' => array(
201 'type' => 'integer',
202 'length' => 4,
203 'notnull' => true
204 ),
205 'score_given' => array(
206 'type' => 'float',
207 'notnull' => false
208 ),
209 'score_maximum' => array(
210 'type' => 'float',
211 'notnull' => false
212 ),
213 'activity_progress' => array(
214 'type' => 'text',
215 'length' => 20,
216 'notnull' => true
217 ),
218 'grading_progress' => array(
219 'type' => 'text',
220 'length' => 20,
221 'notnull' => true
222 ),
223 'lti_timestamp' => array(
224 'type' => 'timestamp',
225 'notnull' => false,
226 'default' => null
227 ),
228 'stored' => array(
229 'type' => 'timestamp',
230 'notnull' => true
231 )
232 );
233 $this->db->createTable("lti_consumer_grades", $values);
234 $this->db->addPrimaryKey("lti_consumer_grades", array("id"));
235 $this->db->createSequence("lti_consumer_grades");
236 $this->db->addIndex("lti_consumer_grades", array("obj_id","usr_id"), 'i1');
237 }
238 }

◆ step_2()

ilLTIConsumerDatabaseUpdateSteps::step_2 ( )

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

42 : void
43 {
44 if (!$this->db->tableColumnExists('lti_ext_provider', 'instructor_send_email')) {
45 $this->db->addTableColumn('lti_ext_provider', 'instructor_send_email', [
46 'type' => 'integer',
47 'length' => 1,
48 'notnull' => true,
49 'default' => '0'
50 ]);
51 }
52 }

◆ step_3()

ilLTIConsumerDatabaseUpdateSteps::step_3 ( )

Definition at line 54 of file class.ilLTIConsumerDatabaseUpdateSteps.php.

54 : void
55 {
56 if (!$this->db->tableColumnExists('lti_ext_provider', 'client_id')) {
57 $this->db->addTableColumn('lti_ext_provider', 'client_id', [
58 'type' => 'text',
59 'length' => 255,
60 'notnull' => false
61 ]);
62 }
63 }

◆ step_4()

ilLTIConsumerDatabaseUpdateSteps::step_4 ( )

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

65 : void
66 {
67 if (!$this->db->tableColumnExists('lti_ext_provider', 'enabled_capability')) {
68 $this->db->addTableColumn('lti_ext_provider', 'enabled_capability', [
69 'type' => 'clob'
70 ]);
71 }
72 }

◆ step_5()

ilLTIConsumerDatabaseUpdateSteps::step_5 ( )

Definition at line 74 of file class.ilLTIConsumerDatabaseUpdateSteps.php.

74 : void
75 {
76 if (!$this->db->tableColumnExists('lti_ext_provider', 'key_type')) {
77 $this->db->addTableColumn('lti_ext_provider', 'key_type', [
78 'type' => 'text',
79 'length' => 16,
80 'notnull' => false
81 ]);
82 }
83 }

◆ step_6()

ilLTIConsumerDatabaseUpdateSteps::step_6 ( )

Definition at line 85 of file class.ilLTIConsumerDatabaseUpdateSteps.php.

85 : void
86 {
87 if (!$this->db->tableColumnExists('lti_ext_provider', 'public_key')) {
88 $this->db->addTableColumn('lti_ext_provider', 'public_key', [
89 'type' => 'clob'
90 ]);
91 }
92 }

◆ step_7()

ilLTIConsumerDatabaseUpdateSteps::step_7 ( )

Definition at line 94 of file class.ilLTIConsumerDatabaseUpdateSteps.php.

94 : void
95 {
96 if (!$this->db->tableColumnExists('lti_ext_provider', 'public_keyset')) {
97 $this->db->addTableColumn('lti_ext_provider', 'public_keyset', [
98 'type' => 'text',
99 'length' => 255,
100 'notnull' => false
101 ]);
102 }
103 }

◆ step_8()

ilLTIConsumerDatabaseUpdateSteps::step_8 ( )

Definition at line 105 of file class.ilLTIConsumerDatabaseUpdateSteps.php.

105 : void
106 {
107 if (!$this->db->tableColumnExists('lti_ext_provider', 'initiate_login')) {
108 $this->db->addTableColumn('lti_ext_provider', 'initiate_login', [
109 'type' => 'text',
110 'length' => 255,
111 'notnull' => false
112 ]);
113 }
114 }

◆ step_9()

ilLTIConsumerDatabaseUpdateSteps::step_9 ( )

Definition at line 116 of file class.ilLTIConsumerDatabaseUpdateSteps.php.

116 : void
117 {
118 if (!$this->db->tableColumnExists('lti_ext_provider', 'redirection_uris')) {
119 $this->db->addTableColumn('lti_ext_provider', 'redirection_uris', [
120 'type' => 'text',
121 'length' => 510,
122 'notnull' => false
123 ]);
124 }
125 }

Field Documentation

◆ $db

ilDBInterface ilLTIConsumerDatabaseUpdateSteps::$db
protected

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

Referenced by prepare().


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