Passed
Push — 1.10.x ( aae6b1...e5a590 )
by Yannick
131:05 queued 81:36
created
main/mySpace/student.php 1 patch
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -19,14 +19,14 @@  discard block
 block discarded – undo
19 19
 
20 20
 $this_section = SECTION_TRACKING;
21 21
 
22
-$interbreadcrumb[] = array ("url" => "index.php", "name" => get_lang('MySpace'));
22
+$interbreadcrumb[] = array("url" => "index.php", "name" => get_lang('MySpace'));
23 23
 
24 24
 if (isset($_GET["user_id"]) && $_GET["user_id"] != "" && !isset($_GET["type"])) {
25
-    $interbreadcrumb[] = array ("url" => "teachers.php", "name" => get_lang('Teachers'));
25
+    $interbreadcrumb[] = array("url" => "teachers.php", "name" => get_lang('Teachers'));
26 26
 }
27 27
 
28
-if (isset($_GET["user_id"]) && $_GET["user_id"]!="" && isset($_GET["type"]) && $_GET["type"] == "coach") {
29
-    $interbreadcrumb[] = array ("url" => "coaches.php", "name" => get_lang('Tutors'));
28
+if (isset($_GET["user_id"]) && $_GET["user_id"] != "" && isset($_GET["type"]) && $_GET["type"] == "coach") {
29
+    $interbreadcrumb[] = array("url" => "coaches.php", "name" => get_lang('Tutors'));
30 30
 }
31 31
 
32 32
 function get_count_users()
@@ -121,8 +121,8 @@  discard block
 block discarded – undo
121 121
                 $courseInfo = api_get_course_info($course_code);
122 122
                 $courseId = $courseInfo['real_id'];
123 123
                 if (CourseManager :: is_user_subscribed_in_course($student_id, $course_code, true)) {
124
-                    $avg_time_spent 	+= Tracking :: get_time_spent_on_the_course($student_id, $courseId, $_GET['id_session']);
125
-                    $my_average 		 = Tracking :: get_avg_student_score($student_id, $course_code);
124
+                    $avg_time_spent += Tracking :: get_time_spent_on_the_course($student_id, $courseId, $_GET['id_session']);
125
+                    $my_average = Tracking :: get_avg_student_score($student_id, $course_code);
126 126
                     if (is_numeric($my_average)) {
127 127
                         $avg_student_score += $my_average;
128 128
                     }
@@ -161,7 +161,7 @@  discard block
 block discarded – undo
161 161
             $detailsLink = '<a href="myStudents.php?student='.$student_id.'&id_coach='.$coach_id.'&id_session='.$_GET['id_session'].'">
162 162
 				          <img src="'.api_get_path(WEB_IMG_PATH).'icons/22/2rightarrow.png" border="0" /></a>';
163 163
         } else {
164
-            $detailsLink =  '<a href="myStudents.php?student='.$student_id.'">
164
+            $detailsLink = '<a href="myStudents.php?student='.$student_id.'">
165 165
 				             <img src="'.api_get_path(WEB_IMG_PATH).'icons/22/2rightarrow.png" border="0" /></a>';
166 166
         }
167 167
 
@@ -190,7 +190,7 @@  discard block
 block discarded – undo
190 190
 
191 191
 if (api_is_drh()) {
192 192
     $menu_items = array(
193
-        Display::url(Display::return_icon('stats.png', get_lang('MyStats'), '', ICON_SIZE_MEDIUM), api_get_path(WEB_CODE_PATH)."auth/my_progress.php" ),
193
+        Display::url(Display::return_icon('stats.png', get_lang('MyStats'), '', ICON_SIZE_MEDIUM), api_get_path(WEB_CODE_PATH)."auth/my_progress.php"),
194 194
         Display::url(Display::return_icon('user_na.png', get_lang('Students'), array(), ICON_SIZE_MEDIUM), '#'),
195 195
         Display::url(Display::return_icon('teacher.png', get_lang('Trainers'), array(), ICON_SIZE_MEDIUM), 'teachers.php'),
196 196
         Display::url(Display::return_icon('course.png', get_lang('Courses'), array(), ICON_SIZE_MEDIUM), 'course.php'),
@@ -218,7 +218,7 @@  discard block
 block discarded – undo
218 218
     );
219 219
     $actionsLeft .= Display::url(
220 220
         Display::return_icon("statistics.png", get_lang("CompanyReport"), array(), ICON_SIZE_MEDIUM),
221
-        api_get_path(WEB_CODE_PATH) . "mySpace/company_reports.php"
221
+        api_get_path(WEB_CODE_PATH)."mySpace/company_reports.php"
222 222
     );
223 223
     $actionsLeft .= Display::url(
224 224
         Display::return_icon(
@@ -227,7 +227,7 @@  discard block
 block discarded – undo
227 227
             [],
228 228
             ICON_SIZE_MEDIUM
229 229
         ),
230
-        api_get_path(WEB_CODE_PATH) . "gradebook/certificate_report.php"
230
+        api_get_path(WEB_CODE_PATH)."gradebook/certificate_report.php"
231 231
     );
232 232
 }
233 233
 
@@ -242,7 +242,7 @@  discard block
 block discarded – undo
242 242
 );
243 243
 
244 244
 
245
-$toolbar = Display::toolbarAction('toolbar-student', $content = array( 0 => $actionsLeft, 1 => $actionsRight ));
245
+$toolbar = Display::toolbarAction('toolbar-student', $content = array(0 => $actionsLeft, 1 => $actionsRight));
246 246
 
