Completed
Push — 1.11.x ( 78f130...f6f5c2 )
by José
50:40 queued 24:26
created
plugin/buycourses/src/panel.ajax.php 1 patch
Spacing   +16 added lines, -16 removed lines patch added patch discarded remove patch
@@ -37,20 +37,20 @@  discard block
 block discarded – undo
37 37
 
38 38
         $userInfo = api_get_user_info($sale['user_id']);
39 39
 
40
-        $html = '<h2>' . $sale['product_name'] .'</h2>';
40
+        $html = '<h2>'.$sale['product_name'].'</h2>';
41 41
         $html .= '<div class="row">';
42 42
         $html .= '<div class="col-sm-6 col-md-6">';
43 43
         $html .= '<ul>';
44
-        $html .= '<li><b>'. $plugin->get_lang('OrderPrice') . ':</b> '. $sale['price'] . '</li>';
45
-        $html .= '<li><b>'. $plugin->get_lang('CurrencyType') . ':</b> '. $currency['iso_code'] . '</li>';
46
-        $html .= '<li><b>'. $plugin->get_lang('ProductType') . ':</b> '. $productType . '</li>';
47
-        $html .= '<li><b>'. $plugin->get_lang('OrderDate') . ':</b> '. api_format_date($sale['date'], DATE_TIME_FORMAT_LONG_24H) . '</li>';
48
-        $html .= '<li><b>'. $plugin->get_lang('Buyer') . ':</b> '. $userInfo['complete_name'] . '</li>';
49
-        $html .= '<li><b>'. $plugin->get_lang('PaymentMethods') . ':</b> '. $paymentType . '</li>';
44
+        $html .= '<li><b>'.$plugin->get_lang('OrderPrice').':</b> '.$sale['price'].'</li>';
45
+        $html .= '<li><b>'.$plugin->get_lang('CurrencyType').':</b> '.$currency['iso_code'].'</li>';
46
+        $html .= '<li><b>'.$plugin->get_lang('ProductType').':</b> '.$productType.'</li>';
47
+        $html .= '<li><b>'.$plugin->get_lang('OrderDate').':</b> '.api_format_date($sale['date'], DATE_TIME_FORMAT_LONG_24H).'</li>';
48
+        $html .= '<li><b>'.$plugin->get_lang('Buyer').':</b> '.$userInfo['complete_name'].'</li>';
49
+        $html .= '<li><b>'.$plugin->get_lang('PaymentMethods').':</b> '.$paymentType.'</li>';
50 50
         $html .= '</ul>';
51 51
         $html .= '</div>';
52 52
         $html .= '<div class="col-sm-6 col-md-6">';
53
-        $html .= '<img class="thumbnail" src="'. $productImage .'" >';
53
+        $html .= '<img class="thumbnail" src="'.$productImage.'" >';
54 54
         $html .= '</div>';
55 55
         $html .= '</div>';
56 56
 
@@ -95,9 +95,9 @@  discard block
 block discarded – undo
95 95
         $html = '<div class="row">'
96 96
         . '<p>'
97 97
             . '<ul>'
98
-                . '<li>'. get_plugin_lang("PayoutsTotalCompleted", "BuyCoursesPlugin") .' <b>'. $stats['completed_count'] .'</b> - '. get_plugin_lang("TotalAmount", "BuyCoursesPlugin") .' <b>'. $stats['completed_total_amount'] .' '. $currency['iso_code'] . '</b></li>'
99
-                . '<li>'. get_plugin_lang("PayoutsTotalPending", "BuyCoursesPlugin") .' <b>'. $stats['pending_count'] .'</b> - '. get_plugin_lang("TotalAmount", "BuyCoursesPlugin") .' <b>'. $stats['pending_total_amount'] .' '. $currency['iso_code'] . '</b></li>'
100
-                . '<li>'. get_plugin_lang("PayoutsTotalCanceled", "BuyCoursesPlugin") .' <b>'. $stats['canceled_count'] .'</b> - '. get_plugin_lang("TotalAmount", "BuyCoursesPlugin") .' <b>'. $stats['canceled_total_amount'] .' '. $currency['iso_code'] . '</b></li>'
98
+                . '<li>'.get_plugin_lang("PayoutsTotalCompleted", "BuyCoursesPlugin").' <b>'.$stats['completed_count'].'</b> - '.get_plugin_lang("TotalAmount", "BuyCoursesPlugin").' <b>'.$stats['completed_total_amount'].' '.$currency['iso_code'].'</b></li>'
99
+                . '<li>'.get_plugin_lang("PayoutsTotalPending", "BuyCoursesPlugin").' <b>'.$stats['pending_count'].'</b> - '.get_plugin_lang("TotalAmount", "BuyCoursesPlugin").' <b>'.$stats['pending_total_amount'].' '.$currency['iso_code'].'</b></li>'
100
+                . '<li>'.get_plugin_lang("PayoutsTotalCanceled", "BuyCoursesPlugin").' <b>'.$stats['canceled_count'].'</b> - '.get_plugin_lang("TotalAmount", "BuyCoursesPlugin").' <b>'.$stats['canceled_total_amount'].' '.$currency['iso_code'].'</b></li>'
101 101
             . '</ul>'
