@@ -80,7 +80,7 @@ |
||
80 | 80 | |
81 | 81 | /** |
82 | 82 | * Validates the received active connection data with the database |
83 | - * @return bool Return the loginFailed variable value to local.inc.php |
|
83 | + * @return null|false Return the loginFailed variable value to local.inc.php |
|
84 | 84 | */ |
85 | 85 | public function check_user() |
86 | 86 | { |
@@ -327,7 +327,7 @@ |
||
327 | 327 | * @param array $arr1 first array |
328 | 328 | * @param array $arr2 second array |
329 | 329 | * |
330 | - * @return array difference between the two arrays |
|
330 | + * @return string difference between the two arrays |
|
331 | 331 | */ |
332 | 332 | function diff($arr1, $arr2) |
333 | 333 | { |
@@ -16,7 +16,7 @@ |
||
16 | 16 | * |
17 | 17 | * @param string Mobile phone number to be validated |
18 | 18 | * @param string Not using it. Just to respect the declaration |
19 | - * @return boolean Returns true if valid, false otherwise. |
|
19 | + * @return integer Returns true if valid, false otherwise. |
|
20 | 20 | */ |
21 | 21 | function validate($mobilePhoneNumber, $options = null) |
22 | 22 | { |
@@ -626,7 +626,7 @@ |
||
626 | 626 | |
627 | 627 | /** |
628 | 628 | * Get first SMS plugin name |
629 | - * @return string|boolean |
|
629 | + * @return string|false |
|
630 | 630 | */ |
631 | 631 | public function getSMSPluginName() |
632 | 632 | { |
@@ -254,13 +254,13 @@ |
||
254 | 254 | } |
255 | 255 | |
256 | 256 | /** |
257 | - * @param string $region |
|
258 | - * @param array $plugins |
|
259 | - * @param mixed $template |
|
260 | - * @param bool $forced |
|
261 | - * |
|
262 | - * @return null|string |
|
263 | - */ |
|
257 | + * @param string $region |
|
258 | + * @param array $plugins |
|
259 | + * @param mixed $template |
|
260 | + * @param bool $forced |
|
261 | + * |
|
262 | + * @return null|string |
|
263 | + */ |
|
264 | 264 | public function load_region($region, $template, $plugins, $forced = false) |
265 | 265 | { |
266 | 266 | if ($region == 'course_tool_plugin') { |
@@ -425,7 +425,7 @@ |
||
425 | 425 | // Extra options |
426 | 426 | $plugin_settings = api_get_settings_params( |
427 | 427 | array( |
428 | - "subkey = ? AND category = ? AND type = ? " => array($plugin_name, 'Plugins','setting') |
|
428 | + "subkey = ? AND category = ? AND type = ? " => array($plugin_name, 'Plugins', 'setting') |
|
429 | 429 | ) |
430 | 430 | ); |
431 | 431 |
@@ -129,7 +129,7 @@ discard block |
||
129 | 129 | } |
130 | 130 | |
131 | 131 | /** |
132 | - * @return array |
|
132 | + * @return string[] |
|
133 | 133 | */ |
134 | 134 | public function get_status_list() |
135 | 135 | { |
@@ -272,7 +272,7 @@ discard block |
||
272 | 272 | /** |
273 | 273 | * @param int $id |
274 | 274 | * |
275 | - * @return bool |
|
275 | + * @return null|false |
|
276 | 276 | */ |
277 | 277 | public function delete($id) |
278 | 278 | { |
@@ -326,6 +326,7 @@ discard block |
||
326 | 326 | |
327 | 327 | /** |
328 | 328 | * Gets an element |
329 | + * @param integer $gradebook_id |
|
329 | 330 | */ |
330 | 331 | public function get_skill_info($skill_id, $gradebook_id) |
331 | 332 | { |
@@ -544,7 +545,7 @@ discard block |
||
544 | 545 | * Gets an element |
545 | 546 | * @param int $id |
546 | 547 | * |
547 | - * @return array|mixed |
|
548 | + * @return integer |
|
548 | 549 | */ |
549 | 550 | public function get($id) |
550 | 551 | { |
@@ -885,7 +886,7 @@ discard block |
||
885 | 886 | /** |
886 | 887 | * Get user's skills |
887 | 888 | * |
888 | - * @param int $userId User's id |
|
889 | + * @param integer $user_id User's id |
|
889 | 890 | * @param bool $get_skill_data |
890 | 891 | */ |
891 | 892 | public function get_user_skills($user_id, $get_skill_data = false) |
@@ -43,7 +43,7 @@ |
||
43 | 43 | public function updateProfileInfo($profileId, $name, $description) |
44 | 44 | { |
45 | 45 | $profileId = intval($profileId); |
46 | - $sql = "UPDATE $this->table SET |
|
46 | + $sql = "update $this->table SET |
|
47 | 47 | name = '$name', |
48 | 48 | description = '$description' |
49 | 49 | WHERE id = $profileId "; |
@@ -443,6 +443,7 @@ |
||
443 | 443 | * @param bool hide navigation optionally |
444 | 444 | * @param int content per page when show navigation (optional) |
445 | 445 | * @param bool sort data optionally |
446 | + * @param boolean $visibility_options |
|
446 | 447 | * @return string grid html |
447 | 448 | */ |
448 | 449 | public function display_simple_grid($visibility_options, $hide_navigation = true, $per_page = 20, $sort_data = true, $grid_class = array()) |
@@ -340,9 +340,9 @@ discard block |
||
340 | 340 | } |
341 | 341 | |
342 | 342 | /** |
343 | - * This function shows the content of a table in a grid. |
|
344 | - * Should not be use to edit information (edit/delete rows) only. |
|
345 | - **/ |
|
343 | + * This function shows the content of a table in a grid. |
|
344 | + * Should not be use to edit information (edit/delete rows) only. |
|
345 | + **/ |
|
346 | 346 | public function display_grid() |
347 | 347 | { |
348 | 348 | $empty_table = false; |
@@ -800,7 +800,7 @@ discard block |
||
800 | 800 | //$param[$tablename.'_direction'] = $_GET[$tablename.'_direction']; |
801 | 801 | $my_get_direction = $_GET[$tablename.'_direction']; |
802 | 802 | if (!in_array($my_get_direction, array('ASC', 'DESC'))) { |
803 | - $param[$tablename.'_direction'] = 'ASC'; |
|
803 | + $param[$tablename.'_direction'] = 'ASC'; |
|
804 | 804 | } else { |
805 | 805 | $param[$tablename.'_direction'] = $my_get_direction; |
806 | 806 | } |
@@ -929,7 +929,7 @@ discard block |
||
929 | 929 | if (is_array($row)) { |
930 | 930 | foreach ($row as & $value) { |
931 | 931 | if (empty($value)) { |
932 | - $value = '-'; |
|
932 | + $value = '-'; |
|
933 | 933 | } |
934 | 934 | } |
935 | 935 | } |
@@ -85,6 +85,7 @@ |
||
85 | 85 | /** |
86 | 86 | * @author Sebastien Piraux <[email protected]> |
87 | 87 | * @param sql : a sql query (as a string) |
88 | + * @param integer $X |
|
88 | 89 | * @desc Return many results of a query in a X column tab |
89 | 90 | * in $resu[$i][0], $resu[$i][1],$resu[$i][2],... |
90 | 91 | * this function is more 'standard' but use a little |
@@ -330,6 +330,7 @@ discard block |
||
330 | 330 | /** |
331 | 331 | * Sets the footer visibility |
332 | 332 | * @param bool true if we show the footer |
333 | + * @param boolean $status |
|
333 | 334 | */ |
334 | 335 | public function set_footer($status) |
335 | 336 | { |
@@ -370,6 +371,7 @@ discard block |
||
370 | 371 | /** |
371 | 372 | * Sets the header visibility |
372 | 373 | * @param bool true if we show the header |
374 | + * @param boolean $status |
|
373 | 375 | */ |
374 | 376 | public function set_header($status) |
375 | 377 | { |
@@ -615,7 +615,7 @@ |
||
615 | 615 | return [ |
616 | 616 | '_p' => $_p, |
617 | 617 | '_s' => $_s, |
618 | - // '_u' => $user_info, |
|
618 | + // '_u' => $user_info, |
|
619 | 619 | 'template' => 'default' // @todo setup template folder in config.yml; |
620 | 620 | ]; |
621 | 621 | } |
@@ -315,7 +315,7 @@ discard block |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 | ) |
@@ -607,7 +607,7 @@ |
||
607 | 607 | |
608 | 608 | if (is_file(api_get_path(SYS_CSS_PATH).'themes/'.$this->theme.'/editor.css')) { |
609 | 609 | $css[] = api_get_path(WEB_CSS_PATH).'themes/'.$this->theme.'/editor.css'; |
610 | - }else{ |
|
610 | + } else { |
|
611 | 611 | $css[] = api_get_cdn_path(api_get_path(WEB_CSS_PATH).'editor.css'); |
612 | 612 | } |
613 | 613 |