Completed
Push — 1.11.x ( ca7787...41c0f2 )
by José
31:51
created
main/inc/lib/glossary.lib.php 1 patch
Spacing   +18 added lines, -18 removed lines patch added patch discarded remove patch
@@ -47,9 +47,9 @@  discard block
 block discarded – undo
47 47
      *
48 48
      * @return string The glossary description
49 49
      */
50
-    public static function get_glossary_term_by_glossary_id ($glossary_id)
50
+    public static function get_glossary_term_by_glossary_id($glossary_id)
51 51
     {
52
-        $glossary_table  = Database::get_course_table(TABLE_GLOSSARY);
52
+        $glossary_table = Database::get_course_table(TABLE_GLOSSARY);
53 53
         $course_id = api_get_course_int_id();
54 54
         $sql = "SELECT description FROM $glossary_table
55 55
                 WHERE c_id = $course_id  AND glossary_id =".intval($glossary_id);
@@ -72,7 +72,7 @@  discard block
 block discarded – undo
72 72
      */
73 73
     public static function get_glossary_term_by_glossary_name($glossary_name)
74 74
     {
75
-        $glossary_table  = Database::get_course_table(TABLE_GLOSSARY);
75
+        $glossary_table = Database::get_course_table(TABLE_GLOSSARY);
76 76
         $session_id = api_get_session_id();
77 77
         $course_id = api_get_course_int_id();
78 78
         $sql_filter = api_get_session_condition($session_id);
@@ -225,7 +225,7 @@  discard block
 block discarded – undo
225 225
         $get_max = "SELECT MAX(display_order) FROM $t_glossary
226 226
                     WHERE c_id = $course_id ";
227 227
         $res_max = Database::query($get_max);
228
-        if (Database::num_rows($res_max)==0) {
228
+        if (Database::num_rows($res_max) == 0) {
229 229
             return 0;
230 230
         }
231 231
         $row = Database::fetch_array($res_max);
@@ -254,7 +254,7 @@  discard block
 block discarded – undo
254 254
                 WHERE
255 255
                     c_id = $course_id AND
256 256
                     name = '".Database::escape_string($term)."'";
257
-        if ($not_id<>'') {
257
+        if ($not_id <> '') {
258 258
             $sql .= " AND glossary_id <> '".intval($not_id)."'";
259 259
         }
260 260
         $result = Database::query($sql);
@@ -378,25 +378,25 @@  discard block
 block discarded – undo
378 378
         $actionsLeft = '';
379 379
         if (api_is_allowed_to_edit(null, true)) {
380 380
             $actionsLeft .= '<a href="index.php?'.api_get_cidreq().'&action=addglossary&msg=add?'.api_get_cidreq().'">'.
381
-                Display::return_icon('new_glossary_term.png',get_lang('TermAddNew'), '', ICON_SIZE_MEDIUM).'</a>';
381
+                Display::return_icon('new_glossary_term.png', get_lang('TermAddNew'), '', ICON_SIZE_MEDIUM).'</a>';
382 382
         }
383 383
 
384 384
         $actionsLeft .= '<a href="index.php?'.api_get_cidreq().'&action=export">'.
385
-            Display::return_icon('export_csv.png',get_lang('ExportGlossaryAsCSV'), '', ICON_SIZE_MEDIUM).'</a>';
385
+            Display::return_icon('export_csv.png', get_lang('ExportGlossaryAsCSV'), '', ICON_SIZE_MEDIUM).'</a>';
386 386
         if (api_is_allowed_to_edit(null, true)) {
387 387
             $actionsLeft .= '<a href="index.php?'.api_get_cidreq().'&action=import">'.
388
-                Display::return_icon('import_csv.png',get_lang('ImportGlossary'), '', ICON_SIZE_MEDIUM).'</a>';
388
+                Display::return_icon('import_csv.png', get_lang('ImportGlossary'), '', ICON_SIZE_MEDIUM).'</a>';
389 389
         }
390 390
 
391 391
         $actionsLeft .= '<a href="index.php?'.api_get_cidreq().'&action=export_to_pdf">'.
392
-            Display::return_icon('pdf.png',get_lang('ExportToPDF'), '', ICON_SIZE_MEDIUM).'</a>';
392
+            Display::return_icon('pdf.png', get_lang('ExportToPDF'), '', ICON_SIZE_MEDIUM).'</a>';
393 393
 
394 394
         if (($view == 'table') || (!isset($view))) {
395 395
             $actionsLeft .= '<a href="index.php?'.api_get_cidreq().'&action=changeview&view=list">'.
396
-                Display::return_icon('view_detailed.png',get_lang('ListView'), '', ICON_SIZE_MEDIUM).'</a>';
396
+                Display::return_icon('view_detailed.png', get_lang('ListView'), '', ICON_SIZE_MEDIUM).'</a>';
397 397
         } else {
398 398
             $actionsLeft .= '<a href="index.php?'.api_get_cidreq().'&action=changeview&view=table">'.
399
-                Display::return_icon('view_text.png',get_lang('TableView'), '', ICON_SIZE_MEDIUM).'</a>';
399
+                Display::return_icon('view_text.png', get_lang('TableView'), '', ICON_SIZE_MEDIUM).'</a>';
400 400
         }
401 401
 
402 402
         /* BUILD SEARCH FORM */
@@ -433,7 +433,7 @@  discard block
 block discarded – undo
433 433
             $table->set_header(1, get_lang('TermDefinition'), true);
434 434
             if (api_is_allowed_to_edit(null, true)) {
435 435
                 $table->set_header(2, get_lang('Actions'), false, 'width=90px', array('class' => 'td_actions'));
436
-                $table->set_column_filter(2, array('GlossaryManager','actions_filter'));
436
+                $table->set_column_filter(2, array('GlossaryManager', 'actions_filter'));
437 437
             }
438 438
             $content .= $table->return_table();
439 439
         }
@@ -455,8 +455,8 @@  discard block
 block discarded – undo
455 455
         $content = '';
456 456
         foreach ($glossary_data as $key => $glossary_item) {
457 457
             $actions = '';
458
-            if (api_is_allowed_to_edit(null,true)) {
459
-                $actions = '<div class="pull-right">'.self::actions_filter($glossary_item[2], '',$glossary_item).'</div>';
458
+            if (api_is_allowed_to_edit(null, true)) {
459
+                $actions = '<div class="pull-right">'.self::actions_filter($glossary_item[2], '', $glossary_item).'</div>';
460 460
             }
461 461
             $content .= Display::panel($glossary_item[1], $glossary_item[0].' '.$actions);
462 462
         }
@@ -469,7 +469,7 @@  discard block
 block discarded – undo
469 469
      * @return integer Count of glossary terms
470 470
      *
471 471
      */
472
-    public static function get_number_glossary_terms($session_id=0)
472
+    public static function get_number_glossary_terms($session_id = 0)
473 473
     {
474 474
         // Database table definition
475 475
         $t_glossary = Database :: get_course_table(TABLE_GLOSSARY);
@@ -563,7 +563,7 @@  discard block
 block discarded – undo
563 563
         while ($data = Database::fetch_array($res)) {
564 564
             // Validation when belongs to a session
565 565
             $session_img = api_get_session_image($data['session_id'], $_user['status']);
566
-            $array[0] = $data[0] . $session_img;
566
+            $array[0] = $data[0].$session_img;
567 567
 
568 568
             if (!$view || $view === 'table') {
569 569
                 $array[1] = str_replace(array('<p>', '</p>'), array('', '<br />'), $data[1]);
@@ -593,13 +593,13 @@  discard block
 block discarded – undo
593 593
     {
594 594
         $glossary_id = $row[2];
595 595
         $return = '<a href="'.api_get_self().'?action=edit_glossary&glossary_id='.$glossary_id.'&'.api_get_cidreq().'&msg=edit">'.
596
-            Display::return_icon('edit.png',get_lang('Edit'),'',22).'</a>';
596
+            Display::return_icon('edit.png', get_lang('Edit'), '', 22).'</a>';
597 597
         $glossary_data = GlossaryManager::get_glossary_information($glossary_id);
598 598
         $glossary_term = $glossary_data['name'];
599 599
         if (api_is_allowed_to_edit(null, true)) {
600 600
             if ($glossary_data['session_id'] == api_get_session_id()) {
601 601
                 $return .= '<a href="'.api_get_self().'?action=delete_glossary&glossary_id='.$glossary_id.'&'.api_get_cidreq().'" onclick="return confirmation(\''.$glossary_term.'\');">'.
602
-                    Display::return_icon('delete.png', get_lang('Delete'),'',22).'</a>';
602
+                    Display::return_icon('delete.png', get_lang('Delete'), '', 22).'</a>';
603 603
             } else {
604 604
                 $return = get_lang('EditionNotAvailableFromSession');
605 605
             }
Please login to merge, or discard this patch.
main/inc/lib/lp_item.lib.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -36,7 +36,7 @@
 block discarded – undo
36 36
 
37 37
     public function __construct($in_c_id = 0, $in_id = 0)
38 38
     {
39
-        if ($in_c_id > 0 && $in_id >0) {
39
+        if ($in_c_id > 0 && $in_id > 0) {
40 40
             $item_view_table = Database::get_course_table(TABLE_LP_ITEM);
41 41
             $sql = "SELECT * FROM $item_view_table
42 42
                     WHERE
Please login to merge, or discard this patch.
main/install/index.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -105,7 +105,7 @@  discard block
 block discarded – undo
105 105
 \Patchwork\Utf8\Bootup::initAll();
106 106
 
107 107
 // Page encoding initialization.
108
-header('Content-Type: text/html; charset='. $charset);
108
+header('Content-Type: text/html; charset='.$charset);
109 109
 
110 110
 // Setting the error reporting levels.
111 111
 error_reporting(E_ALL);
@@ -215,7 +215,7 @@  discard block
 block discarded – undo
215 215
     // This is the main configuration file of the system before the upgrade.
216 216
     // Old configuration file.
217 217
     // Don't change to include_once
218
-    $oldConfigPath = api_get_path(SYS_CODE_PATH) . 'inc/conf/configuration.php';
218
+    $oldConfigPath = api_get_path(SYS_CODE_PATH).'inc/conf/configuration.php';
219 219
     if (file_exists($oldConfigPath)) {
220 220
         include $oldConfigPath;
221 221
     }
@@ -345,7 +345,7 @@  discard block
 block discarded – undo
345 345
             //Blocking step6 button
346 346
             $("#button_step6").click(function() {
347 347
                 $("#button_step6").hide();
348
-                $("#button_please_wait").html('<?php echo addslashes(get_lang('PleaseWait'));?>');
348
+                $("#button_please_wait").html('<?php echo addslashes(get_lang('PleaseWait')); ?>');
349 349
                 $("#button_please_wait").show();
350 350
                 $("#button_please_wait").attr('disabled', true);
351 351
                 $("#is_executable").attr("value",'step6');
@@ -412,7 +412,7 @@  discard block
 block discarded – undo
412 412
 
413 413
 $instalation_type_label = '';
414 414
 if ($installType == 'new') {
415
-    $instalation_type_label  = get_lang('NewInstallation');
415
+    $instalation_type_label = get_lang('NewInstallation');
416 416
 } elseif ($installType == 'update') {
417 417
     $update_from_version = isset($update_from_version) ? $update_from_version : null;
418 418
     $instalation_type_label = get_lang('UpdateFromLMSVersion').(is_array($update_from_version) ? implode('|', $update_from_version) : '');
@@ -582,8 +582,8 @@  discard block
 block discarded – undo
582 582
 
583 583
     <?php
584 584
     if ($installType == 'new') {
585
-        echo get_lang('AdminLogin') . ' : <strong>' . $loginForm . '</strong><br />';
586
-        echo get_lang('AdminPass') . ' : <strong>' . $passForm . '</strong><br /><br />'; /* TODO: Maybe this password should be hidden too? */
585
+        echo get_lang('AdminLogin').' : <strong>'.$loginForm.'</strong><br />';
586
+        echo get_lang('AdminPass').' : <strong>'.$passForm.'</strong><br /><br />'; /* TODO: Maybe this password should be hidden too? */
587 587
     }
588 588
     $allowSelfRegistrationLiteral = ($allowSelfReg == 'true') ? get_lang('Yes') : ($allowSelfReg == 'approval' ? get_lang('Approval') : get_lang('No'));
589 589
     echo get_lang('AdminFirstName').' : '.$adminFirstName, '<br />', get_lang('AdminLastName').' : '.$adminLastName, '<br />';
@@ -595,7 +595,7 @@  discard block
 block discarded – undo
595 595
     <?php echo get_lang('DBLogin').' : '.$dbUsernameForm; ?><br />
596 596
     <?php echo get_lang('DBPassword').' : '.str_repeat('*', api_strlen($dbPassForm)); ?><br />
597 597
     <?php echo get_lang('MainDB').' : <strong>'.$dbNameForm; ?></strong><br />
598
-    <?php echo get_lang('AllowSelfReg').' : '. $allowSelfRegistrationLiteral; ?><br />
598
+    <?php echo get_lang('AllowSelfReg').' : '.$allowSelfRegistrationLiteral; ?><br />
599 599
     <?php echo get_lang('EncryptMethodUserPass').' : ';
600 600
     echo $encryptPassForm;
601 601
     ?>
Please login to merge, or discard this patch.
main/install/update-configuration.inc.php 1 patch
Spacing   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -10,11 +10,11 @@  discard block
 block discarded – undo
10 10
  */
11 11
 if (defined('SYSTEM_INSTALLATION')) {
12 12
 
13
-    error_log("Starting " . basename(__FILE__));
13
+    error_log("Starting ".basename(__FILE__));
14 14
     $perm = api_get_permissions_for_new_files();
15 15
 
16
-    $oldConfFile = api_get_path(SYS_CODE_PATH) . 'inc/conf/configuration.php';
17
-    $newConfFile = api_get_path(CONFIGURATION_PATH) . 'configuration.php';
16
+    $oldConfFile = api_get_path(SYS_CODE_PATH).'inc/conf/configuration.php';
17
+    $newConfFile = api_get_path(CONFIGURATION_PATH).'configuration.php';
18 18
 
19 19
     if (file_exists($oldConfFile)) {
20 20
         copy($oldConfFile, $newConfFile);
@@ -37,18 +37,18 @@  discard block
 block discarded – undo
37 37
         $ignore = false;
38 38
         if (stripos($line, '$_configuration[\'system_version\']') !== false) {
39 39
             $found_version = true;
40
-            $line = '$_configuration[\'system_version\'] = \'' . $GLOBALS['new_version'] . '\';' . "\r\n";
40
+            $line = '$_configuration[\'system_version\'] = \''.$GLOBALS['new_version'].'\';'."\r\n";
41 41
        } elseif (stripos($line, '$_configuration[\'system_stable\']') !== false) {
42 42
             $found_stable = true;
43
-            $line = '$_configuration[\'system_stable\'] = ' . ($GLOBALS['new_version_stable'] ? 'true' : 'false') . ';' . "\r\n";
43
+            $line = '$_configuration[\'system_stable\'] = '.($GLOBALS['new_version_stable'] ? 'true' : 'false').';'."\r\n";
44 44
         } elseif (stripos($line, '$_configuration[\'software_name\']') !== false) {
45 45
             $found_software_name = true;
46
-            $line = '$_configuration[\'software_name\'] = \'' . $GLOBALS['software_name'] . '\';' . "\r\n";
46
+            $line = '$_configuration[\'software_name\'] = \''.$GLOBALS['software_name'].'\';'."\r\n";
47 47
         } elseif (stripos($line, '$_configuration[\'software_url\']') !== false) {
48 48
             $found_software_url = true;
49
-            $line = '$_configuration[\'software_url\'] = \'' . $GLOBALS['software_url'] . '\';' . "\r\n";
49
+            $line = '$_configuration[\'software_url\'] = \''.$GLOBALS['software_url'].'\';'."\r\n";
50 50
         } elseif (stripos($line, '$userPasswordCrypted') !== false) {
51
-            $line = '$_configuration[\'password_encryption\'] = \'' .$userPasswordCrypted.'\';' . "\r\n";
51
+            $line = '$_configuration[\'password_encryption\'] = \''.$userPasswordCrypted.'\';'."\r\n";
52 52
         } elseif (stripos($line, '?>') !== false) {
53 53
             $ignore = true;
54 54
         }
@@ -58,21 +58,21 @@  discard block
 block discarded – undo
58 58
     }
59 59
 
60 60
     if (!$found_version) {
61
-        fwrite($fh, '$_configuration[\'system_version\'] = \'' . $new_version . '\';' . "\r\n");
61
+        fwrite($fh, '$_configuration[\'system_version\'] = \''.$new_version.'\';'."\r\n");
62 62
     }
63 63
     if (!$found_stable) {
64
-        fwrite($fh, '$_configuration[\'system_stable\'] = ' . ($new_version_stable ? 'true' : 'false') . ';' . "\r\n");
64
+        fwrite($fh, '$_configuration[\'system_stable\'] = '.($new_version_stable ? 'true' : 'false').';'."\r\n");
65 65
     }
66 66
     if (!$found_software_name) {
67
-        fwrite($fh, '$_configuration[\'software_name\'] = \'' . $software_name . '\';' . "\r\n");
67
+        fwrite($fh, '$_configuration[\'software_name\'] = \''.$software_name.'\';'."\r\n");
68 68
     }
69 69
     if (!$found_software_url) {
70
-        fwrite($fh, '$_configuration[\'software_url\'] = \'' . $software_url . '\';' . "\r\n");
70
+        fwrite($fh, '$_configuration[\'software_url\'] = \''.$software_url.'\';'."\r\n");
71 71
     }
72 72
     fwrite($fh, '?>');
73 73
     fclose($fh);
74 74
 
75 75
     error_log("configuration.php file updated.");
76 76
 } else {
77
-    echo 'You are not allowed here !'. __FILE__;
77
+    echo 'You are not allowed here !'.__FILE__;
78 78
 }
Please login to merge, or discard this patch.
main/calendar/ical_export.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -46,9 +46,9 @@
 block discarded – undo
46 46
 	define('ICAL_LANG', api_get_language_isocode());
47 47
 
48 48
     $ical = new vcalendar();
49
-    $ical->setConfig('unique_id',api_get_path(WEB_PATH));
50
-    $ical->setProperty( 'method', 'PUBLISH' );
51
-    $ical->setConfig('url',api_get_path(WEB_PATH));
49
+    $ical->setConfig('unique_id', api_get_path(WEB_PATH));
50
+    $ical->setProperty('method', 'PUBLISH');
51
+    $ical->setConfig('url', api_get_path(WEB_PATH));
52 52
     $vevent = new vevent();
53 53
 
54 54
     switch ($_GET['class']) {
Please login to merge, or discard this patch.
main/lp/lp_list.php 1 patch
Spacing   +33 added lines, -33 removed lines patch added patch discarded remove patch
@@ -338,7 +338,7 @@  discard block
 block discarded – undo
338 338
                 if ($current_session == $details['lp_session']) {
339 339
                     $dsp_edit_lp = Display::url(
340 340
                         Display::return_icon('settings.png', get_lang('CourseSettings'), '', ICON_SIZE_SMALL),
341
-                        "lp_controller.php?" . api_get_cidreq() . "&action=edit&lp_id=$id"
341
+                        "lp_controller.php?".api_get_cidreq()."&action=edit&lp_id=$id"
342 342
                     );
343 343
                 } else {
344 344
                     $dsp_edit_lp = Display::return_icon(
@@ -354,7 +354,7 @@  discard block
 block discarded – undo
354 354
                     if ($details['lp_type'] == 1 || $details['lp_type'] == 2) {
355 355
                         $dsp_build = Display::url(
356 356
                             Display::return_icon('edit.png', get_lang('LearnpathEditLearnpath'), '', ICON_SIZE_SMALL),
357
-                            'lp_controller.php?' . api_get_cidreq() . '&' . http_build_query([
357
+                            'lp_controller.php?'.api_get_cidreq().'&'.http_build_query([
358 358
                                 'action' => 'add_item',
359 359
                                 'type' => 'step',
360 360
                                 'lp_id' => $id,
@@ -388,19 +388,19 @@  discard block
 block discarded – undo
388 388
                     if ($details['lp_visibility'] == 0) {
389 389
                         $dsp_visible = Display::url(
390 390
                             Display::return_icon('invisible.png', get_lang('Show'), '', ICON_SIZE_SMALL),
391
-                            api_get_self() . '?' . api_get_cidreq() . "&lp_id=$id&action=toggle_visible&new_status=1"
391
+                            api_get_self().'?'.api_get_cidreq()."&lp_id=$id&action=toggle_visible&new_status=1"
392 392
                         );
393 393
                     } else {
394 394
                         $dsp_visible = Display::url(
395 395
                             Display::return_icon('visible.png', get_lang('Hide'), '', ICON_SIZE_SMALL),
396
-                            api_get_self() . '?' . api_get_cidreq() . "&lp_id=$id&action=toggle_visible&new_status=0"
396
+                            api_get_self().'?'.api_get_cidreq()."&lp_id=$id&action=toggle_visible&new_status=0"
397 397
                         );
398 398
                     }
399 399
                 }
400 400
 
401 401
                 //Tracking command
402 402
                 $trackingActionUrl = 'lp_controller.php?'
403
-                    . api_get_cidreq() . '&'
403
+                    . api_get_cidreq().'&'
404 404
                     . http_build_query([
405 405
                         'action' => 'report',
406 406
                         'lp_id' => $id,
@@ -421,7 +421,7 @@  discard block
 block discarded – undo
421 421
                                 '',
422 422
                                 ICON_SIZE_SMALL
423 423
                             ),
424
-                            api_get_self() . '?' . api_get_cidreq() . "&lp_id=$id&action=toggle_publish&new_status=v"
424
+                            api_get_self().'?'.api_get_cidreq()."&lp_id=$id&action=toggle_publish&new_status=v"
425 425
                         );
426 426
                     } else {
427 427
                         $dsp_publish = "<a href='".api_get_self()."?".api_get_cidreq()."&lp_id=$id&action=toggle_publish&new_status=i'>".
@@ -438,7 +438,7 @@  discard block
 block discarded – undo
438 438
                                 '',
439 439
                                 ICON_SIZE_SMALL
440 440
                             ),
441
-                            api_get_self() . '?' . api_get_cidreq() . "&lp_id=$id&action=toggle_publish&new_status=i"
441
+                            api_get_self().'?'.api_get_cidreq()."&lp_id=$id&action=toggle_publish&new_status=i"
442 442
                         );
443 443
                     }
444 444
                 } else {
@@ -466,7 +466,7 @@  discard block
 block discarded – undo
466 466
                                 '',
467 467
                                 ICON_SIZE_SMALL
468 468
                             ),
469
-                            "lp_controller.php?" . api_get_cidreq() . "&action=switch_attempt_mode&lp_id=$id"
469
+                            "lp_controller.php?".api_get_cidreq()."&action=switch_attempt_mode&lp_id=$id"
470 470
                         );
471 471
                     }
472 472
                     if ($details['seriousgame_mode'] == 0 && $details['lp_prevent_reinit'] == 1) { //single mode | next = multiple
@@ -477,7 +477,7 @@  discard block
 block discarded – undo
477 477
                                 '',
478 478
                                 ICON_SIZE_SMALL
479 479
                             ),
480
-                            "lp_controller.php?" . api_get_cidreq() . "&action=switch_attempt_mode&lp_id=$id"
480
+                            "lp_controller.php?".api_get_cidreq()."&action=switch_attempt_mode&lp_id=$id"
481 481
                         );
482 482
                     }
483 483
                     if ($details['seriousgame_mode'] == 0 && $details['lp_prevent_reinit'] == 0) { //multiple mode | next = seriousgame
@@ -488,7 +488,7 @@  discard block
 block discarded – undo
488 488
                                 '',
489 489
                                 ICON_SIZE_SMALL
490 490
                             ),
491
-                            "lp_controller.php?" . api_get_cidreq() . "&action=switch_attempt_mode&lp_id=$id"
491
+                            "lp_controller.php?".api_get_cidreq()."&action=switch_attempt_mode&lp_id=$id"
492 492
                         );
493 493
                     }
494 494
                 } else {
@@ -511,8 +511,8 @@  discard block
 block discarded – undo
511 511
                                     '',
512 512
                                     ICON_SIZE_SMALL
513 513
                                 ),
514
-                                'lp_controller.php?' . api_get_cidreq()
515
-                                . '&action=switch_view_mode&lp_id=' . $id . $token_parameter
514
+                                'lp_controller.php?'.api_get_cidreq()
515
+                                . '&action=switch_view_mode&lp_id='.$id.$token_parameter
516 516
                             );
517 517
                             break;
518 518
                         case 'embedded':
@@ -523,8 +523,8 @@  discard block
 block discarded – undo
523 523
                                     '',
524 524
                                     ICON_SIZE_SMALL
525 525
                                 ),
526
-                                'lp_controller.php?' . api_get_cidreq()
527
-                                . '&action=switch_view_mode&lp_id=' . $id . $token_parameter
526
+                                'lp_controller.php?'.api_get_cidreq()
527
+                                . '&action=switch_view_mode&lp_id='.$id.$token_parameter
528 528
                             );
529 529
                             break;
530 530
                         case 'embedframe':
@@ -535,8 +535,8 @@  discard block
 block discarded – undo
535 535
                                     '',
536 536
                                     ICON_SIZE_SMALL
537 537
                                 ),
538
-                                'lp_controller.php?' . api_get_cidreq()
539
-                                . '&action=switch_view_mode&lp_id=' . $id . $token_parameter
538
+                                'lp_controller.php?'.api_get_cidreq()
539
+                                . '&action=switch_view_mode&lp_id='.$id.$token_parameter
540 540
                             );
541 541
                             break;
542 542
                         case 'impress':
@@ -547,8 +547,8 @@  discard block
 block discarded – undo
547 547
                                     '',
548 548
                                     ICON_SIZE_SMALL
549 549
                                 ),
550
-                                'lp_controller.php?' . api_get_cidreq()
551
-                                . '&action=switch_view_mode&lp_id=' . $id . $token_parameter
550
+                                'lp_controller.php?'.api_get_cidreq()
551
+                                . '&action=switch_view_mode&lp_id='.$id.$token_parameter
552 552
                             );
553 553
                             break;
554 554
                     }
@@ -580,7 +580,7 @@  discard block
 block discarded – undo
580 580
                                 '',
581 581
                                 ICON_SIZE_SMALL
582 582
                             ),
583
-                            "lp_controller.php?" . api_get_cidreq() . "&action=switch_scorm_debug&lp_id=$id"
583
+                            "lp_controller.php?".api_get_cidreq()."&action=switch_scorm_debug&lp_id=$id"
584 584
                         );
585 585
                     } else {
586 586
                         $dsp_debug = Display::url(
@@ -590,7 +590,7 @@  discard block
 block discarded – undo
590 590
                                 '',
591 591
                                 ICON_SIZE_SMALL
592 592
                             ),
593
-                            "lp_controller.php?" . api_get_cidreq() . "&action=switch_scorm_debug&lp_id=$id"
593
+                            "lp_controller.php?".api_get_cidreq()."&action=switch_scorm_debug&lp_id=$id"
594 594
                         );
595 595
                     }