102 102
         . '</p>';
103 103
         $html .= '</div>';
@@ -137,15 +137,15 @@  discard block
 block discarded – undo
137 137
 
138 138
         $isoCode = $currentCurrency['iso_code'];
139 139
 
140
-        $html .= '<p>'. get_plugin_lang("VerifyTotalAmountToProceedPayout", "BuyCoursesPlugin") .'</p>';
140
+        $html .= '<p>'.get_plugin_lang("VerifyTotalAmountToProceedPayout", "BuyCoursesPlugin").'</p>';
141 141
         $html .= ''
142 142
         . '<p>'
143 143
             . '<ul>'
144
-                . '<li>'. get_plugin_lang("TotalAcounts", "BuyCoursesPlugin") .' <b>'. $totalAccounts .'</b></li>'
145
-                . '<li>'. get_plugin_lang("TotalPayout", "BuyCoursesPlugin") .' <b>'. $isoCode .' '. $totalPayout .'</b></li>'
144
+                . '<li>'.get_plugin_lang("TotalAcounts", "BuyCoursesPlugin").' <b>'.$totalAccounts.'</b></li>'
145
+                . '<li>'.get_plugin_lang("TotalPayout", "BuyCoursesPlugin").' <b>'.$isoCode.' '.$totalPayout.'</b></li>'
146 146
             . '</ul>'
147 147
         . '</p>';
148
-        $html .= '<p>'. get_plugin_lang("CautionThisProcessCantBeCanceled", "BuyCoursesPlugin") .'</p>';
148
+        $html .= '<p>'.get_plugin_lang("CautionThisProcessCantBeCanceled", "BuyCoursesPlugin").'</p>';
149 149
         $html .= '<br /><br />';
150 150
         $html .= '<div id="spinner" class="text-center"></div>';
151 151
 
@@ -199,7 +199,7 @@  discard block
 block discarded – undo
199 199
 
200 200
         } else {
201 201
 
202
-            echo Display::return_message('<b>'.$result['L_SEVERITYCODE0'].' '.$result['L_ERRORCODE0'].'</b> - '.$result['L_SHORTMESSAGE0'].'<br /><ul><li>'. $result['L_LONGMESSAGE0'].'</li></ul>', 'error', false);
202
+            echo Display::return_message('<b>'.$result['L_SEVERITYCODE0'].' '.$result['L_ERRORCODE0'].'</b> - '.$result['L_SHORTMESSAGE0'].'<br /><ul><li>'.$result['L_LONGMESSAGE0'].'</li></ul>', 'error', false);
203 203
 
204 204
         }
205 205
 
Please login to merge, or discard this patch.
plugin/buycourses/src/buycourses.ajax.php 1 patch
Spacing   +16 added lines, -16 removed lines patch added patch discarded remove patch
@@ -37,20 +37,20 @@  discard block
 block discarded – undo
37 37
 
38 38
         $userInfo = api_get_user_info($sale['user_id']);
39 39
 
40
-        $html = '<h2>' . $sale['product_name'] .'</h2>';
40
+        $html = '<h2>'.$sale['product_name'].'</h2>';
41 41
         $html .= '<div class="row">';
42 42
         $html .= '<div class="col-sm-6 col-md-6">';
43 43
         $html .= '<ul>';
