Completed
Push — 1.10.x ( 914b0e...814da6 )
by Angel Fernando Quiroz
41:58
created
main/course_progress/index.php 1 patch
Spacing   +21 added lines, -21 removed lines patch added patch discarded remove patch
@@ -17,7 +17,7 @@  discard block
 block discarded – undo
17 17
 // current section
18 18
 $this_section = SECTION_COURSES;
19 19
 
20
-$current_course_tool  = TOOL_COURSE_PROGRESS;
20
+$current_course_tool = TOOL_COURSE_PROGRESS;
21 21
 
22 22
 // protect a course script
23 23
 api_protect_course_script(true);
@@ -49,7 +49,7 @@  discard block
 block discarded – undo
49 49
     'thematic_advance_delete'
50 50
 );
51 51
 
52
-$action  = 'thematic_details';
52
+$action = 'thematic_details';
53 53
 if (isset($_REQUEST['action']) && in_array($_REQUEST['action'], $actions)) {
54 54
     $action = $_REQUEST['action'];
55 55
 }
@@ -187,21 +187,21 @@  discard block
 block discarded – undo
187 187
 $thematicControl = Session::read('thematic_control');
188 188
 
189 189
 if ($action == 'thematic_list') {
190
-    $interbreadcrumb[] = array ('url' => '#', 'name' => get_lang('ThematicControl'));
190
+    $interbreadcrumb[] = array('url' => '#', 'name' => get_lang('ThematicControl'));
191 191
 }
192 192
 if ($action == 'thematic_add') {
193
-    $interbreadcrumb[] = array ('url' => 'index.php?'.api_get_cidreq().'&action='.$thematicControl, 'name' => get_lang('ThematicControl'));
194
-    $interbreadcrumb[] = array ('url' => '#', 'name' => get_lang('NewThematicSection'));
193
+    $interbreadcrumb[] = array('url' => 'index.php?'.api_get_cidreq().'&action='.$thematicControl, 'name' => get_lang('ThematicControl'));
194
+    $interbreadcrumb[] = array('url' => '#', 'name' => get_lang('NewThematicSection'));
195 195
 }
196 196
 if ($action == 'thematic_edit') {
197
-    $interbreadcrumb[] = array ('url' => 'index.php?'.api_get_cidreq().'&action='.$thematicControl, 'name' => get_lang('ThematicControl'));
198
-    $interbreadcrumb[] = array ('url' => '#', 'name' => get_lang('EditThematicSection'));
197
+    $interbreadcrumb[] = array('url' => 'index.php?'.api_get_cidreq().'&action='.$thematicControl, 'name' => get_lang('ThematicControl'));
198
+    $interbreadcrumb[] = array('url' => '#', 'name' => get_lang('EditThematicSection'));
199 199
 }
200 200
 if ($action == 'thematic_details') {
201
-    $interbreadcrumb[] = array ('url' => '#', 'name' => get_lang('ThematicControl'));
201
+    $interbreadcrumb[] = array('url' => '#', 'name' => get_lang('ThematicControl'));
202 202
 }
