Completed
Pull Request — 1.11.x (#1628)
by José
97:30 queued 69:06
created
main/webservices/cm_webservice.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -51,7 +51,7 @@  discard block
 block discarded – undo
51 51
      */
52 52
     public static function setErrorHandler($handler)
53 53
     {
54
-        if($handler instanceof WSErrorHandler) {
54
+        if ($handler instanceof WSErrorHandler) {
55 55
             self::$_handler = $handler;
56 56
         }
57 57
     }
@@ -122,12 +122,12 @@  discard block
 block discarded – undo
122 122
 		// if we are behind a reverse proxy, assume it will send the
123 123
 		// HTTP_X_FORWARDED_FOR header and use this IP instead
124 124
 		if (!empty($_SERVER['HTTP_X_FORWARDED_FOR'])) {
125
-		  list($ip1,$ip2) = split(',',$_SERVER['HTTP_X_FORWARDED_FOR']);
125
+		  list($ip1, $ip2) = split(',', $_SERVER['HTTP_X_FORWARDED_FOR']);
126 126
 		  $ip = trim($ip1);
127 127
 		}
128 128
 		$security_key = $ip.$this->_configuration['security_key'];
129 129
 
130
-		if(!api_is_valid_secret_key($secret_key, $security_key)) {
130
+		if (!api_is_valid_secret_key($secret_key, $security_key)) {
131 131
 			return new WSCMError(1, "API key is invalid");
132 132
 		} else {
133 133
 			return null;
@@ -252,8 +252,8 @@  discard block
 block discarded – undo
252 252
 	protected function getSessionId($session_id_field_name, $session_id_value)
253 253
 	{
254 254
 		if ($session_id_field_name == "chamilo_session_id") {
255
-			$session = SessionManager::fetch((int)$session_id_value);
256
-			if(!empty($session)) {
255
+			$session = SessionManager::fetch((int) $session_id_value);
256
+			if (!empty($session)) {
257 257
 				return intval($session_id_value);
258 258
 			} else {
259 259
 				return new WSCMError(300, "Session not found");
@@ -263,7 +263,7 @@  discard block
 block discarded – undo
263 263
 				$session_id_value,
264 264
 				$session_id_field_name
265 265
 			);
266
-			if($session_id == 0) {
266
+			if ($session_id == 0) {
267 267
 				return new WSCMError(300, "Session not found");
268 268
 			} else {
269 269
 				return $session_id;
Please login to merge, or discard this patch.
main/webservices/cm_webservice_user.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -91,12 +91,12 @@
 block discarded – undo
91 91
         if ($this->verifyUserPass($username, $password) == "valid") {
92 92
 		    $user_id = UserManager::get_user_id_from_username($username);
93 93
             $message_title = get_lang('Invitation');
94
-            $count_is_true = SocialManager::send_invitation_friend($user_id,$userfriend_id, $message_title, $content_message);
94
+            $count_is_true = SocialManager::send_invitation_friend($user_id, $userfriend_id, $message_title, $content_message);
95 95
 
96 96
             if ($count_is_true) {
97
-                return Display::display_normal_message(api_htmlentities(get_lang('InvitationHasBeenSent'), ENT_QUOTES,$charset),false);
97
+                return Display::display_normal_message(api_htmlentities(get_lang('InvitationHasBeenSent'), ENT_QUOTES, $charset), false);
98 98
             } else {
99
-                return Display::display_error_message(api_htmlentities(get_lang('YouAlreadySentAnInvitation'), ENT_QUOTES,$charset),false);
99
+                return Display::display_error_message(api_htmlentities(get_lang('YouAlreadySentAnInvitation'), ENT_QUOTES, $charset), false);
100 100
             }
101 101
         }
102 102
         return get_lang('InvalidId');
Please login to merge, or discard this patch.
main/inc/ajax/model.ajax.php 1 patch
Spacing   +40 added lines, -40 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
 
@@ -64,19 +64,19 @@  discard block
 block discarded – undo
64 64
 function getWhereClause($col, $oper, $val)
65 65
 {
66 66
     $ops = array(
67
-        'eq' => '=',        //equal
68
-        'ne' => '<>',       //not equal
69
-        'lt' => '<',        //less than
70
-        'le' => '<=',       //less than or equal
71
-        'gt' => '>',        //greater than
72
-        'ge' => '>=',       //greater than or equal
73
-        'bw' => 'LIKE',     //begins with
67
+        'eq' => '=', //equal
68
+        'ne' => '<>', //not equal
69
+        'lt' => '<', //less than
70
+        'le' => '<=', //less than or equal
71
+        'gt' => '>', //greater than
72
+        'ge' => '>=', //greater than or equal
73
+        'bw' => 'LIKE', //begins with
74 74
         'bn' => 'NOT LIKE', //doesn't begin with
75
-        'in' => 'LIKE',     //is in
75
+        'in' => 'LIKE', //is in
76 76
         'ni' => 'NOT LIKE', //is not in
77
-        'ew' => 'LIKE',     //ends with
77
+        'ew' => 'LIKE', //ends with
78 78
         'en' => 'NOT LIKE', //doesn't end with
79
-        'cn' => 'LIKE',     //contains
79
+        'cn' => 'LIKE', //contains
80 80
         'nc' => 'NOT LIKE'  //doesn't contain
81 81
     );
82 82
 
@@ -100,10 +100,10 @@  discard block
 block discarded – undo
100 100
 
101 101
 // If there is no search request sent by jqgrid, $where should be empty
102 102
 $whereCondition = '';
103
-$operation = isset($_REQUEST['oper'])  ? $_REQUEST['oper']  : false;
104
-$exportFormat = isset($_REQUEST['export_format'])  ? $_REQUEST['export_format']  : 'csv';
105
-$searchField = isset($_REQUEST['searchField'])  ? $_REQUEST['searchField']  : false;
106
-$searchOperator = isset($_REQUEST['searchOper'])   ? $_REQUEST['searchOper']   : false;
103
+$operation = isset($_REQUEST['oper']) ? $_REQUEST['oper'] : false;
104
+$exportFormat = isset($_REQUEST['export_format']) ? $_REQUEST['export_format'] : 'csv';
105
+$searchField = isset($_REQUEST['searchField']) ? $_REQUEST['searchField'] : false;
106
+$searchOperator = isset($_REQUEST['searchOper']) ? $_REQUEST['searchOper'] : false;
107 107
 $searchString = isset($_REQUEST['searchString']) ? $_REQUEST['searchString'] : false;
108 108
 $search = isset($_REQUEST['_search']) ? $_REQUEST['_search'] : false;
109 109
 $forceSearch = isset($_REQUEST['_force_search']) ? $_REQUEST['_force_search'] : false;
@@ -171,7 +171,7 @@  discard block
 block discarded – undo
171 171
             foreach ($filters->rules as $key => $rule) {
172 172
                 $whereCondition .= getWhereClause($rule->field, $rule->op, $rule->data);
173 173
 
174
-                if ($counter < count($filters->rules) -1) {
174
+                if ($counter < count($filters->rules) - 1) {
175 175
                     $whereCondition .= $filters->groupOp;
176 176
                 }
177 177
                 $counter++;
@@ -201,7 +201,7 @@  discard block
 block discarded – undo
201 201
         $userId = api_get_user_id();
202 202
         $sessionId = isset($_GET['session_id']) ? intval($_GET['session_id']) : 0;
203 203
         $courseCodeList = array();
204
-        $userIdList  = array();
204
+        $userIdList = array();
205 205
         $sessionIdList = [];
206 206
         $searchByGroups = false;
207 207
         if (api_is_drh()) {
@@ -585,7 +585,7 @@  discard block
 block discarded – undo
585 585
 $total_pages = 0;
586 586
 if ($count > 0) {
587 587
     if (!empty($limit)) {
588
-        $total_pages = ceil((float)$count/(float)$limit);
588
+        $total_pages = ceil((float) $count / (float) $limit);
589 589
     }
590 590
 }
591 591
 if ($page > $total_pages) {
@@ -865,10 +865,10 @@  discard block
 block discarded – undo
865 865
     case 'get_work_user_list_others':
866 866
         if (isset($_GET['type']) && $_GET['type'] === 'simple') {
867 867
             $columns = array(
868
-                'type', 'firstname', 'lastname',  'title', 'qualification', 'sent_date', 'qualificator_id', 'actions'
868
+                'type', 'firstname', 'lastname', 'title', 'qualification', 'sent_date', 'qualificator_id', 'actions'
869 869
             );
870 870
         } else {
871
-            $columns = array('type', 'firstname', 'lastname',  'title', 'sent_date', 'actions');
871
+            $columns = array('type', 'firstname', 'lastname', 'title', 'sent_date', 'actions');
872 872
         }
873 873
         $whereCondition .= " AND u.user_id <> ".api_get_user_id();
874 874
         $result = get_work_user_list($start, $limit, $sidx, $sord, $work_id, $whereCondition);
@@ -902,7 +902,7 @@  discard block
 block discarded – undo
902 902
     case 'get_exercise_results':
903 903
         $course = api_get_course_info();
904 904
         // Used inside ExerciseLib::get_exam_results_data()
905
-        $documentPath = api_get_path(SYS_COURSE_PATH) . $course['path'] . "/document";
905
+        $documentPath = api_get_path(SYS_COURSE_PATH).$course['path']."/document";
906 906
         if ($is_allowedToEdit || api_is_student_boss()) {
907 907
             $columns = array(
908 908
                 'firstname',
@@ -927,11 +927,11 @@  discard block
 block discarded – undo
927 927
         break;
928 928
     case 'get_hotpotatoes_exercise_results':
929 929
         $course = api_get_course_info();
930
-        $documentPath = api_get_path(SYS_COURSE_PATH) . $course['path'] . "/document";
930
+        $documentPath = api_get_path(SYS_COURSE_PATH).$course['path']."/document";
931 931
         if (api_is_allowed_to_edit()) {
932
-            $columns = array('firstname', 'lastname', 'username', 'group_name', 'exe_date',  'score', 'actions');
932
+            $columns = array('firstname', 'lastname', 'username', 'group_name', 'exe_date', 'score', 'actions');
933 933
         } else {
934
-            $columns = array('exe_date',  'score', 'actions');
934
+            $columns = array('exe_date', 'score', 'actions');
935 935
         }
936 936
         $result = ExerciseLib::get_exam_results_hotpotatoes_data(
937 937
             $start,
@@ -964,12 +964,12 @@  discard block
 block discarded – undo
964 964
         break;
965 965
     case 'get_hotpotatoes_exercise_results':
966 966
         $course = api_get_course_info();
967
-        $documentPath = api_get_path(SYS_COURSE_PATH) . $course['path'] . "/document";
967
+        $documentPath = api_get_path(SYS_COURSE_PATH).$course['path']."/document";
968 968
 
969 969
         if (api_is_allowed_to_edit(null, true) || api_is_drh()) {
970
-            $columns = array('firstname', 'lastname', 'username', 'group_name', 'exe_date',  'score', 'actions');
970
+            $columns = array('firstname', 'lastname', 'username', 'group_name', 'exe_date', 'score', 'actions');
971 971
         } else {
972
-            $columns = array('exe_date',  'score', 'actions');
972
+            $columns = array('exe_date', 'score', 'actions');
973 973
         }
974 974
         $result = ExerciseLib::get_exam_results_hotpotatoes_data(
975 975
             $start,
@@ -1005,7 +1005,7 @@  discard block
 block discarded – undo
1005 1005
             );
1006 1006
         }
1007 1007
 
1008
-        $columns =  array(
1008
+        $columns = array(
1009 1009
             'name',
1010 1010
             'date',
1011 1011
             'course_per_session',
@@ -1041,17 +1041,17 @@  discard block
 block discarded – undo
1041 1041
                 $detailButtons = [];
1042 1042
                 $detailButtons[] = Display::url(
1043 1043
                     Display::return_icon('works.png', get_lang('WorksReport')),
1044
-                    api_get_path(WEB_CODE_PATH) . 'mySpace/works_in_session_report.php?session=' . $session['id']
1044
+                    api_get_path(WEB_CODE_PATH).'mySpace/works_in_session_report.php?session='.$session['id']
1045 1045
                 );
1046 1046
                 $detailButtons[] = Display::url(
1047 1047
                     Display::return_icon('2rightarrow.png'),
1048
-                    api_get_path(WEB_CODE_PATH) . 'mySpace/course.php?session_id=' . $session['id']
1048
+                    api_get_path(WEB_CODE_PATH).'mySpace/course.php?session_id='.$session['id']
1049 1049
                 );
1050 1050
 
1051 1051
                 $result[] = array(
1052 1052
                     'name' => Display::url(
1053 1053
                         $session['name'],
1054
-                        api_get_path(WEB_CODE_PATH) . 'mySpace/course.php?session_id=' . $session['id']
1054
+                        api_get_path(WEB_CODE_PATH).'mySpace/course.php?session_id='.$session['id']
1055 1055
                     ),
1056 1056
                     'date' => $session_date_string,
1057 1057
                     'course_per_session' => $count_courses_in_session,
@@ -1363,7 +1363,7 @@  discard block
 block discarded – undo
1363 1363
         $result = $new_result;
1364 1364
         break;
1365 1365
     case 'get_gradebooks':
1366
-        $columns = array('name', 'certificates','skills', 'actions', 'has_certificates');
1366
+        $columns = array('name', 'certificates', 'skills', 'actions', 'has_certificates');
1367 1367
         if (!in_array($sidx, $columns)) {
1368 1368
             $sidx = 'name';
1369 1369
         }
@@ -1536,7 +1536,7 @@  discard block
 block discarded – undo
1536 1536
                     if (!empty($exercises[$cnt - 4]['title'])) {
1537 1537
                         $title = ucwords(strtolower(trim($exercises[$cnt - 4]['title'])));
1538 1538
                     }
1539
-                    $columns[] = 'exer' . $i;
1539
+                    $columns[] = 'exer'.$i;
1540 1540
                     $column_names[] = $title;
1541 1541
                     $i++;
1542 1542
                     break;
@@ -1569,7 +1569,7 @@  discard block
 block discarded – undo
1569 1569
             $sessionInfo = SessionManager::fetch($listUserSess[$user['user_id']]['id_session']);
1570 1570
             $result[$i]['session'] = $sessionInfo['name'];
1571 1571
             $result[$i]['username'] = $user['username'];
1572
-            $result[$i]['name'] = $user['lastname'] . " " . $user['firstname'];
1572
+            $result[$i]['name'] = $user['lastname']." ".$user['firstname'];
1573 1573
             $j = 1;
1574 1574
             $finalScore = 0;
1575 1575
             foreach ($quizIds as $quizID) {
@@ -1577,7 +1577,7 @@  discard block
 block discarded – undo
1577 1577
                 if (!empty($arrGrade [$user['user_id']][$quizID]) || $arrGrade [$user['user_id']][$quizID] == 0) {
1578 1578
                     $finalScore += $grade = $arrGrade [$user['user_id']][$quizID];
1579 1579
                 }
1580
-                $result[$i]['exer' . $j] = $grade;
1580
+                $result[$i]['exer'.$j] = $grade;
1581 1581
                 $j++;
1582 1582
             }
1583 1583
 
@@ -1745,9 +1745,9 @@  discard block
 block discarded – undo
1745 1745
         foreach ($result as $row) {
1746 1746
             // if results tab give not id, set id to $i otherwise id="null" for all <tr> of the jqgrid - ref #4235
1747 1747
             if (!isset($row['id']) || isset($row['id']) && $row['id'] == '') {
1748
-                $response->rows[$i]['id']= $i;
1748
+                $response->rows[$i]['id'] = $i;
1749 1749
             } else {
1750
-                $response->rows[$i]['id']= $row['id'];
1750
+                $response->rows[$i]['id'] = $row['id'];
1751 1751
             }
1752 1752
             $array = array();
1753 1753
             foreach ($columns as $col) {
@@ -1757,7 +1757,7 @@  discard block
 block discarded – undo
1757 1757
                     $array[] = isset($row[$col]) ? Security::remove_XSS($row[$col]) : '';
1758 1758
                 }
1759 1759
             }
1760
-            $response->rows[$i]['cell']=$array;
1760
+            $response->rows[$i]['cell'] = $array;
1761 1761
             $i++;
1762 1762
         }
1763 1763
     }
Please login to merge, or discard this patch.
main/gradebook/lib/be/studentpublicationlink.class.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -92,7 +92,7 @@  discard block
 block discarded – undo
92 92
 
93 93
         $result = Database::query($sql);
94 94
 
95
-        $cats=array();
95
+        $cats = array();
96 96
         while ($data = Database::fetch_array($result)) {
97 97
             $cats[] = array($data['id'], $data['url']);
98 98
         }
@@ -135,9 +135,9 @@  discard block
 block discarded – undo
135 135
             if (empty($work_name)) {
136 136
                 $work_name = basename($data->getUrl());
137 137
             }
138
-            $cats[] = array ($data->getId(), $work_name);
138
+            $cats[] = array($data->getId(), $work_name);
139 139
         }
140
-        $cats=isset($cats) ? $cats : array();
140
+        $cats = isset($cats) ? $cats : array();
141 141
         return $cats;
142 142
     }
143 143
 
@@ -263,7 +263,7 @@  discard block
 block discarded – undo
263 263
             ];
264 264
         }
265 265
 
266
-        $students = array();  // user list, needed to make sure we only
266
+        $students = array(); // user list, needed to make sure we only
267 267
         // take first attempts into account
268 268
         $rescount = 0;
269 269
         $sum = 0;
@@ -296,7 +296,7 @@  discard block
 block discarded – undo
296 296
                 return array($bestResult, $weight);
297 297
                 break;
298 298
             case 'average':
299
-                return array($sumResult/$rescount, $weight);
299
+                return array($sumResult / $rescount, $weight);
300 300
                 break;
301 301
             case 'ranking':
302 302
                 return AbstractLink::getCurrentUserRanking($stud_id, $students);
Please login to merge, or discard this patch.
main/exercise/hotpotatoes_exercise_result.class.php 1 patch
Spacing   +30 added lines, -30 removed lines patch added patch discarded remove patch
@@ -24,13 +24,13 @@  discard block
 block discarded – undo
24 24
     {
25 25
 		$return = array();
26 26
         $TBL_USER = Database::get_main_table(TABLE_MAIN_USER);
27
-        $TBL_TRACK_HOTPOTATOES	= Database::get_main_table(TABLE_STATISTIC_TRACK_E_HOTPOTATOES);
27
+        $TBL_TRACK_HOTPOTATOES = Database::get_main_table(TABLE_STATISTIC_TRACK_E_HOTPOTATOES);
28 28
 
29 29
         $cid             = api_get_course_id();
30 30
         $course_id       = api_get_course_int_id();
31 31
         //$user_id         = intval($user_id);
32 32
         $user_id = null;
33
-        $session_id_and  = ' AND te.session_id = ' . api_get_session_id() . ' ';
33
+        $session_id_and  = ' AND te.session_id = '.api_get_session_id().' ';
34 34
         $hotpotato_name  = Database::escape_string($hotpotato_name);
35 35
 
36 36
         if (!empty($exercise_id)) {
@@ -38,7 +38,7 @@  discard block
 block discarded – undo
38 38
         }
39 39
 
40 40
         if (empty($user_id)) {
41
-            $sql="SELECT firstname as userpart1, lastname as userpart2 ,
41
+            $sql = "SELECT firstname as userpart1, lastname as userpart2 ,
42 42
                     email,
43 43
                     tth.exe_name,
44 44
                     tth.exe_result,
@@ -50,13 +50,13 @@  discard block
 block discarded – undo
50 50
                             tth.exe_name = '$hotpotato_name'
51 51
                     ORDER BY tth.c_id ASC, tth.exe_date ASC";
52 52
         } else {
53
-            $user_id_and = ' AND te.exe_user_id = ' . api_get_user_id() . ' ';
53
+            $user_id_and = ' AND te.exe_user_id = '.api_get_user_id().' ';
54 54
             // get only this user's results
55 55
 
56 56
             $sql = "SELECT '', exe_name, exe_result , exe_weighting, exe_date
57 57
                     FROM $TBL_TRACK_HOTPOTATOES
58 58
                     WHERE
59
-                        exe_user_id = '" . $user_id . "' AND
59
+                        exe_user_id = '".$user_id."' AND
60 60
                         c_id = $course_id AND
61 61
                         tth.exe_name = '$hotpotato_name'
62 62
                     ORDER BY c_id ASC, exe_date ASC";
@@ -65,13 +65,13 @@  discard block
 block discarded – undo
65 65
         $results = array();
66 66
 
67 67
         $resx = Database::query($sql);
68
-        while ($rowx = Database::fetch_array($resx,'ASSOC')) {
68
+        while ($rowx = Database::fetch_array($resx, 'ASSOC')) {
69 69
             $results[] = $rowx;
70 70
         }
71 71
 
72 72
         $hpresults = array();
73 73
         $resx = Database::query($sql);
74
-        while ($rowx = Database::fetch_array($resx,'ASSOC')) {
74
+        while ($rowx = Database::fetch_array($resx, 'ASSOC')) {
75 75
             $hpresults[] = $rowx;
76 76
         }
77 77
 
@@ -90,19 +90,19 @@  discard block
 block discarded – undo
90 90
 
91 91
         // Print the Result of Hotpotatoes Tests
92 92
         if (is_array($hpresults)) {
93
-            for($i = 0; $i < sizeof($hpresults); $i++) {
93
+            for ($i = 0; $i < sizeof($hpresults); $i++) {
94 94
                 $return[$i] = array();
95 95
                 $title = GetQuizName($hpresults[$i]['exe_name'], $document_path);
96
-                if ($title =='') {
96
+                if ($title == '') {
97 97
                     $title = basename($hpresults[$i]['exe_name']);
98 98
                 }
99
-                if(empty($user_id)) {
99
+                if (empty($user_id)) {
100 100
                 $return[$i]['email'] = $hpresults[$i]['email'];
101 101
                     $return[$i]['first_name'] = $hpresults[$i]['userpart1'];
102 102
                     $return[$i]['last_name'] = $hpresults[$i]['userpart2'];
103 103
                 }
104 104
                 $return[$i]['title'] = $title;
105
-                $return[$i]['exe_date']  = $hpresults[$i]['exe_date'];
105
+                $return[$i]['exe_date'] = $hpresults[$i]['exe_date'];
106 106
 
107 107
                 $return[$i]['result'] = $hpresults[$i]['exe_result'];
108 108
                 $return[$i]['max'] = $hpresults[$i]['exe_weighting'];
@@ -132,17 +132,17 @@  discard block
 block discarded – undo
132 132
 		$data = '';
133 133
 
134 134
         if (api_is_western_name_order()) {
135
-            if(!empty($this->results[0]['first_name'])) {
135
+            if (!empty($this->results[0]['first_name'])) {
136 136
                 $data .= get_lang('FirstName').';';
137 137
             }
138
-            if(!empty($this->results[0]['last_name'])) {
138
+            if (!empty($this->results[0]['last_name'])) {
139 139
                 $data .= get_lang('LastName').';';
140 140
             }
141 141
         } else {
142
-            if(!empty($this->results[0]['last_name'])) {
142
+            if (!empty($this->results[0]['last_name'])) {
143 143
                 $data .= get_lang('LastName').';';
144 144
             }
145
-            if(!empty($this->results[0]['first_name'])) {
145
+            if (!empty($this->results[0]['first_name'])) {
146 146
                 $data .= get_lang('FirstName').';';
147 147
             }
148 148
         }
@@ -164,16 +164,16 @@  discard block
 block discarded – undo
164 164
 		$data .= "\n";
165 165
 
166 166
 		//results
167
-		foreach($this->results as $row) {
167
+		foreach ($this->results as $row) {
168 168
             if (api_is_western_name_order()) {
169
-              $data .= str_replace("\r\n",'  ',api_html_entity_decode(strip_tags($row['first_name']), ENT_QUOTES, $charset)).';';
170
-              $data .= str_replace("\r\n",'  ',api_html_entity_decode(strip_tags($row['last_name']), ENT_QUOTES, $charset)).';';
169
+              $data .= str_replace("\r\n", '  ', api_html_entity_decode(strip_tags($row['first_name']), ENT_QUOTES, $charset)).';';
170
+              $data .= str_replace("\r\n", '  ', api_html_entity_decode(strip_tags($row['last_name']), ENT_QUOTES, $charset)).';';
171 171
             } else {
172
-              $data .= str_replace("\r\n",'  ',api_html_entity_decode(strip_tags($row['last_name']), ENT_QUOTES, $charset)).';';
173
-              $data .= str_replace("\r\n",'  ',api_html_entity_decode(strip_tags($row['first_name']), ENT_QUOTES, $charset)).';';
172
+              $data .= str_replace("\r\n", '  ', api_html_entity_decode(strip_tags($row['last_name']), ENT_QUOTES, $charset)).';';
173
+              $data .= str_replace("\r\n", '  ', api_html_entity_decode(strip_tags($row['first_name']), ENT_QUOTES, $charset)).';';
174 174
             }
175 175
 
176
-            $data .= str_replace("\r\n",'  ',api_html_entity_decode(strip_tags($row['email']), ENT_QUOTES, $charset)).';';
176
+            $data .= str_replace("\r\n", '  ', api_html_entity_decode(strip_tags($row['email']), ENT_QUOTES, $charset)).';';
177 177
 
178 178
 			/*if ($export_user_fields) {
179 179
 				//show user fields data, if any, for this user
@@ -183,10 +183,10 @@  discard block
 block discarded – undo
183 183
 				}
184 184
 			}*/
185 185
 
186
-			$data .= str_replace("\r\n",'  ',api_html_entity_decode(strip_tags($row['title']), ENT_QUOTES, $charset)).';';
187
-			$data .= str_replace("\r\n",'  ',$row['exe_date']).';';
188
-			$data .= str_replace("\r\n",'  ',$row['result']).';';
189
-			$data .= str_replace("\r\n",'  ',$row['max']).';';
186
+			$data .= str_replace("\r\n", '  ', api_html_entity_decode(strip_tags($row['title']), ENT_QUOTES, $charset)).';';
187
+			$data .= str_replace("\r\n", '  ', $row['exe_date']).';';
188
+			$data .= str_replace("\r\n", '  ', $row['result']).';';
189
+			$data .= str_replace("\r\n", '  ', $row['max']).';';
190 190
 			$data .= "\n";
191 191
 		}
192 192
 
@@ -208,7 +208,7 @@  discard block
 block discarded – undo
208 208
 		header('Content-Description: '.$filename);
209 209
 		header('Content-transfer-encoding: binary');
210 210
 		// @todo add this utf-8 header for all csv files
211
-		echo "\xEF\xBB\xBF";  // force utf-8 header of csv file
211
+		echo "\xEF\xBB\xBF"; // force utf-8 header of csv file
212 212
 		echo $data;
213 213
 		return true;
214 214
 	}
@@ -267,7 +267,7 @@  discard block
 block discarded – undo
267 267
 
268 268
 		if ($export_user_fields) {
269 269
 			//show user fields section with a big th colspan that spans over all fields
270
-			$extra_user_fields = UserManager::get_extra_fields(0,1000,5,'ASC',false, 1);
270
+			$extra_user_fields = UserManager::get_extra_fields(0, 1000, 5, 'ASC', false, 1);
271 271
 
272 272
 			//show the fields names for user fields
273 273
 			foreach ($extra_user_fields as $field) {
@@ -315,7 +315,7 @@  discard block
 block discarded – undo
315 315
                 $column++;
316 316
 
317 317
                 if (api_is_western_name_order()) {
318
-                    $worksheet->setCellValueByColumnAndRow($column, $line,api_html_entity_decode(strip_tags($row['first_name']), ENT_QUOTES, $charset));
318
+                    $worksheet->setCellValueByColumnAndRow($column, $line, api_html_entity_decode(strip_tags($row['first_name']), ENT_QUOTES, $charset));
319 319
                     $column++;
320 320
                     $worksheet->setCellValueByColumnAndRow($column, $line, api_html_entity_decode(strip_tags($row['last_name']), ENT_QUOTES, $charset));
321 321
                     $column++;
@@ -329,8 +329,8 @@  discard block
 block discarded – undo
329 329
 
330 330
 			if ($export_user_fields) {
331 331
 				//show user fields data, if any, for this user
332
-				$user_fields_values = UserManager::get_extra_user_data($row['user_id'],false,false, false, true);
333
-				foreach($user_fields_values as $value) {
332
+				$user_fields_values = UserManager::get_extra_user_data($row['user_id'], false, false, false, true);
333
+				foreach ($user_fields_values as $value) {
334 334
 					$worksheet->setCellValueByColumnAndRow($column, $line, api_html_entity_decode(strip_tags($value), ENT_QUOTES, $charset));
335 335
 					$column++;
336 336
 				}
Please login to merge, or discard this patch.
main/tracking/exams.php 1 patch
Spacing   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -80,7 +80,7 @@  discard block
 block discarded – undo
80 80
 
81 81
 if (!$exportToXLS) {
82 82
     Display :: display_header(get_lang('Reporting'));
83
-    $actionsLeft = $actionsRight ='';
83
+    $actionsLeft = $actionsRight = '';
84 84
     if ($global) {
85 85
         $actionsLeft .= '<a href="'.api_get_path(WEB_CODE_PATH).'auth/my_progress.php">'.
86 86
         Display::return_icon('stats.png', get_lang('MyStats'), '', ICON_SIZE_MEDIUM);
@@ -93,9 +93,9 @@  discard block
 block discarded – undo
93 93
         }
94 94
 
95 95
         $actionsRight .= '<a href="'.api_get_self().'?export=1&score='.$filter_score.'&exercise_id='.$exerciseId.'&'.$courseLink.'">'.
96
-            Display::return_icon('export_excel.png',get_lang('ExportAsXLS'),'',ICON_SIZE_MEDIUM).'</a>';
96
+            Display::return_icon('export_excel.png', get_lang('ExportAsXLS'), '', ICON_SIZE_MEDIUM).'</a>';
97 97
         $actionsRight .= '<a href="javascript: void(0);" onclick="javascript: window.print()">'.
98
-            Display::return_icon('printer.png',get_lang('Print'),'',ICON_SIZE_MEDIUM).'</a>';
98
+            Display::return_icon('printer.png', get_lang('Print'), '', ICON_SIZE_MEDIUM).'</a>';
99 99
 
100 100
         $menuItems[] = Display::url(
101 101
             Display::return_icon('teacher.png', get_lang('TeacherInterface'), array(), 32),
@@ -199,7 +199,7 @@  discard block
 block discarded – undo
199 199
             $countExercises = Database::store_result($result);
200 200
             $exerciseSessionCount = $countExercises[0]['count'];
201 201
 
202
-            $exerciseCount =  $exerciseCount + $exerciseCount * count($newSessionList) + $exerciseSessionCount;
202
+            $exerciseCount = $exerciseCount + $exerciseCount * count($newSessionList) + $exerciseSessionCount;
203 203
 
204 204
             // Add course and session list.
205 205
             if ($exerciseCount == 0) {
@@ -416,7 +416,7 @@  discard block
 block discarded – undo
416 416
         $column++;
417 417
         $worksheet->setCellValueByColumnAndRow($column, $line, get_lang('ExamNotTaken'));
418 418
         $column++;
419
-        $worksheet->setCellValueByColumnAndRow($column, $line, sprintf(get_lang('ExamPassX'), $filter_score) . '%');
419
+        $worksheet->setCellValueByColumnAndRow($column, $line, sprintf(get_lang('ExamPassX'), $filter_score).'%');
420 420
         $column++;
421 421
         $worksheet->setCellValueByColumnAndRow($column, $line, get_lang('ExamFail'));
422 422
         $column++;
@@ -593,10 +593,10 @@  discard block
 block discarded – undo
593 593
         $percentageScore = 0;
594 594
 
595 595
         if ($weighting != 0) {
596
-            $percentageScore = round(($score*100)/$weighting);
596
+            $percentageScore = round(($score * 100) / $weighting);
597 597
         }
598 598
 
599
-        if ($attempts['count'] > 0 ) {
599
+        if ($attempts['count'] > 0) {
600 600
             $taken++;
601 601
         }
602 602
 
@@ -639,7 +639,7 @@  discard block
 block discarded – undo
639 639
             } else {
640 640
                 $score = '-';
641 641
                 $userRow .= '<td>';
642
-                $userRow .=  '-';
642
+                $userRow .= '-';
643 643
                 $tempArray[] = '-';
644 644
                 $userRow .= '</td>';
645 645
 
@@ -693,13 +693,13 @@  discard block
 block discarded – undo
693 693
         // Exam taken
694 694
         $html .= '<td>';
695 695
         $html .= $taken;
696
-        $globalRow[]= $taken;
696
+        $globalRow[] = $taken;
697 697
         $html .= '</td>';
698 698
 
699 699
         // Exam NOT taken
700 700
         $html .= '<td>';
701 701
         $html .= $not_taken = $totalStudents - $taken;
702
-        $globalRow[]= $not_taken;
702
+        $globalRow[] = $not_taken;
703 703
         $html .= '</td>';
704 704
 
705 705
         // Exam pass
@@ -710,19 +710,19 @@  discard block
 block discarded – undo
710 710
         }
711 711
 
712 712
         $html .= $total_with_parameter_score;
713
-        $globalRow[]= $total_with_parameter_score;
713
+        $globalRow[] = $total_with_parameter_score;
714 714
         $html .= '</td>';
715 715
 
716 716
         // Exam fail
717 717
         $html .= '<td>';
718 718
 
719 719
         $html .= $fail = $taken - $total_with_parameter_score;
720
-        $globalRow[]= $fail;
720
+        $globalRow[] = $fail;
721 721
         $html .= '</td>';
722 722
 
723 723
         $html .= '<td>';
724 724
         $html .= $totalStudents;
725
-        $globalRow[]= $totalStudents;
725
+        $globalRow[] = $totalStudents;
726 726
 
727 727
         $html .= '</td>';
728 728
 
Please login to merge, or discard this patch.
main/session/index.php 1 patch
Spacing   +38 added lines, -38 removed lines patch added patch discarded remove patch
@@ -16,7 +16,7 @@  discard block
 block discarded – undo
16 16
     api_not_allowed();
17 17
 }
18 18
 
19
-$session_id = isset($_GET['session_id']) ? intval($_GET['session_id']): null;
19
+$session_id = isset($_GET['session_id']) ? intval($_GET['session_id']) : null;
20 20
 $sessionField = new ExtraFieldValue('session');
21 21
 $valueAllowVisitors = $sessionField->get_values_by_handler_and_field_variable($session_id, 'allow_visitors');
22 22
 $allowVisitors = $valueAllowVisitors != false;
@@ -28,7 +28,7 @@  discard block
 block discarded – undo
28 28
 
29 29
 $this_section = SECTION_COURSES;
30 30
 $htmlHeadXtra[] = api_get_jqgrid_js();
31
-$course_id  = isset($_GET['course_id'])  ? intval($_GET['course_id']) : null;
31
+$course_id = isset($_GET['course_id']) ? intval($_GET['course_id']) : null;
32 32
 Session::write('id_session', $session_id);
33 33
 
34 34
 // Clear the exercise session just in case
@@ -237,12 +237,12 @@  discard block
 block discarded – undo
237 237
     $sessionCourses = $session->getCourses();
238 238
     $sessionCourse = $sessionCourses[0]->getCourse();
239 239
 
240
-    $courseUrl = $sessionCourse->getDirectory() . '/index.php?';
240
+    $courseUrl = $sessionCourse->getDirectory().'/index.php?';
241 241
     $courseUrl .= http_build_query([
242 242
         'id_session' => $session->getId()
243 243
     ]);
244 244
 
245
-    header('Location: ' . api_get_path(WEB_COURSE_PATH) . $courseUrl);
245
+    header('Location: '.api_get_path(WEB_COURSE_PATH).$courseUrl);
246 246
     exit;
247 247
 }
248 248
 
@@ -250,7 +250,7 @@  discard block
 block discarded – undo
250 250
 
251 251
 $session_select = array();
252 252
 foreach ($session_list as $item) {
253
-    $session_select[$item['id']] =  $item['name'];
253
+    $session_select[$item['id']] = $item['name'];
254 254
 }
255 255
 
256 256
 // Session list form
@@ -278,7 +278,7 @@  discard block
 block discarded – undo
278 278
 $my_real_array = $new_exercises = array();
279 279
 $now = time();
280 280
 foreach ($final_array as $session_data) {
281
-    $my_course_list = isset($session_data['data']) ? $session_data['data']: array();
281
+    $my_course_list = isset($session_data['data']) ? $session_data['data'] : array();
282 282
     if (!empty($my_course_list)) {
283 283
         foreach ($my_course_list as $my_course_code=>$course_data) {
284 284
             $courseInfo = api_get_course_info($my_course_code);
@@ -322,8 +322,8 @@  discard block
 block discarded – undo
322 322
                                     $exercise_result['exe_weighting']
323 323
                                 );
324 324
                                 $my_score = 0;
325
-                                if(!empty($exercise_result['exe_weighting']) && intval($exercise_result['exe_weighting']) != 0) {
326
-                                    $my_score = $exercise_result['exe_result']/$exercise_result['exe_weighting'];
325
+                                if (!empty($exercise_result['exe_weighting']) && intval($exercise_result['exe_weighting']) != 0) {
326
+                                    $my_score = $exercise_result['exe_result'] / $exercise_result['exe_weighting'];
327 327
                                 }
328 328
                                 $position = ExerciseLib::get_exercise_result_ranking(
329 329
                                     $my_score,
@@ -336,7 +336,7 @@  discard block
 block discarded – undo
336 336
 
337 337
                                 $exercise_info->exercise = Display::url(
338 338
                                     $exercise_info->exercise,
339
-                                    api_get_path(WEB_CODE_PATH) . "exercise/result.php?cidReq=$my_course_code&id={$exercise_result['exe_id']}&id_session=$session_id&show_headers=1",
339
+                                    api_get_path(WEB_CODE_PATH)."exercise/result.php?cidReq=$my_course_code&id={$exercise_result['exe_id']}&id_session=$session_id&show_headers=1",
340 340
                                     array('target' => SESSION_LINK_TARGET, 'class'=>'exercise-result-link')
341 341
                                 );
342 342
 
@@ -367,7 +367,7 @@  discard block
 block discarded – undo
367 367
                             }
368 368
                             $exercise_info->exercise = Display::url(
369 369
                                 $exercise_info->exercise,
370
-                                api_get_path(WEB_CODE_PATH) . "exercise/overview.php?cidReq=$my_course_code&exerciseId={$exercise_info->id}&id_session=$session_id",
370
+                                api_get_path(WEB_CODE_PATH)."exercise/overview.php?cidReq=$my_course_code&exerciseId={$exercise_info->id}&id_session=$session_id",
371 371
                                 array('target' => SESSION_LINK_TARGET)
372 372
                             );
373 373
 
@@ -399,7 +399,7 @@  discard block
 block discarded – undo
399 399
     $my_real_array = array_merge($new_exercises, $my_real_array);
400 400
 }
401 401
 
402
-$start = $end = $start_only = $end_only ='';
402
+$start = $end = $start_only = $end_only = '';
403 403
 
404 404
 if (!empty($session_info['access_start_date'])) {
405 405
     $start = api_convert_and_format_date($session_info['access_start_date'], DATE_FORMAT_SHORT);
@@ -437,11 +437,11 @@  discard block
 block discarded – undo
437 437
     get_lang('Title'), get_lang('NumberOfPublishedExercises'), get_lang('NumberOfPublishedLps')
438 438
 );
439 439
 $column_model_courses = array(
440
-    array('name'=>'title',              'index'=>'title',               'width'=>'400px',  'align'=>'left',  'sortable'=>'true'),
440
+    array('name'=>'title', 'index'=>'title', 'width'=>'400px', 'align'=>'left', 'sortable'=>'true'),
441 441
     //array('name'=>'recent_lps',         'index'=>'recent_lps',          'width'=>'10px',  'align'=>'left',  'sortable'=>'false'),
442 442
 //    array('name'=>'max_mutation_date',  'index'=>'max_mutation_date',   'width'=>'120px',  'align'=>'left',  'sortable'=>'true'),
443
-    array('name'=>'exercise_count',     'index'=>'exercise_count',      'width'=>'180px',  'align'=>'left',  'sortable'=>'true'),
444
-    array('name'=>'lp_count',           'index'=>'lp_count',            'width'=>'180px',  'align'=>'left',  'sortable'=>'true')
443
+    array('name'=>'exercise_count', 'index'=>'exercise_count', 'width'=>'180px', 'align'=>'left', 'sortable'=>'true'),
444
+    array('name'=>'lp_count', 'index'=>'lp_count', 'width'=>'180px', 'align'=>'left', 'sortable'=>'true')
445 445
 );
446 446
 
447 447
 $extra_params_courses['height'] = '100%';
@@ -465,10 +465,10 @@  discard block
 block discarded – undo
465 465
     get_lang('LearningPaths')
466 466
 );
467 467
 
468
-$column_model   = array(
469
-    array('name'=>'date',   'index'=>'date',   'width'=>'120', 'align'=>'left', 'sortable'=>'true'),
468
+$column_model = array(
469
+    array('name'=>'date', 'index'=>'date', 'width'=>'120', 'align'=>'left', 'sortable'=>'true'),
470 470
     array('name'=>'course', 'index'=>'course', 'width'=>'300', 'align'=>'left', 'sortable'=>'true', 'wrap_cell' => 'true'),
471
-    array('name'=>'lp',     'index'=>'lp',     'width'=>'440', 'align'=>'left', 'sortable'=>'true')
471
+    array('name'=>'lp', 'index'=>'lp', 'width'=>'440', 'align'=>'left', 'sortable'=>'true')
472 472
 );
473 473
 
474 474
 $extra_params = array();
@@ -514,11 +514,11 @@  discard block
 block discarded – undo
514 514
     get_lang('LearningPaths')
515 515
 );
516 516
 
517
-$column_week_model  = array(
518
-    array('name'=>'week',     'index'=>'week',    'width'=>'40',  'align'=>'left', 'sortable'=>'false'),
519
-    array('name'=>'date',     'index'=>'date',    'width'=>'120', 'align'=>'left', 'sortable'=>'false'),
520
-    array('name'=>'course',   'index'=>'course',  'width'=>'300', 'align'=>'left', 'sortable'=>'true', 'wrap_cell' => 'true'),
521
-    array('name'=>'lp',       'index'=>'lp',      'width'=>'440', 'align'=>'left', 'sortable'=>'true')
517
+$column_week_model = array(
518
+    array('name'=>'week', 'index'=>'week', 'width'=>'40', 'align'=>'left', 'sortable'=>'false'),
519
+    array('name'=>'date', 'index'=>'date', 'width'=>'120', 'align'=>'left', 'sortable'=>'false'),
520
+    array('name'=>'course', 'index'=>'course', 'width'=>'300', 'align'=>'left', 'sortable'=>'true', 'wrap_cell' => 'true'),
521
+    array('name'=>'lp', 'index'=>'lp', 'width'=>'440', 'align'=>'left', 'sortable'=>'true')
522 522
 );
523 523
 
524 524
 $extra_params_week = array();
@@ -530,7 +530,7 @@  discard block
 block discarded – undo
530 530
     'groupField' => array('week'),
531 531
     'groupOrder' => array('desc'),
532 532
     'groupColumnShow' => 'false',
533
-    'groupText' => array('<b>' . get_lang('PeriodWeek') . ' {0}</b>')
533
+    'groupText' => array('<b>'.get_lang('PeriodWeek').' {0}</b>')
534 534
 );
535 535
 $extra_params_week['autowidth'] = 'true'; //use the width of the parent
536 536
 $extra_params_week['height'] = '100%';
@@ -547,15 +547,15 @@  discard block
 block discarded – undo
547 547
         get_lang('BestResultInCourse'),
548 548
         get_lang('Ranking')
549 549
     );
550
-    $column_exercise_model  = array(
551
-        array('name'=>'status',     'index'=>'status',     'width'=>'40', 'align'=>'left',   'sortable'=>'false'),
552
-        array('name'=>'date',       'index'=>'date',       'width'=>'130','align'=>'left',   'sortable'=>'true'),
553
-        array('name'=>'course',     'index'=>'course',     'width'=>'200','align'=>'left',   'sortable'=>'true', 'wrap_cell' => 'true'),
554
-        array('name'=>'exercise',   'index'=>'exercise',   'width'=>'200','align'=>'left',   'sortable'=>'false'),
555
-        array('name'=>'attempt',    'index'=>'attempt',    'width'=>'60', 'align'=>'center', 'sortable'=>'true'),
556
-        array('name'=>'result',     'index'=>'result',     'width'=>'120','align'=>'center', 'sortable'=>'true'),
557
-        array('name'=>'best_result','index'=>'best_result','width'=>'140','align'=>'center', 'sortable'=>'true'),
558
-        array('name'=>'position',   'index'=>'position',   'width'=>'55', 'align'=>'center', 'sortable'=>'true')
550
+    $column_exercise_model = array(
551
+        array('name'=>'status', 'index'=>'status', 'width'=>'40', 'align'=>'left', 'sortable'=>'false'),
552
+        array('name'=>'date', 'index'=>'date', 'width'=>'130', 'align'=>'left', 'sortable'=>'true'),
553
+        array('name'=>'course', 'index'=>'course', 'width'=>'200', 'align'=>'left', 'sortable'=>'true', 'wrap_cell' => 'true'),
554
+        array('name'=>'exercise', 'index'=>'exercise', 'width'=>'200', 'align'=>'left', 'sortable'=>'false'),
555
+        array('name'=>'attempt', 'index'=>'attempt', 'width'=>'60', 'align'=>'center', 'sortable'=>'true'),
556
+        array('name'=>'result', 'index'=>'result', 'width'=>'120', 'align'=>'center', 'sortable'=>'true'),
557
+        array('name'=>'best_result', 'index'=>'best_result', 'width'=>'140', 'align'=>'center', 'sortable'=>'true'),
558
+        array('name'=>'position', 'index'=>'position', 'width'=>'55', 'align'=>'center', 'sortable'=>'true')
559 559
     );
560 560
     $extra_params_exercise['height'] = '100%';
561 561
     $extra_params_exercise['autowidth'] = 'true';
@@ -597,10 +597,10 @@  discard block
 block discarded – undo
597 597
     });
598 598
 <?php
599 599
      //Displays js code to use a jqgrid
600
-     echo Display::grid_js('courses',       '',             $columns_courses, $column_model_courses, $extra_params_courses, $new_course_list);
601
-     echo Display::grid_js('list_default',  $url,           $columns,         $column_model,$extra_params,array(), '');
602
-     echo Display::grid_js('list_course',   $url_by_course, $columns,         $column_model,$extra_params_course,array(),'');
603
-     echo Display::grid_js('list_week',     $url_week,      $column_week,     $column_week_model, $extra_params_week,array(),'');
600
+     echo Display::grid_js('courses', '', $columns_courses, $column_model_courses, $extra_params_courses, $new_course_list);
601
+     echo Display::grid_js('list_default', $url, $columns, $column_model, $extra_params, array(), '');
602
+     echo Display::grid_js('list_course', $url_by_course, $columns, $column_model, $extra_params_course, array(), '');
603
+     echo Display::grid_js('list_week', $url_week, $column_week, $column_week_model, $extra_params_week, array(), '');
604 604
 
605 605
     if (!api_is_anonymous()) {
606 606
         echo Display::grid_js('exercises', '', $column_exercise, $column_exercise_model, $extra_params_exercise, $my_real_array);
@@ -621,7 +621,7 @@  discard block
 block discarded – undo
621 621
         false,
622 622
         false
623 623
     );
624
-    if (!empty($reportingTab))  {
624
+    if (!empty($reportingTab)) {
625 625
         $reportingTab .= '<br />'.Tracking::show_course_detail(
626 626
                 api_get_user_id(),
627 627
                 $courseCode,
@@ -629,7 +629,7 @@  discard block
 block discarded – undo
629 629
             );
630 630
     }
631 631
     if (empty($reportingTab)) {
632
-        $reportingTab  = Display::return_message(get_lang('NoDataAvailable'), 'warning');
632
+        $reportingTab = Display::return_message(get_lang('NoDataAvailable'), 'warning');
633 633
     }
634 634
 }
635 635
 
Please login to merge, or discard this patch.
main/admin/access_url_edit_usergroup_to_url.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -56,7 +56,7 @@  discard block
 block discarded – undo
56 56
 function send() {
57 57
 	if (document.formulaire.access_url_id.value!=0) {
58 58
 		document.formulaire.form_sent.value=0;
59
-		document.formulaire.add_type.value=\'' . $add_type . '\';
59
+		document.formulaire.add_type.value=\'' . $add_type.'\';
60 60
 		document.formulaire.submit();
61 61
 	}
62 62
 }
@@ -102,7 +102,7 @@  discard block
 block discarded – undo
102 102
 echo '<div class="actions">';
103 103
 echo Display::url(
104 104
     Display::return_icon('view_more_stats.gif', get_lang('AddUserGroupToURL'), ''),
105
-    api_get_path(WEB_CODE_PATH) . 'admin/access_url_add_usergroup_to_url.php'
105
+    api_get_path(WEB_CODE_PATH).'admin/access_url_add_usergroup_to_url.php'
106 106
 );
107 107
 echo '</div>';
108 108
 
@@ -140,7 +140,7 @@  discard block
 block discarded – undo
140 140
             <?php
141 141
             echo Display::toolbarButton(
142 142
                 get_lang('SessionAddTypeUnique'),
143
-                api_get_self() . '?' . http_build_query([
143
+                api_get_self().'?'.http_build_query([
144 144
                     'add_type' => 'unique',
145 145
                     'access_url_id' => $access_url_id
146 146
                 ]),
@@ -150,7 +150,7 @@  discard block
 block discarded – undo
150 150
             );
151 151
             echo Display::toolbarButton(
152 152
                 get_lang('SessionAddTypeMultiple'),
153
-                api_get_self() . '?' . http_build_query([
153
+                api_get_self().'?'.http_build_query([
154 154
                     'add_type' => 'multiple',
155 155
                     'access_url_id' => $access_url_id
156 156
                 ]),
Please login to merge, or discard this patch.
main/glossary/index.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -53,7 +53,7 @@  discard block
 block discarded – undo
53 53
         if (!api_is_allowed_to_edit(null, true)) {
54 54
             api_not_allowed(true);
55 55
         }
56
-        $tool_name =  get_lang('Add');
56
+        $tool_name = get_lang('Add');
57 57
         $form = new FormValidator(
58 58
             'glossary',
59 59
             'post',
@@ -190,7 +190,7 @@  discard block
 block discarded – undo
190 190
         if (!api_is_allowed_to_edit(null, true)) {
191 191
             api_not_allowed(true);
192 192
         }
193
-        $tool_name =  get_lang('ImportGlossary');
193
+        $tool_name = get_lang('ImportGlossary');
194 194
         $form = new FormValidator(
195 195
             'glossary',
196 196
             'post',
@@ -218,7 +218,7 @@  discard block
 block discarded – undo
218 218
                 foreach (GlossaryManager::get_glossary_terms() as $term) {
219 219
                     if (!GlossaryManager::delete_glossary($term['id'], false)) {
220 220
                         Display::addFlash(
221
-                            Display::return_message(get_lang("CannotDeleteGlossary") . ':' . $term['id'], 'error')
221
+                            Display::return_message(get_lang("CannotDeleteGlossary").':'.$term['id'], 'error')
222 222
                         );
223 223
                     } else {
224 224
                         $termsDeleted[] = $term['name'];
@@ -315,7 +315,7 @@  discard block
 block discarded – undo
315 315
             if (count($badList) > 0) {
316 316
                 Display::addFlash(
317 317
                     Display::return_message(
318
-                        get_lang("GlossaryTermAlreadyExists").': ' . implode(', ', $badList),
318
+                        get_lang("GlossaryTermAlreadyExists").': '.implode(', ', $badList),
319 319
                         'error'
320 320
                     )
321 321
                 );
@@ -358,7 +358,7 @@  discard block
 block discarded – undo
358 358
         GlossaryManager::export_to_pdf();
359 359
         break;
360 360
     case 'changeview':
361
-        if (in_array($_GET['view'], array('list','table'))) {
361
+        if (in_array($_GET['view'], array('list', 'table'))) {
362 362
             Session::write('glossary_view', $_GET['view']);
363 363
         } else {
364 364
             $view = Session::read('glossary_view');
Please login to merge, or discard this patch.