44
-        $html .= '<li><b>'. $plugin->get_lang('OrderPrice') . ':</b> '. $sale['price'] . '</li>';
45
-        $html .= '<li><b>'. $plugin->get_lang('CurrencyType') . ':</b> '. $currency['iso_code'] . '</li>';
46
-        $html .= '<li><b>'. $plugin->get_lang('ProductType') . ':</b> '. $productType . '</li>';
47
-        $html .= '<li><b>'. $plugin->get_lang('OrderDate') . ':</b> '. api_format_date($sale['date'], DATE_TIME_FORMAT_LONG_24H) . '</li>';
48
-        $html .= '<li><b>'. $plugin->get_lang('Buyer') . ':</b> '. $userInfo['complete_name'] . '</li>';
49
-        $html .= '<li><b>'. $plugin->get_lang('PaymentMethods') . ':</b> '. $paymentType . '</li>';
44
+        $html .= '<li><b>'.$plugin->get_lang('OrderPrice').':</b> '.$sale['price'].'</li>';
45
+        $html .= '<li><b>'.$plugin->get_lang('CurrencyType').':</b> '.$currency['iso_code'].'</li>';
46
+        $html .= '<li><b>'.$plugin->get_lang('ProductType').':</b> '.$productType.'</li>';
47
+        $html .= '<li><b>'.$plugin->get_lang('OrderDate').':</b> '.api_format_date($sale['date'], DATE_TIME_FORMAT_LONG_24H).'</li>';
48
+        $html .= '<li><b>'.$plugin->get_lang('Buyer').':</b> '.$userInfo['complete_name'].'</li>';
49
+        $html .= '<li><b>'.$plugin->get_lang('PaymentMethods').':</b> '.$paymentType.'</li>';
50 50
         $html .= '</ul>';
51 51
         $html .= '</div>';
52 52
         $html .= '<div class="col-sm-6 col-md-6">';
53
-        $html .= '<img class="thumbnail" src="'. $productImage .'" >';
53
+        $html .= '<img class="thumbnail" src="'.$productImage.'" >';
54 54
         $html .= '</div>';
55 55
         $html .= '</div>';
56 56
 
@@ -95,9 +95,9 @@  discard block
 block discarded – undo
95 95
         $html = '<div class="row">'
96 96
         . '<p>'
97 97
             . '<ul>'
98
-                . '<li>'. get_plugin_lang("PayoutsTotalCompleted", "BuyCoursesPlugin") .' <b>'. $stats['completed_count'] .'</b> - '. get_plugin_lang("TotalAmount", "BuyCoursesPlugin") .' <b>'. $stats['completed_total_amount'] .' '. $currency['iso_code'] . '</b></li>'
99
-                . '<li>'. get_plugin_lang("PayoutsTotalPending", "BuyCoursesPlugin") .' <b>'. $stats['pending_count'] .'</b> - '. get_plugin_lang("TotalAmount", "BuyCoursesPlugin") .' <b>'. $stats['pending_total_amount'] .' '. $currency['iso_code'] . '</b></li>'
100
-                . '<li>'. get_plugin_lang("PayoutsTotalCanceled", "BuyCoursesPlugin") .' <b>'. $stats['canceled_count'] .'</b> - '. get_plugin_lang("TotalAmount", "BuyCoursesPlugin") .' <b>'. $stats['canceled_total_amount'] .' '. $currency['iso_code'] . '</b></li>'
98
+                . '<li>'.get_plugin_lang("PayoutsTotalCompleted", "BuyCoursesPlugin").' <b>'.$stats['completed_count'].'</b> - '.get_plugin_lang("TotalAmount", "BuyCoursesPlugin").' <b>'.$stats['completed_total_amount'].' '.$currency['iso_code'].'</b></li>'
99
+                . '<li>'.get_plugin_lang("PayoutsTotalPending", "BuyCoursesPlugin").' <b>'.$stats['pending_count'].'</b> - '.get_plugin_lang("TotalAmount", "BuyCoursesPlugin").' <b>'.$stats['pending_total_amount'].' '.$currency['iso_code'].'</b></li>'
100
+                . '<li>'.get_plugin_lang("PayoutsTotalCanceled", "BuyCoursesPlugin").' <b>'.$stats['canceled_count'].'</b> - '.get_plugin_lang("TotalAmount", "BuyCoursesPlugin").' <b>'.$stats['canceled_total_amount'].' '.$currency['iso_code'].'</b></li>'
101 101
             . '</ul>'
102 102
         . '</p>';
103 103
         $html .= '</div>';
@@ -137,15 +137,15 @@  discard block
 block discarded – undo
137 137
 
138 138
         $isoCode = $currentCurrency['iso_code'];
139 139
 
140
-        $html .= '<p>'. get_plugin_lang("VerifyTotalAmountToProceedPayout", "BuyCoursesPlugin") .'</p>';
140
+        $html .= '<p>'.get_plugin_lang("VerifyTotalAmountToProceedPayout", "BuyCoursesPlugin").'</p>';
141 141
         $html .= ''
142 142
         . '<p>'
143 143
             . '<ul>'
144
-                . '<li>'. get_plugin_lang("TotalAcounts", "BuyCoursesPlugin") .' <b>'. $totalAccounts .'</b></li>'
145
-                . '<li>'. get_plugin_lang("TotalPayout", "BuyCoursesPlugin") .' <b>'. $isoCode .' '. $totalPayout .'</b></li>'
144
+                . '<li>'.get_plugin_lang("TotalAcounts", "BuyCoursesPlugin").' <b>'.$totalAccounts.'</b></li>'
145
+                . '<li>'.get_plugin_lang("TotalPayout", "BuyCoursesPlugin").' <b>'.$isoCode.' '.$totalPayout.'</b></li>'
146 146
             . '</ul>'