247 247
 $table = new SortableTable(
248 248
     'tracking_student',
Please login to merge, or discard this patch.
main/mySpace/admin.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -35,13 +35,13 @@  discard block
 block discarded – undo
35 35
 }
36 36
 $sql = "SELECT user.user_id,lastname,firstname,email
37 37
         FROM $tbl_user as user, $tbl_admin as admin
38
-        WHERE admin.user_id=user.user_id" . $order_clause;
38
+        WHERE admin.user_id=user.user_id".$order_clause;
39 39
 $result_admins = Database::query($sql);
40 40
 
41 41
 if (api_is_western_name_order()) {
42
-    echo '<table class="data_table"><tr><th>' . get_lang('FirstName') . '</th><th>' . get_lang('LastName') . '</th><th>' . get_lang('Email') . '</th></tr>';
42
+    echo '<table class="data_table"><tr><th>'.get_lang('FirstName').'</th><th>'.get_lang('LastName').'</th><th>'.get_lang('Email').'</th></tr>';
43 43
 } else {
44
-    echo '<table class="data_table"><tr><th>' . get_lang('LastName') . '</th><th>' . get_lang('FirstName') . '</th><th>' . get_lang('Email') . '</th></tr>';
44
+    echo '<table class="data_table"><tr><th>'.get_lang('LastName').'</th><th>'.get_lang('FirstName').'</th><th>'.get_lang('Email').'</th></tr>';
45 45
 }
46 46
 
47 47
 if (api_is_western_name_order(PERSON_NAME_DATA_EXPORT)) {
@@ -65,9 +65,9 @@  discard block
 block discarded – undo
65 65
             $css_class = "row_odd";
66 66
             if ($i % 20 == 0 && $i != 0) {
67 67
                 if (api_is_western_name_order()) {
68
-                    echo '<tr><th>' . get_lang('FirstName') . '</th><th>' . get_lang('LastName') . '</th><th>' . get_lang('Email') . '</th></tr>';
68
+                    echo '<tr><th>'.get_lang('FirstName').'</th><th>'.get_lang('LastName').'</th><th>'.get_lang('Email').'</th></tr>';
69 69
                 } else {
70
-                    echo '<tr><th>' . get_lang('LastName') . '</th><th>' . get_lang('FirstName') . '</th><th>' . get_lang('Email') . '</th></tr>';
70
+                    echo '<tr><th>'.get_lang('LastName').'</th><th>'.get_lang('FirstName').'</th><th>'.get_lang('Email').'</th></tr>';
71 71
                 }
72 72
             }
73 73
         } else {
@@ -77,9 +77,9 @@  discard block
 block discarded – undo
77 77
         $i++;
78 78
 
79 79
         if (api_is_western_name_order()) {
80
-            echo "<tr class=" . $css_class . "><td>$firstname</td><td>$lastname</td><td><a href='mailto:" . $email . "'>$email</a></td></tr>";
80
+            echo "<tr class=".$css_class."><td>$firstname</td><td>$lastname</td><td><a href='mailto:".$email."'>$email</a></td></tr>";
81 81
         } else {
82
-            echo "<tr class=" . $css_class . "><td>$lastname</td><td>$firstname</td><td><a href='mailto:" . $email . "'>$email</a></td></tr>";
82
+            echo "<tr class=".$css_class."><td>$lastname</td><td>$firstname</td><td><a href='mailto:".$email."'>$email</a></td></tr>";
83 83
         }
84 84
 
85 85
         if (api_is_western_name_order(PERSON_NAME_DATA_EXPORT)) {
@@ -93,7 +93,7 @@  discard block
 block discarded – undo
93 93
     }
94 94
 } else {
95 95
     // No results
96
-    echo '<tr><td colspan="3">' . get_lang('NoResults') . '</td></tr>';
96
+    echo '<tr><td colspan="3">'.get_lang('NoResults').'</td></tr>';
97 97
 }
98 98
 echo '</table>';
99 99
 
@@ -104,8 +104,8 @@  discard block
 block discarded – undo
104 104
 echo "
105 105
     <br /><br />
106 106
     <form method='post' action='admin.php'>
107
-        <button type='submit' class='save' name='export' value='" . get_lang('ExportExcel') . "'>
108
-            " . get_lang('ExportExcel') . "
107
+        <button type='submit' class='save' name='export' value='" . get_lang('ExportExcel')."'>
108
+            " . get_lang('ExportExcel')."
109 109
         </button>
110 110
     <form>
111 111
 ";
Please login to merge, or discard this patch.
main/mySpace/teachers.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -20,14 +20,14 @@  discard block
 block discarded – undo
20 20
 
21 21
 $this_section = SECTION_TRACKING;
22 22
 
23
-$interbreadcrumb[] = array ("url" => "index.php", "name" => get_lang('MySpace'));
23
+$interbreadcrumb[] = array("url" => "index.php", "name" => get_lang('MySpace'));
24 24
 
25 25
 if (isset($_GET["user_id"]) && $_GET["user_id"] != "" && !isset($_GET["type"])) {
26
-    $interbreadcrumb[] = array ("url" => "teachers.php", "name" => get_lang('Teachers'));
26
+    $interbreadcrumb[] = array("url" => "teachers.php", "name" => get_lang('Teachers'));
27 27
 }
28 28
 