596 596
                 }
@@ -643,7 +643,7 @@  discard block
 block discarded – undo
643 643
                 if ($details['subscribe_users'] == 1) {
644 644
                     $subscribeUsers = Display::url(
645 645
                         Display::return_icon('user.png', get_lang('SubscribeUsersToLp')),
646
-                        api_get_path(WEB_CODE_PATH) . "lp/lp_subscribe_users.php?lp_id=$id&".api_get_cidreq()
646
+                        api_get_path(WEB_CODE_PATH)."lp/lp_subscribe_users.php?lp_id=$id&".api_get_cidreq()
647 647
                     );
648 648
                 }
649 649
 
@@ -653,12 +653,12 @@  discard block
 block discarded – undo
653 653
                         $autolaunch_exists = true;
654 654
                         $lp_auto_launch_icon = Display::url(
655 655
                             Display::return_icon('launch.png', get_lang('DisableLPAutoLaunch')),
656
-                            api_get_self() . '?' . api_get_cidreq() . "&action=auto_launch&status=0&lp_id=$id"
656
+                            api_get_self().'?'.api_get_cidreq()."&action=auto_launch&status=0&lp_id=$id"
657 657
                         );
658 658
                     } else {
659 659
                         $lp_auto_launch_icon = Display::url(
660 660
                             Display::return_icon('launch_na.png', get_lang('EnableLPAutoLaunch')),
661
-                            api_get_self() . '?' . api_get_cidreq() . "&action=auto_launch&status=1&lp_id=$id"
661
+                            api_get_self().'?'.api_get_cidreq()."&action=auto_launch&status=1&lp_id=$id"
662 662
                         );
663 663
                     }
