Completed
Push — master ( 5da9ea...eef579 )
by Angel Fernando Quiroz
50:18 queued 17:36
created
main/document/record_audio.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -80,7 +80,7 @@  discard block
 block discarded – undo
80 80
 
81 81
 //groups //TODO: clean
82 82
 if (!empty($groupId)) {
83
-    $interbreadcrumb[] = array ("url" => "../group/group_space.php?".api_get_cidreq(), "name" => get_lang('GroupSpace'));
83
+    $interbreadcrumb[] = array("url" => "../group/group_space.php?".api_get_cidreq(), "name" => get_lang('GroupSpace'));
84 84
     $noPHP_SELF = true;
85 85
     $group = GroupManager :: get_group_properties($groupId);
86 86
     $path = explode('/', $dir);
@@ -144,8 +144,8 @@  discard block
 block discarded – undo
144 144
 $htmlHeadXtra[] = api_get_js('js/swfobject/swfobject.js');
145 145
 
146 146
 $actions = Display::toolbarButton(
147
-    get_lang('BackTo') . ' ' . get_lang('DocumentsOverview'),
148
-    'document.php?' . api_get_cidreq() . "&id=$document_id",
147
+    get_lang('BackTo').' '.get_lang('DocumentsOverview'),
148
+    'document.php?'.api_get_cidreq()."&id=$document_id",
149 149
     'arrow-left',
150 150
     'default',
151 151
     [],
Please login to merge, or discard this patch.
main/inc/lib/template.lib.php 1 patch
Spacing   +30 added lines, -30 removed lines patch added patch discarded remove patch
@@ -315,7 +315,7 @@  discard block
 block discarded – undo
315 315
                 $content = '<div class="help">';
316 316
                 $content .= Display::url(
317 317
                     Display::return_icon('help.large.png', get_lang('Help')),
318
-                    api_get_path(WEB_CODE_PATH) . 'help/help.php?open=' . $help,
318
+                    api_get_path(WEB_CODE_PATH).'help/help.php?open='.$help,
319 319
                     [
320 320
                         'class' => 'ajax',
321 321
                         'data-title' => get_lang('Help')
@@ -637,12 +637,12 @@  discard block
 block discarded – undo
637 637
         foreach ($bowerCSSFiles as $file) {
638 638
             $css[] = api_get_path(WEB_PATH).'web/assets/'.$file;
639 639
         }
640
-        $css[] = api_get_path(WEB_LIBRARY_PATH) . 'javascript/bootstrap-select/css/bootstrap-select.min.css';
641
-        $css[] = api_get_path(WEB_LIBRARY_PATH) . 'javascript/chosen/chosen.css';
642
-        $css[] = api_get_path(WEB_LIBRARY_PATH) . 'javascript/tag/style.css';
640
+        $css[] = api_get_path(WEB_LIBRARY_PATH).'javascript/bootstrap-select/css/bootstrap-select.min.css';
641
+        $css[] = api_get_path(WEB_LIBRARY_PATH).'javascript/chosen/chosen.css';
642
+        $css[] = api_get_path(WEB_LIBRARY_PATH).'javascript/tag/style.css';
643 643
 
644 644
         if (api_is_global_chat_enabled()) {
645
-            $css[] = api_get_path(WEB_LIBRARY_PATH) . 'javascript/chat/css/chat.css';
645
+            $css[] = api_get_path(WEB_LIBRARY_PATH).'javascript/chat/css/chat.css';
646 646
         }
647 647
 
648 648
         //THEME CSS STYLE
@@ -694,7 +694,7 @@  discard block
 block discarded – undo
694 694
 
695 695
         if (is_file(api_get_path(SYS_CSS_PATH).'themes/'.$this->theme.'/editor.css')) {
696 696
             $css[] = api_get_path(WEB_CSS_PATH).'themes/'.$this->theme.'/editor.css';
697
-        }else{
697
+        } else {
698 698
             $css[] = api_get_cdn_path(api_get_path(WEB_CSS_PATH).'editor.css');
699 699
         }
700 700
 
@@ -729,7 +729,7 @@  discard block
 block discarded – undo
729 729
 
730 730
             $style_print = '';
731 731
             if (is_readable(api_get_path(SYS_CSS_PATH).$this->theme.'/print.css')) {
732
-                $style_print = api_get_css(api_get_cdn_path(api_get_path(WEB_CSS_PATH) . $this->theme . '/print.css'),
732
+                $style_print = api_get_css(api_get_cdn_path(api_get_path(WEB_CSS_PATH).$this->theme.'/print.css'),
733 733
                     'print');
734 734
             }
735 735
             $this->assign('css_style_print', $style_print);
@@ -752,10 +752,10 @@  discard block
 block discarded – undo
752 752
 
753 753
         $isoCode = api_get_language_isocode();
754 754
 
755
-        $selectLink = 'bootstrap-select/js/i18n/defaults-' . $isoCode . '_' . strtoupper($isoCode) . '.min.js';
755
+        $selectLink = 'bootstrap-select/js/i18n/defaults-'.$isoCode.'_'.strtoupper($isoCode).'.min.js';
756 756
 
757 757
         if ($isoCode == 'en') {
758
-            $selectLink = 'bootstrap-select/js/i18n/defaults-' . $isoCode . '_US.min.js';
758
+            $selectLink = 'bootstrap-select/js/i18n/defaults-'.$isoCode.'_US.min.js';
759 759
         }
760 760
         // JS files
761 761
         $js_files = array(
@@ -808,8 +808,8 @@  discard block
 block discarded – undo
808 808
         }
809 809
 
810 810
         if ($isoCode != 'en') {
811
-            $bowerJsFiles[] = 'jqueryui-timepicker-addon/dist/i18n/jquery-ui-timepicker-' . $isoCode . '.js';
812
-            $bowerJsFiles[] = 'jquery-ui/ui/minified/i18n/datepicker-' . $isoCode . '.min.js';
811
+            $bowerJsFiles[] = 'jqueryui-timepicker-addon/dist/i18n/jquery-ui-timepicker-'.$isoCode.'.js';
812
+            $bowerJsFiles[] = 'jquery-ui/ui/minified/i18n/datepicker-'.$isoCode.'.min.js';
813 813
         }
814 814
 
815 815
         foreach ($bowerJsFiles as $file) {
@@ -958,14 +958,14 @@  discard block
 block discarded – undo
958 958
         $this->assign('section_name', 'section-'.$this_section);
959 959
 
960 960
         //Defaul root chamilo favicon
961
-        $favico = '<link rel="shortcut icon" href="' . api_get_path(WEB_PATH) . 'favicon.ico" type="image/x-icon" />';
961
+        $favico = '<link rel="shortcut icon" href="'.api_get_path(WEB_PATH).'favicon.ico" type="image/x-icon" />';
962 962
 
963 963
         //Added to verify if in the current Chamilo Theme exist a favicon
964
-        $favicoThemeUrl = api_get_path(SYS_CSS_PATH) . 'themes/' . $this->theme . '/images/';
964
+        $favicoThemeUrl = api_get_path(SYS_CSS_PATH).'themes/'.$this->theme.'/images/';
965 965
 
966 966
         //If exist pick the current chamilo theme favicon
967
-        if (is_file($favicoThemeUrl . 'favicon.ico')) {
968
-            $favico = '<link rel="shortcut icon" href="' . api_get_path(WEB_CSS_PATH). 'themes/' . $this->theme . '/images/favicon.ico" type="image/x-icon" />';
967
+        if (is_file($favicoThemeUrl.'favicon.ico')) {
968
+            $favico = '<link rel="shortcut icon" href="'.api_get_path(WEB_CSS_PATH).'themes/'.$this->theme.'/images/favicon.ico" type="image/x-icon" />';
969 969
         }
970 970
 
971 971
         if (api_is_multiple_url_enabled()) {
@@ -995,7 +995,7 @@  discard block
 block discarded – undo
995 995
         if (api_get_setting('show_link_bug_notification') == 'true' && $this->user_is_logged_in) {
996 996
             $rightFloatMenu = '<div class="report">
997 997
 		<a href="https://github.com/chamilo/chamilo-lms/wiki/How-to-report-issues" target="_blank">
998
-                    '. $iconBug . '
998
+                    '. $iconBug.'
999 999
                 </a>
1000 1000
 		</div>';
1001 1001
         }
@@ -1011,7 +1011,7 @@  discard block
 block discarded – undo
1011 1011
             $url = api_get_path(WEB_CODE_PATH).'ticket/tickets.php?project_id=1&'.$courseParams;
1012 1012
             $rightFloatMenu .= '<div class="report">
1013 1013
 		        <a href="'.$url.'" target="_blank">
1014
-                    '. $iconTicket . '
1014
+                    '. $iconTicket.'
1015 1015
                 </a>
1016 1016
 		    </div>';
1017 1017
         }
@@ -1118,7 +1118,7 @@  discard block
 block discarded – undo
1118 1118
 
1119 1119
         // Block Breadcrumb
1120 1120
         //$breadcrumb = return_breadcrumb($interbreadcrumb, $language_file, $nameTools);
1121
-        $breadcrumb  = '';
1121
+        $breadcrumb = '';
1122 1122
         $this->assign('breadcrumb', $breadcrumb);
1123 1123
 
1124 1124
         //Extra content
@@ -1138,13 +1138,13 @@  discard block
 block discarded – undo
1138 1138
         $socialMeta = '';
1139 1139
         $metaTitle = api_get_setting('meta_title');
1140 1140
         if (!empty($metaTitle)) {
1141
-            $socialMeta .= '<meta name="twitter:card" content="summary" />' . "\n";
1141
+            $socialMeta .= '<meta name="twitter:card" content="summary" />'."\n";
1142 1142
             $metaSite = api_get_setting('meta_twitter_site');
1143 1143
             if (!empty($metaSite)) {
1144
-                $socialMeta .= '<meta name="twitter:site" content="' . $metaSite . '" />' . "\n";
1144
+                $socialMeta .= '<meta name="twitter:site" content="'.$metaSite.'" />'."\n";
1145 1145
                 $metaCreator = api_get_setting('meta_twitter_creator');
1146 1146
                 if (!empty($metaCreator)) {
1147
-                    $socialMeta .= '<meta name="twitter:creator" content="' . $metaCreator . '" />' . "\n";
1147
+                    $socialMeta .= '<meta name="twitter:creator" content="'.$metaCreator.'" />'."\n";
1148 1148
                 }
1149 1149
             }
1150 1150
 
@@ -1156,19 +1156,19 @@  discard block
 block discarded – undo
1156 1156
             if (!$userId && !$skillId) {
1157 1157
                 // no combination of user and skill ID has been defined,
1158 1158
                 // so print the normal OpenGraph meta tags
1159
-                $socialMeta .= '<meta property="og:title" content="' . $metaTitle . '" />' . "\n";
1160
-                $socialMeta .= '<meta property="og:url" content="' . api_get_path(WEB_PATH) . '" />' . "\n";
1159
+                $socialMeta .= '<meta property="og:title" content="'.$metaTitle.'" />'."\n";
1160
+                $socialMeta .= '<meta property="og:url" content="'.api_get_path(WEB_PATH).'" />'."\n";
1161 1161
 
1162 1162
                 $metaDescription = api_get_setting('meta_description');
1163 1163
                 if (!empty($metaDescription)) {
1164
-                    $socialMeta .= '<meta property="og:description" content="' . $metaDescription . '" />' . "\n";
1164
+                    $socialMeta .= '<meta property="og:description" content="'.$metaDescription.'" />'."\n";
1165 1165
                 }
1166 1166
 
1167 1167
                 $metaImage = api_get_setting('meta_image_path');
1168 1168
                 if (!empty($metaImage)) {
1169
-                    if (is_file(api_get_path(SYS_PATH) . $metaImage)) {
1170
-                        $path = api_get_path(WEB_PATH) . $metaImage;
1171
-                        $socialMeta .= '<meta property="og:image" content="' . $path . '" />' . "\n";
1169
+                    if (is_file(api_get_path(SYS_PATH).$metaImage)) {
1170
+                        $path = api_get_path(WEB_PATH).$metaImage;
1171
+                        $socialMeta .= '<meta property="og:image" content="'.$path.'" />'."\n";
1172 1172
                     }
1173 1173
                 }
1174 1174
             }
@@ -1202,7 +1202,7 @@  discard block
 block discarded – undo
1202 1202
         // Tutor name
1203 1203
         if (api_get_setting('show_tutor_data') == 'true') {
1204 1204
             // Course manager
1205
-            $courseId  = api_get_course_int_id();
1205
+            $courseId = api_get_course_int_id();
1206 1206
             $id_session = api_get_session_id();
1207 1207
             if (!empty($courseId)) {
1208 1208
                 $tutor_data = '';
@@ -1234,7 +1234,7 @@  discard block
 block discarded – undo
1234 1234
             $courseId = api_get_course_int_id();
1235 1235
             if (!empty($courseId)) {
1236 1236
                 $teacher_data = '';
1237
-                $mail= CourseManager::get_emails_of_tutors_to_course($courseId);
1237
+                $mail = CourseManager::get_emails_of_tutors_to_course($courseId);
1238 1238
                 if (!empty($mail)) {
1239 1239
                     $teachers_parsed = array();
1240 1240
                     foreach ($mail as $value) {
@@ -1468,7 +1468,7 @@  discard block
 block discarded – undo
1468 1468
                     'sessionVar'   => basename(__FILE__, '.php'),
1469 1469
                     'imageOptions' => array(
1470 1470
                         'font_size' => 20,
1471
-                        'font_path' => api_get_path(SYS_FONTS_PATH) . 'opensans/',
1471
+                        'font_path' => api_get_path(SYS_FONTS_PATH).'opensans/',
1472 1472
                         'font_file' => 'OpenSans-Regular.ttf',
1473 1473
                         //'output' => 'gif'
1474 1474
                     )
Please login to merge, or discard this patch.
main/session/add_users_to_session.php 1 patch
Spacing   +34 added lines, -34 removed lines patch added patch discarded remove patch
@@ -102,13 +102,13 @@  discard block
 block discarded – undo
102 102
         if (api_is_session_admin() &&
103 103
             api_get_setting('prevent_session_admins_to_manage_all_users') === 'true'
104 104
         ) {
105
-            $order_clause = " AND user.creator_id = " . api_get_user_id() . $order_clause;
105
+            $order_clause = " AND user.creator_id = ".api_get_user_id().$order_clause;
106 106
         }
107 107
 
108 108
         $cond_user_id = '';
109 109
 
110 110
         // Only for single & multiple
111
-        if (in_array($type, array('single','multiple')))
111
+        if (in_array($type, array('single', 'multiple')))
112 112
         if (!empty($id_session)) {
113 113
             $id_session = intval($id_session);
114 114
             // check id_user from session_rel_user table
@@ -118,11 +118,11 @@  discard block
 block discarded – undo
118 118
             $user_ids = array();
119 119
             if (Database::num_rows($res) > 0) {
120 120
                 while ($row = Database::fetch_row($res)) {
121
-                    $user_ids[] = (int)$row[0];
121
+                    $user_ids[] = (int) $row[0];
122 122
                 }
123 123
             }
124 124
             if (count($user_ids) > 0) {
125
-                $cond_user_id = ' AND user.id NOT IN('.implode(",",$user_ids).')';
125
+                $cond_user_id = ' AND user.id NOT IN('.implode(",", $user_ids).')';
126 126
             }
127 127
         }
128 128
 
@@ -164,7 +164,7 @@  discard block
 block discarded – undo
164 164
         }
165 165
 
166 166
         if (api_is_multiple_url_enabled()) {
167
-            $tbl_user_rel_access_url= Database::get_main_table(TABLE_MAIN_ACCESS_URL_REL_USER);
167
+            $tbl_user_rel_access_url = Database::get_main_table(TABLE_MAIN_ACCESS_URL_REL_USER);
168 168
             $access_url_id = api_get_current_access_url_id();
169 169
             if ($access_url_id != -1) {
170 170
                 switch ($type) {
@@ -215,10 +215,10 @@  discard block
 block discarded – undo
215 215
 
216 216
         $rs = Database::query($sql);
217 217
         $i = 0;
218
-        if ($type=='single') {
218
+        if ($type == 'single') {
219 219
             while ($user = Database :: fetch_array($rs)) {
220 220
                 $i++;
221
-                if ($i<=10) {
221
+                if ($i <= 10) {
222 222
                     $person_name = $user['lastname'].' '.$user['firstname'].' ('.$user['username'].') '.$user['official_code'];
223 223
                     if ($showOfficialCode) {
224 224
                         $officialCode = !empty($user['official_code']) ? $user['official_code'].' - ' : '? - ';
@@ -231,7 +231,7 @@  discard block
 block discarded – undo
231 231
                 }
232 232
             }
233 233
 
234
-            $xajax_response -> addAssign('ajax_list_users_single','innerHTML',api_utf8_encode($return));
234
+            $xajax_response -> addAssign('ajax_list_users_single', 'innerHTML', api_utf8_encode($return));
235 235
         } else {
236 236
             global $nosessionUsersList;
237 237
             $return .= '<select id="origin_users" name="nosessionUsersList[]" multiple="multiple" size="15" style="width:360px;">';
@@ -244,7 +244,7 @@  discard block
 block discarded – undo
244 244
                 $return .= '<option value="'.$user['id'].'">'.$person_name.' </option>';
245 245
             }
246 246
             $return .= '</select>';
247
-            $xajax_response -> addAssign('ajax_list_users_multiple','innerHTML',api_utf8_encode($return));
247
+            $xajax_response -> addAssign('ajax_list_users_multiple', 'innerHTML', api_utf8_encode($return));
248 248
         }
249 249
     }
250 250
     return $xajax_response;
@@ -360,10 +360,10 @@  discard block
 block discarded – undo
360 360
             $order_clause";
361 361
 
362 362
     if (api_is_multiple_url_enabled()) {
363
-        $tbl_user_rel_access_url= Database::get_main_table(TABLE_MAIN_ACCESS_URL_REL_USER);
363
+        $tbl_user_rel_access_url = Database::get_main_table(TABLE_MAIN_ACCESS_URL_REL_USER);
364 364
         $access_url_id = api_get_current_access_url_id();
365 365
         if ($access_url_id != -1) {
366
-            $sql="SELECT u.id, lastname, firstname, username, session_id, official_code
366
+            $sql = "SELECT u.id, lastname, firstname, username, session_id, official_code
367 367
             FROM $tbl_user u
368 368
             INNER JOIN $tbl_session_rel_user
369 369
                 ON $tbl_session_rel_user.user_id = u.id AND
@@ -377,7 +377,7 @@  discard block
 block discarded – undo
377 377
     $result = Database::query($sql);
378 378
     $users = Database::store_result($result);
379 379
     foreach ($users as $user) {
380
-        $sessionUsersList[$user['id']] = $user ;
380
+        $sessionUsersList[$user['id']] = $user;
381 381
     }
382 382
 
383 383
     unset($users); //clean to free memory
@@ -395,12 +395,12 @@  discard block
 block discarded – undo
395 395
                     if (isset($_POST[$varname]) && $_POST[$varname] != '0') {
396 396
                         $use_extra_fields = true;
397 397
                         if ($fieldtype == ExtraField::FIELD_TYPE_TAG) {
398
-                            $extra_field_result[]= UserManager::get_extra_user_data_by_tags(
398
+                            $extra_field_result[] = UserManager::get_extra_user_data_by_tags(
399 399
                                 intval($_POST['field_id']),
400 400
                                 $_POST[$varname]
401 401
                             );
402 402
                         } else {
403
-                            $extra_field_result[]= UserManager::get_extra_user_data_by_value(
403
+                            $extra_field_result[] = UserManager::get_extra_user_data_by_value(
404 404
                                 $new_field['variable'],
405 405
                                 $_POST[$varname]
406 406
                             );
@@ -413,10 +413,10 @@  discard block
 block discarded – undo
413 413
 
414 414
     if ($use_extra_fields) {
415 415
         $final_result = array();
416
-       	if (count($extra_field_result)>1) {
417
-	    for($i=0;$i<count($extra_field_result)-1;$i++) {
418
-                if (is_array($extra_field_result[$i+1])) {
419
-                    $final_result  = array_intersect($extra_field_result[$i],$extra_field_result[$i+1]);
416
+       	if (count($extra_field_result) > 1) {
417
+	    for ($i = 0; $i < count($extra_field_result) - 1; $i++) {
418
+                if (is_array($extra_field_result[$i + 1])) {
419
+                    $final_result = array_intersect($extra_field_result[$i], $extra_field_result[$i + 1]);
420 420
                 }
421 421
             }
422 422
         } else {
@@ -424,14 +424,14 @@  discard block
 block discarded – undo
424 424
         }
425 425
 
426 426
         if (api_is_multiple_url_enabled()) {
427
-            if (is_array($final_result) && count($final_result)>0) {
428
-                $where_filter = " AND u.id IN  ('".implode("','",$final_result)."') ";
427
+            if (is_array($final_result) && count($final_result) > 0) {
428
+                $where_filter = " AND u.id IN  ('".implode("','", $final_result)."') ";
429 429
             } else {
430 430
                 //no results
431 431
                 $where_filter = " AND u.id  = -1";
432 432
             }
433 433
         } else {
434
-            if (is_array($final_result) && count($final_result)>0) {
434
+            if (is_array($final_result) && count($final_result) > 0) {
435 435
                 $where_filter = " WHERE u.id IN  ('".implode("','", $final_result)."') ";
436 436
             } else {
437 437
                 //no results
@@ -440,7 +440,7 @@  discard block
 block discarded – undo
440 440
         }
441 441
     }
442 442
     if (api_is_session_admin() && api_get_setting('prevent_session_admins_to_manage_all_users') === 'true') {
443
-        $order_clause = " AND u.creator_id = " . api_get_user_id() . $order_clause;
443
+        $order_clause = " AND u.creator_id = ".api_get_user_id().$order_clause;
444 444
     }
445 445
     if ($use_extra_fields) {
446 446
         $sql = "SELECT  u.id, lastname, firstname, username, session_id, official_code
@@ -462,7 +462,7 @@  discard block
 block discarded – undo
462 462
                 $order_clause";
463 463
     }
464 464
     if (api_is_multiple_url_enabled()) {
465
-        $tbl_user_rel_access_url= Database::get_main_table(TABLE_MAIN_ACCESS_URL_REL_USER);
465
+        $tbl_user_rel_access_url = Database::get_main_table(TABLE_MAIN_ACCESS_URL_REL_USER);
466 466
         $access_url_id = api_get_current_access_url_id();
467 467
         if ($access_url_id != -1) {
468 468
             $sql = "SELECT  u.id, lastname, firstname, username, session_id, official_code
@@ -488,7 +488,7 @@  discard block
 block discarded – undo
488 488
                 'ln' => $user['lastname'],
489 489
                 'un' => $user['username'],
490 490
                 'official_code' => $user['official_code']
491
-            ) ;
491
+            );
492 492
             unset($users[$uid]);
493 493
         }
494 494
     }
@@ -504,7 +504,7 @@  discard block
 block discarded – undo
504 504
           WHERE u.status<>".DRH." AND u.status<>6 $order_clause";
505 505
 
506 506
     if (api_is_multiple_url_enabled()) {
507
-        $tbl_user_rel_access_url= Database::get_main_table(TABLE_MAIN_ACCESS_URL_REL_USER);
507
+        $tbl_user_rel_access_url = Database::get_main_table(TABLE_MAIN_ACCESS_URL_REL_USER);
508 508
         $access_url_id = api_get_current_access_url_id();
509 509
         if ($access_url_id != -1) {
510 510
             $sql = "SELECT  u.id, lastname, firstname, username, session_id, official_code
@@ -542,7 +542,7 @@  discard block
 block discarded – undo
542 542
 	$link_add_type_multiple = '<a href="'.api_get_self().'?id_session='.$id_session.'&amp;add='.$addProcess.'&amp;add_type=multiple">'.Display::return_icon('multiple.gif').get_lang('SessionAddTypeMultiple').'</a>';
543 543
 }
544 544
 $link_add_group = Display::url(
545
-    Display::return_icon('multiple.gif',get_lang('RegistrationByUsersGroups')).get_lang('RegistrationByUsersGroups'),
545
+    Display::return_icon('multiple.gif', get_lang('RegistrationByUsersGroups')).get_lang('RegistrationByUsersGroups'),
546 546
     api_get_path(WEB_CODE_PATH).'admin/usergroups.php'
547 547
 );
548 548
 
@@ -563,12 +563,12 @@  discard block
 block discarded – undo
563 563
     echo $newLinks;
564 564
     ?>
565 565
 </div>
566
-<form name="formulaire" method="post" action="<?php echo api_get_self(); ?>?page=<?php echo $page; ?>&id_session=<?php echo $id_session; ?><?php if(!empty($addProcess)) echo '&add=true' ; ?>"  <?php if ($ajax_search) { echo ' onsubmit="valide();"';}?>>
566
+<form name="formulaire" method="post" action="<?php echo api_get_self(); ?>?page=<?php echo $page; ?>&id_session=<?php echo $id_session; ?><?php if (!empty($addProcess)) echo '&add=true'; ?>"  <?php if ($ajax_search) { echo ' onsubmit="valide();"'; }?>>
567 567
 <?php echo '<legend>'.$tool_name.' ('.$session_info['name'].') </legend>'; ?>
568 568
 <?php
569
-if ($add_type=='multiple') {
569
+if ($add_type == 'multiple') {
570 570
 	if (is_array($extra_field_list)) {
571
-		if (is_array($new_field_list) && count($new_field_list)>0 ) {
571
+		if (is_array($new_field_list) && count($new_field_list) > 0) {
572 572
 			echo '<h3>'.get_lang('FilterUsers').'</h3>';
573 573
 			foreach ($new_field_list as $new_field) {
574 574
 				echo $new_field['name'];
@@ -576,8 +576,8 @@  discard block
 block discarded – undo
576 576
                 $fieldtype = $new_field['type'];
577 577
 				echo '&nbsp;<select name="'.$varname.'">';
578 578
 				echo '<option value="0">--'.get_lang('Select').'--</option>';
579
-				foreach	($new_field['data'] as $option) {
580
-					$checked='';
579
+				foreach ($new_field['data'] as $option) {
580
+					$checked = '';
581 581
                     if ($fieldtype == ExtraField::FIELD_TYPE_TAG) {
582 582
                         if (isset($_POST[$varname])) {
583 583
                             if ($_POST[$varname] == $option['tag']) {
@@ -618,7 +618,7 @@  discard block
 block discarded – undo
618 618
         <div class="form-group">
619 619
             <label><?php echo get_lang('UserListInPlatform') ?> </label>
620 620
             <?php
621
-            if (!($add_type=='multiple')) {
621
+            if (!($add_type == 'multiple')) {
622 622
               ?>
623 623
               <input type="text" id="user_to_add" onkeyup="xajax_search_users(this.value,'single')" class="form-control" />
624 624
               <div id="ajax_list_users_single" class="select-list-ajax"></div>
@@ -630,7 +630,7 @@  discard block
 block discarded – undo
630 630
               <?php
631 631
               foreach ($nosessionUsersList as $uid => $enreg) {
632 632
               ?>
633
-                  <option value="<?php echo $uid; ?>" <?php if(in_array($uid,$UserList)) echo 'selected="selected"'; ?>>
633
+                  <option value="<?php echo $uid; ?>" <?php if (in_array($uid, $UserList)) echo 'selected="selected"'; ?>>
634 634
                       <?php
635 635
                       $personName = $enreg['ln'].' '.$enreg['fn'].' ('.$enreg['un'].') '.$enreg['official_code'];
636 636
                       if ($showOfficialCode) {
@@ -655,7 +655,7 @@  discard block
 block discarded – undo
655 655
     </div>
656 656
 
657 657
     <div class="col-md-4">
658
-        <?php if ($add_type=='multiple') { ?>
658
+        <?php if ($add_type == 'multiple') { ?>
659 659
             <?php echo get_lang('FirstLetterUser'); ?> :
660 660
 
661 661
             <select id="first_letter_user" name="firstLetterUser" onchange = "change_select(this.value);" >
Please login to merge, or discard this patch.
main/lp/lp_controller.php 1 patch
Spacing   +16 added lines, -16 removed lines patch added patch discarded remove patch
@@ -26,7 +26,7 @@  discard block
 block discarded – undo
26 26
 
27 27
 // Including the global initialization file.
28 28
 require_once __DIR__.'/../inc/global.inc.php';
29
-$current_course_tool  = TOOL_LEARNPATH;
29
+$current_course_tool = TOOL_LEARNPATH;
30 30
 $_course = api_get_course_info();
31 31
 
32 32
 $glossaryExtraTools = api_get_setting('show_glossary_in_extra_tools');
@@ -38,7 +38,7 @@  discard block
 block discarded – undo
38 38
     ) {
39 39
         $htmlHeadXtra[] = '<script>
40 40
     <!--
41
-        var jQueryFrameReadyConfigPath = \'' . api_get_jquery_web_path() . '\';
41
+        var jQueryFrameReadyConfigPath = \'' . api_get_jquery_web_path().'\';
42 42
     -->
43 43
     </script>';
44 44
     $htmlHeadXtra[] = api_get_js('js/jquery.frameready.js');
@@ -247,7 +247,7 @@  discard block
 block discarded – undo
247 247
 
248 248
 $course_id = api_get_course_int_id();
249 249
 
250
-if ($debug>0) error_log('New LP - Passed data remains check', 0);
250
+if ($debug > 0) error_log('New LP - Passed data remains check', 0);
251 251
 
252 252
 if (!$lp_found || (!empty($_REQUEST['lp_id']) && $_SESSION['oLP']->get_id() != $_REQUEST['lp_id'])) {
253 253
     if ($debug > 0) error_log('New LP - oLP is not object, has changed or refresh been asked, getting new', 0);
@@ -271,7 +271,7 @@  discard block
 block discarded – undo
271 271
             if (Database::num_rows($res)) {
272 272
                 $row = Database::fetch_array($res);
273 273
                 $type = $row['lp_type'];
274
-                if ($debug > 0) error_log('New LP - found row - type '.$type. ' - Calling constructor with '.api_get_course_id().' - '.$lp_id.' - '.api_get_user_id(), 0);
274
+                if ($debug > 0) error_log('New LP - found row - type '.$type.' - Calling constructor with '.api_get_course_id().' - '.$lp_id.' - '.api_get_user_id(), 0);
275 275
                 switch ($type) {
276 276
                     case 1:
277 277
                         if ($debug > 0) error_log('New LP - found row - type dokeos - Calling constructor with '.api_get_course_id().' - '.$lp_id.' - '.api_get_user_id(), 0);
@@ -706,8 +706,8 @@  discard block
 block discarded – undo
706 706
                 $editPrerequisite = $_SESSION['oLP']->edit_item_prereq(
707 707
                     $_GET['id'],
708 708
                     $_POST['prerequisites'],
709
-                    $_POST['min_' . $_POST['prerequisites']],
710
-                    $_POST['max_' . $_POST['prerequisites']]
709
+                    $_POST['min_'.$_POST['prerequisites']],
710
+                    $_POST['max_'.$_POST['prerequisites']]
711 711
                 );
712 712
 
713 713
                 if ($editPrerequisite) {
@@ -967,7 +967,7 @@  discard block
 block discarded – undo
967 967
             $_SESSION['oLP']->setAccumulateScormTime($accumulateScormTime);
968 968
 
969 969
             if (isset($_REQUEST['activate_start_date_check']) && $_REQUEST['activate_start_date_check'] == 1) {
970
-            	$publicated_on  = $_REQUEST['publicated_on'];
970
+            	$publicated_on = $_REQUEST['publicated_on'];
971 971
             } else {
972 972
             	$publicated_on = null;
973 973
             }
@@ -1147,8 +1147,8 @@  discard block
 block discarded – undo
1147 1147
             error_log('New LP - No learnpath given for view', 0);
1148 1148
             require 'lp_list.php';
1149 1149
         } else {
1150
-            if ($debug > 0) {error_log('New LP - Trying to set current item to ' . $_REQUEST['item_id'], 0); }
1151
-            if ( !empty($_REQUEST['item_id']) ) {
1150
+            if ($debug > 0) {error_log('New LP - Trying to set current item to '.$_REQUEST['item_id'], 0); }
1151
+            if (!empty($_REQUEST['item_id'])) {
1152 1152
                 $_SESSION['oLP']->set_current_item($_REQUEST['item_id']);
1153 1153
             }
1154 1154
             require 'lp_view.php';
@@ -1231,7 +1231,7 @@  discard block
 block discarded – undo
1231 1231
 		break;
1232 1232
      */
1233 1233
 	case 'switch_attempt_mode':
1234
-		if(!$lp_found){ error_log('New LP - No learnpath given for switch',0); require 'lp_list.php'; }
1234
+		if (!$lp_found) { error_log('New LP - No learnpath given for switch', 0); require 'lp_list.php'; }
1235 1235
 		$_SESSION['refresh'] = 1;
1236 1236
 		$_SESSION['oLP']->switch_attempt_mode();
1237 1237
         require 'lp_list.php';
@@ -1276,8 +1276,8 @@  discard block
 block discarded – undo
1276 1276
             error_log('New LP - No learnpath given for view', 0);
1277 1277
             require 'lp_list.php';
1278 1278
         } else {
1279
-            if ($debug > 0) {error_log('New LP - Trying to impress this LP item to ' . $_REQUEST['item_id'], 0); }
1280
-            if (!empty($_REQUEST['item_id']) ) {
1279
+            if ($debug > 0) {error_log('New LP - Trying to impress this LP item to '.$_REQUEST['item_id'], 0); }
1280
+            if (!empty($_REQUEST['item_id'])) {
1281 1281
                 $_SESSION['oLP']->set_current_item($_REQUEST['item_id']);
1282 1282
             }
1283 1283
             require 'lp_impress.php';
@@ -1337,7 +1337,7 @@  discard block
 block discarded – undo
1337 1337
                     $_SESSION['oLP']->lp_session_id
1338 1338
                 );
1339 1339
 
1340
-                $forumCategoryId = !empty($forumCategory) ? $forumCategory['cat_id']: 0;
1340
+                $forumCategoryId = !empty($forumCategory) ? $forumCategory['cat_id'] : 0;
1341 1341
 
1342 1342
                 if (empty($forumCategoryId)) {
1343 1343
                     $forumCategoryId = store_forumcategory(
@@ -1369,7 +1369,7 @@  discard block
 block discarded – undo
1369 1369
             }
1370 1370
         }
1371 1371
 
1372
-        header('Location:' . api_get_self() . '?' . http_build_query([
1372
+        header('Location:'.api_get_self().'?'.http_build_query([
1373 1373
             'action' => 'add_item',
1374 1374
             'type' => 'step',
1375 1375
             'lp_id' => $_SESSION['oLP']->lp_id
@@ -1409,7 +1409,7 @@  discard block
 block discarded – undo
1409 1409
             }
1410 1410
         }
1411 1411
 
1412
-        header('Location:' . api_get_self() . '?' . http_build_query([
1412
+        header('Location:'.api_get_self().'?'.http_build_query([
1413 1413
             'action' => 'add_item',
1414 1414
             'type' => 'step',
1415 1415
             'lp_id' => $_SESSION['oLP']->lp_id
@@ -1429,7 +1429,7 @@  discard block
 block discarded – undo
1429 1429
         }
1430 1430
 
1431 1431
         $_SESSION['oLP']->getFinalItemForm();
1432
-        $redirectTo = api_get_self() . '?' . api_get_cidreq().'&'.http_build_query([
1432
+        $redirectTo = api_get_self().'?'.api_get_cidreq().'&'.http_build_query([
1433 1433
             'action' => 'add_item',
1434 1434
             'type' => 'step',
1435 1435
             'lp_id' => intval($_SESSION['oLP']->lp_id)
Please login to merge, or discard this patch.
main/ticket/new_ticket.php 1 patch
Spacing   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -8,7 +8,7 @@  discard block
 block discarded – undo
8 8
 require_once __DIR__.'/../inc/global.inc.php';
9 9
 
10 10
 if (!api_is_platform_admin() && api_get_setting('ticket_allow_student_add') != 'true') {
11
-    header('location:' . api_get_path(WEB_CODE_PATH).'ticket/tickets.php');
11
+    header('location:'.api_get_path(WEB_CODE_PATH).'ticket/tickets.php');
12 12
     exit;
13 13
 }
14 14
 
@@ -91,7 +91,7 @@  discard block
 block discarded – undo
91 91
     });
92 92
 
93 93
     img_remove = $("<img/>", {
94
-        src: "' . Display::returnIconPath('delete.png') . '"
94
+        src: "' . Display::returnIconPath('delete.png').'"
95 95
     });
96 96
 
97 97
     new_filepath_id = $("#filepath_" + counter_image);
@@ -110,10 +110,10 @@  discard block
 block discarded – undo
110 110
 
111 111
 $types = TicketManager::get_all_tickets_categories($projectId, 'category.name ASC');
112 112
 $htmlHeadXtra[] = '<script language="javascript">
113
-    var projects = ' . js_array($types, 'projects', 'project_id') . '
114
-    var course_required = ' . js_array($types, 'course_required', 'course_required') . '
115
-    var other_area = ' . js_array($types, 'other_area', 'other_area') . '
116
-    var email = ' . js_array($types, 'email', 'email') .
113
+    var projects = ' . js_array($types, 'projects', 'project_id').'
114
+    var course_required = ' . js_array($types, 'course_required', 'course_required').'
115
+    var other_area = ' . js_array($types, 'other_area', 'other_area').'
116
+    var email = ' . js_array($types, 'email', 'email').
117 117
 '</script>';
118 118
 
119 119
 /**
@@ -122,7 +122,7 @@  discard block
 block discarded – undo
122 122
  */
123 123
 function js_str($s)
124 124
 {
125
-    return '"' . addcslashes($s, "\0..\37\"\\") . '"';
125
+    return '"'.addcslashes($s, "\0..\37\"\\").'"';
126 126
 }
127 127
 
128 128
 /**
@@ -135,7 +135,7 @@  discard block
 block discarded – undo
135 135
 {
136 136
     $return = "new Array(); ";
137 137
     foreach ($array as $value) {
138
-        $return .= $name . "['" . $value['category_id'] . "'] ='" . $value[$key] . "'; ";
138
+        $return .= $name."['".$value['category_id']."'] ='".$value[$key]."'; ";
139 139
     }
140 140
 
141 141
     return $return;
@@ -148,7 +148,7 @@  discard block
 block discarded – undo
148 148
 {
149 149
     $content = $_POST['content'];
150 150
     if ($_POST['phone'] != '') {
151
-        $content .= '<p style="color:red">&nbsp;' . get_lang('Phone') . ': ' . $_POST['phone']. '</p>';
151
+        $content .= '<p style="color:red">&nbsp;'.get_lang('Phone').': '.$_POST['phone'].'</p>';
152 152
     }
153 153
     $course_id = isset($_POST['course_id']) ? $_POST['course_id'] : '';
154 154
     $sessionId = isset($_POST['session_id']) ? $_POST['session_id'] : '';
@@ -179,7 +179,7 @@  discard block
 block discarded – undo
179 179
         $status,
180 180
         $user_id
181 181
     )) {
182
-        header('Location:' . api_get_path(WEB_CODE_PATH).'ticket/tickets.php');
182
+        header('Location:'.api_get_path(WEB_CODE_PATH).'ticket/tickets.php');
183 183
         exit;
184 184
     } else {
185 185
         Display::addFlash(Display::return_message(get_lang('ThereWasAnErrorRegisteringTheTicket')));
@@ -363,7 +363,7 @@  discard block
 block discarded – undo
363 363
 $form->addElement(
364 364
     'text',
365 365
     'phone',
366
-    get_lang('Phone') . ' (' . get_lang('Optional') . ')',
366
+    get_lang('Phone').' ('.get_lang('Optional').')',
367 367
     array(
368 368
         'id' => 'phone'
369 369
     )
@@ -401,7 +401,7 @@  discard block
 block discarded – undo
401 401
 $form->addLabel(
402 402
     '',
403 403
     '<span id="link-more-attach">
404
-         <span class="btn btn-success" onclick="return add_image_form()">' . get_lang('AddOneMoreFile') . '</span>
404
+         <span class="btn btn-success" onclick="return add_image_form()">' . get_lang('AddOneMoreFile').'</span>
405 405
          </span>
406 406
          ('.sprintf(get_lang('MaximunFileSizeX'), format_file_size(api_get_setting('message_max_upload_filesize'))).')
407 407
     '
@@ -434,7 +434,7 @@  discard block
 block discarded – undo
434 434
 echo '<div class="actions">';
435 435
 echo Display::url(
436 436
     Display::return_icon('back.png', get_lang('Tickets'), [], ICON_SIZE_MEDIUM),
437
-    api_get_path(WEB_CODE_PATH) . 'ticket/tickets.php'
437
+    api_get_path(WEB_CODE_PATH).'ticket/tickets.php'
438 438
 );
439 439
 echo '</div>';
440 440
 
Please login to merge, or discard this patch.
main/exercise/exercise_submit_modal.php 1 patch
Spacing   +44 added lines, -44 removed lines patch added patch discarded remove patch
@@ -117,7 +117,7 @@  discard block
 block discarded – undo
117 117
 }
118 118
 
119 119
 $choice = array();
120
-$questionid= $questionList[$questionNum];
120
+$questionid = $questionList[$questionNum];
121 121
 // $choice_value => value of the user selection
122 122
 $choice[$questionid] = isset($choice_value) ? $choice_value : null;
123 123
 
@@ -194,9 +194,9 @@  discard block
 block discarded – undo
194 194
         $numAnswer = $objAnswerTmp->selectAutoId($answerId);
195 195
 
196 196
         //delineation
197
-        $delineation_cord  = $objAnswerTmp->selectHotspotCoordinates(1);
197
+        $delineation_cord = $objAnswerTmp->selectHotspotCoordinates(1);
198 198
         $answer_delineation_destination = $objAnswerTmp->selectDestination(1);
199
-        if ($dbg_local>0) { error_log(__LINE__.' answerId: '.$answerId.'('.$answerType.') - user delineation_cord: '.$delineation_cord.' - $answer_delineation_destination: '.$answer_delineation_destination,0);}
199
+        if ($dbg_local > 0) { error_log(__LINE__.' answerId: '.$answerId.'('.$answerType.') - user delineation_cord: '.$delineation_cord.' - $answer_delineation_destination: '.$answer_delineation_destination, 0); }
200 200
 
201 201
         switch ($answerType) {
202 202
             // for unique answer
@@ -231,7 +231,7 @@  discard block
 block discarded – undo
231 231
             }
232 232
         } elseif ($answerType == HOT_SPOT_DELINEATION) {
233 233
             if ($next) {
234
-                if ($dbg_local>0) { error_log(__LINE__.' - next',0);}
234
+                if ($dbg_local > 0) { error_log(__LINE__.' - next', 0); }
235 235
                 $hot_spot_load = true; //apparently the script is called twice
236 236
                 $user_answer = $user_array;
237 237
                 $_SESSION['exerciseResultCoordinates'][$questionid] = $user_answer; //needed for exercise_result.php
@@ -266,7 +266,7 @@  discard block
 block discarded – undo
266 266
                 }
267 267
 
268 268
                 //$overlap = round(polygons_overlap($poly_answer,$poly_user)); //this is an area in pixels
269
-                if ($dbg_local>0) { error_log(__LINE__.' - Polygons results are '.print_r($poly_results,1),0);}
269
+                if ($dbg_local > 0) { error_log(__LINE__.' - Polygons results are '.print_r($poly_results, 1), 0); }
270 270
                 if ($overlap < 1) {
271 271
                     //shortcut to avoid complicated calculations
272 272
                     $final_overlap = 0;
@@ -274,14 +274,14 @@  discard block
 block discarded – undo
274 274
                     $final_excess  = 100;
275 275
                 } else {
276 276
                     // the final overlap is the percentage of the initial polygon that is overlapped by the user's polygon
277
-                    $final_overlap = round(((float)$overlap / (float)$poly_answer_area)*100);
278
-                    if ($dbg_local>1) { error_log(__LINE__.' - Final overlap is '.$final_overlap,0);}
277
+                    $final_overlap = round(((float) $overlap / (float) $poly_answer_area) * 100);
278
+                    if ($dbg_local > 1) { error_log(__LINE__.' - Final overlap is '.$final_overlap, 0); }
279 279
                     // the final missing area is the percentage of the initial polygon that is not overlapped by the user's polygon
280 280
                     $final_missing = 100 - $final_overlap;
281
-                    if ($dbg_local>1) { error_log(__LINE__.' - Final missing is '.$final_missing,0);}
281
+                    if ($dbg_local > 1) { error_log(__LINE__.' - Final missing is '.$final_missing, 0); }
282 282
                     // the final excess area is the percentage of the initial polygon's size that is covered by the user's polygon outside of the initial polygon
283
-                    $final_excess = round((((float)$poly_user_area-(float)$overlap)/(float)$poly_answer_area)*100);
284
-                    if ($dbg_local>1) { error_log(__LINE__.' - Final excess is '.$final_excess,0);}
283
+                    $final_excess = round((((float) $poly_user_area - (float) $overlap) / (float) $poly_answer_area) * 100);
284
+                    if ($dbg_local > 1) { error_log(__LINE__.' - Final excess is '.$final_excess, 0); }
285 285
                 }
286 286
 
287 287
                 $destination_items = explode('@@', $answerDestination);
@@ -289,10 +289,10 @@  discard block
 block discarded – undo
289 289
                 $threadhold_items = explode(';', $threadhold_total);
290 290
                 $threadhold1 = $threadhold_items[0]; // overlap
291 291
                 $threadhold2 = $threadhold_items[1]; // excess
292
-                $threadhold3 = $threadhold_items[2];     //missing
292
+                $threadhold3 = $threadhold_items[2]; //missing
293 293
 
294 294
                 // if is delineation
295
-                if ($answerId===1) {
295
+                if ($answerId === 1) {
296 296
                     //setting colors
297 297
                     if ($final_overlap >= $threadhold1) {
298 298
                         $overlap_color = true; //echo 'a';
@@ -308,11 +308,11 @@  discard block
 block discarded – undo
308 308
 
309 309
                     // if pass
310 310
                     //if ($final_overlap>=$threadhold1 && $final_missing<=$threadhold2 && $final_excess<=$threadhold3) {
311
-                    if ($final_overlap>=$threadhold1 && $final_missing<=$threadhold3 && $final_excess<=$threadhold2) {
312
-                        $next=1; //go to the oars
313
-                        $result_comment=get_lang('Acceptable');
311
+                    if ($final_overlap >= $threadhold1 && $final_missing <= $threadhold3 && $final_excess <= $threadhold2) {
312
+                        $next = 1; //go to the oars
313
+                        $result_comment = get_lang('Acceptable');
314 314
                     } else {
315
-                        $next=1; //Go to the oars. If $next =  0 we will show this message: "One (or more) area at risk has been hit" instead of the table resume with the results
315
+                        $next = 1; //Go to the oars. If $next =  0 we will show this message: "One (or more) area at risk has been hit" instead of the table resume with the results
316 316
                         $wrong_results = true;
317 317
                         $result_comment = get_lang('Unacceptable');
318 318
                         $special_comment = $comment = $answerDestination = $objAnswerTmp->selectComment(1);
@@ -325,12 +325,12 @@  discard block
 block discarded – undo
325 325
                     }
326 326
                 } elseif ($answerId > 1) {
327 327
                     if ($objAnswerTmp->selectHotspotType($answerId) == 'noerror') {
328
-                        if ($dbg_local>0) { error_log(__LINE__.' - answerId is of type noerror',0);}
328
+                        if ($dbg_local > 0) { error_log(__LINE__.' - answerId is of type noerror', 0); }
329 329
                         //type no error shouldn't be treated
330 330
                         $next = 1;
331 331
                         continue;
332 332
                     }
333
-                    if ($dbg_local>0) { error_log(__LINE__.' - answerId is >1 so we\'re probably in OAR',0);}
333
+                    if ($dbg_local > 0) { error_log(__LINE__.' - answerId is >1 so we\'re probably in OAR', 0); }
334 334
                     //check the intersection between the oar and the user
335 335
                     //echo 'user';	print_r($x_user_list);		print_r($y_user_list);
336 336
                     //echo 'official';print_r($x_list);print_r($y_list);
@@ -354,7 +354,7 @@  discard block
 block discarded – undo
354 354
                             $poly_user,
355 355
                             $max_coord,
356 356
                             $test
357
-                        );//$poly_user is already set when answerid = 1
357
+                        ); //$poly_user is already set when answerid = 1
358 358
                         $poly_answer_compiled = poly_compile(
359 359
                             $poly_answer,
360 360
                             $max_coord,
@@ -396,25 +396,25 @@  discard block
 block discarded – undo
396 396
                 }
397 397
             } else {
398 398
                 // the first delineation feedback
399
-                if ($dbg_local>0) { error_log(__LINE__.' first',0);}
399
+                if ($dbg_local > 0) { error_log(__LINE__.' first', 0); }
400 400
             }
401 401
         }
402 402
     }
403 403
 
404 404
 	if ($overlap_color) {
405
-		$overlap_color='green';
405
+		$overlap_color = 'green';
406 406
     } else {
407
-		$overlap_color='red';
407
+		$overlap_color = 'red';
408 408
     }
409 409
 	if ($missing_color) {
410
-		$missing_color='green';
410
+		$missing_color = 'green';
411 411
     } else {
412
-		$missing_color='red';
412
+		$missing_color = 'red';
413 413
     }
414 414
 	if ($excess_color) {
415
-		$excess_color='green';
415
+		$excess_color = 'green';
416 416
     } else {
417
-		$excess_color='red';
417
+		$excess_color = 'red';
418 418
     }
419 419
 
420 420
     if (!is_numeric($final_overlap)) {
@@ -428,7 +428,7 @@  discard block
 block discarded – undo
428 428
     	$final_excess = 0;
429 429
     }
430 430
 
431
-    if ($final_excess>100) {
431
+    if ($final_excess > 100) {
432 432
     	$final_excess = 100;
433 433
     }
434 434
 
@@ -442,19 +442,19 @@  discard block
 block discarded – undo
442 442
 	<tr class="row_even">
443 443
 		<td><b>'.get_lang('Overlap').'</b></td>
444 444
 		<td>'.get_lang('Min').' '.$threadhold1.'</td>
445
-		<td><div style="color:'.$overlap_color.'">'.(($final_overlap < 0)?0:intval($final_overlap)).'</div></td>
445
+		<td><div style="color:'.$overlap_color.'">'.(($final_overlap < 0) ? 0 : intval($final_overlap)).'</div></td>
446 446
 	</tr>
447 447
 
448 448
 	<tr>
449 449
 		<td><b>'.get_lang('Excess').'</b></td>
450 450
 		<td>'.get_lang('Max').' '.$threadhold2.'</td>
451
-		<td><div style="color:'.$excess_color.'">'.(($final_excess < 0)?0:intval($final_excess)).'</div></td>
451
+		<td><div style="color:'.$excess_color.'">'.(($final_excess < 0) ? 0 : intval($final_excess)).'</div></td>
452 452
 	</tr>
453 453
 
454 454
 	<tr class="row_even">
455 455
 		<td><b>'.get_lang('Missing').'</b></td>
456 456
 		<td>'.get_lang('Max').' '.$threadhold3.'</td>
457
-		<td><div style="color:'.$missing_color.'">'.(($final_missing < 0)?0:intval($final_missing)).'</div></td>
457
+		<td><div style="color:'.$missing_color.'">'.(($final_missing < 0) ? 0 : intval($final_missing)).'</div></td>
458 458
 	</tr>
459 459
 	</table>';
460 460
 }
@@ -477,7 +477,7 @@  discard block
 block discarded – undo
477 477
         $destinationid = $item_list[2];
478 478
         $url = $item_list[3];
479 479
     }
480
-	$table_resume='';
480
+	$table_resume = '';
481 481
 } else {
482 482
     $try = $try_hotspot;
483 483
     $lp = $lp_hotspot;
@@ -503,7 +503,7 @@  discard block
 block discarded – undo
503 503
 }
504 504
 
505 505
 // the link to retry the question
506
-if (isset($try) && $try==1) {
506
+if (isset($try) && $try == 1) {
507 507
     $num_value_array = array_keys($questionList, $questionid);
508 508
     $links .= Display:: return_icon(
509 509
             'reload.gif',
@@ -514,7 +514,7 @@  discard block
 block discarded – undo
514 514
 
515 515
 // the link to theory (a learning path)
516 516
 if (!empty($lp)) {
517
-	$lp_url= api_get_path(WEB_CODE_PATH) . 'lp/lp_controller.php?'.api_get_cidreq().'&action=view&lp_id='.$lp;
517
+	$lp_url = api_get_path(WEB_CODE_PATH).'lp/lp_controller.php?'.api_get_cidreq().'&action=view&lp_id='.$lp;
518 518
 	$list = new LearnpathList(api_get_user_id());
519 519
 	$flat_list = $list->get_flat_list();
520 520
     $links .= Display:: return_icon(
@@ -543,10 +543,10 @@  discard block
 block discarded – undo
543 543
         ).'<a onclick="SendEx(-1);" href="#">'.get_lang('EndActivity').'</a><br /><br />';
544 544
 } else {
545 545
 	// the link to other question
546
-	if (in_array($destinationid,$questionList)) {
546
+	if (in_array($destinationid, $questionList)) {
547 547
 		$objQuestionTmp = Question :: read($destinationid);
548
-		$questionName=$objQuestionTmp->selectTitle();
549
-		$num_value_array= (array_keys($questionList, $destinationid));
548
+		$questionName = $objQuestionTmp->selectTitle();
549
+		$num_value_array = (array_keys($questionList, $destinationid));
550 550
         $links .= Display:: return_icon(
551 551
                 'quiz.png',
552 552
                 '',
@@ -568,7 +568,7 @@  discard block
 block discarded – undo
568 568
 }
569 569
 </script>';
570 570
 
571
-if ($links!='') {
571
+if ($links != '') {
572 572
 	/*echo '<div id="ModalContent" style="padding-bottom:30px;padding-top:10px;padding-left:20px;padding-right:20px;">
573 573
     <a onclick="self.parent.tb_remove();" href="#" style="float:right; margin-top:-10px;">'.api_ucfirst(get_lang('Close')).'</a>';*/
574 574
 	echo '<h1><div style="color:#333;">'.get_lang('Feedback').'</div></h1>';
@@ -576,15 +576,15 @@  discard block
 block discarded – undo
576 576
 		if ($organs_at_risk_hit > 0) {
577 577
 			//$message='<p>'.get_lang('YourDelineation').'</p>';
578 578
 			//$message.=$table_resume;
579
-			$message.='<br />'.get_lang('ResultIs').' <b>'.get_lang('Unacceptable').'</b><br />';
579
+			$message .= '<br />'.get_lang('ResultIs').' <b>'.get_lang('Unacceptable').'</b><br />';
580 580
 			//if ($wrong_results) { }
581
-			$message.='<p style="color:#DC0A0A;"><b>'.get_lang('OARHit').'</b></p>';
582
-			$message.='<p>'.$comment.'</p>';
581
+			$message .= '<p style="color:#DC0A0A;"><b>'.get_lang('OARHit').'</b></p>';
582
+			$message .= '<p>'.$comment.'</p>';
583 583
 		} else {
584
-			$message='<p>'.get_lang('YourDelineation').'</p>';
585
-			$message.=$table_resume;
586
-			$message.='<br />'.get_lang('ResultIs').' <b>'.$result_comment.'</b><br />';
587
-			$message.='<p>'.$comment.'</p>';
584
+			$message = '<p>'.get_lang('YourDelineation').'</p>';
585
+			$message .= $table_resume;
586
+			$message .= '<br />'.get_lang('ResultIs').' <b>'.$result_comment.'</b><br />';
587
+			$message .= '<p>'.$comment.'</p>';
588 588
 		}
589 589
 		echo $message;
590 590
 	} else {
Please login to merge, or discard this patch.
src/Chamilo/CoreBundle/Component/Editor/Connector.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -328,7 +328,7 @@
 block discarded – undo
328 328
     {
329 329
         return strpos(basename($path), '.') === 0       // if file/folder begins with '.' (dot)
330 330
             ? !($attr == 'read' || $attr == 'write')    // set read+write to false, other (locked+hidden) set to true
331
-            :  null;                                    // else elFinder decide it itself
331
+            :  null; // else elFinder decide it itself
332 332
     }
333 333
 
334 334
     /**
Please login to merge, or discard this patch.
main/dashboard/dashboard.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -13,7 +13,7 @@  discard block
 block discarded – undo
13 13
 // menu actions for dashboard views
14 14
 $views = array('blocks', 'list');
15 15
 
16
-if(isset($_GET['view']) && in_array($_GET['view'], $views)){
16
+if (isset($_GET['view']) && in_array($_GET['view'], $views)) {
17 17
     $dashboard_view = $_GET['view'];
18 18
 }
19 19
 
@@ -21,16 +21,16 @@  discard block
 block discarded – undo
21 21
 
22 22
 if (isset($dashboard_view) && $dashboard_view == 'list') {
23 23
     $link_blocks_view = '<a href="'.api_get_self().'?view=blocks">'.
24
-        Display::return_icon('blocks.png',get_lang('DashboardBlocks'),'',ICON_SIZE_MEDIUM).'</a>';
24
+        Display::return_icon('blocks.png', get_lang('DashboardBlocks'), '', ICON_SIZE_MEDIUM).'</a>';
25 25
 } else {
26 26
     $link_list_view = '<a href="'.api_get_self().'?view=list">'.
27
-        Display::return_icon('edit.png',get_lang('EditBlocks'),'',ICON_SIZE_MEDIUM).'</a>';
27
+        Display::return_icon('edit.png', get_lang('EditBlocks'), '', ICON_SIZE_MEDIUM).'</a>';
28 28
 }
29 29
 
30 30
 $configuration_link = null;
31 31
 if (api_is_platform_admin()) {
32 32
     $configuration_link = '<a href="'.api_get_path(WEB_CODE_PATH).'admin/settings.php?category=Plugins">'
33
-    .Display::return_icon('settings.png',get_lang('ConfigureDashboardPlugin'),'',ICON_SIZE_MEDIUM).'</a>';
33
+    .Display::return_icon('settings.png', get_lang('ConfigureDashboardPlugin'), '', ICON_SIZE_MEDIUM).'</a>';
34 34
 }
35 35
 
36 36
 echo '<div class="actions">';
Please login to merge, or discard this patch.
main/cron/import_csv.php 1 patch
Spacing   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -476,7 +476,7 @@  discard block
 block discarded – undo
476 476
                     $result = UserManager::update_user(
477 477
                         $userInfo['user_id'],
478 478
                         $row['firstname'], // <<-- changed
479
-                        $row['lastname'],  // <<-- changed
479
+                        $row['lastname'], // <<-- changed
480 480
                         $userInfo['username'],
481 481
                         null, //$password = null,
482 482
                         $row['auth_source'],
@@ -634,7 +634,7 @@  discard block
 block discarded – undo
634 634
 
635 635
                     if (isset($row['action']) && $row['action'] === 'delete') {
636 636
                         // Inactive one year later
637
-                        $userInfo['expiration_date'] = api_get_utc_datetime(api_strtotime(time() + 365*24*60*60));
637
+                        $userInfo['expiration_date'] = api_get_utc_datetime(api_strtotime(time() + 365 * 24 * 60 * 60));
638 638
                     }
639 639
 
640 640
                     $password = $row['password']; // change password
@@ -696,8 +696,8 @@  discard block
 block discarded – undo
696 696
                     $result = UserManager::update_user(
697 697
                         $userInfo['user_id'],
698 698
                         $row['firstname'], // <<-- changed
699
-                        $row['lastname'],  // <<-- changed
700
-                        $row['username'],  // <<-- changed
699
+                        $row['lastname'], // <<-- changed
700
+                        $row['username'], // <<-- changed
701 701
                         $password, //$password = null,
702 702
                         $row['auth_source'],
703 703
                         $email,
@@ -748,7 +748,7 @@  discard block
 block discarded – undo
748 748
         }
749 749
 
750 750
         $timeEnd = microtime(true);
751
-        $executionTime = round(($timeEnd - $timeStart)/60, 2);
751
+        $executionTime = round(($timeEnd - $timeStart) / 60, 2);
752 752
         $this->logger->addInfo("Execution Time for process students: $executionTime Min");
753 753
 
754 754
         if ($moveFile) {
@@ -1072,7 +1072,7 @@  discard block
 block discarded – undo
1072 1072
                             api_format_date($start, TIME_NO_SEC_FORMAT).' '.
1073 1073
                             api_format_date($end, TIME_NO_SEC_FORMAT).')';
1074 1074
                     } else {
1075
-                        $date = api_format_date($start,DATE_TIME_FORMAT_LONG_24H).' - '.
1075
+                        $date = api_format_date($start, DATE_TIME_FORMAT_LONG_24H).' - '.
1076 1076
                                 api_format_date($end, DATE_TIME_FORMAT_LONG_24H);
1077 1077
                     }
1078 1078
 
@@ -1131,7 +1131,7 @@  discard block
 block discarded – undo
1131 1131
 
1132 1132
                         if ($announcementId) {
1133 1133
                             $this->logger->addInfo(
1134
-                                "Announcement added: ".(int)($announcementId)." in $info"
1134
+                                "Announcement added: ".(int) ($announcementId)." in $info"
1135 1135
                             );
1136 1136
                             $this->logger->addInfo(
1137 1137
                                 "<<--SENDING MAIL-->>"
@@ -1518,7 +1518,7 @@  discard block
 block discarded – undo
1518 1518
                 );
1519 1519
 
1520 1520
                 $this->logger->addError(
1521
-                    "User '$chamiloUserName' was remove from Session: #$chamiloSessionId - Course: " . $courseInfo['code']
1521
+                    "User '$chamiloUserName' was remove from Session: #$chamiloSessionId - Course: ".$courseInfo['code']
1522 1522
                 );
1523 1523
 
1524 1524
             }
@@ -1592,7 +1592,7 @@  discard block
 block discarded – undo
1592 1592
                 }
1593 1593
 
1594 1594
                 $this->logger->addError(
1595
-                    "User '$chamiloUserName' with status $type was added to session: #$chamiloSessionId - Course: " . $courseInfo['code']
1595
+                    "User '$chamiloUserName' with status $type was added to session: #$chamiloSessionId - Course: ".$courseInfo['code']
1596 1596
                 );
1597 1597
             }
1598 1598
         }
@@ -1630,7 +1630,7 @@  discard block
 block discarded – undo
1630 1630
                     );
1631 1631
                 }
1632 1632
                 if (!in_array('SessionName', $tag_names) ||
1633
-                    !in_array('DateStart',$tag_names) || !in_array('DateEnd', $tag_names)
1633
+                    !in_array('DateStart', $tag_names) || !in_array('DateEnd', $tag_names)
1634 1634
                 ) {
1635 1635
                     $error_message = get_lang('NoNeededData');
1636 1636
                     break;
@@ -1927,7 +1927,7 @@  discard block
 block discarded – undo
1927 1927
         $data = Import::csv_reader($file);
1928 1928
 
1929 1929
         if (!empty($data)) {
1930
-            $this->logger->addInfo(count($data) . " records found.");
1930
+            $this->logger->addInfo(count($data)." records found.");
1931 1931
             foreach ($data as $row) {
1932 1932
                 $chamiloUserName = $row['UserName'];
1933 1933
                 $chamiloCourseCode = $row['CourseCode'];
@@ -1974,7 +1974,7 @@  discard block
 block discarded – undo
1974 1974
                 }
1975 1975
 
1976 1976
                 $this->logger->addError(
1977
-                    "User '$chamiloUserName' with status $type was added to session: #$chamiloSessionId - Course: " . $courseInfo['code']
1977
+                    "User '$chamiloUserName' with status $type was added to session: #$chamiloSessionId - Course: ".$courseInfo['code']
1978 1978
                 );
1979 1979
             }
1980 1980
         }
@@ -1993,7 +1993,7 @@  discard block
 block discarded – undo
1993 1993
         $data = Import::csv_reader($file);
1994 1994
 
1995 1995
         if (!empty($data)) {
1996
-            $this->logger->addInfo(count($data) . " records found.");
1996
+            $this->logger->addInfo(count($data)." records found.");
1997 1997
             foreach ($data as $row) {
1998 1998
                 $chamiloUserName = $row['UserName'];
1999 1999
                 $chamiloCourseCode = $row['CourseCode'];
Please login to merge, or discard this patch.