29
-if (isset($_GET["user_id"]) && $_GET["user_id"]!="" && isset($_GET["type"]) && $_GET["type"] == "coach") {
30
-    $interbreadcrumb[] = array ("url" => "coaches.php", "name" => get_lang('Tutors'));
29
+if (isset($_GET["user_id"]) && $_GET["user_id"] != "" && isset($_GET["type"]) && $_GET["type"] == "coach") {
30
+    $interbreadcrumb[] = array("url" => "coaches.php", "name" => get_lang('Tutors'));
31 31
 }
32 32
 
33 33
 function get_count_users()
@@ -122,8 +122,8 @@  discard block
 block discarded – undo
122 122
                 $courseInfo = api_get_course_info($course_code);
123 123
                 $courseId = $courseInfo['real_id'];
124 124
                 if (CourseManager :: is_user_subscribed_in_course($student_id, $course_code, true)) {
125
-                    $avg_time_spent 	+= Tracking :: get_time_spent_on_the_course($student_id, $courseId, $_GET['id_session']);
126
-                    $my_average 		 = Tracking :: get_avg_student_score($student_id, $course_code);
125
+                    $avg_time_spent += Tracking :: get_time_spent_on_the_course($student_id, $courseId, $_GET['id_session']);
126
+                    $my_average = Tracking :: get_avg_student_score($student_id, $course_code);
127 127
                     if (is_numeric($my_average)) {
128 128
                         $avg_student_score += $my_average;
129 129
                     }
@@ -162,7 +162,7 @@  discard block
 block discarded – undo
162 162
             $detailsLink = '<a href="myStudents.php?student='.$student_id.'&id_coach='.$coach_id.'&id_session='.$_GET['id_session'].'">
163 163
 				          '.Display::return_icon('2rightarrow.png', get_lang('Details')).'</a>';
164 164
         } else {
165
-            $detailsLink =  '<a href="myStudents.php?student='.$student_id.'">
165
+            $detailsLink = '<a href="myStudents.php?student='.$student_id.'">
166 166
 				            '.Display::return_icon('2rightarrow.png', get_lang('Details')).'</a>';
167 167
         }
168 168
         $row[] = $detailsLink;
@@ -181,7 +181,7 @@  discard block
 block discarded – undo
181 181
 $actionsLeft = '';
182 182
 if (api_is_drh()) {
183 183
     $menu_items = array(
184
-        Display::url(Display::return_icon('stats.png', get_lang('MyStats'), '', ICON_SIZE_MEDIUM), api_get_path(WEB_CODE_PATH)."auth/my_progress.php" ),
184
+        Display::url(Display::return_icon('stats.png', get_lang('MyStats'), '', ICON_SIZE_MEDIUM), api_get_path(WEB_CODE_PATH)."auth/my_progress.php"),
185 185
         Display::url(Display::return_icon('user.png', get_lang('Students'), array(), ICON_SIZE_MEDIUM), 'student.php'),
186 186
         Display::url(Display::return_icon('teacher_na.png', get_lang('Trainers'), array(), ICON_SIZE_MEDIUM), 'teachers.php'),
187 187
         Display::url(Display::return_icon('course.png', get_lang('Courses'), array(), ICON_SIZE_MEDIUM), 'course.php'),
@@ -208,7 +208,7 @@  discard block
 block discarded – undo
208 208
 );
209 209
 
210 210
 
211
-$toolbar = Display::toolbarAction('toolbar-teachers', $content = array( 0 => $actionsLeft, 1 => $actionsRight ));
211
+$toolbar = Display::toolbarAction('toolbar-teachers', $content = array(0 => $actionsLeft, 1 => $actionsRight));
212 212
 
213 213
 $table = new SortableTable(
214 214
     'tracking_teachers',
Please login to merge, or discard this patch.
main/mySpace/access_details.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -138,7 +138,7 @@
 block discarded – undo
138 138
     </div><br />
139 139
     <div id="cev_cont_stats">
140 140
     <?php
141
-    if ($result_to_print != "")  {
141
+    if ($result_to_print != "") {
142 142
         $rst = get_stats($user_id, $courseId);
143 143
         $foo_stats = '<strong>'.get_lang('Total').': </strong>'.$rst['total'].'<br />';
144 144
         $foo_stats .= '<strong>'.get_lang('Average').': </strong>'.$rst['avg'].'<br />';
Please login to merge, or discard this patch.
main/wiki/diff.inc.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -137,19 +137,19 @@  discard block
 block discarded – undo
137 137
     switch ($type) {
138 138
         case DIFF_EQUAL:
139 139
             // return $line. ' : ' . ' = <span class="diffEqual" >' . $value . '</span><br />' . "\n" ;
140
-            return '<span class="diffEqual" >' . $value . '</span><br />' . "\n"; //juan carlos muestra solo color
140
+            return '<span class="diffEqual" >'.$value.'</span><br />'."\n"; //juan carlos muestra solo color
141 141
             break;
142 142
         case DIFF_MOVED:
143 143
             //return $line. ' : ' . ' M <span class="diffMoved" >' . $value . '</span><br />' . "\n" ; //juan carlos ra�a  la sustitye la inverior
144
-            return '<span class="diffMoved" >' . $value . '</span><br />' . "\n"; //juan carlos muestra solo color
144
+            return '<span class="diffMoved" >'.$value.'</span><br />'."\n"; //juan carlos muestra solo color
145 145
             break;
146 146
         case DIFF_ADDED:
147 147
             //return $line . ' : ' . ' + <span class="diffAdded" >' . $value . '</span><br />' . "\n" ;
148
-            return '<span class="diffAdded" >' . $value . '</span><br />' . "\n"; //juan carlos muestra solo color
148
+            return '<span class="diffAdded" >'.$value.'</span><br />'."\n"; //juan carlos muestra solo color
149 149
             break;
150 150
         case DIFF_DELETED:
151 151
             //return $line . ' : ' . ' - <span class="diffDeleted" >' . $value . '</span><br />' . "\n" ; //juan carlos ra�a  la sustitye la inverior
152
-            return '<span class="diffDeleted" >' . $value . '</span><br />' . "\n"; //juan carlos muestra solo color
152
+            return '<span class="diffDeleted" >'.$value.'</span><br />'."\n"; //juan carlos muestra solo color
153 153
             break;
154 154
     }
155 155
 }
@@ -169,19 +169,19 @@  discard block
 block discarded – undo
169 169
     switch ($type) {
170 170
         case DIFF_EQUAL:
171 171
             //return '<tr><td>' . $line. '&nbsp;:&nbsp;' . '&nbsp;=</td><td><span class="diffEqual" >'                    . $value . '</span></td></tr>' . "\n"; //juan carlos comentado
172
-            return '<tr><td></td><td bgcolor="#FFFFFF">' . $value . '</td></tr>' . "\n"; //juan carlos muestra solo color (no tambi�n la l�nea). Adem�s EN IEXPLORER VA BIEN PERO EN FIREFOX 3 la etiqueta span no muestra el color de fondo que est� definido en la hoja de estilos como background-color, aceptando s�lo la propiedad color pero esta solo da color al texto con lo cual los cambios quedan poco resaltados, adem�s los cambios de otros objetos que no sean texto no se indican por ej. a�adir una imagen, por esta raz�n doy el color de fondo al td directamente.
172
+            return '<tr><td></td><td bgcolor="#FFFFFF">'.$value.'</td></tr>'."\n"; //juan carlos muestra solo color (no tambi�n la l�nea). Adem�s EN IEXPLORER VA BIEN PERO EN FIREFOX 3 la etiqueta span no muestra el color de fondo que est� definido en la hoja de estilos como background-color, aceptando s�lo la propiedad color pero esta solo da color al texto con lo cual los cambios quedan poco resaltados, adem�s los cambios de otros objetos que no sean texto no se indican por ej. a�adir una imagen, por esta raz�n doy el color de fondo al td directamente.
173 173
             break;
174 174
         case DIFF_MOVED:
175 175
             // return '<tr><td>' . $line. '&nbsp;:&nbsp;' . '&nbsp;M</td><td><span class="diffMoved" >'                    . $value . '</span></td></tr>' . "\n" //juan carlos comenta
176 176
 
177
-            return '<tr><td></td><td bgcolor="#FFFFAA">' . $value . '</td></tr>' . "\n"; //juan carlos muestra solo color (no tambi�n la l�nea). Adem�s EN IEXPLORER VA BIEN PERO EN FIREFOX 3 la etiqueta span no muestra el color de fondo que est� definido en la hoja de estilos como background-color, aceptando s�lo la propiedad color pero esta solo da color al texto con lo cual los cambios quedan poco resaltados, adem�s los cambios de otros objetos que no sean texto no se indican por ej. a�adir una imagen, por esta raz�n doy el color de fondo al td directamente.
177
+            return '<tr><td></td><td bgcolor="#FFFFAA">'.$value.'</td></tr>'."\n"; //juan carlos muestra solo color (no tambi�n la l�nea). Adem�s EN IEXPLORER VA BIEN PERO EN FIREFOX 3 la etiqueta span no muestra el color de fondo que est� definido en la hoja de estilos como background-color, aceptando s�lo la propiedad color pero esta solo da color al texto con lo cual los cambios quedan poco resaltados, adem�s los cambios de otros objetos que no sean texto no se indican por ej. a�adir una imagen, por esta raz�n doy el color de fondo al td directamente.
178 178
             break;
179 179
         case DIFF_ADDED:
180 180
             // return '<tr><td>' . $line. '&nbsp;:&nbsp;' . '&nbsp;+</td><td><span class="diffAdded" >'                    . $value . '</span></td></tr>' . "\n" ; //juan carlos comentado
181
-            return '<tr><td></td><td bgcolor="#CCFFCC">' . $value . '</td></tr>' . "\n"; //juan carlos muestra solo color (no tambi�n la l�nea). Adem�s EN IEXPLORER VA BIEN PERO EN FIREFOX 3 la etiqueta span no muestra el color de fondo que est� definido en la hoja de estilos como background-color, aceptando s�lo la propiedad color pero esta solo da color al texto con lo cual los cambios quedan poco resaltados, adem�s los cambios de otros objetos que no sean texto no se indican por ej. a�adir una imagen, por esta raz�n doy el color de fondo al td directamente.
181
+            return '<tr><td></td><td bgcolor="#CCFFCC">'.$value.'</td></tr>'."\n"; //juan carlos muestra solo color (no tambi�n la l�nea). Adem�s EN IEXPLORER VA BIEN PERO EN FIREFOX 3 la etiqueta span no muestra el color de fondo que est� definido en la hoja de estilos como background-color, aceptando s�lo la propiedad color pero esta solo da color al texto con lo cual los cambios quedan poco resaltados, adem�s los cambios de otros objetos que no sean texto no se indican por ej. a�adir una imagen, por esta raz�n doy el color de fondo al td directamente.
182 182
             break;
183 183
         case DIFF_DELETED:
184 184
             // return '<tr><td>' . $line. '&nbsp;:&nbsp;' . '&nbsp;-</td><td><span class="diffDeleted" >'                    . $value . '</span></td></tr>' . "\n" ; //juan carlos comentado
185
-            return '<tr><td></td><td bgcolor="#FFAAAA">' . $value . '</td></tr>' . "\n"; //juan carlos muestra solo color (no tambi�n la l�nea). Adem�s EN IEXPLORER VA BIEN PERO EN FIREFOX 3 la etiqueta span no muestra el color de fondo que est� definido en la hoja de estilos como background-color, aceptando s�lo la propiedad color pero esta solo da color al texto con lo cual los cambios quedan poco resaltados, adem�s los cambios de otros objetos que no sean texto no se indican por ej. a�adir una imagen, por esta raz�n doy el color de fondo al td directamente.
185
+            return '<tr><td></td><td bgcolor="#FFAAAA">'.$value.'</td></tr>'."\n"; //juan carlos muestra solo color (no tambi�n la l�nea). Adem�s EN IEXPLORER VA BIEN PERO EN FIREFOX 3 la etiqueta span no muestra el color de fondo que est� definido en la hoja de estilos como background-color, aceptando s�lo la propiedad color pero esta solo da color al texto con lo cual los cambios quedan poco resaltados, adem�s los cambios de otros objetos que no sean texto no se indican por ej. a�adir una imagen, por esta raz�n doy el color de fondo al td directamente.
186 186
     }
187 187
 }
Please login to merge, or discard this patch.
main/wiki/index.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -18,7 +18,7 @@  discard block
 block discarded – undo
18 18
 
19 19
 // section (for the tabs)
20 20
 $this_section = SECTION_COURSES;
21
-$current_course_tool  = TOOL_WIKI;
21
+$current_course_tool = TOOL_WIKI;
22 22
 
23 23
 $course_id = api_get_course_int_id();
24 24
 $session_id = api_get_session_id();
@@ -27,7 +27,7 @@  discard block
 block discarded – undo
27 27
 $groupId = api_get_group_id();
28 28
 
29 29
 // additional style information
30
-$htmlHeadXtra[] ='<link rel="stylesheet" type="text/css" href="'.api_get_path(WEB_CODE_PATH).'wiki/css/default.css"/>';
30
+$htmlHeadXtra[] = '<link rel="stylesheet" type="text/css" href="'.api_get_path(WEB_CODE_PATH).'wiki/css/default.css"/>';
31 31
 
32 32
 // javascript for advanced parameters menu
33 33
 $htmlHeadXtra[] = '<script>
@@ -72,7 +72,7 @@  discard block
 block discarded – undo
72 72
     //ensure this tool in groups whe it's private or deactivated
73 73
     if ($group_properties['wiki_state'] == 0) {
74 74
         api_not_allowed();
75
-    } elseif ($group_properties['wiki_state']==2) {
75
+    } elseif ($group_properties['wiki_state'] == 2) {
76 76
         if (!api_is_allowed_to_edit(false, true) and
77 77
             !GroupManager :: is_user_in_group(api_get_user_id(), api_get_group_id())
78 78
         ) {
@@ -84,7 +84,7 @@  discard block
 block discarded – undo
84 84
 $is_allowed_to_edit = api_is_allowed_to_edit(false, true);
85 85
 
86 86
 // The page we are dealing with
87
-$page = isset($_GET['title']) ? $_GET['title']: 'index';
87
+$page = isset($_GET['title']) ? $_GET['title'] : 'index';
88 88
 $action = isset($_GET['action']) ? Security::remove_XSS($_GET['action']) : 'showpage';
89 89
 $view = isset($_GET['view']) ? Security::remove_XSS($_GET['view']) : null;
90 90
 
Please login to merge, or discard this patch.
main/forum/newthread.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -54,12 +54,12 @@  discard block
 block discarded – undo
54 54
 
55 55
 /* Breadcrumbs */
56 56
 
57
-if (isset($_SESSION['gradebook'])){
57
+if (isset($_SESSION['gradebook'])) {
58 58
     $gradebook = Security::remove_XSS($_SESSION['gradebook']);
59 59
 }
60 60
 
61 61
 if (!empty($gradebook) && $gradebook == 'view') {
62
-    $interbreadcrumb[] = array (
62
+    $interbreadcrumb[] = array(
63 63
         'url' => '../gradebook/'.Security::remove_XSS($_SESSION['gradebook_dest']),
64 64
         'name' => get_lang('ToolGradebook')
65 65
     );
@@ -67,7 +67,7 @@  discard block
 block discarded – undo
67 67
 
68 68
 if (!empty($_GET['gidReq'])) {
69 69
     $toolgroup = intval($_GET['gidReq']);
70
-    Session::write('toolgroup',$toolgroup);
70
+    Session::write('toolgroup', $toolgroup);
71 71
 }
72 72
 
73 73
 /* Is the user allowed here? */
@@ -122,7 +122,7 @@  discard block
 block discarded – undo
122 122
     $interbreadcrumb[] = array('url' => '../group/group.php?'.$cidreq, 'name' => get_lang('Groups'));
123 123
     $interbreadcrumb[] = array('url' => '../group/group_space.php?'.$cidreq, 'name' => get_lang('GroupSpace').' '.$groupProperties['name']);
124 124
     $interbreadcrumb[] = array('url' => 'viewforum.php?'.$cidreq.'&forum='.Security::remove_XSS($_GET['forum']), 'name' => $current_forum['forum_title']);
125
-    $interbreadcrumb[] = array('url' => 'newthread.php?'.$cidreq.'&forum='.Security::remove_XSS($_GET['forum']),'name' => get_lang('NewTopic'));
125
+    $interbreadcrumb[] = array('url' => 'newthread.php?'.$cidreq.'&forum='.Security::remove_XSS($_GET['forum']), 'name' => get_lang('NewTopic'));
126 126
 } else {
127 127
     $interbreadcrumb[] = array('url' => 'index.php?'.$cidreq, 'name' => $nameTools);
128 128
     $interbreadcrumb[] = array('url' => 'viewforumcategory.php?'.$cidreq.'&forumcategory='.$current_forum_category['cat_id'], 'name' => $current_forum_category['cat_title']);
@@ -133,9 +133,9 @@  discard block
 block discarded – undo
133 133
 /* Resource Linker */
134 134
 
135 135
 if (isset($_POST['add_resources']) AND $_POST['add_resources'] == get_lang('Resources')) {
136
-    $_SESSION['formelements']	= $_POST;
137
-    $_SESSION['origin']			= $_SERVER['REQUEST_URI'];
138
-    $_SESSION['breadcrumbs']	= $interbreadcrumb;
136
+    $_SESSION['formelements'] = $_POST;
137
+    $_SESSION['origin'] = $_SERVER['REQUEST_URI'];
138
+    $_SESSION['breadcrumbs'] = $interbreadcrumb;
139 139
     header('Location: ../resourcelinker/resourcelinker.php');
140 140
     exit;
141 141
 }
@@ -170,7 +170,7 @@  discard block
 block discarded – undo
170 170
 echo '<div class="actions">';
171 171
 echo '<span style="float:right;">'.search_link().'</span>';
172 172
 echo '<a href="viewforum.php?forum='.Security::remove_XSS($_GET['forum']).'&'.$cidreq.'">'.
173
-    Display::return_icon('back.png',get_lang('BackToForum'),'',ICON_SIZE_MEDIUM).'</a>';
173
+    Display::return_icon('back.png', get_lang('BackToForum'), '', ICON_SIZE_MEDIUM).'</a>';
174 174
 echo '</div>';
175 175
 
176 176
 // Set forum attachment data into $_SESSION
Please login to merge, or discard this patch.
main/forum/index.php 1 patch
Spacing   +39 added lines, -39 removed lines patch added patch discarded remove patch
@@ -64,7 +64,7 @@  discard block
 block discarded – undo
64 64
 
65 65
 if (!empty($gradebook) && $gradebook == 'view') {
66 66
     $interbreadcrumb[] = array(
67
-        'url' => '../gradebook/' . $_SESSION['gradebook_dest'],
67
+        'url' => '../gradebook/'.$_SESSION['gradebook_dest'],
68 68
         'name' => get_lang('ToolGradebook'),
69 69
     );
70 70
 }
@@ -79,7 +79,7 @@  discard block
 block discarded – undo
79 79
     switch ($_GET['content']) {
80 80
         case 'forum':
81 81
             $interbreadcrumb[] = array(
82
-                'url' => 'index.php?search=' . $search_forum . '&' . api_get_cidreq(),
82
+                'url' => 'index.php?search='.$search_forum.'&'.api_get_cidreq(),
83 83
                 'name' => get_lang('Forum'),
84 84
             );
85 85
             $interbreadcrumb[] = array(
@@ -89,7 +89,7 @@  discard block
 block discarded – undo
89 89
             break;
90 90
         case 'forumcategory':
91 91
             $interbreadcrumb[] = array(
92
-                'url' => 'index.php?search=' . $search_forum . '&' . api_get_cidreq(),
92
+                'url' => 'index.php?search='.$search_forum.'&'.api_get_cidreq(),
93 93
                 'name' => get_lang('Forum'),
94 94
             );
95 95
             $interbreadcrumb[] = array(
@@ -185,7 +185,7 @@  discard block
 block discarded – undo
185 185
         . "&gradebook=&action=add_item&type=step&lp_id=$lp_id#resource_tab-5\">"
186 186
         . Display::return_icon(
187 187
             'back.png',
188
-            get_lang("BackTo") . ' ' . get_lang("LearningPaths"),
188
+            get_lang("BackTo").' '.get_lang("LearningPaths"),
189 189
             '',
190 190
             ICON_SIZE_MEDIUM
191 191
         )
@@ -197,8 +197,8 @@  discard block
 block discarded – undo
197 197
 
198 198
 if (api_is_allowed_to_edit(false, true)) {
199 199
     echo '<a href="'
200
-        . api_get_self() . '?' . api_get_cidreq()
201
-        . '&action=add&content=forumcategory&lp_id=' . $lp_id . '"> ' .
200
+        . api_get_self().'?'.api_get_cidreq()
201
+        . '&action=add&content=forumcategory&lp_id='.$lp_id.'"> '.
202 202
         Display::return_icon(
203 203
             'new_folder.png', get_lang('AddForumCategory'), '', ICON_SIZE_MEDIUM
204 204
         )
@@ -248,7 +248,7 @@  discard block
 block discarded – undo
248 248
         );
249 249
 
250 250
         if (empty($sessionId) && !empty($forumCategory['session_name'])) {
251
-            $session_displayed = ' (' . Security::remove_XSS($forumCategory['session_name']) . ')';
251
+            $session_displayed = ' ('.Security::remove_XSS($forumCategory['session_name']).')';
252 252
         } else {
253 253
             $session_displayed = '';
254 254
         }
@@ -260,7 +260,7 @@  discard block
 block discarded – undo
260 260
         $html = '';
261 261
         $iconsEdit = '';
262 262
         $idCategory = $forumCategory['cat_id'];
263
-        $urlCategory = 'viewforumcategory.php?' . api_get_cidreq() . '&forumcategory=' . intval($idCategory);
263
+        $urlCategory = 'viewforumcategory.php?'.api_get_cidreq().'&forumcategory='.intval($idCategory);
264 264
         $titleCategory = Display::tag(
265 265
             'a',
266 266
             $forumCategory['cat_title'],
@@ -278,9 +278,9 @@  discard block
 block discarded – undo
278 278
                 !($forumCategory['session_id'] == 0 &&
279 279
                 intval($sessionId) != 0)
280 280
             ) {
281
-                $iconsEdit .= '<a href="' . api_get_self() . '?' . api_get_cidreq()
282
-                    . '&action=edit&content=forumcategory&id=' . intval($idCategory)
283
-                    . '">' . Display::return_icon(
281
+                $iconsEdit .= '<a href="'.api_get_self().'?'.api_get_cidreq()
282
+                    . '&action=edit&content=forumcategory&id='.intval($idCategory)
283
+                    . '">'.Display::return_icon(
284 284
                         'edit.png',
285 285
                         get_lang('Edit'),
286 286
                         array(),
@@ -288,8 +288,8 @@  discard block
 block discarded – undo
288 288
                     )
289 289
                     . '</a>';
290 290
 
291
-                $iconsEdit .='<a href="' . api_get_self() . '?' . api_get_cidreq()
292
-                    . '&action=delete&content=forumcategory&id=' . intval($idCategory)
291
+                $iconsEdit .= '<a href="'.api_get_self().'?'.api_get_cidreq()
292
+                    . '&action=delete&content=forumcategory&id='.intval($idCategory)
293 293
                     . "\" onclick=\"javascript:if(!confirm('"
294 294
                     . addslashes(api_htmlentities(
295 295
                         get_lang('DeleteForumCategory'),
@@ -303,7 +303,7 @@  discard block
 block discarded – undo
303 303
                         ICON_SIZE_SMALL
304 304
                     )
305 305
                     . '</a>';
306
-                $iconsEdit .=  return_visible_invisible_icon(
306
+                $iconsEdit .= return_visible_invisible_icon(
307 307
                     'forumcategory',
308 308
                     strval(intval($idCategory)),
309 309
                     strval(intval($forumCategory['visibility']))
@@ -337,7 +337,7 @@  discard block
 block discarded – undo
337 337
             array(),
338 338
             ICON_SIZE_MEDIUM
339 339
         );
340
-        $html .= '<h3>' . $icoCategory . $titleCategory . '</h3>';
340
+        $html .= '<h3>'.$icoCategory.$titleCategory.'</h3>';
341 341
 
342 342
         if ($descriptionCategory != '' && trim($descriptionCategory) != '&nbsp;') {
343 343
             $html .= '<div class="forum-description">'.$descriptionCategory.'</div>';
@@ -470,15 +470,15 @@  discard block
 block discarded – undo
470 470
                                 30
471 471
                             );
472 472
                             $forum_title_group_addition = ' (<a href="../group/group_space.php?'
473
-                                . api_get_cidreq() . '&gidReq=' . $forum['forum_of_group']
474
-                                . '" class="forum_group_link">' . get_lang('GoTo') . ' ' . $group_title . '</a>)'
473
+                                . api_get_cidreq().'&gidReq='.$forum['forum_of_group']
474
+                                . '" class="forum_group_link">'.get_lang('GoTo').' '.$group_title.'</a>)'
475 475
                                 . $session_img;
476 476
                         } else {
477 477
                             $forum_title_group_addition = '';
478 478
                         }
479 479
 
480 480
                         if (empty($sessionId) && !empty($forum['session_name'])) {
481
-                            $session_displayed = ' (' . $forum['session_name'] . ')';
481
+                            $session_displayed = ' ('.$forum['session_name'].')';
482 482
                         } else {
483 483
                             $session_displayed = '';
484 484
                         }
@@ -490,7 +490,7 @@  discard block
 block discarded – undo
490 490
                         $html .= '<div class="row">';
491 491
                         $html .= '<div class="col-md-6">';
492 492
                         $html .= '<div class="col-md-3">';
493
-                        $html .= '<div class="number-post">'.$forum_image.'<p>'.$number_threads.' ' . get_lang('ForumThreads') . '</p>'
493
+                        $html .= '<div class="number-post">'.$forum_image.'<p>'.$number_threads.' '.get_lang('ForumThreads').'</p>'
494 494
                             . '</div>';
495 495
                         $html .= '</div>';
496 496
 
@@ -505,15 +505,15 @@  discard block
 block discarded – undo
505 505
                         $linkForum .= Display::tag(
506 506
                             'a',
507 507
                             $forum['forum_title'],
508
-                            array (
509
-                                'href' => 'viewforum.php?' . api_get_cidreq()
510
-                                    . '&gidReq=' . intval($groupid)
511
-                                    . '&forum=' . intval($forum['forum_id']),
512
-                                'class' => return_visible_invisible( strval( intval($forum['visibility']) ) )
508
+                            array(
509
+                                'href' => 'viewforum.php?'.api_get_cidreq()
510
+                                    . '&gidReq='.intval($groupid)
511
+                                    . '&forum='.intval($forum['forum_id']),
512
+                                'class' => return_visible_invisible(strval(intval($forum['visibility'])))
513 513
                             )
514 514
                         );
515 515
 
516
-                        $html .= '<h3 class="title">' . $iconForum . $linkForum . '</h3>';
516
+                        $html .= '<h3 class="title">'.$iconForum.$linkForum.'</h3>';
517 517
 
518 518
                         $html .= Display::tag(
519 519
                             'p',
@@ -525,13 +525,13 @@  discard block
 block discarded – undo
525 525
                         $html .= '</div>';
526 526
                         $html .= '</div>';
527 527
 
528
-                        $iconEmpty='';
528
+                        $iconEmpty = '';
529 529
 
530 530
                         // The number of topics and posts.
531 531
                         if ($forum['forum_of_group'] !== '0') {
532
-                            $newPost='';
532
+                            $newPost = '';
533 533
                             if (is_array($mywhatsnew_post_info) && !empty($mywhatsnew_post_info)) {
534
-                                $newPost = ' ' . Display::return_icon(
534
+                                $newPost = ' '.Display::return_icon(
535 535
                                     'alert.png',
536 536
                                     get_lang('Forum'),
537 537
                                     null,
@@ -542,7 +542,7 @@  discard block
 block discarded – undo
542 542
                             }
543 543
                         } else {
544 544
                             if (is_array($mywhatsnew_post_info) && !empty($mywhatsnew_post_info)) {
545
-                                $newPost = ' ' . Display::return_icon(
545
+                                $newPost = ' '.Display::return_icon(
546 546
                                     'alert.png',
547 547
                                     get_lang('Forum'),
548 548
                                     null,
@@ -584,9 +584,9 @@  discard block
 block discarded – undo
584 584
                                     null,
585 585
                                     ICON_SIZE_TINY
586 586
                                 )
587
-                                . ' ' .
587
+                                . ' '.
588 588
                                 api_convert_and_format_date($forum['last_post_date'])
589
-                                . '<br /> ' . get_lang('By') . ' ' .
589
+                                . '<br /> '.get_lang('By').' '.
590 590
                                 display_user_link(
591 591
                                     $poster_id,
592 592
                                     $name,
@@ -601,13 +601,13 @@  discard block
 block discarded – undo
601 601
                             api_is_allowed_to_edit(false, true) &&
602 602
                             !($forum['session_id'] == 0 && intval($sessionId) != 0)
603 603
                         ) {
604
-                            $html .= '<a href="'.api_get_self() . '?' . api_get_cidreq()
605
-                                . '&action=edit&content=forum&id=' . $forum['forum_id'] . '">'
604
+                            $html .= '<a href="'.api_get_self().'?'.api_get_cidreq()
605
+                                . '&action=edit&content=forum&id='.$forum['forum_id'].'">'
606 606
                                 . Display::return_icon('edit.png', get_lang('Edit'), array(), ICON_SIZE_SMALL)
607 607
                                 . '</a>';
608
-                            $html .= '<a href="' . api_get_self() . '?' . api_get_cidreq()
609
-                                . '&action=delete&content=forum&id=' . $forum['forum_id']
610
-                                . "\" onclick=\"javascript:if(!confirm('" . addslashes(
608
+                            $html .= '<a href="'.api_get_self().'?'.api_get_cidreq()
609
+                                . '&action=delete&content=forum&id='.$forum['forum_id']
610
+                                . "\" onclick=\"javascript:if(!confirm('".addslashes(
611 611
                                     api_htmlentities(get_lang('DeleteForum'), ENT_QUOTES)
612 612
                                 )
613 613
                                 . "')) return false;\">"
@@ -645,8 +645,8 @@  discard block
 block discarded – undo
645 645
                             !api_is_anonymous() &&
646 646
                             api_is_allowed_to_session_edit(false, true)
647 647
                         ) {
648
-                            $html .= '<a href="' . api_get_self() . '?' . api_get_cidreq()
649
-                                . '&action=notify&content=forum&id=' . $forum['forum_id'] . '">'
648
+                            $html .= '<a href="'.api_get_self().'?'.api_get_cidreq()
649
+                                . '&action=notify&content=forum&id='.$forum['forum_id'].'">'
650 650
                                 . Display::return_icon($iconnotify, get_lang('NotifyMe'), null, ICON_SIZE_SMALL)
651 651
                                 . '</a>';
652 652
                         }
@@ -663,7 +663,7 @@  discard block
 block discarded – undo
663 663
                 }
664 664
             }
665 665
         } else {
666
-            echo '<div class="alert alert-warning">' . get_lang('NoForumInThisCategory') . '</div>'
666
+            echo '<div class="alert alert-warning">'.get_lang('NoForumInThisCategory').'</div>'
667 667
                 . (api_is_allowed_to_edit(false, true) ? '<div>' : '</div>')
668 668
                 . '</div>';
669 669
         }
Please login to merge, or discard this patch.
main/forum/download.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -31,7 +31,7 @@  discard block
 block discarded – undo
31 31
 $doc_url = str_replace(' ', '+', $doc_url);
32 32
 $doc_url = str_replace('/..', '', $doc_url); //echo $doc_url;
33 33
 
34
-if (! isset($_course)) {
34
+if (!isset($_course)) {
35 35
     api_not_allowed(true);
36 36
 }
37 37
 
@@ -51,11 +51,11 @@  discard block
 block discarded – undo
51 51
     exit;
52 52
 }
53 53
 
54
-$tbl_forum_attachment  = Database::get_course_table(TABLE_FORUM_ATTACHMENT);
54
+$tbl_forum_attachment = Database::get_course_table(TABLE_FORUM_ATTACHMENT);
55 55
 $tbl_forum_post = Database::get_course_table(TABLE_FORUM_POST);
56 56
 
57 57
 $course_id = api_get_course_int_id();
58
-$courseInfo =     api_get_course_info_by_id($course_id);
58
+$courseInfo = api_get_course_info_by_id($course_id);
59 59
 
60 60
 // launch event
61 61
 Event::event_download($doc_url);
@@ -85,7 +85,7 @@  discard block
 block discarded – undo
85 85
     api_get_session_id()
86 86
 );
87 87
 
88
-if ($forum_thread_visibility==1 && $forum_forum_visibility==1) {
88
+if ($forum_thread_visibility == 1 && $forum_forum_visibility == 1) {
89 89
     if (Security::check_abs_path(
90 90
         $full_file_name,
91 91
         api_get_path(SYS_COURSE_PATH).$courseInfo['path'].'/upload/forum/')
Please login to merge, or discard this patch.