203 203
 if ($action == 'thematic_plan_list' || $action == 'thematic_plan_delete') {
204
-    $interbreadcrumb[] = array ('url' => 'index.php?'.api_get_cidreq().'&action='.$thematicControl, 'name' => get_lang('ThematicControl'));
204
+    $interbreadcrumb[] = array('url' => 'index.php?'.api_get_cidreq().'&action='.$thematicControl, 'name' => get_lang('ThematicControl'));
205 205
     if (!empty($thematic_data)) {
206 206
         $interbreadcrumb[] = array(
207 207
             'url' => '#',
@@ -210,22 +210,22 @@  discard block
 block discarded – undo
210 210
     }
211 211
 }
212 212
 if ($action == 'thematic_plan_add' || $action == 'thematic_plan_edit') {
213
-    $interbreadcrumb[] = array ('url' => 'index.php?'.api_get_cidreq().'&action='.$thematicControl, 'name' => get_lang('ThematicControl'));
214
-    $interbreadcrumb[] = array ('url' => 'index.php?'.api_get_cidreq().'&action=thematic_plan_list&thematic_id='.$thematic_id, 'name' => get_lang('ThematicPlan').' ('.$thematic_data['title'].')');
213
+    $interbreadcrumb[] = array('url' => 'index.php?'.api_get_cidreq().'&action='.$thematicControl, 'name' => get_lang('ThematicControl'));
214
+    $interbreadcrumb[] = array('url' => 'index.php?'.api_get_cidreq().'&action=thematic_plan_list&thematic_id='.$thematic_id, 'name' => get_lang('ThematicPlan').' ('.$thematic_data['title'].')');
215 215
     if ($description_type >= ADD_THEMATIC_PLAN) {
216
-        $interbreadcrumb[] = array ('url' => '#', 'name' => get_lang('NewBloc'));
216
+        $interbreadcrumb[] = array('url' => '#', 'name' => get_lang('NewBloc'));
217 217
     } else {
218
-        $interbreadcrumb[] = array ('url' => '#', 'name' => $default_thematic_plan_title[$description_type]);
218
+        $interbreadcrumb[] = array('url' => '#', 'name' => $default_thematic_plan_title[$description_type]);
219 219
     }
220 220
 }
221 221
 if ($action == 'thematic_advance_list' || $action == 'thematic_advance_delete') {
222
-    $interbreadcrumb[] = array ('url' => 'index.php?'.api_get_cidreq().'&action='.$thematicControl, 'name' => get_lang('ThematicControl'));
223
-    $interbreadcrumb[] = array ('url' => '#', 'name' => get_lang('ThematicAdvance').' ('.$thematic_data['title'].')');
222
+    $interbreadcrumb[] = array('url' => 'index.php?'.api_get_cidreq().'&action='.$thematicControl, 'name' => get_lang('ThematicControl'));
223
+    $interbreadcrumb[] = array('url' => '#', 'name' => get_lang('ThematicAdvance').' ('.$thematic_data['title'].')');
224 224
 }
225 225
 if ($action == 'thematic_advance_add' || $action == 'thematic_advance_edit') {
226
-    $interbreadcrumb[] = array ('url' => 'index.php?'.api_get_cidreq().'&action='.$thematicControl, 'name' => get_lang('ThematicControl'));
227
-    $interbreadcrumb[] = array ('url' => 'index.php?'.api_get_cidreq().'&action=thematic_advance_list&thematic_id='.$thematic_id, 'name' => get_lang('ThematicAdvance').' ('.$thematic_data['title'].')');
228
-    $interbreadcrumb[] = array ('url' => '#', 'name' => get_lang('NewThematicAdvance'));
226
+    $interbreadcrumb[] = array('url' => 'index.php?'.api_get_cidreq().'&action='.$thematicControl, 'name' => get_lang('ThematicControl'));
227
+    $interbreadcrumb[] = array('url' => 'index.php?'.api_get_cidreq().'&action=thematic_advance_list&thematic_id='.$thematic_id, 'name' => get_lang('ThematicAdvance').' ('.$thematic_data['title'].')');
228
+    $interbreadcrumb[] = array('url' => '#', 'name' => get_lang('NewThematicAdvance'));
229 229
 }
230 230
 
231 231
 // Distpacher actions to controller
@@ -239,7 +239,7 @@  discard block
 block discarded – undo
239 239
     case 'thematic_import':
240 240
     case 'moveup':
241 241
     case 'movedown':
242
-        if (!api_is_allowed_to_edit(null,true)) {
242
+        if (!api_is_allowed_to_edit(null, true)) {
243 243
             api_not_allowed();
244 244
         }
245 245
     case 'thematic_list':
@@ -251,7 +251,7 @@  discard block
 block discarded – undo
251 251
     case 'thematic_plan_add':
252 252
     case 'thematic_plan_edit':
253 253
     case 'thematic_plan_delete':
254
-        if (!api_is_allowed_to_edit(null,true)) {
254
+        if (!api_is_allowed_to_edit(null, true)) {
255 255
             api_not_allowed();
256 256
         }
257 257
     case 'thematic_plan_list':
@@ -260,7 +260,7 @@  discard block
 block discarded – undo
260 260
     case 'thematic_advance_add':
261 261
     case 'thematic_advance_edit':
262 262
     case 'thematic_advance_delete':
263
-        if (!api_is_allowed_to_edit(null,true)) {
263
+        if (!api_is_allowed_to_edit(null, true)) {
264 264
             api_not_allowed();
265 265
         }
266 266
     case 'thematic_advance_list':
Please login to merge, or discard this patch.
main/course_progress/thematic_advance.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -22,17 +22,17 @@  discard block
 block discarded – undo
22 22
     $form = new FormValidator(
23 23
         'thematic_advance',
24 24
         'POST',
25
-        api_get_self() . '?' . api_get_cidreq()
25
+        api_get_self().'?'.api_get_cidreq()
26 26
     );
27
-    $form->addElement('header',  $header_form);
27
+    $form->addElement('header', $header_form);
28 28
     //$form->addElement('hidden', 'thematic_advance_token',$token);
29 29
     $form->addElement('hidden', 'action', $action);
30 30
 
31 31
     if (!empty($thematic_advance_id)) {
32
-        $form->addElement('hidden', 'thematic_advance_id',$thematic_advance_id);
32
+        $form->addElement('hidden', 'thematic_advance_id', $thematic_advance_id);
33 33
     }
34 34
     if (!empty($thematic_id)) {
35
-        $form->addElement('hidden', 'thematic_id',$thematic_id);
35
+        $form->addElement('hidden', 'thematic_id', $thematic_id);
36 36
     }
37 37
 
38 38
     $radios = array();
@@ -175,7 +175,7 @@  discard block
 block discarded – undo
175 175
 
176 176
         $thematic = new Thematic();
177 177
         $thematic->set_thematic_advance_attributes(
178
-            isset($values['thematic_advance_id']) ? $values['thematic_advance_id']: null,
178
+            isset($values['thematic_advance_id']) ? $values['thematic_advance_id'] : null,
179 179
             $values['thematic_id'],
180 180
             $values['start_date_type'] == 1 && isset($values['attendance_select']) ? $values['attendance_select'] : 0,
181 181
             $values['content'],
@@ -194,13 +194,13 @@  discard block
 block discarded – undo
194 194
             }
195 195
         }
196 196
 
197
-        $redirectUrlParams = 'course_progress/index.php?' .  api_get_cidreq() . '&' .
197
+        $redirectUrlParams = 'course_progress/index.php?'.api_get_cidreq().'&'.
198 198
             http_build_query([
199 199
                 'action' => 'thematic_advance_list',
200 200
                 'thematic_id' => $values['thematic_id']
201 201
             ]);
202 202
 
203
-        header('Location: ' . api_get_path(WEB_CODE_PATH) . $redirectUrlParams);
203
+        header('Location: '.api_get_path(WEB_CODE_PATH).$redirectUrlParams);
204 204
         exit;
205 205
     }
206 206
 
@@ -210,10 +210,10 @@  discard block
 block discarded – undo
210 210
     // thematic advance list
211 211
     echo '<div class="actions">';
212 212
     echo '<a href="'.api_get_self().'?'.api_get_cidreq().'&amp;action=thematic_details">'.
213
-            Display::return_icon('back.png', get_lang("BackTo"),'',ICON_SIZE_MEDIUM).'</a>';
213
+            Display::return_icon('back.png', get_lang("BackTo"), '', ICON_SIZE_MEDIUM).'</a>';
214 214
     if (api_is_allowed_to_edit(false, true)) {
215 215
         echo '<a href="'.api_get_self().'?'.api_get_cidreq().'&amp;action=thematic_advance_add&amp;thematic_id='.$thematic_id.'"> '.
216
-            Display::return_icon('add.png', get_lang('NewThematicAdvance'),'',ICON_SIZE_MEDIUM).'</a>';
216
+            Display::return_icon('add.png', get_lang('NewThematicAdvance'), '', ICON_SIZE_MEDIUM).'</a>';
217 217
     }
218 218
     echo '</div>';
219 219
     $table = new SortableTable(
Please login to merge, or discard this patch.