Completed
Pull Request — 1.11.x (#1293)
by José
387:57 queued 349:55
created
main/inc/lib/thematic.lib.php 1 patch
Spacing   +62 added lines, -62 removed lines patch added patch discarded remove patch
@@ -74,7 +74,7 @@  discard block
 block discarded – undo
74 74
         $from = intval($from);
75 75
         $number_of_items = intval($number_of_items);
76 76
 
77
-        if (!in_array($direction, array('ASC','DESC'))) {
77
+        if (!in_array($direction, array('ASC', 'DESC'))) {
78 78
             $direction = 'ASC';
79 79
         }
80 80
 
@@ -97,24 +97,24 @@  discard block
 block discarded – undo
97 97
             $thematic[1] = '<a href="index.php?'.api_get_cidreq().'&action=thematic_details&thematic_id='.$thematic[0].'">'.
98 98
                 Security::remove_XSS($thematic[1], STUDENT).$session_star.'</a>';
99 99
             if (api_is_allowed_to_edit(null, true)) {
100
-                $actions  = '';
100
+                $actions = '';
101 101
 
102 102
                 if (api_get_session_id()) {
103 103
                     if (api_get_session_id() == $thematic[3]) {
104 104
                         $actions .= '<a href="index.php?'.api_get_cidreq().'&action=thematic_plan_list&thematic_id='.$thematic[0].'">'.
105
-                            Display::return_icon('lesson_plan.png',get_lang('ThematicPlan'),'',ICON_SIZE_SMALL).'</a>&nbsp;';
105
+                            Display::return_icon('lesson_plan.png', get_lang('ThematicPlan'), '', ICON_SIZE_SMALL).'</a>&nbsp;';
106 106
                         $actions .= '<a href="index.php?'.api_get_cidreq().'&action=thematic_advance_list&thematic_id='.$thematic[0].'">'.
107
-                            Display::return_icon('lesson_plan_calendar.png',get_lang('ThematicAdvance'),'',ICON_SIZE_SMALL).'</a>&nbsp;';
107
+                            Display::return_icon('lesson_plan_calendar.png', get_lang('ThematicAdvance'), '', ICON_SIZE_SMALL).'</a>&nbsp;';
108 108
 
109 109
                         $actions .= '<a href="index.php?'.api_get_cidreq().'&action=thematic_edit&thematic_id='.$thematic[0].'">'.
110
-                            Display::return_icon('edit.png',get_lang('Edit'),'',ICON_SIZE_SMALL).'</a>';
110
+                            Display::return_icon('edit.png', get_lang('Edit'), '', ICON_SIZE_SMALL).'</a>';
111 111
                         $actions .= '<a onclick="javascript:if(!confirm(\''.get_lang('AreYouSureToDelete').'\')) return false;" href="index.php?'.api_get_cidreq().'&action=thematic_delete&thematic_id='.$thematic[0].'">'.
112
-                            Display::return_icon('delete.png',get_lang('Delete'),'',ICON_SIZE_SMALL).'</a>';
112
+                            Display::return_icon('delete.png', get_lang('Delete'), '', ICON_SIZE_SMALL).'</a>';
113 113
                     } else {
114
-                        $actions .= Display::return_icon('lesson_plan_na.png',get_lang('ThematicPlan'),'',ICON_SIZE_SMALL).'&nbsp;';
115
-                        $actions .= Display::return_icon('lesson_plan_calendar_na.png',get_lang('ThematicAdvance'),'',ICON_SIZE_SMALL).'&nbsp;';
116
-                        $actions .= Display::return_icon('edit_na.png',get_lang('Edit'),'',ICON_SIZE_SMALL);
117
-                        $actions .= Display::return_icon('delete_na.png',get_lang('Delete'),'',ICON_SIZE_SMALL).'&nbsp;';
114
+                        $actions .= Display::return_icon('lesson_plan_na.png', get_lang('ThematicPlan'), '', ICON_SIZE_SMALL).'&nbsp;';
115
+                        $actions .= Display::return_icon('lesson_plan_calendar_na.png', get_lang('ThematicAdvance'), '', ICON_SIZE_SMALL).'&nbsp;';
116
+                        $actions .= Display::return_icon('edit_na.png', get_lang('Edit'), '', ICON_SIZE_SMALL);
117
+                        $actions .= Display::return_icon('delete_na.png', get_lang('Delete'), '', ICON_SIZE_SMALL).'&nbsp;';
118 118
                         $actions .= Display::url(
119 119
                             Display::return_icon('cd.gif', get_lang('Copy')),
120 120
                             'index.php?'.api_get_cidreq().'&action=thematic_copy&thematic_id='.$thematic[0]
@@ -122,26 +122,26 @@  discard block
 block discarded – undo
122 122
                     }
123 123
                 } else {
124 124
                     $actions .= '<a href="index.php?'.api_get_cidreq().'&action=thematic_plan_list&thematic_id='.$thematic[0].'">'.
125
-                        Display::return_icon('lesson_plan.png',get_lang('ThematicPlan'),'',ICON_SIZE_SMALL).'</a>&nbsp;';
125
+                        Display::return_icon('lesson_plan.png', get_lang('ThematicPlan'), '', ICON_SIZE_SMALL).'</a>&nbsp;';
126 126
                     $actions .= '<a href="index.php?'.api_get_cidreq().'&action=thematic_advance_list&thematic_id='.$thematic[0].'">'.
127
-                        Display::return_icon('lesson_plan_calendar.png',get_lang('ThematicAdvance'),'',ICON_SIZE_SMALL).'</a>&nbsp;';
127
+                        Display::return_icon('lesson_plan_calendar.png', get_lang('ThematicAdvance'), '', ICON_SIZE_SMALL).'</a>&nbsp;';
128 128
 
129 129
                     if ($thematic[2] > 1) {
130 130
                         $actions .= '<a href="'.api_get_self().'?action=moveup&'.api_get_cidreq().'&thematic_id='.$thematic[0].'">'.
131
-                            Display::return_icon('up.png', get_lang('Up'),'',ICON_SIZE_SMALL).'</a>';
131
+                            Display::return_icon('up.png', get_lang('Up'), '', ICON_SIZE_SMALL).'</a>';
132 132
                     } else {
133
-                        $actions .= Display::return_icon('up_na.png','&nbsp;','',ICON_SIZE_SMALL);
133
+                        $actions .= Display::return_icon('up_na.png', '&nbsp;', '', ICON_SIZE_SMALL);
134 134
                     }
135 135
                     if ($thematic[2] < self::get_max_thematic_item()) {
136 136
                         $actions .= '<a href="'.api_get_self().'?action=movedown&a'.api_get_cidreq().'&thematic_id='.$thematic[0].'">'.
137
-                            Display::return_icon('down.png',get_lang('Down'),'',ICON_SIZE_SMALL).'</a>';
137
+                            Display::return_icon('down.png', get_lang('Down'), '', ICON_SIZE_SMALL).'</a>';
138 138
                     } else {
139
-                        $actions .= Display::return_icon('down_na.png','&nbsp;','',ICON_SIZE_SMALL);
139
+                        $actions .= Display::return_icon('down_na.png', '&nbsp;', '', ICON_SIZE_SMALL);
140 140
                     }
141 141
                     $actions .= '<a href="index.php?'.api_get_cidreq().'&action=thematic_edit&thematic_id='.$thematic[0].'">'.
142
-                        Display::return_icon('edit.png',get_lang('Edit'),'',ICON_SIZE_SMALL).'</a>';
142
+                        Display::return_icon('edit.png', get_lang('Edit'), '', ICON_SIZE_SMALL).'</a>';
143 143
                     $actions .= '<a onclick="javascript:if(!confirm(\''.get_lang('AreYouSureToDelete').'\')) return false;" href="index.php?'.api_get_cidreq().'&action=thematic_delete&thematic_id='.$thematic[0].'">'.
144
-                        Display::return_icon('delete.png',get_lang('Delete'),'',ICON_SIZE_SMALL).'</a>';
144
+                        Display::return_icon('delete.png', get_lang('Delete'), '', ICON_SIZE_SMALL).'</a>';
145 145
                 }
146 146
                 $thematics[] = array($thematic[0], $thematic[1], $actions);
147 147
             }
@@ -278,9 +278,9 @@  discard block
 block discarded – undo
278 278
         $res = Database::query($sql);
279 279
         if (Database::num_rows($res) > 0) {
280 280
             if (!empty($thematic_id)) {
281
-                $data = Database::fetch_array($res,'ASSOC');
281
+                $data = Database::fetch_array($res, 'ASSOC');
282 282
             } else {
283
-                while ($row = Database::fetch_array($res,'ASSOC')) {
283
+                while ($row = Database::fetch_array($res, 'ASSOC')) {
284 284
                     $data[$row['id']] = $row;
285 285
                 }
286 286
             }
@@ -375,7 +375,7 @@  discard block
 block discarded – undo
375 375
 
376 376
         if (is_array($thematic_id)) {
377 377
             foreach ($thematic_id as $id) {
378
-                $id	= intval($id);
378
+                $id = intval($id);
379 379
                 $sql = "UPDATE $tbl_thematic SET active = 0
380 380
                         WHERE c_id = $course_id AND id = $id";
381 381
                 $result = Database::query($sql);
@@ -391,8 +391,8 @@  discard block
 block discarded – undo
391 391
                     );
392 392
                 }
393 393
             }
394
-        } else  {
395
-            $thematic_id	= intval($thematic_id);
394
+        } else {
395
+            $thematic_id = intval($thematic_id);
396 396
             $sql = "UPDATE $tbl_thematic SET active = 0
397 397
                     WHERE c_id = $course_id AND id = $thematic_id";
398 398
             $result = Database::query($sql);
@@ -428,8 +428,8 @@  discard block
 block discarded – undo
428 428
         $new_thematic_id = $thematic_copy->thematic_save();
429 429
         if (!empty($new_thematic_id)) {
430 430
             $thematic_advanced = self::get_thematic_advance_by_thematic_id($thematic_id);
431
-            if(!empty($thematic_advanced)) {
432
-                foreach($thematic_advanced as $item) {
431
+            if (!empty($thematic_advanced)) {
432
+                foreach ($thematic_advanced as $item) {
433 433
                     $thematic = new Thematic();
434 434
                     $thematic->set_thematic_advance_attributes(
435 435
                         0,
@@ -492,7 +492,7 @@  discard block
 block discarded – undo
492 492
         $column = intval($column);
493 493
         $from   = intval($from);
494 494
         $number_of_items = intval($number_of_items);
495
-        if (!in_array($direction, array('ASC','DESC'))) {
495
+        if (!in_array($direction, array('ASC', 'DESC'))) {
496 496
             $direction = 'ASC';
497 497
         }
498 498
         $data = array();
@@ -525,8 +525,8 @@  discard block
 block discarded – undo
525 525
                     $thematic_advance[1] = api_get_local_time($thematic_advance[1]);
526 526
                     $thematic_advance[1] = api_format_date($thematic_advance[1], DATE_TIME_FORMAT_LONG);
527 527
                     $actions  = '';
528
-                    $actions .= '<a href="index.php?'.api_get_cidreq().'&action=thematic_advance_edit&thematic_id='.$thematic_id.'&thematic_advance_id='.$thematic_advance[0].'">'.Display::return_icon('edit.png',get_lang('Edit'),'',22).'</a>';
529
-                    $actions .= '<a onclick="javascript:if(!confirm(\''.get_lang('AreYouSureToDelete').'\')) return false;" href="index.php?'.api_get_cidreq().'&action=thematic_advance_delete&thematic_id='.$thematic_id.'&thematic_advance_id='.$thematic_advance[0].'">'.Display::return_icon('delete.png',get_lang('Delete'),'',22).'</a></center>';
528
+                    $actions .= '<a href="index.php?'.api_get_cidreq().'&action=thematic_advance_edit&thematic_id='.$thematic_id.'&thematic_advance_id='.$thematic_advance[0].'">'.Display::return_icon('edit.png', get_lang('Edit'), '', 22).'</a>';
529
+                    $actions .= '<a onclick="javascript:if(!confirm(\''.get_lang('AreYouSureToDelete').'\')) return false;" href="index.php?'.api_get_cidreq().'&action=thematic_advance_delete&thematic_id='.$thematic_id.'&thematic_advance_id='.$thematic_advance[0].'">'.Display::return_icon('delete.png', get_lang('Delete'), '', 22).'</a></center>';
530 530
                     $data[] = array($i, $thematic_advance[1], $thematic_advance[2], $thematic_advance[3], $actions);
531 531
                     $i++;
532 532
                 }
@@ -590,7 +590,7 @@  discard block
 block discarded – undo
590 590
 
591 591
                 $session_star = '';
592 592
                 if (api_is_allowed_to_edit(null, true)) {
593
-                    if ($thematic_advance['session_id'] !=0) {
593
+                    if ($thematic_advance['session_id'] != 0) {
594 594
                         $session_star = api_get_session_image(api_get_session_id(), $uinfo['status']);
595 595
                     }
596 596
                 }
@@ -616,13 +616,13 @@  discard block
 block discarded – undo
616 616
 
617 617
         foreach ($data as $thematic_id => $thematic_plan_data) {
618 618
             $new_thematic_plan_data = array();
619
-            foreach($thematic_plan_data as $thematic_item) {
619
+            foreach ($thematic_plan_data as $thematic_item) {
620 620
                 $thematic_simple_list[] = $thematic_item['description_type'];
621 621
                 $new_thematic_plan_data[$thematic_item['description_type']] = $thematic_item;
622 622
             }
623 623
 
624 624
             if (!empty($thematic_simple_list)) {
625
-                foreach($thematic_simple_list as $item) {
625
+                foreach ($thematic_simple_list as $item) {
626 626
                     $default_thematic_plan_title[$item] = $new_thematic_plan_data[$item]['title'];
627 627
                 }
628 628
             }
@@ -638,7 +638,7 @@  discard block
 block discarded – undo
638 638
                     }
639 639
                     if (!empty($data[$thematic_id][$id]['title']) && !empty($data[$thematic_id][$id]['description'])) {
640 640
                         if (api_is_allowed_to_edit(null, true)) {
641
-                            if ($data[$thematic_id][$id]['session_id'] !=0) {
641
+                            if ($data[$thematic_id][$id]['session_id'] != 0) {
642 642
                                 $session_star = api_get_session_image(api_get_session_id(), $uinfo['status']);
643 643
                             }
644 644
                         }
@@ -651,7 +651,7 @@  discard block
 block discarded – undo
651 651
             if ($no_data) {
652 652
                 $return .= '<div><em>'.get_lang('StillDoNotHaveAThematicPlan').'</em></div>';
653 653
             }
654
-            $return  .= '</div>';
654
+            $return .= '</div>';
655 655
             $final_return[$thematic_id] = $return;
656 656
         }
657 657
         return $final_return;
@@ -691,7 +691,7 @@  discard block
 block discarded – undo
691 691
                 api_get_session_id()
692 692
             );
693 693
             foreach ($list as $value) {
694
-                $elements[$value['ref']]= $value;
694
+                $elements[$value['ref']] = $value;
695 695
             }
696 696
         }
697 697
 
@@ -865,18 +865,18 @@  discard block
 block discarded – undo
865 865
             api_get_session_id()
866 866
         );
867 867
 
868
-        $thematic_plan_complete_list  = array();
868
+        $thematic_plan_complete_list = array();
869 869
         $thematic_plan_id_list = array();
870 870
 
871 871
         if (!empty($items_from_course)) {
872
-            foreach($items_from_course as $item) {
872
+            foreach ($items_from_course as $item) {
873 873
                 $thematic_plan_id_list[] = $item['ref'];
874 874
                 $thematic_plan_complete_list[$item['ref']] = $item;
875 875
             }
876 876
         }
877 877
 
878 878
         if (!empty($items_from_session)) {
879
-            foreach($items_from_session as $item) {
879
+            foreach ($items_from_session as $item) {
880 880
                 $thematic_plan_id_list[] = $item['ref'];
881 881
                 $thematic_plan_complete_list[$item['ref']] = $item;
882 882
             }
@@ -898,7 +898,7 @@  discard block
 block discarded – undo
898 898
                 if (!isset($thematic_id) && !isset($description_type)) {
899 899
                     // group all data group by thematic id
900 900
                     $tmp = array();
901
-                    while ($row = Database::fetch_array($rs,'ASSOC')) {
901
+                    while ($row = Database::fetch_array($rs, 'ASSOC')) {
902 902
                         $tmp[] = $row['thematic_id'];
903 903
                         if (in_array($row['thematic_id'], $tmp)) {
904 904
                             $row['session_id'] = $thematic_plan_complete_list[$row['id']];
@@ -906,7 +906,7 @@  discard block
 block discarded – undo
906 906
                         }
907 907
                     }
908 908
                 } else {
909
-                    while ($row = Database::fetch_array($rs,'ASSOC')) {
909
+                    while ($row = Database::fetch_array($rs, 'ASSOC')) {
910 910
                         $row['session_id'] = $thematic_plan_complete_list[$row['id']];
911 911
                         $data[] = $row;
912 912
                     }
@@ -941,8 +941,8 @@  discard block
 block discarded – undo
941 941
         );
942 942
 
943 943
         $elements_to_show = array();
944
-        foreach($list as $value) {
945
-            $elements_to_show[]= $value['ref'];
944
+        foreach ($list as $value) {
945
+            $elements_to_show[] = $value['ref'];
946 946
         }
947 947
         $condition = '';
948 948
         if (!empty($elements_to_show)) {
@@ -954,7 +954,7 @@  discard block
 block discarded – undo
954 954
                     c_id = $course_id AND
955 955
                     thematic_id = $thematic_id AND
956 956
                     description_type = '$description_type'";
957
-        $rs	 = Database::query($sql);
957
+        $rs = Database::query($sql);
958 958
 
959 959
         $affected_rows = 0;
960 960
         if (Database::num_rows($rs) > 0) {
@@ -1190,7 +1190,7 @@  discard block
 block discarded – undo
1190 1190
             $diff = array_diff($all, $a_thematic_advance_ids);
1191 1191
             if (!empty($diff)) {
1192 1192
                 $upd = "UPDATE $tbl_thematic_advance SET done_advance = 0
1193
-    			        WHERE c_id = $course_id AND id IN(".implode(',',$diff).") ";
1193
+    			        WHERE c_id = $course_id AND id IN(".implode(',', $diff).") ";
1194 1194
                 Database::query($upd);
1195 1195
             }
1196 1196
 
@@ -1304,7 +1304,7 @@  discard block
 block discarded – undo
1304 1304
             $course_code = api_get_course_id();
1305 1305
         }
1306 1306
         if (api_get_session_id()) {
1307
-            $thematic_data = $this->get_thematic_list(null, $course_code );
1307
+            $thematic_data = $this->get_thematic_list(null, $course_code);
1308 1308
         } else {
1309 1309
             $thematic_data = $this->get_thematic_list(null, $course_code, 0);
1310 1310
         }
@@ -1356,7 +1356,7 @@  discard block
 block discarded – undo
1356 1356
             }
1357 1357
             // calculate average by thematic
1358 1358
             $count_total_advances = count($advances);
1359
-            $average = round(($count_done_advances*100)/$count_total_advances);
1359
+            $average = round(($count_done_advances * 100) / $count_total_advances);
1360 1360
         }
1361 1361
 
1362 1362
         return $average;
@@ -1447,12 +1447,12 @@  discard block
 block discarded – undo
1447 1447
     public function get_default_thematic_plan_title()
1448 1448
     {
1449 1449
         $default_thematic_plan_titles = array();
1450
-        $default_thematic_plan_titles[1]= get_lang('Objectives');
1451
-        $default_thematic_plan_titles[2]= get_lang('SkillToAcquire');
1452
-        $default_thematic_plan_titles[3]= get_lang('Methodology');
1453
-        $default_thematic_plan_titles[4]= get_lang('Infrastructure');
1454
-        $default_thematic_plan_titles[5]= get_lang('Assessment');
1455
-        $default_thematic_plan_titles[6]= get_lang('Others');
1450
+        $default_thematic_plan_titles[1] = get_lang('Objectives');
1451
+        $default_thematic_plan_titles[2] = get_lang('SkillToAcquire');
1452
+        $default_thematic_plan_titles[3] = get_lang('Methodology');
1453
+        $default_thematic_plan_titles[4] = get_lang('Infrastructure');
1454
+        $default_thematic_plan_titles[5] = get_lang('Assessment');
1455
+        $default_thematic_plan_titles[6] = get_lang('Others');
1456 1456
 
1457 1457
         return $default_thematic_plan_titles;
1458 1458
     }
@@ -1464,12 +1464,12 @@  discard block
 block discarded – undo
1464 1464
     public function get_default_thematic_plan_icon()
1465 1465
     {
1466 1466
         $default_thematic_plan_icon = array();
1467
-        $default_thematic_plan_icon[1]= 'icons/32/objective.png';
1468
-        $default_thematic_plan_icon[2]= 'icons/32/skills.png';
1469
-        $default_thematic_plan_icon[3]= 'icons/32/strategy.png';
1470
-        $default_thematic_plan_icon[4]= 'icons/32/laptop.png';
1471
-        $default_thematic_plan_icon[5]= 'icons/32/assessment.png';
1472
-        $default_thematic_plan_icon[6]= 'icons/32/wizard.png';
1467
+        $default_thematic_plan_icon[1] = 'icons/32/objective.png';
1468
+        $default_thematic_plan_icon[2] = 'icons/32/skills.png';
1469
+        $default_thematic_plan_icon[3] = 'icons/32/strategy.png';
1470
+        $default_thematic_plan_icon[4] = 'icons/32/laptop.png';
1471
+        $default_thematic_plan_icon[5] = 'icons/32/assessment.png';
1472
+        $default_thematic_plan_icon[6] = 'icons/32/wizard.png';
1473 1473
 
1474 1474
         return $default_thematic_plan_icon;
1475 1475
     }
@@ -1481,11 +1481,11 @@  discard block
 block discarded – undo
1481 1481
     public function get_default_question()
1482 1482
     {
1483 1483
         $question = array();
1484
-        $question[1]= get_lang('ObjectivesQuestions');
1485
-        $question[2]= get_lang('SkillToAcquireQuestions');
1486
-        $question[3]= get_lang('MethodologyQuestions');
1487
-        $question[4]= get_lang('InfrastructureQuestions');
1488
-        $question[5]= get_lang('AssessmentQuestions');
1484
+        $question[1] = get_lang('ObjectivesQuestions');
1485
+        $question[2] = get_lang('SkillToAcquireQuestions');
1486
+        $question[3] = get_lang('MethodologyQuestions');
1487
+        $question[4] = get_lang('InfrastructureQuestions');
1488
+        $question[5] = get_lang('AssessmentQuestions');
1489 1489
 
1490 1490
         return $question;
1491 1491
     }
Please login to merge, or discard this patch.
main/inc/lib/rights.lib.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -6,9 +6,9 @@
 block discarded – undo
6 6
  */
7 7
 class Rights {
8 8
 	private static $rights_cache = array();
9
-	private static $rights = array (
9
+	private static $rights = array(
10 10
 		'show_tabs:reports' =>
11
-			array (
11
+			array(
12 12
 				'type' => 'const',
13 13
 				'const' => 'true' )
14 14
 		);
Please login to merge, or discard this patch.
main/inc/lib/table_sort.class.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -157,7 +157,7 @@  discard block
 block discarded – undo
157 157
 
158 158
                 $new_data_order = array();
159 159
                 if (!empty($docs_to_sort)) {
160
-                    foreach($docs_to_sort as $id => $document) {
160
+                    foreach ($docs_to_sort as $id => $document) {
161 161
                         if (isset($new_data[$id])) {
162 162
                             $new_data_order[] = $new_data[$id];
163 163
                         }
@@ -165,7 +165,7 @@  discard block
 block discarded – undo
165 165
                 }
166 166
 
167 167
                 if (!empty($folder_to_sort)) {
168
-                    foreach($folder_to_sort as $id => $document) {
168
+                    foreach ($folder_to_sort as $id => $document) {
169 169
                         if (isset($new_data[$id])) {
170 170
                             $new_data_order[] = $new_data[$id];
171 171
                         }
Please login to merge, or discard this patch.
main/inc/lib/plugin.lib.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -425,7 +425,7 @@  discard block
 block discarded – undo
425 425
             //extra options
426 426
             $plugin_settings = api_get_settings_params(
427 427
                 array(
428
-                    "subkey = ? AND category = ? AND type = ? " => array($plugin_name, 'Plugins','setting')
428
+                    "subkey = ? AND category = ? AND type = ? " => array($plugin_name, 'Plugins', 'setting')
429 429
                 )
430 430
             );
431 431
             $settings_filtered = array();
@@ -530,7 +530,7 @@  discard block
 block discarded – undo
530 530
             if (!empty($obj->course_settings)) {
531 531
                 if (is_file(api_get_path(SYS_CODE_PATH).'img/icons/'.ICON_SIZE_SMALL.'/'.$plugin_name.'.png')) {
532 532
                     $icon = Display::return_icon(
533
-                        $plugin_name . '.png',
533
+                        $plugin_name.'.png',
534 534
                         Security::remove_XSS($pluginTitle),
535 535
                         '',
536 536
                         ICON_SIZE_SMALL
Please login to merge, or discard this patch.
main/inc/lib/lp_item.lib.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -34,9 +34,9 @@
 block discarded – undo
34 34
     public $search_did = 0;
35 35
     public $audio = "";
36 36
 
37
-    public function __construct($in_c_id=0, $in_id=0)
37
+    public function __construct($in_c_id = 0, $in_id = 0)
38 38
     {
39
-        if ($in_c_id > 0 && $in_id >0) {
39
+        if ($in_c_id > 0 && $in_id > 0) {
40 40
             $item_view_table = Database::get_course_table(TABLE_LP_ITEM);
41 41
             $sql = "SELECT * FROM $item_view_table
42 42
                     WHERE
Please login to merge, or discard this patch.
main/inc/lib/course_request.lib.php 1 patch
Spacing   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -65,8 +65,8 @@  discard block
 block discarded – undo
65 65
         $exemplary_content
66 66
     ) {
67 67
         $wanted_code = trim($wanted_code);
68
-        $user_id = (int)$user_id;
69
-        $exemplary_content = (bool)$exemplary_content ? 1 : 0;
68
+        $user_id = (int) $user_id;
69
+        $exemplary_content = (bool) $exemplary_content ? 1 : 0;
70 70
 
71 71
         if ($wanted_code == '') {
72 72
             return false;
@@ -254,10 +254,10 @@  discard block
 block discarded – undo
254 254
         $user_id,
255 255
         $exemplary_content
256 256
     ) {
257
-        $id = (int)$id;
257
+        $id = (int) $id;
258 258
         $wanted_code = trim($wanted_code);
259
-        $user_id = (int)$user_id;
260
-        $exemplary_content = (bool)$exemplary_content ? 1 : 0;
259
+        $user_id = (int) $user_id;
260
+        $exemplary_content = (bool) $exemplary_content ? 1 : 0;
261 261
 
262 262
         if ($wanted_code == '') {
263 263
             return false;
@@ -360,7 +360,7 @@  discard block
 block discarded – undo
360 360
      */
361 361
     public static function delete_course_request($id)
362 362
     {
363
-        $id = (int)$id;
363
+        $id = (int) $id;
364 364
         $sql = "DELETE FROM ".Database :: get_main_table(TABLE_MAIN_COURSE_REQUEST)."
365 365
                 WHERE id = ".$id;
366 366
         $result = Database::query($sql);
@@ -377,7 +377,7 @@  discard block
 block discarded – undo
377 377
         if (is_null($status)) {
378 378
             $sql = "SELECT COUNT(id) AS number FROM ".$course_table;
379 379
         } else {
380
-            $status = (int)$status;
380
+            $status = (int) $status;
381 381
             $sql = "SELECT COUNT(id) AS number FROM ".$course_table."
382 382
                     WHERE status = ".$status;
383 383
         }
@@ -395,7 +395,7 @@  discard block
 block discarded – undo
395 395
      */
396 396
     public static function get_course_request_info($id)
397 397
     {
398
-        $id = (int)$id;
398
+        $id = (int) $id;
399 399
         $sql = "SELECT *
400 400
                 FROM ".Database :: get_main_table(TABLE_MAIN_COURSE_REQUEST)."
401 401
                 WHERE id = ".$id;
@@ -413,7 +413,7 @@  discard block
 block discarded – undo
413 413
      */
414 414
     public static function get_course_request_code($id)
415 415
     {
416
-        $id = (int)$id;
416
+        $id = (int) $id;
417 417
         $sql = "SELECT code
418 418
                 FROM ".Database :: get_main_table(TABLE_MAIN_COURSE_REQUEST)."
419 419
                 WHERE id = ".$id;
@@ -434,7 +434,7 @@  discard block
 block discarded – undo
434 434
      */
435 435
     public static function accept_course_request($id)
436 436
     {
437
-        $id = (int)$id;
437
+        $id = (int) $id;
438 438
 
439 439
         // Retrieve request's data
440 440
         $course_request_info = self::get_course_request_info($id);
@@ -447,7 +447,7 @@  discard block
 block discarded – undo
447 447
             return false;
448 448
         }*/
449 449
 
450
-        $user_id = (int)$course_request_info['user_id'];
450
+        $user_id = (int) $course_request_info['user_id'];
451 451
         if ($user_id <= 0) {
452 452
             return false;
453 453
         }
@@ -531,7 +531,7 @@  discard block
 block discarded – undo
531 531
      */
532 532
     public static function reject_course_request($id)
533 533
     {
534
-        $id = (int)$id;
534
+        $id = (int) $id;
535 535
         // Retrieve request's data
536 536
         $course_request_info = self::get_course_request_info($id);
537 537
         if (!is_array($course_request_info)) {
@@ -609,7 +609,7 @@  discard block
 block discarded – undo
609 609
      */
610 610
     public static function ask_for_additional_info($id)
611 611
     {
612
-        $id = (int)$id;
612
+        $id = (int) $id;
613 613
 
614 614
         // Retrieve request's data
615 615
         $course_request_info = self::get_course_request_info($id);
@@ -700,7 +700,7 @@  discard block
 block discarded – undo
700 700
      */
701 701
     public static function additional_info_asked($id)
702 702
     {
703
-        $id = (int)$id;
703
+        $id = (int) $id;
704 704
         $sql = "SELECT id FROM ".Database :: get_main_table(TABLE_MAIN_COURSE_REQUEST)."
705 705
                 WHERE (id = ".$id." AND info > 0)";
706 706
         $result = Database::num_rows(Database::query($sql));
Please login to merge, or discard this patch.
main/inc/lib/system/web/request.class.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -15,7 +15,7 @@
 block discarded – undo
15 15
         return isset($_REQUEST[$key]) ? $_REQUEST[$key] : $default;
16 16
     }
17 17
 
18
-    public static function has($key){
18
+    public static function has($key) {
19 19
         return isset($_REQUEST[$key]);
20 20
     }
21 21
 
Please login to merge, or discard this patch.
main/inc/lib/access_url_edit_sessions_to_url_functions.lib.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -44,17 +44,17 @@
 block discarded – undo
44 44
                     ORDER BY name, id
45 45
                     LIMIT 11';
46 46
             $rs = Database::query($sql);
47
-            $i=0;
47
+            $i = 0;
48 48
             while ($session = Database :: fetch_array($rs)) {
49 49
                 $i++;
50
-                if ($i<=10) {
50
+                if ($i <= 10) {
51 51
                      $return .= '<a href="#" onclick="add_user_to_url(\''.addslashes($session['id']).'\',\''.addslashes($session['name']).' ('.addslashes($session['id']).')'.'\')">'.$session['name'].' </a><br />';
52 52
                 } else {
53 53
                     $return .= '...<br />';
54 54
                 }
55 55
             }
56 56
         }
57
-        $xajax_response -> addAssign('ajax_list_courses','innerHTML',api_utf8_encode($return));
57
+        $xajax_response -> addAssign('ajax_list_courses', 'innerHTML', api_utf8_encode($return));
58 58
         return $xajax_response;
59 59
     }
60 60
 }
Please login to merge, or discard this patch.
main/inc/lib/portfolio.class.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -482,14 +482,14 @@  discard block
 block discarded – undo
482 482
         $attributes['z-index'] = 100000;
483 483
         $s = ' ';
484 484
         foreach ($attributes as $key => $value) {
485
-            $s .= $key . '="' . $value . '" ';
485
+            $s .= $key.'="'.$value.'" ';
486 486
         }
487 487
 
488 488
         $result = array();
489
-        $result[] = '<span ' . $s . ' >';
489
+        $result[] = '<span '.$s.' >';
490 490
         $result[] = '<span class="dropdown" >';
491 491
         $result[] = '<a href="#" data-toggle="dropdown" class="dropdown-toggle">';
492
-        $result[] = Display::return_icon('document_send.png', get_lang('Send'), array(), ICON_SIZE_SMALL) . '<b class="caret"></b>';
492
+        $result[] = Display::return_icon('document_send.png', get_lang('Send'), array(), ICON_SIZE_SMALL).'<b class="caret"></b>';
493 493
         $result[] = '</a>';
494 494
         $result[] = '<ul class="dropdown-menu">';
495 495
 
@@ -505,7 +505,7 @@  discard block
 block discarded – undo
505 505
             $parameters[PortfolioController::PARAM_TOOL] = $tool;
506 506
             $url = api_get_path(WEB_CODE_PATH).'portfolio/share.php?';
507 507
             $result[] = '<li>';
508
-            $result[] = '<a href="' . $url . '">' . $portfolio->get_title() . '</a>';
508
+            $result[] = '<a href="'.$url.'">'.$portfolio->get_title().'</a>';
509 509
             $result[] = '</li>';
510 510
         }
511 511
         $result[] = '</ul>';
@@ -564,8 +564,8 @@  discard block
 block discarded – undo
564 564
      */
565 565
     public function __construct($portfolio)
566 566
     {
567
-        $this->name = md5(__CLASS__) . '_' . $portfolio->get_name();
568
-        $this->title = $portfolio->get_title() ? $portfolio->get_title() : get_lang('SendTo') . ' ' . $portfolio->get_name();
567
+        $this->name = md5(__CLASS__).'_'.$portfolio->get_name();
568
+        $this->title = $portfolio->get_title() ? $portfolio->get_title() : get_lang('SendTo').' '.$portfolio->get_name();
569 569
         $this->portfolio = $portfolio;
570 570
     }
571 571
 
Please login to merge, or discard this patch.