664 664
                 }
@@ -671,7 +671,7 @@  discard block
 block discarded – undo
671 671
                         '',
672 672
                         ICON_SIZE_SMALL
673 673
                     ),
674
-                    api_get_self() . '?' . api_get_cidreq() . "&action=export_to_pdf&lp_id=$id"
674
+                    api_get_self().'?'.api_get_cidreq()."&action=export_to_pdf&lp_id=$id"
675 675
                 );
676 676
 
677 677
                 /* Delete */
@@ -683,8 +683,8 @@  discard block
 block discarded – undo
683 683
                             '',
684 684
                             ICON_SIZE_SMALL
685 685
                         ),
686
-                        'lp_controller.php?' . api_get_cidreq() . "&action=delete&lp_id=$id",
687
-                        ['onclick' => "javascript: return confirmation('" . addslashes($name) . "');"]
686
+                        'lp_controller.php?'.api_get_cidreq()."&action=delete&lp_id=$id",
687
+                        ['onclick' => "javascript: return confirmation('".addslashes($name)."');"]
688 688
                     );
689 689
                 } else {
690 690
                     $dsp_delete = Display::return_icon(
@@ -701,23 +701,23 @@  discard block
 block discarded – undo
701 701
                     if ($details['lp_display_order'] == 1 && $max != 1) {
702 702
                         $dsp_order .= Display::url(
703 703
                             Display::return_icon('down.png', get_lang('MoveDown'), '', ICON_SIZE_SMALL),
704
-                            "lp_controller.php?" . api_get_cidreq() . "&action=move_lp_down&lp_id=$id"
704
+                            "lp_controller.php?".api_get_cidreq()."&action=move_lp_down&lp_id=$id"
705 705
                         );
706 706
                     } elseif ($current == $max - 1 && $max != 1) {
707 707
                         $dsp_order .= Display::url(
708 708
                             Display::return_icon('up.png', get_lang('MoveUp'), '', ICON_SIZE_SMALL),
709
-                            "lp_controller.php?" . api_get_cidreq() . "&action=move_lp_up&lp_id=$id"
709
+                            "lp_controller.php?".api_get_cidreq()."&action=move_lp_up&lp_id=$id"
710 710
                         );
711 711
                     } elseif ($max == 1) {
712 712
                         $dsp_order = '';
713 713
                     } else {
714 714
                         $dsp_order .= Display::url(
715 715
                             Display::return_icon('down.png', get_lang('MoveDown'), '', ICON_SIZE_SMALL),
716
-                            "lp_controller.php?" . api_get_cidreq() . "&action=move_lp_down&lp_id=$id"
716
+                            "lp_controller.php?".api_get_cidreq()."&action=move_lp_down&lp_id=$id"
717 717
                         );
718 718
                         $dsp_order .= Display::url(
719 719
                             Display::return_icon('up.png', get_lang('MoveUp'), '', ICON_SIZE_SMALL),
720
-                            "lp_controller.php?" . api_get_cidreq() . "&action=move_lp_up&lp_id=$id"
720
+                            "lp_controller.php?".api_get_cidreq()."&action=move_lp_up&lp_id=$id"
721 721
                         );
722 722
                     }
723 723
                 }
@@ -733,7 +733,7 @@  discard block
 block discarded – undo
733 733
                     if ($details['seriousgame_mode'] == 0) {
734 734
                         $actionSeriousGame = Display::toolbarButton(
735 735
                             null,
736
-                            api_get_self() . '?' . api_get_cidreq() . "&lp_id=$id&action=toggle_seriousgame",
736
+                            api_get_self().'?'.api_get_cidreq()."&lp_id=$id&action=toggle_seriousgame",
737 737
                             'trophy',
738 738
                             'default',
739 739
                             [
@@ -744,7 +744,7 @@  discard block
 block discarded – undo
744 744
                     } else {
745 745
                         $actionSeriousGame = Display::toolbarButton(
746 746
                             null,
747
-                            api_get_self() . '?' . api_get_cidreq() . "&lp_id=$id&action=toggle_seriousgame",
747
+                            api_get_self().'?'.api_get_cidreq()."&lp_id=$id&action=toggle_seriousgame",
748 748
                             'trophy',
749 749
                             'warning',
750 750
                             [
@@ -758,7 +758,7 @@  discard block
 block discarded – undo
758 758
                 // Student
759 759
                 $export_icon = Display::url(
760 760
                     Display::return_icon('pdf.png', get_lang('ExportToPDF'), '', ICON_SIZE_SMALL),
761
-                    api_get_self() . '?' . api_get_cidreq() . "&action=export_to_pdf&lp_id=$id"
761
+                    api_get_self().'?'.api_get_cidreq()."&action=export_to_pdf&lp_id=$id"
762 762
                 );
763 763
             }
764 764
 
Please login to merge, or discard this patch.
main/inc/lib/add_courses_to_session_functions.lib.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -21,7 +21,7 @@  discard block
 block discarded – undo
21 21
 		$course_title = null;
22 22
 		$xajax_response = new xajaxResponse();
23 23
 		$return = '';
24
-		if(!empty($needle) && !empty($type)) {
24
+		if (!empty($needle) && !empty($type)) {
25 25
 			// xajax send utf8 datas... datas in db can be non-utf8 datas
26 26
 			$charset = api_get_system_encoding();
27 27
 			$needle = api_convert_encoding($needle, $charset, 'utf-8');
@@ -38,7 +38,7 @@  discard block
 block discarded – undo
38 38
 					while ($row = Database::fetch_row($res)) {
39 39
 						$course_codes .= '\''.$row[0].'\',';
40 40
 					}
41
-					$course_codes = substr($course_codes,0,(strlen($course_codes)-1));
41
+					$course_codes = substr($course_codes, 0, (strlen($course_codes) - 1));
42 42
 
43 43
 					$cond_course_code = ' AND course.id NOT IN('.$course_codes.') ';
44 44
 				}
@@ -69,9 +69,9 @@  discard block
 block discarded – undo
69 69
 			if (api_is_multiple_url_enabled()) {
70 70
 				$tbl_course_rel_access_url = Database::get_main_table(TABLE_MAIN_ACCESS_URL_REL_COURSE);
71 71
 				$access_url_id = api_get_current_access_url_id();
72
-				if ($access_url_id != -1){
72
+				if ($access_url_id != -1) {
73 73
 
74
-					if ($type=='single') {
74
+					if ($type == 'single') {
75 75
 						$sql = 'SELECT
76 76
                                     course.id,
77 77
 						            course.visual_code,
@@ -104,19 +104,19 @@  discard block
 block discarded – undo
104 104
             if ($type == 'single') {
105 105
 				while ($course = Database :: fetch_array($rs)) {
106 106
 					$course_list[] = $course['code'];
107
-					$course_title=str_replace("'","\'",$course_title);
107
+					$course_title = str_replace("'", "\'", $course_title);
108 108
                     $return .= '<a href="javascript: void(0);" onclick="javascript: add_course_to_session(\''.$course['id'].'\',\''.$course_title.' ('.$course['visual_code'].')'.'\')">'.$course['title'].' ('.$course['visual_code'].')</a><br />';
109 109
 				}
110
-				$xajax_response -> addAssign('ajax_list_courses_single','innerHTML',api_utf8_encode($return));
110
+				$xajax_response -> addAssign('ajax_list_courses_single', 'innerHTML', api_utf8_encode($return));
111 111
 			} else {
112 112
 				$return .= '<select id="origin" name="NoSessionCoursesList[]" multiple="multiple" size="20" style="width:340px;">';
113
-				while($course = Database :: fetch_array($rs)) {
113
+				while ($course = Database :: fetch_array($rs)) {
114 114
 					$course_list[] = $course['code'];
115
-					$course_title=str_replace("'","\'",$course_title);
116
-                    $return .= '<option value="'.$course['id'].'" title="'.htmlspecialchars($course['title'].' ('.$course['visual_code'].')',ENT_QUOTES).'">'.$course['title'].' ('.$course['visual_code'].')</option>';
115
+					$course_title = str_replace("'", "\'", $course_title);
116
+                    $return .= '<option value="'.$course['id'].'" title="'.htmlspecialchars($course['title'].' ('.$course['visual_code'].')', ENT_QUOTES).'">'.$course['title'].' ('.$course['visual_code'].')</option>';
117 117
 				}
118 118
 				$return .= '</select>';
119
-				$xajax_response -> addAssign('ajax_list_courses_multiple','innerHTML',api_utf8_encode($return));
119
+				$xajax_response -> addAssign('ajax_list_courses_multiple', 'innerHTML', api_utf8_encode($return));
120 120
 			}
121 121
 		}
122 122
 		$_SESSION['course_list'] = $course_list;
Please login to merge, or discard this patch.
main/exercise/hotpotatoes_exercise_report.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -73,11 +73,11 @@  discard block
 block discarded – undo
73 73
     // the form
74 74
     if (api_is_platform_admin() || api_is_course_admin() || api_is_course_tutor() || api_is_course_coach()) {
75 75
         $actions .= '<a id="export_opener" href="'.api_get_self().'?export_report=1&path='.$hotpotatoes_path.' ">'.
76
-            Display::return_icon('save.png',   get_lang('Export'),'',ICON_SIZE_MEDIUM).'</a>';
76
+            Display::return_icon('save.png', get_lang('Export'), '', ICON_SIZE_MEDIUM).'</a>';
77 77
     }
78 78
 } else {
79
-    $actions .= '<a href="exercise.php">' .
80
-        Display :: return_icon('back.png', get_lang('GoBackToQuestionList'),'',ICON_SIZE_MEDIUM).'</a>';
79
+    $actions .= '<a href="exercise.php">'.
80
+        Display :: return_icon('back.png', get_lang('GoBackToQuestionList'), '', ICON_SIZE_MEDIUM).'</a>';
81 81
 }
82 82
 
83 83
 if ($is_allowedToEdit) {
@@ -99,13 +99,13 @@  discard block
 block discarded – undo
99 99
 
100 100
 if ($is_allowedToEdit || $is_tutor) {
101 101
     $nameTools = get_lang('StudentScore');
102
-    $interbreadcrumb[] = array("url" => "exercise.php","name" => get_lang('Exercises'));
102
+    $interbreadcrumb[] = array("url" => "exercise.php", "name" => get_lang('Exercises'));
103 103
     $objExerciseTmp = new Exercise();
104 104
     /*if ($objExerciseTmp->read($exercise_id)) {
105 105
         $interbreadcrumb[] = array("url" => "admin.php?exerciseId=".$exercise_id, "name" => $objExerciseTmp->name);
106 106
     }*/
107 107
 } else {
108
-    $interbreadcrumb[] = array("url" => "exercise.php","name" => get_lang('Exercises'));
108
+    $interbreadcrumb[] = array("url" => "exercise.php", "name" => get_lang('Exercises'));
109 109
     $objExerciseTmp = new Exercise();
110 110
     /*if ($objExerciseTmp->read($exercise_id)) {
111 111
         $nameTools = get_lang('Results').': '.$objExerciseTmp->name;
@@ -168,7 +168,7 @@  discard block
 block discarded – undo
168 168
 // Generating group list
169 169
 
170 170
 $group_list = GroupManager::get_group_list();
171
-$group_parameters = array('group_all:'.get_lang('All'),'group_none:'.get_lang('None'));
171
+$group_parameters = array('group_all:'.get_lang('All'), 'group_none:'.get_lang('None'));
172 172
 
173 173
 foreach ($group_list as $group) {
174 174
     $group_parameters[] = $group['id'].':'.$group['name'];
Please login to merge, or discard this patch.
main/group/group.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -22,7 +22,7 @@  discard block
 block discarded – undo
22 22
 $userId = api_get_user_id();
23 23
 
24 24
 $this_section = SECTION_COURSES;
25
-$current_course_tool  = TOOL_GROUP;
25
+$current_course_tool = TOOL_GROUP;
26 26
 
27 27
 // Notice for unauthorized people.
28 28
 api_protect_course_script(true);
@@ -170,7 +170,7 @@  discard block
 block discarded – undo
170 170
         Display::return_icon('add-groups.png', get_lang('NewGroupCreate'), '', ICON_SIZE_MEDIUM).'</a>';
171 171
 
172 172
     if (api_get_setting('allow_group_categories') === 'true') {
173
-        $actionsLeft .=  '<a href="group_category.php?'.api_get_cidreq().'&action=add_category">'.
173
+        $actionsLeft .= '<a href="group_category.php?'.api_get_cidreq().'&action=add_category">'.
174 174
             Display::return_icon('new_folder.png', get_lang('AddCategory'), '', ICON_SIZE_MEDIUM).'</a>';
175 175
     } else {
176 176
         $actionsLeft .= '<a href="group_category.php?'.api_get_cidreq().'&id=2">'.
@@ -225,7 +225,7 @@  discard block
 block discarded – undo
225 225
         $actions = null;
226 226
         if (api_is_allowed_to_edit(false, true) && !empty($categoryId)) {
227 227
             $actions .= '<a href="group_category.php?'.api_get_cidreq().'&id='.$categoryId.'" title="'.get_lang('Edit').'">'.
228
-                Display::return_icon('edit.png', get_lang('EditGroup'),'',ICON_SIZE_SMALL).'</a>';
228
+                Display::return_icon('edit.png', get_lang('EditGroup'), '', ICON_SIZE_SMALL).'</a>';
229 229
             $actions .=
230 230
                 Display::url(
231 231
                     Display::return_icon('delete.png', get_lang('Delete'), '', ICON_SIZE_SMALL),
@@ -235,17 +235,17 @@  discard block
 block discarded – undo
235 235
                     )
236 236
                 );
237 237
             if ($index != 0) {
238
-                $actions .=  ' <a href="group.php?'.api_get_cidreq().'&action=swap_cat_order&id1='.$categoryId.'&id2='.$group_cats[$index -1]['id'].'">'.
239
-                    Display::return_icon('up.png','&nbsp;','',ICON_SIZE_SMALL).'</a>';
238
+                $actions .= ' <a href="group.php?'.api_get_cidreq().'&action=swap_cat_order&id1='.$categoryId.'&id2='.$group_cats[$index - 1]['id'].'">'.
239
+                    Display::return_icon('up.png', '&nbsp;', '', ICON_SIZE_SMALL).'</a>';
240 240
             }
241 241
             if ($index != count($group_cats) - 1) {
242
-                $actions .= ' <a href="group.php?'.api_get_cidreq().'&action=swap_cat_order&id1='.$categoryId.'&id2='.$group_cats[$index +1]['id'].'">'.
243
-                    Display::return_icon('down.png','&nbsp;','',ICON_SIZE_SMALL).'</a>';
242
+                $actions .= ' <a href="group.php?'.api_get_cidreq().'&action=swap_cat_order&id1='.$categoryId.'&id2='.$group_cats[$index + 1]['id'].'">'.
243
+                    Display::return_icon('down.png', '&nbsp;', '', ICON_SIZE_SMALL).'</a>';
244 244
             }
245 245
         }
246 246
 
247 247
         echo Display::page_header(
248
-            Security::remove_XSS($category['title'].' '. $label.' ').$actions,
248
+            Security::remove_XSS($category['title'].' '.$label.' ').$actions,
249 249
             null,
250 250
             'h4',
251 251
             false
Please login to merge, or discard this patch.