Completed
Push — 1.11.x ( 78f130...f6f5c2 )
by José
50:40 queued 24:26
created
plugin/vchamilo/views/editinstance.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -26,10 +26,10 @@
 block discarded – undo
26 26
 if ($id) {
27 27
     $mode = 'update';
28 28
 } else {
29
-    $mode = $registeronly ? 'register' : 'add' ;
29
+    $mode = $registeronly ? 'register' : 'add';
30 30
 }
31 31
 
32
-$vhost = (array)  Virtual::getInstance($id);
32
+$vhost = (array) Virtual::getInstance($id);
33 33
 
34 34
 $form = new InstanceForm($plugin, $mode, $vhost);
35 35
 
Please login to merge, or discard this patch.
main/calendar/ical_export.php 2 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -43,7 +43,7 @@
 block discarded – undo
43 43
 $event = $agenda->get_event($id);
44 44
 
45 45
 if (!empty($event)) {
46
-	define('ICAL_LANG', api_get_language_isocode());
46
+    define('ICAL_LANG', api_get_language_isocode());
47 47
 
48 48
     $ical = new vcalendar();
49 49
     $ical->setConfig('unique_id',api_get_path(WEB_PATH));
Please login to merge, or discard this 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/upload/upload_ppt.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -19,9 +19,9 @@  discard block
 block discarded – undo
19 19
     if (isset($_FILES['user_file'])) {
20 20
         $allowed_extensions = array('odp', 'sxi', 'ppt', 'pps', 'sxd', 'pptx');
21 21
         if (in_array(strtolower(pathinfo($_FILES['user_file']['name'], PATHINFO_EXTENSION)), $allowed_extensions)) {
22
-            require_once api_get_path(SYS_CODE_PATH) . 'lp/lp_upload.php';
22
+            require_once api_get_path(SYS_CODE_PATH).'lp/lp_upload.php';
23 23
             if (isset($o_ppt) && $first_item_id != 0) {
24
-                if (api_get_setting('search_enabled')=='true') {
24
+                if (api_get_setting('search_enabled') == 'true') {
25 25
                     require_once api_get_path(LIBRARY_PATH).'specific_fields_manager.lib.php';
26 26
                     $specific_fields = get_specific_field_list();
27 27
                     foreach ($specific_fields as $specific_field) {
@@ -60,7 +60,7 @@  discard block
 block discarded – undo
60 60
     api_not_allowed(true);
61 61
 }
62 62
 
63
-$interbreadcrumb[]= array ("url"=>"../lp/lp_controller.php?action=list", "name"=> get_lang("Doc"));
63
+$interbreadcrumb[] = array("url"=>"../lp/lp_controller.php?action=list", "name"=> get_lang("Doc"));
64 64
 
65 65
 $nameTools = get_lang("OogieConversionPowerPoint");
66 66
 Display :: display_header($nameTools);
@@ -72,7 +72,7 @@  discard block
 block discarded – undo
72 72
 
73 73
 $div_upload_limit = get_lang('UploadMaxSize').' : '.ini_get('post_max_size');
74 74
 
75
-$form = new FormValidator('upload_ppt', 'POST', '?' . api_get_cidreq(), '');
75
+$form = new FormValidator('upload_ppt', 'POST', '?'.api_get_cidreq(), '');
76 76
 $form->addElement('header', get_lang("WelcomeOogieSubtitle"));
77 77
 $form->addElement('html', Display::return_message($message, 'info', false));
78 78
 $form->addElement('file', 'user_file', array(Display::return_icon('powerpoint_big.gif'), $div_upload_limit));
@@ -80,7 +80,7 @@  discard block
 block discarded – undo
80 80
 $options = apiGetDocumentConversionSizes();
81 81
 $form->addElement('select', 'slide_size', get_lang('SlideSize'), $options);
82 82
 if (api_get_setting('search_enabled') == 'true') {
83
-    require_once(api_get_path(LIBRARY_PATH) . 'specific_fields_manager.lib.php');
83
+    require_once(api_get_path(LIBRARY_PATH).'specific_fields_manager.lib.php');
84 84
     $specific_fields = get_specific_field_list();
85 85
     $form->addElement('checkbox', 'index_document', '', get_lang('SearchFeatureDoIndexDocument'));
86 86
     $form->addElement('select_language', 'language', get_lang('SearchFeatureDocumentLanguage'));
Please login to merge, or discard this patch.
main/inc/lib/add_courses_to_session_functions.lib.php 2 patches
Indentation   +67 added lines, -67 removed lines patch added patch discarded remove patch
@@ -6,47 +6,47 @@  discard block
 block discarded – undo
6 6
  */
7 7
 class AddCourseToSession
8 8
 {
9
-	/**
10
-	 * Searches a course, given a search string and a type of search box
11
-	 * @param string $needle Search string
12
-	 * @param string $type Type of search box ('single' or anything else)
13
-	 * @return xajaxResponse XajaxResponse
14
-	 * @assert ('abc', 'single') !== null
15
-	 * @assert ('abc', 'multiple') !== null
16
-	 */
17
-	public static function search_courses($needle, $type)
18
-	{
19
-		global $tbl_session_rel_course, $id_session;
9
+    /**
10
+     * Searches a course, given a search string and a type of search box
11
+     * @param string $needle Search string
12
+     * @param string $type Type of search box ('single' or anything else)
13
+     * @return xajaxResponse XajaxResponse
14
+     * @assert ('abc', 'single') !== null
15
+     * @assert ('abc', 'multiple') !== null
16
+     */
17
+    public static function search_courses($needle, $type)
18
+    {
19
+        global $tbl_session_rel_course, $id_session;
20 20
         $tbl_course = Database::get_main_table(TABLE_MAIN_COURSE);
21
-		$course_title = null;
22
-		$xajax_response = new xajaxResponse();
23
-		$return = '';
24
-		if(!empty($needle) && !empty($type)) {
25
-			// xajax send utf8 datas... datas in db can be non-utf8 datas
26
-			$charset = api_get_system_encoding();
27
-			$needle = api_convert_encoding($needle, $charset, 'utf-8');
21
+        $course_title = null;
22
+        $xajax_response = new xajaxResponse();
23
+        $return = '';
24
+        if(!empty($needle) && !empty($type)) {
25
+            // xajax send utf8 datas... datas in db can be non-utf8 datas
26
+            $charset = api_get_system_encoding();
27
+            $needle = api_convert_encoding($needle, $charset, 'utf-8');
28 28
 
29
-			$cond_course_code = '';
30
-			if (!empty($id_session)) {
31
-				$id_session = intval($id_session);
32
-				// check course_code from session_rel_course table
33
-				$sql = 'SELECT c_id FROM '.$tbl_session_rel_course.'
29
+            $cond_course_code = '';
30
+            if (!empty($id_session)) {
31
+                $id_session = intval($id_session);
32
+                // check course_code from session_rel_course table
33
+                $sql = 'SELECT c_id FROM '.$tbl_session_rel_course.'
34 34
 						WHERE session_id = '.$id_session;
35
-				$res = Database::query($sql);
36
-				$course_codes = '';
37
-				if (Database::num_rows($res) > 0) {
38
-					while ($row = Database::fetch_row($res)) {
39
-						$course_codes .= '\''.$row[0].'\',';
40
-					}
41
-					$course_codes = substr($course_codes,0,(strlen($course_codes)-1));
35
+                $res = Database::query($sql);
36
+                $course_codes = '';
37
+                if (Database::num_rows($res) > 0) {
38
+                    while ($row = Database::fetch_row($res)) {
39
+                        $course_codes .= '\''.$row[0].'\',';
40
+                    }
41
+                    $course_codes = substr($course_codes,0,(strlen($course_codes)-1));
42 42
 
43
-					$cond_course_code = ' AND course.id NOT IN('.$course_codes.') ';
44
-				}
45
-			}
43
+                    $cond_course_code = ' AND course.id NOT IN('.$course_codes.') ';
44
+                }
45
+            }
46 46
 
47 47
             if ($type == 'single') {
48
-				// search users where username or firstname or lastname begins likes $needle
49
-				$sql = 'SELECT
48
+                // search users where username or firstname or lastname begins likes $needle
49
+                $sql = 'SELECT
50 50
                             course.id,
51 51
 						 	course.visual_code,
52 52
 						 	course.title,
@@ -58,21 +58,21 @@  discard block
 block discarded – undo
58 58
 						WHERE
59 59
 							course.visual_code LIKE "'.$needle.'%" OR
60 60
 							course.title LIKE "'.$needle.'%"';
61
-			} else {
61
+            } else {
62 62
                 $sql = 'SELECT course.id, course.visual_code, course.title
63 63
 						FROM '.$tbl_course.' course
64 64
 						WHERE
65 65
 							course.visual_code LIKE "'.$needle.'%" '.$cond_course_code.'
66 66
 						ORDER BY course.code ';
67
-			}
67
+            }
68 68
 
69
-			if (api_is_multiple_url_enabled()) {
70
-				$tbl_course_rel_access_url = Database::get_main_table(TABLE_MAIN_ACCESS_URL_REL_COURSE);
71
-				$access_url_id = api_get_current_access_url_id();
72
-				if ($access_url_id != -1){
69
+            if (api_is_multiple_url_enabled()) {
70
+                $tbl_course_rel_access_url = Database::get_main_table(TABLE_MAIN_ACCESS_URL_REL_COURSE);
71
+                $access_url_id = api_get_current_access_url_id();
72
+                if ($access_url_id != -1){
73 73
 
74
-					if ($type=='single') {
75
-						$sql = 'SELECT
74
+                    if ($type=='single') {
75
+                        $sql = 'SELECT
76 76
                                     course.id,
77 77
 						            course.visual_code,
78 78
 						            course.title,
@@ -87,7 +87,7 @@  discard block
 block discarded – undo
87 87
 									access_url_id = '.$access_url_id.' AND
88 88
 									(course.visual_code LIKE "'.$needle.'%" OR
89 89
 									course.title LIKE "'.$needle.'%" )';
90
-					} else {
90
+                    } else {
91 91
                         $sql = 'SELECT course.id, course.visual_code, course.title
92 92
 								FROM '.$tbl_course.' course, '.$tbl_course_rel_access_url.' url_course
93 93
 								WHERE
@@ -95,32 +95,32 @@  discard block
 block discarded – undo
95 95
 									access_url_id = '.$access_url_id.' AND
96 96
 									course.visual_code LIKE "'.$needle.'%" '.$cond_course_code.'
97 97
 								ORDER BY course.code ';
98
-					}
99
-				}
100
-			}
98
+                    }
99
+                }
100
+            }
101 101
 
102
-			$rs = Database::query($sql);
103
-			$course_list = array();
102
+            $rs = Database::query($sql);
103
+            $course_list = array();
104 104
             if ($type == 'single') {
105
-				while ($course = Database :: fetch_array($rs)) {
106
-					$course_list[] = $course['code'];
107
-					$course_title=str_replace("'","\'",$course_title);
105
+                while ($course = Database :: fetch_array($rs)) {
106
+                    $course_list[] = $course['code'];
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
-				}
110
-				$xajax_response -> addAssign('ajax_list_courses_single','innerHTML',api_utf8_encode($return));
111
-			} else {
112
-				$return .= '<select id="origin" name="NoSessionCoursesList[]" multiple="multiple" size="20" style="width:340px;">';
113
-				while($course = Database :: fetch_array($rs)) {
114
-					$course_list[] = $course['code'];
115
-					$course_title=str_replace("'","\'",$course_title);
109
+                }
110
+                $xajax_response -> addAssign('ajax_list_courses_single','innerHTML',api_utf8_encode($return));
111
+            } else {
112
+                $return .= '<select id="origin" name="NoSessionCoursesList[]" multiple="multiple" size="20" style="width:340px;">';
113
+                while($course = Database :: fetch_array($rs)) {
114
+                    $course_list[] = $course['code'];
115
+                    $course_title=str_replace("'","\'",$course_title);
116 116
                     $return .= '<option value="'.$course['id'].'" title="'.htmlspecialchars($course['title'].' ('.$course['visual_code'].')',ENT_QUOTES).'">'.$course['title'].' ('.$course['visual_code'].')</option>';
117
-				}
118
-				$return .= '</select>';
119
-				$xajax_response -> addAssign('ajax_list_courses_multiple','innerHTML',api_utf8_encode($return));
120
-			}
121
-		}
122
-		$_SESSION['course_list'] = $course_list;
117
+                }
118
+                $return .= '</select>';
119
+                $xajax_response -> addAssign('ajax_list_courses_multiple','innerHTML',api_utf8_encode($return));
120
+            }
121
+        }
122
+        $_SESSION['course_list'] = $course_list;
123 123
 
124
-		return $xajax_response;
125
-	}
124
+        return $xajax_response;
125
+    }
126 126
 }
Please login to merge, or discard this 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.
plugin/bbb/start.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -4,7 +4,7 @@  discard block
 block discarded – undo
4 4
  * @package chamilo.plugin.bigbluebutton
5 5
  */
6 6
 
7
-require __DIR__ . '/../../vendor/autoload.php';
7
+require __DIR__.'/../../vendor/autoload.php';
8 8
 
9 9
 $course_plugin = 'bbb'; //needed in order to load the plugin lang variables
10 10
 require_once __DIR__.'/config.php';
@@ -16,7 +16,7 @@  discard block
 block discarded – undo
16 16
 $host = '';
17 17
 $salt = '';
18 18
 $isGlobal = isset($_GET['global']) ? true : false;
19
-$isGlobalPerUser = isset($_GET['user_id']) ? (int) $_GET['user_id']: false;
19
+$isGlobalPerUser = isset($_GET['user_id']) ? (int) $_GET['user_id'] : false;
20 20
 $bbb = new bbb('', '', $isGlobal, $isGlobalPerUser);
21 21
 
22 22
 if ($bbb->pluginEnabled) {
@@ -24,16 +24,16 @@  discard block
 block discarded – undo
24 24
 
25 25
         if (isset($_GET['launch']) && $_GET['launch'] == 1) {
26 26
 
27
-            if (file_exists(__DIR__ . '/config.vm.php')) {
28
-                $config = require __DIR__ . '/config.vm.php';
27
+            if (file_exists(__DIR__.'/config.vm.php')) {
28
+                $config = require __DIR__.'/config.vm.php';
29 29
                 $vmIsEnabled = true;
30 30
                 $host = '';
31 31
                 $salt = '';
32 32
 
33
-                require __DIR__ . '/lib/vm/AbstractVM.php';
34
-                require __DIR__ . '/lib/vm/VMInterface.php';
35
-                require __DIR__ . '/lib/vm/DigitalOceanVM.php';
36
-                require __DIR__ . '/lib/VM.php';
33
+                require __DIR__.'/lib/vm/AbstractVM.php';
34
+                require __DIR__.'/lib/vm/VMInterface.php';
35
+                require __DIR__.'/lib/vm/DigitalOceanVM.php';
36
+                require __DIR__.'/lib/VM.php';
37 37
 
38 38
                 $vm = new VM($config);
39 39
 
@@ -69,7 +69,7 @@  discard block
 block discarded – undo
69 69
             }
70 70
         } else {
71 71
             $url = $bbb->getListingUrl();
72
-            header('Location: ' . $url);
72
+            header('Location: '.$url);
73 73
             exit;
74 74
         }
75 75
     } else {
Please login to merge, or discard this patch.
main/exercise/hotpotatoes_exercise_report.php 2 patches
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -44,7 +44,7 @@  discard block
 block discarded – undo
44 44
 }
45 45
 
46 46
 if (!$is_allowedToEdit) {
47
-   // api_not_allowed();
47
+    // api_not_allowed();
48 48
 }
49 49
 
50 50
 if (!empty($_REQUEST['path'])) {
@@ -189,8 +189,8 @@  discard block
 block discarded – undo
189 189
         get_lang('Actions')
190 190
     );
191 191
 
192
-  // Column config
193
-  // @todo fix search firstname/lastname that doesn't work. rmove search for the moment
192
+    // Column config
193
+    // @todo fix search firstname/lastname that doesn't work. rmove search for the moment
194 194
     $column_model = array(
195 195
         array('name' => 'firstname', 'index' => 'firstname', 'width' => '50', 'align' => 'left', 'search' => 'false'),
196 196
         array(
Please login to merge, or discard this 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/work/work.php 1 patch
Spacing   +10 added lines, -10 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_STUDENTPUBLICATION;
11
+$current_course_tool = TOOL_STUDENTPUBLICATION;
12 12
 
13 13
 api_protect_course_script(true);
14 14
 
@@ -38,7 +38,7 @@  discard block
 block discarded – undo
38 38
 $item_id = isset($_REQUEST['item_id']) ? intval($_REQUEST['item_id']) : null;
39 39
 $origin = isset($_REQUEST['origin']) ? Security::remove_XSS($_REQUEST['origin']) : '';
40 40
 $course_dir = api_get_path(SYS_COURSE_PATH).$courseInfo['path'];
41
-$base_work_dir = $course_dir . '/work';
41
+$base_work_dir = $course_dir.'/work';
42 42
 $action = isset($_REQUEST['action']) ? $_REQUEST['action'] : 'list';
43 43
 
44 44
 //Download folder
@@ -75,7 +75,7 @@  discard block
 block discarded – undo
75 75
         'url' => api_get_path(WEB_CODE_PATH).'work/work.php?'.api_get_cidreq(),
76 76
         'name' => get_lang('StudentPublications'),
77 77
     );
78
-    $url_dir = api_get_path(WEB_CODE_PATH).'work/work.php?&id=' . $work_id.'&'.api_get_cidreq();
78
+    $url_dir = api_get_path(WEB_CODE_PATH).'work/work.php?&id='.$work_id.'&'.api_get_cidreq();
79 79
     if (!empty($my_folder_data)) {
80 80
         $interbreadcrumb[] = array('url' => $url_dir, 'name' =>  $my_folder_data['title']);
81 81
     }
@@ -118,7 +118,7 @@  discard block
 block discarded – undo
118 118
             $interbreadcrumb[] = array('url' => '#', 'name' => get_lang('EditToolOptions'));
119 119
         }
120 120
         if ($action == 'create_dir') {
121
-            $interbreadcrumb[] = array('url' => '#','name' => get_lang('CreateAssignment'));
121
+            $interbreadcrumb[] = array('url' => '#', 'name' => get_lang('CreateAssignment'));
122 122
         }
123 123
     }
124 124
 }
@@ -168,7 +168,7 @@  discard block
 block discarded – undo
168 168
         $form = new FormValidator(
169 169
             'form1',
170 170
             'post',
171
-            api_get_path(WEB_CODE_PATH) . 'work/work.php?action=create_dir&' . api_get_cidreq()
171
+            api_get_path(WEB_CODE_PATH).'work/work.php?action=create_dir&'.api_get_cidreq()
172 172
         );
173 173
         $form->addElement('header', get_lang('CreateAssignment'));
174 174
         $form->addElement('hidden', 'action', 'add');
@@ -205,7 +205,7 @@  discard block
 block discarded – undo
205 205
             $result = deleteDirWork($_REQUEST['id']);
206 206
             if ($result) {
207 207
                 $message = Display::return_message(
208
-                    get_lang('DirDeleted') . ': ' . $work_to_delete['title'],
208
+                    get_lang('DirDeleted').': '.$work_to_delete['title'],
209 209
                     'success'
210 210
                 );
211 211
                 Display::addFlash($message);
@@ -236,16 +236,16 @@  discard block
 block discarded – undo
236 236
             if ($move_to_path == -1) {
237 237
                 $move_to_path = '/';
238 238
             } elseif (substr($move_to_path, -1, 1) != '/') {
239
-                $move_to_path = $move_to_path .'/';
239
+                $move_to_path = $move_to_path.'/';
240 240
             }
241 241
 
242 242
             // Security fix: make sure they can't move files that are not in the document table
243 243
             if ($path = get_work_path($item_id)) {
244
-                if (move($course_dir.'/'.$path, $base_work_dir . $move_to_path)) {
244
+                if (move($course_dir.'/'.$path, $base_work_dir.$move_to_path)) {
245 245
                     // Update db
246 246
                     updateWorkUrl(
247 247
                         $item_id,
248
-                        'work' . $move_to_path,
248
+                        'work'.$move_to_path,
249 249
                         $_REQUEST['move_to_id']
250 250
                     );
251 251
 
@@ -344,7 +344,7 @@  discard block
 block discarded – undo
344 344
             $content .= '</div>';
345 345
             $content .= '</div>';
346 346
             $content .= '<div id="student-list-work" style="display: none" class="table-responsive">';
347
-            $content .= '<div class="toolbar"><a id="closed-view-list" href="#"><em class="fa fa-times-circle"></em> ' .get_lang('Close'). '</a></div>';
347
+            $content .= '<div class="toolbar"><a id="closed-view-list" href="#"><em class="fa fa-times-circle"></em> '.get_lang('Close').'</a></div>';
348 348
             $content .= showStudentList($work_id);
349 349
             $content .= '</div>';
350 350
         } else {
Please login to merge, or discard this patch.
app/SymfonyRequirements.php 1 patch
Doc Comments   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -220,7 +220,7 @@  discard block
 block discarded – undo
220 220
      * Adds a mandatory requirement in form of a php.ini configuration.
221 221
      *
222 222
      * @param string        $cfgName           The configuration name used for ini_get()
223
-     * @param bool|callback $evaluation        Either a boolean indicating whether the configuration should evaluate to true or false,
223
+     * @param boolean|string $evaluation        Either a boolean indicating whether the configuration should evaluate to true or false,
224 224
      *                                         or a callback function receiving the configuration value as parameter to determine the fulfillment of the requirement
225 225
      * @param bool          $approveCfgAbsence If true the Requirement will be fulfilled even if the configuration option does not exist, i.e. ini_get() returns false.
226 226
      *                                         This is helpful for abandoned configs in later PHP versions or configs of an optional extension, like Suhosin.
@@ -238,7 +238,7 @@  discard block
 block discarded – undo
238 238
      * Adds an optional recommendation in form of a php.ini configuration.
239 239
      *
240 240
      * @param string        $cfgName           The configuration name used for ini_get()
241
-     * @param bool|callback $evaluation        Either a boolean indicating whether the configuration should evaluate to true or false,
241
+     * @param string|false $evaluation        Either a boolean indicating whether the configuration should evaluate to true or false,
242 242
      *                                         or a callback function receiving the configuration value as parameter to determine the fulfillment of the requirement
243 243
      * @param bool          $approveCfgAbsence If true the Requirement will be fulfilled even if the configuration option does not exist, i.e. ini_get() returns false.
244 244
      *                                         This is helpful for abandoned configs in later PHP versions or configs of an optional extension, like Suhosin.
Please login to merge, or discard this patch.