147 147
         . '</p>';
148
-        $html .= '<p>'. get_plugin_lang("CautionThisProcessCantBeCanceled", "BuyCoursesPlugin") .'</p>';
148
+        $html .= '<p>'.get_plugin_lang("CautionThisProcessCantBeCanceled", "BuyCoursesPlugin").'</p>';
149 149
         $html .= '<br /><br />';
150 150
         $html .= '<div id="spinner" class="text-center"></div>';
151 151
 
@@ -199,7 +199,7 @@  discard block
 block discarded – undo
199 199
 
200 200
         } else {
201 201
 
202
-            echo Display::return_message('<b>'.$result['L_SEVERITYCODE0'].' '.$result['L_ERRORCODE0'].'</b> - '.$result['L_SHORTMESSAGE0'].'<br /><ul><li>'. $result['L_LONGMESSAGE0'].'</li></ul>', 'error', false);
202
+            echo Display::return_message('<b>'.$result['L_SEVERITYCODE0'].' '.$result['L_ERRORCODE0'].'</b> - '.$result['L_SHORTMESSAGE0'].'<br /><ul><li>'.$result['L_LONGMESSAGE0'].'</li></ul>', 'error', false);
203 203
 
204 204
         }
205 205
 
Please login to merge, or discard this patch.
main/gradebook/gradebook_add_cat.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -8,7 +8,7 @@  discard block
 block discarded – undo
8 8
 require_once '../inc/global.inc.php';
9 9
 $_in_course = true;
10 10
 $course_code = api_get_course_id();
