Passed
Push — 1.10.x ( f9cbcd...83c791 )
by Yannick
657:30 queued 614:41
created
main/inc/ajax/thematic.ajax.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -98,8 +98,8 @@  discard block
 block discarded – undo
98 98
 			}
99 99
 			$new_thematic_list = array();
100 100
 
101
-			foreach($thematic_list_temp as $item) {
102
-				if (!empty($item['attendance_id']) ) {
101
+			foreach ($thematic_list_temp as $item) {
102
+				if (!empty($item['attendance_id'])) {
103 103
 					$new_thematic_list[$item['id']] = array('attendance_id' =>$item['attendance_id'], 'start_date'=>$item['start_date']);
104 104
 				}
105 105
 			}
@@ -115,7 +115,7 @@  discard block
 block discarded – undo
115 115
 					//checking if was already taken
116 116
 					foreach ($new_thematic_list as $key => $thematic_item) {
117 117
 						//if ($calendar['db_date_time'] == $thematic_item['start_date'] && $calendar['attendance_id'] == $thematic_item['attendance_id'] ) {
118
-						if ($calendar['db_date_time'] == $thematic_item['start_date'] ) {
118
+						if ($calendar['db_date_time'] == $thematic_item['start_date']) {
119 119
 							$insert = false;
120 120
 							if ($thematic_advance_id == $key) {
121 121
 								$insert = true;
Please login to merge, or discard this patch.
main/inc/ajax/model.ajax.php 1 patch
Spacing   +62 added lines, -62 removed lines patch added patch discarded remove patch
@@ -11,8 +11,8 @@  discard block
 block discarded – undo
11 11
 $action = $_GET['a'];
12 12
 $page = intval($_REQUEST['page']); //page
13 13
 $limit = intval($_REQUEST['rows']); //quantity of rows
14
-$sidx = $_REQUEST['sidx'];         //index (field) to filter
15
-$sord = $_REQUEST['sord'];         //asc or desc
14
+$sidx = $_REQUEST['sidx']; //index (field) to filter
15
+$sord = $_REQUEST['sord']; //asc or desc
16 16
 
17 17
 if (strpos(strtolower($sidx), 'asc') !== false) {
18 18
     $sidx = str_replace(array('asc', ','), '', $sidx);
@@ -24,7 +24,7 @@  discard block
 block discarded – undo
24 24
     $sord = 'desc';
25 25
 }
26 26
 
27
-if (!in_array($sord, array('asc','desc'))) {
27
+if (!in_array($sord, array('asc', 'desc'))) {
28 28
     $sord = 'desc';
29 29
 }
30 30
 
@@ -63,19 +63,19 @@  discard block
 block discarded – undo
63 63
 function getWhereClause($col, $oper, $val)
64 64
 {
65 65
     $ops = array(
66
-        'eq' => '=',        //equal
67
-        'ne' => '<>',       //not equal
68
-        'lt' => '<',        //less than
69
-        'le' => '<=',       //less than or equal
70
-        'gt' => '>',        //greater than
71
-        'ge' => '>=',       //greater than or equal
72
-        'bw' => 'LIKE',     //begins with
66
+        'eq' => '=', //equal
67
+        'ne' => '<>', //not equal
68
+        'lt' => '<', //less than
69
+        'le' => '<=', //less than or equal
70
+        'gt' => '>', //greater than
71
+        'ge' => '>=', //greater than or equal
72
+        'bw' => 'LIKE', //begins with
73 73
         'bn' => 'NOT LIKE', //doesn't begin with
74
-        'in' => 'LIKE',     //is in
74
+        'in' => 'LIKE', //is in
75 75
         'ni' => 'NOT LIKE', //is not in
76
-        'ew' => 'LIKE',     //ends with
76
+        'ew' => 'LIKE', //ends with
77 77
         'en' => 'NOT LIKE', //doesn't end with
78
-        'cn' => 'LIKE',     //contains
78
+        'cn' => 'LIKE', //contains
79 79
         'nc' => 'NOT LIKE'  //doesn't contain
80 80
     );
81 81
 
@@ -99,10 +99,10 @@  discard block
 block discarded – undo
99 99
 
100 100
 // If there is no search request sent by jqgrid, $where should be empty
101 101
 $whereCondition = null;
102
-$operation = isset($_REQUEST['oper'])  ? $_REQUEST['oper']  : false;
103
-$exportFormat = isset($_REQUEST['export_format'])  ? $_REQUEST['export_format']  : 'csv';
104
-$searchField = isset($_REQUEST['searchField'])  ? $_REQUEST['searchField']  : false;
105
-$searchOperator = isset($_REQUEST['searchOper'])   ? $_REQUEST['searchOper']   : false;
102
+$operation = isset($_REQUEST['oper']) ? $_REQUEST['oper'] : false;
103
+$exportFormat = isset($_REQUEST['export_format']) ? $_REQUEST['export_format'] : 'csv';
104
+$searchField = isset($_REQUEST['searchField']) ? $_REQUEST['searchField'] : false;
105
+$searchOperator = isset($_REQUEST['searchOper']) ? $_REQUEST['searchOper'] : false;
106 106
 $searchString = isset($_REQUEST['searchString']) ? $_REQUEST['searchString'] : false;
107 107
 $search = isset($_REQUEST['_search']) ? $_REQUEST['_search'] : false;
108 108
 $forceSearch = isset($_REQUEST['_force_search']) ? $_REQUEST['_force_search'] : false;
@@ -166,7 +166,7 @@  discard block
 block discarded – undo
166 166
             foreach ($filters->rules as $key => $rule) {
167 167
                 $whereCondition .= getWhereClause($rule->field, $rule->op, $rule->data);
168 168
 
169
-                if ($counter < count($filters->rules) -1) {
169
+                if ($counter < count($filters->rules) - 1) {
170 170
                     $whereCondition .= $filters->groupOp;
171 171
                 }
172 172
                 $counter++;
@@ -200,7 +200,7 @@  discard block
 block discarded – undo
200 200
 
201 201
         $sessionId = isset($_GET['session_id']) ? intval($_GET['session_id']) : 0;
202 202
         $courseCodeList = array();
203
-        $userIdList  = array();
203
+        $userIdList = array();
204 204
         $sessionIdList = [];
205 205
         $searchByGroups = false;
206 206
         if (api_is_drh()) {
@@ -550,7 +550,7 @@  discard block
 block discarded – undo
550 550
 $total_pages = 0;
551 551
 if ($count > 0) {
552 552
     if (!empty($limit)) {
553
-        $total_pages = ceil((float)$count/(float)$limit);
553
+        $total_pages = ceil((float) $count / (float) $limit);
554 554
     }
555 555
 }
556 556
 if ($page > $total_pages) {
@@ -778,7 +778,7 @@  discard block
 block discarded – undo
778 778
         $result = getWorkListStudent($start, $limit, $sidx, $sord, $whereCondition);
779 779
         break;
780 780
     case 'get_work_user_list_all':
781
-        if (isset($_GET['type'])  && $_GET['type'] == 'simple') {
781
+        if (isset($_GET['type']) && $_GET['type'] == 'simple') {
782 782
             $columns = array(
783 783
                 //'type',
784 784
                 'firstname',
@@ -805,18 +805,18 @@  discard block
 block discarded – undo
805 805
         $result = get_work_user_list($start, $limit, $sidx, $sord, $work_id, $whereCondition);
806 806
         break;
807 807
     case 'get_work_user_list_others':
808
-        if (isset($_GET['type'])  && $_GET['type'] == 'simple') {
808
+        if (isset($_GET['type']) && $_GET['type'] == 'simple') {
809 809
             $columns = array(
810
-                'type', 'firstname', 'lastname',  'title', 'qualification', 'sent_date', 'qualificator_id', 'actions'
810
+                'type', 'firstname', 'lastname', 'title', 'qualification', 'sent_date', 'qualificator_id', 'actions'
811 811
             );
812 812
         } else {
813
-            $columns = array('type', 'firstname', 'lastname',  'title', 'sent_date', 'actions');
813
+            $columns = array('type', 'firstname', 'lastname', 'title', 'sent_date', 'actions');
814 814
         }
815 815
         $whereCondition .= " AND u.user_id <> ".api_get_user_id();
816 816
         $result = get_work_user_list($start, $limit, $sidx, $sord, $work_id, $whereCondition);
817 817
         break;
818 818
     case 'get_work_user_list':
819
-        if (isset($_GET['type'])  && $_GET['type'] == 'simple') {
819
+        if (isset($_GET['type']) && $_GET['type'] == 'simple') {
820 820
             $columns = array(
821 821
                 'type', 'title', 'qualification', 'sent_date', 'qualificator_id', 'actions'
822 822
             );
@@ -844,10 +844,10 @@  discard block
 block discarded – undo
844 844
     case 'get_exercise_results':
845 845
         $course = api_get_course_info();
846 846
         // Used inside ExerciseLib::get_exam_results_data()
847
-        $documentPath = api_get_path(SYS_COURSE_PATH) . $course['path'] . "/document";
847
+        $documentPath = api_get_path(SYS_COURSE_PATH).$course['path']."/document";
848 848
         if ($is_allowedToEdit || api_is_student_boss()) {
849 849
             $columns = array(
850
-                'firstname', 'lastname', 'username', 'group_name', 'exe_duration', 'start_date', 'exe_date', 'score',  'user_ip', 'status', 'lp', 'actions'
850
+                'firstname', 'lastname', 'username', 'group_name', 'exe_duration', 'start_date', 'exe_date', 'score', 'user_ip', 'status', 'lp', 'actions'
851 851
             );
852 852
             $officialCodeInList = api_get_setting('show_official_code_exercise_result_list');
853 853
             if ($officialCodeInList === 'true') {
@@ -858,11 +858,11 @@  discard block
 block discarded – undo
858 858
         break;
859 859
     case 'get_hotpotatoes_exercise_results':
860 860
         $course = api_get_course_info();
861
-        $documentPath = api_get_path(SYS_COURSE_PATH) . $course['path'] . "/document";
861
+        $documentPath = api_get_path(SYS_COURSE_PATH).$course['path']."/document";
862 862
         if (api_is_allowed_to_edit()) {
863
-            $columns = array('firstname', 'lastname', 'username', 'group_name', 'exe_date',  'score', 'actions');
863
+            $columns = array('firstname', 'lastname', 'username', 'group_name', 'exe_date', 'score', 'actions');
864 864
         } else {
865
-            $columns = array('exe_date',  'score', 'actions');
865
+            $columns = array('exe_date', 'score', 'actions');
866 866
         }
867 867
         $result = ExerciseLib::get_exam_results_hotpotatoes_data($start, $limit, $sidx, $sord, $hotpot_path, $whereCondition);
868 868
         break;
@@ -888,12 +888,12 @@  discard block
 block discarded – undo
888 888
         break;
889 889
     case 'get_hotpotatoes_exercise_results':
890 890
         $course = api_get_course_info();
891
-        $documentPath = api_get_path(SYS_COURSE_PATH) . $course['path'] . "/document";
891
+        $documentPath = api_get_path(SYS_COURSE_PATH).$course['path']."/document";
892 892
 
893 893
         if (api_is_allowed_to_edit(null, true) || api_is_drh()) {
894
-            $columns = array('firstname', 'lastname', 'username', 'group_name', 'exe_date',  'score', 'actions');
894
+            $columns = array('firstname', 'lastname', 'username', 'group_name', 'exe_date', 'score', 'actions');
895 895
         } else {
896
-            $columns = array('exe_date',  'score', 'actions');
896
+            $columns = array('exe_date', 'score', 'actions');
897 897
         }
898 898
         $result = ExerciseLib::get_exam_results_hotpotatoes_data($start, $limit, $sidx, $sord, $hotpot_path, $whereCondition);
899 899
         break;
@@ -922,7 +922,7 @@  discard block
 block discarded – undo
922 922
             );
923 923
         }
924 924
 
925
-        $columns =  array(
925
+        $columns = array(
926 926
             'name',
927 927
             'date',
928 928
             'course_per_session',
@@ -1144,25 +1144,25 @@  discard block
 block discarded – undo
1144 1144
             'wikis',
1145 1145
             'surveys',
1146 1146
             //exercises
1147
-            'lessons_total' ,
1148
-            'lessons_done' ,
1149
-            'lessons_left' ,
1147
+            'lessons_total',
1148
+            'lessons_done',
1149
+            'lessons_left',
1150 1150
             'lessons_progress',
1151 1151
             //exercises
1152
-            'exercises_total' ,
1153
-            'exercises_done' ,
1154
-            'exercises_left' ,
1155
-            'exercises_progress' ,
1152
+            'exercises_total',
1153
+            'exercises_done',
1154
+            'exercises_left',
1155
+            'exercises_progress',
1156 1156
             //forums
1157
-            'forums_total' ,
1158
-            'forums_done' ,
1159
-            'forums_left' ,
1160
-            'forums_progress' ,
1157
+            'forums_total',
1158
+            'forums_done',
1159
+            'forums_left',
1160
+            'forums_progress',
1161 1161
             //assignments
1162
-            'assignments_total' ,
1163
-            'assignments_done' ,
1164
-            'assignments_left' ,
1165
-            'assignments_progress' ,
1162
+            'assignments_total',
1163
+            'assignments_done',
1164
+            'assignments_left',
1165
+            'assignments_progress',
1166 1166
             //Wiki
1167 1167
             'wiki_total',
1168 1168
             'wiki_revisions',
@@ -1170,10 +1170,10 @@  discard block
 block discarded – undo
1170 1170
             'wiki_unread',
1171 1171
             'wiki_progress',
1172 1172
             //surveys
1173
-            'surveys_total' ,
1174
-            'surveys_done' ,
1175
-            'surveys_left' ,
1176
-            'surveys_progress' ,
1173
+            'surveys_total',
1174
+            'surveys_done',
1175
+            'surveys_left',
1176
+            'surveys_progress',
1177 1177
             );
1178 1178
         $sessionId = 0;
1179 1179
         if (!empty($_GET['course_id']) && !empty($_GET['session_id'])) {
@@ -1260,7 +1260,7 @@  discard block
 block discarded – undo
1260 1260
         $result = $new_result;
1261 1261
         break;
1262 1262
     case 'get_gradebooks':
1263
-        $columns = array('name', 'certificates','skills', 'actions', 'has_certificates');
1263
+        $columns = array('name', 'certificates', 'skills', 'actions', 'has_certificates');
1264 1264
         if (!in_array($sidx, $columns)) {
1265 1265
             $sidx = 'name';
1266 1266
         }
@@ -1430,7 +1430,7 @@  discard block
 block discarded – undo
1430 1430
                     if (!empty($exercises[$cnt - 4]['title'])) {
1431 1431
                         $title = ucwords(strtolower(trim($exercises[$cnt - 4]['title'])));
1432 1432
                     }
1433
-                    $columns[] = 'exer' . $i;
1433
+                    $columns[] = 'exer'.$i;
1434 1434
                     $column_names[] = $title;
1435 1435
                     $i++;
1436 1436
                     break;
@@ -1439,7 +1439,7 @@  discard block
 block discarded – undo
1439 1439
 
1440 1440
         $quizIds = array();
1441 1441
         if (!empty($exercises)) {
1442
-            foreach($exercises as $exercise) {
1442
+            foreach ($exercises as $exercise) {
1443 1443
                 $quizIds[] = $exercise['id'];
1444 1444
             }
1445 1445
         }
@@ -1449,7 +1449,7 @@  discard block
 block discarded – undo
1449 1449
 
1450 1450
         $usersId = array_keys($listUserSess);
1451 1451
 
1452
-        $users = UserManager::get_user_list_by_ids($usersId, null, "lastname, firstname",  "$start , $limit");
1452
+        $users = UserManager::get_user_list_by_ids($usersId, null, "lastname, firstname", "$start , $limit");
1453 1453
         $exeResults = $objExercise->getExerciseAndResult($_GET['course_id'], $_GET['session_id'], $quizIds);
1454 1454
 
1455 1455
         $arrGrade = array();
@@ -1463,7 +1463,7 @@  discard block
 block discarded – undo
1463 1463
             $sessionInfo = SessionManager::fetch($listUserSess[$user['user_id']]['id_session']);
1464 1464
             $result[$i]['session'] = $sessionInfo['name'];
1465 1465
             $result[$i]['username'] = $user['username'];
1466
-            $result[$i]['name'] = $user['lastname'] . " " . $user['firstname'];
1466
+            $result[$i]['name'] = $user['lastname']." ".$user['firstname'];
1467 1467
             $j = 1;
1468 1468
             $finalScore = 0;
1469 1469
             foreach ($quizIds as $quizID) {
@@ -1471,7 +1471,7 @@  discard block
 block discarded – undo
1471 1471
                 if (!empty($arrGrade [$user['user_id']][$quizID]) || $arrGrade [$user['user_id']][$quizID] == 0) {
1472 1472
                     $finalScore += $grade = $arrGrade [$user['user_id']][$quizID];
1473 1473
                 }
1474
-                $result[$i]['exer' . $j] = $grade;
1474
+                $result[$i]['exer'.$j] = $grade;
1475 1475
                 $j++;
1476 1476
             }
1477 1477
 
@@ -1644,9 +1644,9 @@  discard block
 block discarded – undo
1644 1644
         foreach ($result as $row) {
1645 1645
             // if results tab give not id, set id to $i otherwise id="null" for all <tr> of the jqgrid - ref #4235
1646 1646
             if (!isset($row['id']) || isset($row['id']) && $row['id'] == '') {
1647
-                $response->rows[$i]['id']= $i;
1647
+                $response->rows[$i]['id'] = $i;
1648 1648
             } else {
1649
-                $response->rows[$i]['id']= $row['id'];
1649
+                $response->rows[$i]['id'] = $row['id'];
1650 1650
             }
1651 1651
             $array = array();
1652 1652
             foreach ($columns as $col) {
@@ -1656,7 +1656,7 @@  discard block
 block discarded – undo
1656 1656
                     $array[] = isset($row[$col]) ? Security::remove_XSS($row[$col]) : '';
1657 1657
                 }
1658 1658
             }
1659
-            $response->rows[$i]['cell']=$array;
1659
+            $response->rows[$i]['cell'] = $array;
1660 1660
             $i++;
1661 1661
         }
1662 1662
     }
Please login to merge, or discard this patch.
main/inc/local.inc.php 1 patch
Spacing   +23 added lines, -23 removed lines patch added patch discarded remove patch
@@ -130,7 +130,7 @@  discard block
 block discarded – undo
130 130
     $_user['status']  = $uData['status'];
131 131
     Session::write('_user', $_user);
132 132
     Session::erase('conditional_login');
133
-    $uidReset=true;
133
+    $uidReset = true;
134 134
     Event::event_login($_user['user_id']);
135 135
 }
136 136
 
@@ -212,7 +212,7 @@  discard block
 block discarded – undo
212 212
 
213 213
             //is necessary verify check
214 214
             if ($legal_type == 1) {
215
-                if ((isset($_POST['legal_accept']) && $_POST['legal_accept']=='1')) {
215
+                if ((isset($_POST['legal_accept']) && $_POST['legal_accept'] == '1')) {
216 216
                     $legal_option = true;
217 217
                 } else {
218 218
                     $legal_option = false;
@@ -221,7 +221,7 @@  discard block
 block discarded – undo
221 221
 
222 222
             //no is check option
223 223
             if ($legal_type == 0) {
224
-                $legal_option=true;
224
+                $legal_option = true;
225 225
             }
226 226
 
227 227
             if (isset($_POST['legal_accept_type']) && $legal_option === true) {
@@ -514,7 +514,7 @@  discard block
 block discarded – undo
514 514
                  * Process external authentication
515 515
                  * on the basis of the given login name
516 516
                  */
517
-                $loginFailed = true;  // Default initialisation. It could
517
+                $loginFailed = true; // Default initialisation. It could
518 518
                 // change after the external authentication
519 519
                 $key = $uData['auth_source']; //'ldap','shibboleth'...
520 520
                 /* >>>>>>>> External authentication modules <<<<<<<<< */
@@ -533,7 +533,7 @@  discard block
 block discarded – undo
533 533
             }
534 534
         } else {
535 535
             // login failed, Database::num_rows($result) <= 0
536
-            $loginFailed = true;  // Default initialisation. It could
536
+            $loginFailed = true; // Default initialisation. It could
537 537
             // change after the external authentication
538 538
 
539 539
             /*
@@ -559,7 +559,7 @@  discard block
 block discarded – undo
559 559
                         include_once($thisAuthSource['newUser']);
560 560
                     } else {
561 561
                         error_log(
562
-                            'Chamilo Authentication file '. $thisAuthSource['newUser'].
562
+                            'Chamilo Authentication file '.$thisAuthSource['newUser'].
563 563
                             ' could not be found - this might prevent your system from using'.
564 564
                             ' the authentication process in the user creation process',
565 565
                             0
@@ -668,7 +668,7 @@  discard block
 block discarded – undo
668 668
             online_logout(null, false);
669 669
             $osso->logout(); //redirects and exits
670 670
         }
671
-    } elseif (api_get_setting('openid_authentication')=='true') {
671
+    } elseif (api_get_setting('openid_authentication') == 'true') {
672 672
         if (!empty($_POST['openid_url'])) {
673 673
             include api_get_path(SYS_CODE_PATH).'auth/openid/login.php';
674 674
             openid_begin(trim($_POST['openid_url']), api_get_path(WEB_PATH).'index.php');
@@ -681,7 +681,7 @@  discard block
 block discarded – undo
681 681
             if ($res['status'] == 'success') {
682 682
                 $id1 = Database::escape_string($res['openid.identity']);
683 683
                 //have another id with or without the final '/'
684
-                $id2 = (substr($id1, -1, 1)=='/'?substr($id1, 0, -1):$id1.'/');
684
+                $id2 = (substr($id1, -1, 1) == '/' ? substr($id1, 0, -1) : $id1.'/');
685 685
                 //lookup the user in the main database
686 686
                 $user_table = Database::get_main_table(TABLE_MAIN_USER);
687 687
                 $sql = "SELECT user_id, username, password, auth_source, active, expiration_date
@@ -690,14 +690,14 @@  discard block
 block discarded – undo
690 690
                         OR openid = '$id2' ";
691 691
                 $result = Database::query($sql);
692 692
                 if ($result !== false) {
693
-                    if (Database::num_rows($result)>0) {
693
+                    if (Database::num_rows($result) > 0) {
694 694
                         $uData = Database::fetch_array($result);
695 695
 
696 696
                         if ($uData['auth_source'] == PLATFORM_AUTH_SOURCE) {
697 697
                             //the authentification of this user is managed by Chamilo itself
698 698
 
699 699
                             // check if the account is active (not locked)
700
-                            if ($uData['active']=='1') {
700
+                            if ($uData['active'] == '1') {
701 701
                                 // check if the expiration date has not been reached
702 702
                                 if ($uData['expiration_date'] > date('Y-m-d H:i:s')
703 703
                                     || empty($uData['expiration_date'])
@@ -775,7 +775,7 @@  discard block
 block discarded – undo
775 775
     (isset($_SESSION['_cid']) && $cidReq != $_SESSION['_cid']))
776 776
 ) {
777 777
     $cidReset = true;
778
-    $gidReset = true;    // As groups depend from courses, group id is reset
778
+    $gidReset = true; // As groups depend from courses, group id is reset
779 779
 }
780 780
 
781 781
 /* USER INIT */
@@ -864,8 +864,8 @@  discard block
 block discarded – undo
864 864
             $tbl_session_course_user = Database::get_main_table(TABLE_MAIN_SESSION_COURSE_USER);
865 865
 
866 866
             if (!empty($_GET['id_session'])) {
867
-                $sql = 'SELECT name FROM '.$tbl_session . '
868
-                        WHERE id="'.intval($_GET['id_session']) . '"';
867
+                $sql = 'SELECT name FROM '.$tbl_session.'
868
+                        WHERE id="'.intval($_GET['id_session']).'"';
869 869
                 $rs = Database::query($sql);
870 870
                 if (Database::num_rows($rs)) {
871 871
                     list($_SESSION['session_name']) = Database::fetch_array(
@@ -956,7 +956,7 @@  discard block
 block discarded – undo
956 956
         // Moreover, if we want to track a course with another session it can be usefull
957 957
         if (!empty($_GET['id_session']) && is_numeric($_GET['id_session'])) {
958 958
             $tbl_session = Database::get_main_table(TABLE_MAIN_SESSION);
959
-            $sql = 'SELECT name FROM '.$tbl_session . ' WHERE id="'.intval($_GET['id_session']). '"';
959
+            $sql = 'SELECT name FROM '.$tbl_session.' WHERE id="'.intval($_GET['id_session']).'"';
960 960
             $rs = Database::query($sql);
961 961
             if (Database::num_rows($rs)) {
962 962
                 list($_SESSION['session_name']) = Database::fetch_array($rs);
@@ -1005,7 +1005,7 @@  discard block
 block discarded – undo
1005 1005
                     $session_lifetime    = 3600; // 1 hour
1006 1006
                 }*/
1007 1007
 
1008
-                $session_lifetime    = 3600; // 1 hour
1008
+                $session_lifetime = 3600; // 1 hour
1009 1009
 
1010 1010
                 $course_code = $_course['sysCode'];
1011 1011
                 $time = api_get_utc_datetime();
@@ -1031,7 +1031,7 @@  discard block
 block discarded – undo
1031 1031
                         Database::query($sql);
1032 1032
                     } else {
1033 1033
                         $ip = api_get_real_ip();
1034
-                        $sql="INSERT INTO $course_tracking_table (c_id, user_ip, user_id, login_course_date, logout_course_date, counter, session_id)" .
1034
+                        $sql = "INSERT INTO $course_tracking_table (c_id, user_ip, user_id, login_course_date, logout_course_date, counter, session_id)".
1035 1035
                             "VALUES('".$_course['real_id']."', '".$ip."', '".$_user['user_id']."', '$time', '$time', '1','".api_get_session_id()."')";
1036 1036
                         Database::query($sql);
1037 1037
                     }
@@ -1096,8 +1096,8 @@  discard block
 block discarded – undo
1096 1096
         if (Database::num_rows($result) > 0) { // this  user have a recorded state for this course
1097 1097
             $cuData = Database::fetch_array($result, 'ASSOC');
1098 1098
 
1099
-            $is_courseAdmin = (bool)($cuData['status'] == 1);
1100
-            $is_courseTutor = (bool)($cuData['is_tutor'] == 1);
1099
+            $is_courseAdmin = (bool) ($cuData['status'] == 1);
1100
+            $is_courseTutor = (bool) ($cuData['is_tutor'] == 1);
1101 1101
             $is_courseMember = true;
1102 1102
         }
1103 1103
 
@@ -1108,7 +1108,7 @@  discard block
 block discarded – undo
1108 1108
                 // This user has no status related to this course
1109 1109
                 // The user is subscribed in a session? The user is a Session coach a Session admin ?
1110 1110
 
1111
-                $tbl_session  = Database :: get_main_table(TABLE_MAIN_SESSION);
1111
+                $tbl_session = Database :: get_main_table(TABLE_MAIN_SESSION);
1112 1112
                 $tbl_session_course = Database :: get_main_table(TABLE_MAIN_SESSION_COURSE);
1113 1113
                 $tbl_session_course_user = Database :: get_main_table(TABLE_MAIN_SESSION_COURSE_USER);
1114 1114
 
@@ -1221,7 +1221,7 @@  discard block
 block discarded – undo
1221 1221
 
1222 1222
             //If I'm the admin platform i'm a teacher of the course
1223 1223
             if ($is_platformAdmin) {
1224
-                $is_courseAdmin     = true;
1224
+                $is_courseAdmin = true;
1225 1225
             }
1226 1226
         }
1227 1227
     } else { // keys missing => not anymore in the course - user relation
@@ -1379,12 +1379,12 @@  discard block
 block discarded – undo
1379 1379
     ($logging_in && exist_firstpage_parameter())
1380 1380
 ) {
1381 1381
     $redirectCourseDir = api_get_firstpage_parameter();
1382
-    api_delete_firstpage_parameter();    // delete the cookie
1382
+    api_delete_firstpage_parameter(); // delete the cookie
1383 1383
 
1384 1384
     if (!isset($_SESSION['request_uri'])) {
1385 1385
         if (CourseManager::get_course_id_from_path($redirectCourseDir)) {
1386 1386
             $_SESSION['noredirection'] = false;
1387
-            $_SESSION['request_uri'] = api_get_path(WEB_COURSE_PATH) . $redirectCourseDir . '/';
1387
+            $_SESSION['request_uri'] = api_get_path(WEB_COURSE_PATH).$redirectCourseDir.'/';
1388 1388
         }
1389 1389
     }
1390 1390
 } elseif (api_user_is_login() && exist_firstpage_parameter()) {
@@ -1392,7 +1392,7 @@  discard block
 block discarded – undo
1392 1392
     api_delete_firstpage_parameter(); // delete the cookie
1393 1393
     if (CourseManager::get_course_id_from_path($redirectCourseDir)) {
1394 1394
         $_SESSION['noredirection'] = false;
1395
-        $_SESSION['request_uri'] = api_get_path(WEB_COURSE_PATH) . $redirectCourseDir . '/';
1395
+        $_SESSION['request_uri'] = api_get_path(WEB_COURSE_PATH).$redirectCourseDir.'/';
1396 1396
     }
1397 1397
 }
1398 1398
 
Please login to merge, or discard this patch.
main/inc/lib/AnnouncementEmail.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -196,7 +196,7 @@
 block discarded – undo
196 196
      *
197 197
      * @return array
198 198
      */
199
-    public function sender($key = '',  $userId = '')
199
+    public function sender($key = '', $userId = '')
200 200
     {
201 201
         $_user = api_get_user_info($userId);
202 202
 
Please login to merge, or discard this patch.
main/inc/lib/custom_pages.class.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -35,7 +35,7 @@  discard block
 block discarded – undo
35 35
      */
36 36
     public static function path($name = '')
37 37
     {
38
-        return api_get_path(SYS_PATH) . 'custompages/' . $name;
38
+        return api_get_path(SYS_PATH).'custompages/'.$name;
39 39
     }
40 40
 
41 41
     /**
@@ -50,12 +50,12 @@  discard block
 block discarded – undo
50 50
             return false;
51 51
         }
52 52
 
53
-        $file = self::path($page_name . '.php');
53
+        $file = self::path($page_name.'.php');
54 54
         if (file_exists($file)) {
55 55
             include($file);
56 56
             exit;
57 57
         } else {
58
-            error_log('CustomPages::displayPage : could not read file ' . $file);
58
+            error_log('CustomPages::displayPage : could not read file '.$file);
59 59
         }
60 60
     }
61 61
 
@@ -69,14 +69,14 @@  discard block
 block discarded – undo
69 69
     public static function getURLImages($url_id = null)
70 70
     {
71 71
         if (is_null($url_id)) {
72
-            $url = 'http://' . $_SERVER['HTTP_HOST'] . '/';
72
+            $url = 'http://'.$_SERVER['HTTP_HOST'].'/';
73 73
             $url_id = UrlManager::get_url_id($url);
74 74
         }
75
-        $url_images_dir = api_get_path(SYS_PATH) . 'custompages/url-images/';
75
+        $url_images_dir = api_get_path(SYS_PATH).'custompages/url-images/';
76 76
         $images = array();
77 77
         for ($img_id = 1; $img_id <= 3; $img_id++) {
78
-            if (file_exists($url_images_dir . $url_id . '_url_image_' . $img_id . '.png')) {
79
-                $images[] = api_get_path(WEB_PATH) . 'custompages/url-images/' . $url_id . '_url_image_' . $img_id . '.png';
78
+            if (file_exists($url_images_dir.$url_id.'_url_image_'.$img_id.'.png')) {
79
+                $images[] = api_get_path(WEB_PATH).'custompages/url-images/'.$url_id.'_url_image_'.$img_id.'.png';
80 80
             }
81 81
         }
82 82
 
Please login to merge, or discard this patch.
main/inc/lib/notification.lib.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -355,7 +355,7 @@  discard block
 block discarded – undo
355 355
                 $newMessageText = '';
356 356
                 $linkToNewMessage = Display::url(
357 357
                     get_lang('SeeMessage'),
358
-                    api_get_path(WEB_CODE_PATH) . 'messages/inbox.php'
358
+                    api_get_path(WEB_CODE_PATH).'messages/inbox.php'
359 359
                 );
360 360
                 break;
361 361
             case self::NOTIFICATION_TYPE_MESSAGE:
@@ -370,7 +370,7 @@  discard block
 block discarded – undo
370 370
                 }
371 371
                 $linkToNewMessage = Display::url(
372 372
                     get_lang('SeeMessage'),
373
-                    api_get_path(WEB_CODE_PATH) . 'messages/inbox.php'
373
+                    api_get_path(WEB_CODE_PATH).'messages/inbox.php'
374 374
                 );
375 375
                 break;
376 376
             case self::NOTIFICATION_TYPE_INVITATION:
@@ -385,7 +385,7 @@  discard block
 block discarded – undo
385 385
                 }
386 386
                 $linkToNewMessage = Display::url(
387 387
                     get_lang('SeeInvitation'),
388
-                    api_get_path(WEB_CODE_PATH) . 'social/invitations.php'
388
+                    api_get_path(WEB_CODE_PATH).'social/invitations.php'
389 389
                 );
390 390
                 break;
391 391
             case self::NOTIFICATION_TYPE_GROUP:
Please login to merge, or discard this patch.
main/inc/lib/usermanager.lib.php 1 patch
Spacing   +36 added lines, -36 removed lines patch added patch discarded remove patch
@@ -34,7 +34,7 @@  discard block
 block discarded – undo
34 34
     const USER_FIELD_TYPE_TIMEZONE = 11;
35 35
     const USER_FIELD_TYPE_SOCIAL_PROFILE = 12;
36 36
     const USER_FIELD_TYPE_FILE = 13;
37
-    const USER_FIELD_TYPE_MOBILE_PHONE_NUMBER  = 14;
37
+    const USER_FIELD_TYPE_MOBILE_PHONE_NUMBER = 14;
38 38
 
39 39
     private static $encryptionMethod;
40 40
 
@@ -280,7 +280,7 @@  discard block
 block discarded – undo
280 280
         }
281 281
 
282 282
         if (empty($password)) {
283
-            Display::addFlash(Display::return_message(get_lang('ThisFieldIsRequired').': '.get_lang('Password') , 'warning'));
283
+            Display::addFlash(Display::return_message(get_lang('ThisFieldIsRequired').': '.get_lang('Password'), 'warning'));
284 284
 
285 285
             return false;
286 286
         }
@@ -758,7 +758,7 @@  discard block
 block discarded – undo
758 758
         $sql = "UPDATE $table_user SET active = 1 WHERE id IN ($ids)";
759 759
         $r = Database::query($sql);
760 760
         if ($r !== false) {
761
-            Event::addEvent(LOG_USER_ENABLE,LOG_USER_ID,$ids);
761
+            Event::addEvent(LOG_USER_ENABLE, LOG_USER_ID, $ids);
762 762
         }
763 763
         return $r;
764 764
     }
@@ -1162,7 +1162,7 @@  discard block
 block discarded – undo
1162 1162
             // 1. Conversion of unacceptable letters (latinian letters with accents for example) into ASCII letters in order they not to be totally removed.
1163 1163
             // 2. Applying the strict purifier.
1164 1164
             // 3. Length limitation.
1165
-            $return  = api_get_setting('login_is_email') == 'true' ? substr(preg_replace(USERNAME_PURIFIER_MAIL, '', $username), 0, USERNAME_MAX_LENGTH) : substr(preg_replace(USERNAME_PURIFIER, '', $username), 0, USERNAME_MAX_LENGTH);
1165
+            $return = api_get_setting('login_is_email') == 'true' ? substr(preg_replace(USERNAME_PURIFIER_MAIL, '', $username), 0, USERNAME_MAX_LENGTH) : substr(preg_replace(USERNAME_PURIFIER, '', $username), 0, USERNAME_MAX_LENGTH);
1166 1166
             $return = URLify::transliterate($return);
1167 1167
             return $return;
1168 1168
         }
@@ -1254,12 +1254,12 @@  discard block
 block discarded – undo
1254 1254
 
1255 1255
         if (!is_null($order)) {
1256 1256
             $order = Database::escape_string($order);
1257
-            $sql .= ' ORDER BY ' . $order;
1257
+            $sql .= ' ORDER BY '.$order;
1258 1258
         }
1259 1259
 
1260 1260
         if (!is_null($limit)) {
1261 1261
             $limit = Database::escape_string($limit);
1262
-            $sql .= ' LIMIT ' . $limit;
1262
+            $sql .= ' LIMIT '.$limit;
1263 1263
         }
1264 1264
 
1265 1265
         $rs = Database::query($sql);
@@ -1432,7 +1432,7 @@  discard block
 block discarded – undo
1432 1432
             // In exceptional cases, on some portals, the intermediate base user
1433 1433
             // directory might not have been created. Make sure it is before
1434 1434
             // going further.
1435
-            $rootPath = api_get_path(SYS_UPLOAD_PATH) . 'users/' . substr((string) $id, 0, 1);
1435
+            $rootPath = api_get_path(SYS_UPLOAD_PATH).'users/'.substr((string) $id, 0, 1);
1436 1436
             if (!is_dir($rootPath)) {
1437 1437
                 $perm = api_get_permissions_for_new_directories();
1438 1438
                 try {
@@ -1685,7 +1685,7 @@  discard block
 block discarded – undo
1685 1685
         $path_info = self::get_user_picture_path_by_id($user_id, 'system');
1686 1686
         $path = $path_info['dir'];
1687 1687
         if (!empty($extra_field)) {
1688
-            $path .= $extra_field . '/';
1688
+            $path .= $extra_field.'/';
1689 1689
         }
1690 1690
         // If this directory does not exist - we create it.
1691 1691
         if (!file_exists($path)) {
@@ -1693,7 +1693,7 @@  discard block
 block discarded – undo
1693 1693
         }
1694 1694
 
1695 1695
         if (filter_extension($file)) {
1696
-            if (@move_uploaded_file($source_file,$path.$file)) {
1696
+            if (@move_uploaded_file($source_file, $path.$file)) {
1697 1697
                 if ($extra_field) {
1698 1698
                     return $extra_field.'/'.$file;
1699 1699
                 } else {
@@ -1944,10 +1944,10 @@  discard block
 block discarded – undo
1944 1944
         if (count($extra_files) > 0) {
1945 1945
             $extra_file_list = '<div class="files-production"><ul id="productions">';
1946 1946
             foreach ($extra_files as $file) {
1947
-                $filename = substr($file,strlen($extra_field)+1);
1947
+                $filename = substr($file, strlen($extra_field) + 1);
1948 1948
                 $extra_file_list .= '<li>'.Display::return_icon('archive.png').'<a href="'.$path.$extra_field.'/'.urlencode($filename).'" target="_blank">'.htmlentities($filename).'</a> ';
1949 1949
                 if ($showdelete) {
1950
-                    $extra_file_list .= '<input style="width:16px;" type="image" name="remove_extra_' . $extra_field . '['.urlencode($file).']" src="'.$del_image.'" alt="'.$del_text.'" title="'.$del_text.' '.htmlentities($filename).'" onclick="javascript: return confirmation(\''.htmlentities($filename).'\');" /></li>';
1950
+                    $extra_file_list .= '<input style="width:16px;" type="image" name="remove_extra_'.$extra_field.'['.urlencode($file).']" src="'.$del_image.'" alt="'.$del_text.'" title="'.$del_text.' '.htmlentities($filename).'" onclick="javascript: return confirmation(\''.htmlentities($filename).'\');" /></li>';
1951 1951
                 }
1952 1952
             }
1953 1953
             $extra_file_list .= '</ul></div>';
@@ -2531,7 +2531,7 @@  discard block
 block discarded – undo
2531 2531
 
2532 2532
         if (api_is_allowed_to_create_course()) {
2533 2533
             $sessionListFromCourseCoach = array();
2534
-            $sql =" SELECT DISTINCT session_id
2534
+            $sql = " SELECT DISTINCT session_id
2535 2535
                     FROM $tbl_session_course_user
2536 2536
                     WHERE user_id = $user_id AND status = 2 ";
2537 2537
 
@@ -2539,7 +2539,7 @@  discard block
 block discarded – undo
2539 2539
             if (Database::num_rows($result)) {
2540 2540
                 $result = Database::store_result($result);
2541 2541
                 foreach ($result as $session) {
2542
-                    $sessionListFromCourseCoach[]= $session['session_id'];
2542
+                    $sessionListFromCourseCoach[] = $session['session_id'];
2543 2543
                 }
2544 2544
             }
2545 2545
             if (!empty($sessionListFromCourseCoach)) {
@@ -2562,7 +2562,7 @@  discard block
 block discarded – undo
2562 2562
                 ORDER BY access_start_date, access_end_date, name";
2563 2563
 
2564 2564
         $result = Database::query($sql);
2565
-        if (Database::num_rows($result)>0) {
2565
+        if (Database::num_rows($result) > 0) {
2566 2566
             while ($row = Database::fetch_assoc($result)) {
2567 2567
                 $sessions[$row['id']] = $row;
2568 2568
             }
@@ -2578,7 +2578,7 @@  discard block
 block discarded – undo
2578 2578
                 ORDER BY access_start_date, access_end_date, name";
2579 2579
 
2580 2580
         $result = Database::query($sql);
2581
-        if (Database::num_rows($result)>0) {
2581
+        if (Database::num_rows($result) > 0) {
2582 2582
             while ($row = Database::fetch_assoc($result)) {
2583 2583
                 if (empty($sessions[$row['id']])) {
2584 2584
                     $sessions[$row['id']] = $row;
@@ -3567,13 +3567,13 @@  discard block
 block discarded – undo
3567 3567
         $useExtraFields = false;
3568 3568
         $extraFields = UserManager::get_extra_filtrable_fields();
3569 3569
         $extraFieldResult = array();
3570
-        if (is_array($extraFields) && count($extraFields)>0 ) {
3570
+        if (is_array($extraFields) && count($extraFields) > 0) {
3571 3571
             foreach ($extraFields as $extraField) {
3572 3572
                 $varName = 'field_'.$extraField['variable'];
3573 3573
                 if (UserManager::is_extra_field_available($extraField['variable'])) {
3574
-                    if (isset($_GET[$varName]) && $_GET[$varName]!='0') {
3574
+                    if (isset($_GET[$varName]) && $_GET[$varName] != '0') {
3575 3575
                         $useExtraFields = true;
3576
-                        $extraFieldResult[]= UserManager::get_extra_user_data_by_value(
3576
+                        $extraFieldResult[] = UserManager::get_extra_user_data_by_value(
3577 3577
                             $extraField['variable'],
3578 3578
                             $_GET[$varName]
3579 3579
                         );
@@ -3584,17 +3584,17 @@  discard block
 block discarded – undo
3584 3584
 
3585 3585
         if ($useExtraFields) {
3586 3586
             $finalResult = array();
3587
-            if (count($extraFieldResult)>1) {
3588
-                for ($i=0; $i < count($extraFieldResult) -1; $i++) {
3589
-                    if (is_array($extraFieldResult[$i+1])) {
3590
-                        $finalResult  = array_intersect($extraFieldResult[$i], $extraFieldResult[$i+1]);
3587
+            if (count($extraFieldResult) > 1) {
3588
+                for ($i = 0; $i < count($extraFieldResult) - 1; $i++) {
3589
+                    if (is_array($extraFieldResult[$i + 1])) {
3590
+                        $finalResult = array_intersect($extraFieldResult[$i], $extraFieldResult[$i + 1]);
3591 3591
                     }
3592 3592
                 }
3593 3593
             } else {
3594 3594
                 $finalResult = $extraFieldResult[0];
3595 3595
             }
3596 3596
 
3597
-            if (is_array($finalResult) && count($finalResult)>0) {
3597
+            if (is_array($finalResult) && count($finalResult) > 0) {
3598 3598
                 $whereFilter = " AND u.id IN  ('".implode("','", $finalResult)."') ";
3599 3599
             } else {
3600 3600
                 //no results
@@ -3767,7 +3767,7 @@  discard block
 block discarded – undo
3767 3767
             $sql = 'DELETE FROM '.$tbl_my_friend.'
3768 3768
                     WHERE relation_type <> '.USER_RELATION_TYPE_RRHH.' AND friend_user_id='.$friend_id.' '.$extra_condition;
3769 3769
             Database::query($sql);
3770
-            $sql= 'DELETE FROM '.$tbl_my_friend.'
3770
+            $sql = 'DELETE FROM '.$tbl_my_friend.'
3771 3771
                    WHERE relation_type <> '.USER_RELATION_TYPE_RRHH.' AND user_id='.$friend_id.' '.$extra_condition;
3772 3772
             Database::query($sql);
3773 3773
         } else {
@@ -3961,7 +3961,7 @@  discard block
 block discarded – undo
3961 3961
 
3962 3962
         if (!empty($lastConnectionDate)) {
3963 3963
             $lastConnectionDate = Database::escape_string($lastConnectionDate);
3964
-            $userConditions .=  " AND u.last_login <= '$lastConnectionDate' ";
3964
+            $userConditions .= " AND u.last_login <= '$lastConnectionDate' ";
3965 3965
         }
3966 3966
 
3967 3967
         $courseConditions = null;
@@ -4028,7 +4028,7 @@  discard block
 block discarded – undo
4028 4028
                 break;
4029 4029
             case STUDENT_BOSS :
4030 4030
                 $drhConditions = " AND friend_user_id = $userId AND "
4031
-                . "relation_type = " . USER_RELATION_TYPE_BOSS;
4031
+                . "relation_type = ".USER_RELATION_TYPE_BOSS;
4032 4032
                 break;
4033 4033
         }
4034 4034
 
@@ -4118,7 +4118,7 @@  discard block
 block discarded – undo
4118 4118
                 . "INNER JOIN $userRelAccessUrlTable a ON (a.user_id = s.user_id) "
4119 4119
                 . "WHERE friend_user_id = $userId "
4120 4120
                 . "AND relation_type = $relationType "
4121
-                . "AND access_url_id = " . api_get_current_access_url_id() . "";
4121
+                . "AND access_url_id = ".api_get_current_access_url_id()."";
4122 4122
         } else {
4123 4123
             $sql = "SELECT user_id FROM $userRelUserTable "
4124 4124
                 . "WHERE friend_user_id = $userId "
@@ -4393,7 +4393,7 @@  discard block
 block discarded – undo
4393 4393
         if (empty($years)) {
4394 4394
             $years = 1;
4395 4395
         }
4396
-        $inactive_time = $years * 31536000;  //1 year
4396
+        $inactive_time = $years * 31536000; //1 year
4397 4397
         $rs = Database::query($sql);
4398 4398
         if (Database::num_rows($rs) > 0) {
4399 4399
             if ($last_login_date = Database::result($rs, 0, 0)) {
@@ -4526,7 +4526,7 @@  discard block
 block discarded – undo
4526 4526
                         'extra_'.$field_details[1],
4527 4527
                         $field_details[3],
4528 4528
                         $options,
4529
-                        array('id' => 'extra_' . $field_details[1])
4529
+                        array('id' => 'extra_'.$field_details[1])
4530 4530
                     );
4531 4531
 
4532 4532
                     if (!$admin_permissions) {
@@ -4680,7 +4680,7 @@  discard block
 block discarded – undo
4680 4680
                     $extra_field = 'extra_'.$field_details[1];
4681 4681
                     $form->addElement('file', $extra_field, $field_details[3], null, '');
4682 4682
                     if ($extra_file_list = UserManager::build_user_extra_file_list($user_id, $field_details[1], '', true)) {
4683
-                        $form->addElement('static', $extra_field . '_list', null, $extra_file_list);
4683
+                        $form->addElement('static', $extra_field.'_list', null, $extra_file_list);
4684 4684
                     }
4685 4685
                     if ($field_details[7] == 0) {
4686 4686
                         $form->freeze($extra_field);
@@ -4820,7 +4820,7 @@  discard block
 block discarded – undo
4820 4820
         $direction = null,
4821 4821
         $active = null,
4822 4822
         $lastConnectionDate = null
4823
-    ){
4823
+    ) {
4824 4824
         return self::getUsersFollowedByUser(
4825 4825
                 $userId, $userStatus, $getOnlyUserId, $getSql, $getCount, $from, $numberItems, $column, $direction,
4826 4826
                 $active, $lastConnectionDate, STUDENT_BOSS
@@ -4987,12 +4987,12 @@  discard block
 block discarded – undo
4987 4987
         if (!empty($_SERVER['HTTPS'])) {
4988 4988
             $url = 'https://secure.gravatar.com/avatar/';
4989 4989
         }
4990
-        $url .= md5( strtolower( trim( $email ) ) );
4990
+        $url .= md5(strtolower(trim($email)));
4991 4991
         $url .= "?s=$s&d=$d&r=$r";
4992
-        if ( $img ) {
4993
-            $url = '<img src="' . $url . '"';
4994
-            foreach ( $atts as $key => $val )
4995
-                $url .= ' ' . $key . '="' . $val . '"';
4992
+        if ($img) {
4993
+            $url = '<img src="'.$url.'"';
4994
+            foreach ($atts as $key => $val)
4995
+                $url .= ' '.$key.'="'.$val.'"';
4996 4996
             $url .= ' />';
4997 4997
         }
4998 4998
         return $url;
Please login to merge, or discard this patch.
main/inc/lib/redirect.class.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -34,7 +34,7 @@  discard block
 block discarded – undo
34 34
             self::navigate($url);
35 35
         }
36 36
 
37
-        $url = self::www() . $url;
37
+        $url = self::www().$url;
38 38
         self::navigate($url);
39 39
     }
40 40
 
@@ -67,25 +67,25 @@  discard block
 block discarded – undo
67 67
                     case COURSEMANAGER:
68 68
                         $redir = api_get_setting('teacher_page_after_login');
69 69
                         if (!empty($redir)) {
70
-                            self::navigate(api_get_path(WEB_PATH) . $redir);
70
+                            self::navigate(api_get_path(WEB_PATH).$redir);
71 71
                         }
72 72
                         break;
73 73
                     case STUDENT:
74 74
                         $redir = api_get_setting('student_page_after_login');
75 75
                         if (!empty($redir)) {
76
-                            self::navigate(api_get_path(WEB_PATH) . $redir);
76
+                            self::navigate(api_get_path(WEB_PATH).$redir);
77 77
                         }
78 78
                         break;
79 79
                     case DRH:
80 80
                         $redir = api_get_setting('drh_page_after_login');
81 81
                         if (!empty($redir)) {
82
-                            self::navigate(api_get_path(WEB_PATH) . $redir);
82
+                            self::navigate(api_get_path(WEB_PATH).$redir);
83 83
                         }
84 84
                         break;
85 85
                     case SESSIONADMIN:
86 86
                         $redir = api_get_setting('sessionadmin_page_after_login');
87 87
                         if (!empty($redir)) {
88
-                            self::navigate(api_get_path(WEB_PATH) . $redir);
88
+                            self::navigate(api_get_path(WEB_PATH).$redir);
89 89
                         }
90 90
                         break;
91 91
                     default:
@@ -111,7 +111,7 @@  discard block
 block discarded – undo
111 111
             }
112 112
             $page_after_login = api_get_setting('page_after_login');
113 113
             if (!empty($page_after_login)) {
114
-                self::navigate(api_get_path(WEB_PATH) . $page_after_login);
114
+                self::navigate(api_get_path(WEB_PATH).$page_after_login);
115 115
             }
116 116
         }
117 117
     }
Please login to merge, or discard this patch.
main/inc/lib/gradebook.lib.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -56,7 +56,7 @@  discard block
 block discarded – undo
56 56
         }
57 57
 
58 58
         $c_id = $c_id ? intval($c_id) : api_get_course_int_id();
59
-        $table  = Database::get_course_table(TABLE_TOOL_LIST);
59
+        $table = Database::get_course_table(TABLE_TOOL_LIST);
60 60
         $sql = "SELECT * from $table
61 61
                 WHERE c_id = $c_id and name='$name'
62 62
                 LIMIT 1";
@@ -113,7 +113,7 @@  discard block
 block discarded – undo
113 113
         $clean_gradebook = array();
114 114
 
115 115
         if (!empty($skill_gradebooks_source)) {
116
-            foreach($skill_gradebooks_source as $source) {
116
+            foreach ($skill_gradebooks_source as $source) {
117 117
                 $clean_gradebook[] = $source['skill_id'];
118 118
             }
119 119
         }
@@ -192,7 +192,7 @@  discard block
 block discarded – undo
192 192
         $selected_skills = self::get_skills_by_gradebook($gradebook_id);
193 193
         $clean_selected_skills = array();
194 194
         if (!empty($selected_skills)) {
195
-            foreach($selected_skills as $skill) {
195
+            foreach ($selected_skills as $skill) {
196 196
                 $clean_selected_skills[] = $skill['id'];
197 197
             }
198 198
         }
Please login to merge, or discard this patch.