11
-if (empty($course_code )) {
11
+if (empty($course_code)) {
12 12
     $_in_course = false;
13 13
 }
14 14
 
@@ -23,7 +23,7 @@  discard block
 block discarded – undo
23 23
 $my_user_id = api_get_user_id();
24 24
 $catadd->set_user_id($my_user_id);
25 25
 $catadd->set_parent_id($get_select_cat);
26
-$catcourse = Category :: load ($get_select_cat);
26
+$catcourse = Category :: load($get_select_cat);
27 27
 
28 28
 if ($_in_course) {
29 29
     $catadd->set_course_code($course_code);
@@ -37,12 +37,12 @@  discard block
 block discarded – undo
37 37
     $catadd,
38 38
     'add_cat_form',
39 39
     null,
40
-    api_get_self() . '?selectcat='.$get_select_cat.'&'.api_get_cidreq()
40
+    api_get_self().'?selectcat='.$get_select_cat.'&'.api_get_cidreq()
41 41
 );
42 42
 
43 43
 if ($form->validate()) {
44 44
     $values = $form->exportValues();
45
-    $select_course=isset($values['select_course']) ? $values['select_course'] : array();
45
+    $select_course = isset($values['select_course']) ? $values['select_course'] : array();
46 46
     $cat = new Category();
47 47
     if ($values['hid_parent_id'] == '0') {
48 48
         if ($select_course == 'COURSEINDEPENDENT') {
@@ -89,12 +89,12 @@  discard block
 block discarded – undo
89 89
     }
90 90
     $cat->set_visible($visible);
91 91
     $result = $cat->add();
92
-    header('Location: '.Security::remove_XSS($_SESSION['gradebook_dest']).'?addcat=&selectcat=' . $cat->get_parent_id().'&'.api_get_cidreq());
92
+    header('Location: '.Security::remove_XSS($_SESSION['gradebook_dest']).'?addcat=&selectcat='.$cat->get_parent_id().'&'.api_get_cidreq());
93 93
     exit;
94 94
 }
95 95
 
96 96
 if (!$_in_course) {
97
-    $interbreadcrumb[] = array (
97
+    $interbreadcrumb[] = array(
98 98
         'url' => Security::remove_XSS($_SESSION['gradebook_dest']).'?selectcat='.$get_select_cat.'&'.api_get_cidreq(),
99 99
         'name' => get_lang('Gradebook')
100 100
     );
Please login to merge, or discard this patch.
main/gradebook/lib/fe/exportgradebook.php 1 patch
Spacing   +21 added lines, -21 removed lines patch added patch discarded remove patch
@@ -12,7 +12,7 @@  discard block
 block discarded – undo
12 12
  * @param	string	View to print as a title for the table
13 13
  * @param	string	Course name to print as title for the table
14 14
  */
15
-function print_table($data_array,$header_names,$view,$coursename)
15
+function print_table($data_array, $header_names, $view, $coursename)
16 16
 {
17 17
 	$printdata = '<!DOCTYPE html
18 18
      PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
@@ -160,7 +160,7 @@  discard block
 block discarded – undo
160 160
 
161 161
 	$count_pages = ceil(count($data_table) / $items_per_page);
162 162
     $content_table = '';
163
-    for ($x = 0; $x<$count_pages; $x++) {
163
+    for ($x = 0; $x < $count_pages; $x++) {
164 164
         $content_table .= '<table width="100%" border="1" style="border-collapse:collapse">';
165 165
         // header table
166 166
         $content_table .= '<tr>';
@@ -169,7 +169,7 @@  discard block
 block discarded – undo
169 169
 
170 170
             foreach ($headers_table as $head_table) {
171 171
                 if (!empty($head_table[0])) {
172
-                    $width = (!empty($head_table[1])?$head_table[1].'%':'');
172
+                    $width = (!empty($head_table[1]) ? $head_table[1].'%' : '');
173 173
                     $content_table .= '<th width="'.$width.'">'.$head_table[0].'</th>';
174 174
                     $i++;
175 175
                 }
@@ -178,16 +178,16 @@  discard block
 block discarded – undo
178 178
         $content_table .= '</tr>';
179 179
         // body table
180 180
         if (is_array($data_table) && count($data_table) > 0) {
181
-            $offset = $x*$items_per_page;
182
-            $data_table = array_slice ($data_table, $offset, count($data_table));
181
+            $offset = $x * $items_per_page;
182
+            $data_table = array_slice($data_table, $offset, count($data_table));
183 183
             $i = 1;
184
-            $item = $offset+1;
184
+            $item = $offset + 1;
185 185
             foreach ($data_table as $data) {
186 186
                 $content_table .= '<tr>';
187
-                $content_table .= '<td>'.($item<10?'0'.$item:$item).'</td>';
187
+                $content_table .= '<td>'.($item < 10 ? '0'.$item : $item).'</td>';
188 188
                 foreach ($data as  $key => $content) {
189 189
                     if (isset($content)) {
190
-                        $key == 1 ? $align='align="left"':$align='align="center"';
190
+                        $key == 1 ? $align = 'align="left"' : $align = 'align="center"';
191 191
                         $content_table .= '<td '.$align.' style="padding:4px;" >'.$content.'</td>';
192 192
                     }
193 193
                 }
@@ -240,10 +240,10 @@  discard block
 block discarded – undo
240 240
                             <h1>'.$title_pdf.'</h1></td></tr>';
241 241
         foreach ($headers_pdf as $header_pdf) {
242 242
             if (!empty($header_pdf[0]) && !empty($header_pdf[1])) {
243
-                $header.= '<tr><td><strong>'.$header_pdf[0].'</strong> </td><td>'.$header_pdf[1].'</td></tr>';
243
+                $header .= '<tr><td><strong>'.$header_pdf[0].'</strong> </td><td>'.$header_pdf[1].'</td></tr>';
244 244
             }
245 245
         }
246
-        $header.='</table><br />';
246
+        $header .= '</table><br />';
247 247
     }
248 248
 
249 249
     // preparing footer pdf
@@ -267,7 +267,7 @@  discard block
 block discarded – undo
267 267
     }
268 268
     $items_per_page = 30;
269 269
     $count_pages = ceil(count($data_table) / $items_per_page);
270
-    for ($x = 0; $x<$count_pages; $x++) {
270
+    for ($x = 0; $x < $count_pages; $x++) {
271 271
         $content_table .= '<table width="100%" border="1" style="border-collapse:collapse">';
272 272
         // header table
273 273
         $content_table .= '<tr>';
@@ -275,7 +275,7 @@  discard block
 block discarded – undo
275 275
         if (is_array($headers_table)) {
276 276
             foreach ($headers_table as $head_table) {
277 277
                 if (!empty($head_table[0])) {
278
-                    $width = (!empty($head_table[1])?$head_table[1].'%':'');
278
+                    $width = (!empty($head_table[1]) ? $head_table[1].'%' : '');
279 279
                     $content_table .= '<th width="'.$width.'">'.$head_table[0].'</th>';
280 280
                     $i++;
281 281
                 }
@@ -285,16 +285,16 @@  discard block
 block discarded – undo
285 285
         // body table
286 286
 
287 287
         if (is_array($data_table) && count($data_table) > 0) {
288
-            $offset = $x*$items_per_page;
289
-            $data_table = array_slice ($data_table, $offset, count($data_table));
288
+            $offset = $x * $items_per_page;
289
+            $data_table = array_slice($data_table, $offset, count($data_table));
290 290
             $i = 1;
291
-            $item = $offset+1;
291
+            $item = $offset + 1;
292 292
             foreach ($data_table as $data) {
293 293
                 $content_table .= '<tr>';
294
-                $content_table .= '<td>'.($item<10?'0'.$item:$item).'</td>';
294
+                $content_table .= '<td>'.($item < 10 ? '0'.$item : $item).'</td>';
295 295
                 foreach ($data as  $key => $content) {
296 296
                     if (isset($content)) {
297
-                        $key == 1 ? $align='align="left"':$align='align="center"';
297
+                        $key == 1 ? $align = 'align="left"' : $align = 'align="center"';
298 298
                         $content_table .= '<td '.$align.' style="padding:4px;" >'.$content.'</td>';
299 299
                     }
300 300
                 }
@@ -312,7 +312,7 @@  discard block
 block discarded – undo
312 312
     $pdf = new PDF();
313 313
     $pdf->set_custom_footer($footer);
314 314
     $pdf->set_custom_header($headers_in_pdf);
315
-    $pdf->content_to_pdf($header.$content_table, $css, $title_pdf );
315
+    $pdf->content_to_pdf($header.$content_table, $css, $title_pdf);
316 316
     exit;
317 317
 
318 318
 }
@@ -327,8 +327,8 @@  discard block
 block discarded – undo
327 327
 function export_pdf($pdf, $newarray, $header_names, $format)
328 328
 {
329 329
 	$pdf->selectFont(api_get_path(LIBRARY_PATH).'ezpdf/fonts/Courier.afm');
330
-	$pdf->ezSetCmMargins(0,0,0,0);
331
-	$pdf->ezSetY(($format=='portrait')?'820':'570');
330
+	$pdf->ezSetCmMargins(0, 0, 0, 0);
331
+	$pdf->ezSetY(($format == 'portrait') ? '820' : '570');
332 332
 	$pdf->selectFont(api_get_path(LIBRARY_PATH).'ezpdf/fonts/Courier.afm');
333 333
     if ($format == 'portrait') {
334 334
         $pdf->line(40, 790, 540, 790);
@@ -337,7 +337,7 @@  discard block
 block discarded – undo
337 337
         $pdf->line(40, 540, 790, 540);
338 338
         $pdf->line(40, 40, 790, 40);
339 339
     }
340
-    $pdf->ezSetY(($format=='portrait')?'750':'520');
340
+    $pdf->ezSetY(($format == 'portrait') ? '750' : '520');
341 341
     $pdf->ezTable($newarray, $header_names, '', array(
342 342
         'showHeadings' => 1,
343 343
         'shaded' => 1,
Please login to merge, or discard this patch.
main/blog/blog_admin.php 1 patch
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -8,7 +8,7 @@  discard block
 block discarded – undo
8 8
  */
9 9
 
10 10
 ////require_once '../inc/global.inc.php';
11
-$current_course_tool  = TOOL_BLOGS;
11
+$current_course_tool = TOOL_BLOGS;
12 12
 
13 13
 $this_section = SECTION_COURSES;
14 14
 
@@ -20,7 +20,7 @@  discard block
 block discarded – undo
20 20
 
21 21
 //	 ONLY USERS REGISTERED IN THE COURSE
22 22
 if (!$is_allowed_in_course && !api_is_allowed_to_edit()) {
23
-    api_not_allowed(true);//print headers/footers
23
+    api_not_allowed(true); //print headers/footers
24 24
 }
25 25
 
26 26
 if (api_is_allowed_to_edit()) {
@@ -34,29 +34,29 @@  discard block
 block discarded – undo
34 34
             'url' => 'blog_admin.php?'.api_get_cidreq(),
35 35
             'name' => $nameTools,
36 36
         );
37
-        $my_url='';
38
-        if (isset($_GET['action']) && $_GET['action']=='add') {
37
+        $my_url = '';
38
+        if (isset($_GET['action']) && $_GET['action'] == 'add') {
39 39
             $current_section = get_lang('AddBlog');
40
-            $my_url='action=add';
41
-        } elseif (isset($_GET['action']) && $_GET['action']=='edit') {
40
+            $my_url = 'action=add';
41
+        } elseif (isset($_GET['action']) && $_GET['action'] == 'edit') {
42 42
             $current_section = get_lang('EditBlog');
43
-            $my_url='action=edit&amp;blog_id='.Security::remove_XSS($_GET['blog_id']);
43
+            $my_url = 'action=edit&amp;blog_id='.Security::remove_XSS($_GET['blog_id']);
44 44
         }
45 45
         Display::display_header('');
46 46
     }
47 47
     echo '<div class="actions">';
48 48
     echo "<a href='".api_get_self()."?".api_get_cidreq()."&action=add'>",
49
-        Display::return_icon('new_blog.png', get_lang('AddBlog'),'',ICON_SIZE_MEDIUM)."</a>";
49
+        Display::return_icon('new_blog.png', get_lang('AddBlog'), '', ICON_SIZE_MEDIUM)."</a>";
50 50
     echo '</div>';
51 51
 
52 52
     if (!empty($_POST['new_blog_submit']) && !empty($_POST['blog_name'])) {
53
-        if (isset($_POST['blog_name']))  {
53
+        if (isset($_POST['blog_name'])) {
54 54
             Blog::create_blog($_POST['blog_name'], $_POST['blog_subtitle']);
55 55
             Display::display_confirmation_message(get_lang('BlogStored'));
56 56
         }
57 57
     }
58 58
     if (!empty($_POST['edit_blog_submit']) && !empty($_POST['blog_name'])) {
59
-        if (strlen(trim($_POST['blog_name']))>0) {
59
+        if (strlen(trim($_POST['blog_name'])) > 0) {
60 60
             Blog::edit_blog($_POST['blog_id'], $_POST['blog_name'], $_POST['blog_subtitle']);
61 61
             Display::display_confirmation_message(get_lang('BlogEdited'));
62 62
         }
@@ -88,7 +88,7 @@  discard block
 block discarded – undo
88 88
         // we show the form if
89 89
         // 1. no post data
90 90
         // 2. there is post data and one of the three form elements is empty
91
-        if (!$_POST || (!empty($_POST) && (empty($_POST['edit_blog_submit']) || empty($_POST['blog_name']) ))) {
91
+        if (!$_POST || (!empty($_POST) && (empty($_POST['edit_blog_submit']) || empty($_POST['blog_name'])))) {
92 92
             // if there is post data there is certainly an error in the form
93 93
             if ($_POST) {
94 94
                 Display::display_error_message(get_lang('FormHasErrorsPleaseComplete'));
Please login to merge, or discard this patch.
main/session/session_user_edit.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -28,7 +28,7 @@  discard block
 block discarded – undo
28 28
 }
29 29
 
30 30
 
31
-$interbreadcrumb[] = array('url' => 'session_list.php','name' => get_lang('SessionList'));
31
+$interbreadcrumb[] = array('url' => 'session_list.php', 'name' => get_lang('SessionList'));
32 32
 $interbreadcrumb[] = array(
33 33
     'url' => "resume_session.php?id_session=".$sessionId,
34 34
     "name" => get_lang('SessionOverview')
@@ -60,7 +60,7 @@  discard block
 block discarded – undo
60 60
     if ($days > 0) {
61 61
         $msg = sprintf(get_lang('FirstAccessWasXSessionDurationYEndDateInZDays'), $firstAccessString, $duration, $days);
62 62
     } else {
63
-        $endDateInSeconds = $firstAccess + $duration * 24*60*60;
63
+        $endDateInSeconds = $firstAccess + $duration * 24 * 60 * 60;
64 64
         $last = api_convert_and_format_date($endDateInSeconds, DATE_FORMAT_SHORT);
65 65
         $msg = sprintf(get_lang('FirstAccessWasXSessionDurationYEndDateWasZ'), $firstAccessString, $duration, $last);
66 66
     }
Please login to merge, or discard this patch.
main/session/resume_session.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -29,7 +29,7 @@  discard block
 block discarded – undo
29 29
 $tool_name = get_lang('SessionOverview');
30 30
 
31 31
 //$interbreadcrumb[] = array('url' => 'index.php','name' => get_lang('PlatformAdmin'));
32
-$interbreadcrumb[] = array('url' => 'session_list.php','name' => get_lang('SessionList'));
32
+$interbreadcrumb[] = array('url' => 'session_list.php', 'name' => get_lang('SessionList'));
33 33
 
34 34
 $orig_param = '&origin=resume_session';
35 35
 
@@ -183,7 +183,7 @@  discard block
 block discarded – undo
183 183
 
184 184
 		$coachs = array();
185 185
 		if (Database::num_rows($rs) > 0) {
186
-			while($info_coach = Database::fetch_array($rs)) {
186
+			while ($info_coach = Database::fetch_array($rs)) {
187 187
                 $coachs[] = api_get_person_name(
188 188
                         $info_coach['firstname'],
189 189
                         $info_coach['lastname']
@@ -194,7 +194,7 @@  discard block
 block discarded – undo
194 194
 		}
195 195
 
196 196
 		if (count($coachs) > 0) {
197
-			$coach = implode('<br />',$coachs);
197
+			$coach = implode('<br />', $coachs);
198 198
 		} else {
199 199
 			$coach = get_lang('None');
200 200
 		}
@@ -217,7 +217,7 @@  discard block
 block discarded – undo
217 217
         $downIcon = 'down.png';
218 218
         $downUrl = api_get_self().'?id_session='.$sessionId.'&course_id='.$course->getId().'&action=move_down';
219 219
 
220
-        if ($count +1 == count($courses)) {
220
+        if ($count + 1 == count($courses)) {
221 221
             $downIcon = 'down_na.png';
222 222
             $downUrl = '#';
223 223
         }
@@ -244,7 +244,7 @@  discard block
 block discarded – undo
244 244
 			<td>'.$coach.'</td>
245 245
 			<td>'.$numberOfUsers.'</td>
246 246
 			<td>
247
-                <a href="'. $courseUrl . '">'.
247
+                <a href="'. $courseUrl.'">'.
248 248
                 Display::return_icon('course_home.gif', get_lang('Course')).'</a>
249 249
                 '.$orderButtons.'
250 250
                 <a href="session_course_user_list.php?id_session='.$sessionId.'&course_code='.$course->getCode().'">'.
@@ -309,7 +309,7 @@  discard block
 block discarded – undo
309 309
             array('onclick' => "javascript:if(!confirm('".get_lang('ConfirmYourChoice')."')) return false;")
310 310
         );
311 311
 
312
-        $addUserToUrlLink= '';
312
+        $addUserToUrlLink = '';
313 313
         if ($multiple_url_is_on) {
314 314
             if ($user['access_url_id'] != $url_id) {
315 315
                 $userLink .= ' '.Display::return_icon(
Please login to merge, or discard this patch.
src/Chamilo/CoreBundle/Component/Editor/CkEditor/Toolbar/Documents.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -108,7 +108,7 @@
 block discarded – undo
108 108
             ],
109 109
             ['BulletedList', 'NumberedList', 'HorizontalRule'],
110 110
             ['JustifyLeft', 'JustifyCenter', 'JustifyBlock'],
111
-            [   'Styles',
111
+            ['Styles',
112 112
                 'Format',
113 113
                 'Font',
114 114
                 'FontSize',
Please login to merge, or discard this patch.
src/Chamilo/CoreBundle/Component/Editor/CkEditor/Toolbar/Wiki.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -56,11 +56,11 @@  discard block
 block discarded – undo
56 56
                 '-',
57 57
                 'Find'
58 58
             ],
59
-            ['Wikilink','Link','Unlink','Anchor'],
60
-            ['Image','Video','Flash','Oembed','Youtube','Audio','Asciimath'],
61
-            ['Table','HorizontalRule','Smiley','SpecialChar','leaflet'],
62
-            ['Format','Font','FontSize'],
63
-            ['Bold','Italic','Underline'],
59
+            ['Wikilink', 'Link', 'Unlink', 'Anchor'],
60
+            ['Image', 'Video', 'Flash', 'Oembed', 'Youtube', 'Audio', 'Asciimath'],
61
+            ['Table', 'HorizontalRule', 'Smiley', 'SpecialChar', 'leaflet'],
62
+            ['Format', 'Font', 'FontSize'],
63
+            ['Bold', 'Italic', 'Underline'],
64 64
             [
65 65
                 'Subscript',
66 66
                 'Superscript',
@@ -94,10 +94,10 @@  discard block
 block discarded – undo
94 94
         return [
95 95
             ['Save', 'NewPage', 'Templates', '-', 'PasteText'],
96 96
             ['Undo', 'Redo'],
97
-            ['Wikilink', 'Link', 'Image', 'Video', 'Flash', 'Audio', 'Table',  'Asciimath', 'Asciisvg'],
97
+            ['Wikilink', 'Link', 'Image', 'Video', 'Flash', 'Audio', 'Table', 'Asciimath', 'Asciisvg'],
98 98
             ['BulletedList', 'NumberedList', 'HorizontalRule'],
99 99
             ['JustifyLeft', 'JustifyCenter', 'JustifyRight', 'JustifyBlock'],
100
-            ['Styles','Format', 'Font', 'FontSize', 'Bold', 'Italic', 'Underline', 'TextColor', 'BGColor', 'Source'],
100
+            ['Styles', 'Format', 'Font', 'FontSize', 'Bold', 'Italic', 'Underline', 'TextColor', 'BGColor', 'Source'],
101 101
             api_get_setting('enabled_wiris') == 'true' ? ['ckeditor_wiris_formulaEditor', 'ckeditor_wiris_CAS'] : [''],
102 102
             ['Toolbarswitch']
103 103
         ];
Please login to merge, or discard this patch.