@@ -8,7 +8,7 @@ discard block |
||
8 | 8 | */ |
9 | 9 | |
10 | 10 | ////require_once '../inc/global.inc.php'; |
11 | -$current_course_tool = TOOL_BLOGS; |
|
11 | +$current_course_tool = TOOL_BLOGS; |
|
12 | 12 | |
13 | 13 | $this_section = SECTION_COURSES; |
14 | 14 | |
@@ -20,7 +20,7 @@ discard block |
||
20 | 20 | |
21 | 21 | // ONLY USERS REGISTERED IN THE COURSE |
22 | 22 | if (!$is_allowed_in_course && !api_is_allowed_to_edit()) { |
23 | - api_not_allowed(true);//print headers/footers |
|
23 | + api_not_allowed(true); //print headers/footers |
|
24 | 24 | } |
25 | 25 | |
26 | 26 | if (api_is_allowed_to_edit()) { |
@@ -34,29 +34,29 @@ discard block |
||
34 | 34 | 'url' => 'blog_admin.php?'.api_get_cidreq(), |
35 | 35 | 'name' => $nameTools, |
36 | 36 | ); |
37 | - $my_url=''; |
|
38 | - if (isset($_GET['action']) && $_GET['action']=='add') { |
|
37 | + $my_url = ''; |
|
38 | + if (isset($_GET['action']) && $_GET['action'] == 'add') { |
|
39 | 39 | $current_section = get_lang('AddBlog'); |
40 | - $my_url='action=add'; |
|
41 | - } elseif (isset($_GET['action']) && $_GET['action']=='edit') { |
|
40 | + $my_url = 'action=add'; |
|
41 | + } elseif (isset($_GET['action']) && $_GET['action'] == 'edit') { |
|
42 | 42 | $current_section = get_lang('EditBlog'); |
43 | - $my_url='action=edit&blog_id='.Security::remove_XSS($_GET['blog_id']); |
|
43 | + $my_url = 'action=edit&blog_id='.Security::remove_XSS($_GET['blog_id']); |
|
44 | 44 | } |
45 | 45 | Display::display_header(''); |
46 | 46 | } |
47 | 47 | echo '<div class="actions">'; |
48 | 48 | echo "<a href='".api_get_self()."?".api_get_cidreq()."&action=add'>", |
49 | - Display::return_icon('new_blog.png', get_lang('AddBlog'),'',ICON_SIZE_MEDIUM)."</a>"; |
|
49 | + Display::return_icon('new_blog.png', get_lang('AddBlog'), '', ICON_SIZE_MEDIUM)."</a>"; |
|
50 | 50 | echo '</div>'; |
51 | 51 | |
52 | 52 | if (!empty($_POST['new_blog_submit']) && !empty($_POST['blog_name'])) { |
53 | - if (isset($_POST['blog_name'])) { |
|
53 | + if (isset($_POST['blog_name'])) { |
|
54 | 54 | Blog::create_blog($_POST['blog_name'], $_POST['blog_subtitle']); |
55 | 55 | Display::display_confirmation_message(get_lang('BlogStored')); |
56 | 56 | } |
57 | 57 | } |
58 | 58 | if (!empty($_POST['edit_blog_submit']) && !empty($_POST['blog_name'])) { |
59 | - if (strlen(trim($_POST['blog_name']))>0) { |
|
59 | + if (strlen(trim($_POST['blog_name'])) > 0) { |
|
60 | 60 | Blog::edit_blog($_POST['blog_id'], $_POST['blog_name'], $_POST['blog_subtitle']); |
61 | 61 | Display::display_confirmation_message(get_lang('BlogEdited')); |
62 | 62 | } |
@@ -88,7 +88,7 @@ discard block |
||
88 | 88 | // we show the form if |
89 | 89 | // 1. no post data |
90 | 90 | // 2. there is post data and one of the three form elements is empty |
91 | - if (!$_POST || (!empty($_POST) && (empty($_POST['edit_blog_submit']) || empty($_POST['blog_name']) ))) { |
|
91 | + if (!$_POST || (!empty($_POST) && (empty($_POST['edit_blog_submit']) || empty($_POST['blog_name'])))) { |
|
92 | 92 | // if there is post data there is certainly an error in the form |
93 | 93 | if ($_POST) { |
94 | 94 | Display::display_error_message(get_lang('FormHasErrorsPleaseComplete')); |
@@ -28,7 +28,7 @@ discard block |
||
28 | 28 | } |
29 | 29 | |
30 | 30 | |
31 | -$interbreadcrumb[] = array('url' => 'session_list.php','name' => get_lang('SessionList')); |
|
31 | +$interbreadcrumb[] = array('url' => 'session_list.php', 'name' => get_lang('SessionList')); |
|
32 | 32 | $interbreadcrumb[] = array( |
33 | 33 | 'url' => "resume_session.php?id_session=".$sessionId, |
34 | 34 | "name" => get_lang('SessionOverview') |
@@ -60,7 +60,7 @@ discard block |
||
60 | 60 | if ($days > 0) { |
61 | 61 | $msg = sprintf(get_lang('FirstAccessWasXSessionDurationYEndDateInZDays'), $firstAccessString, $duration, $days); |
62 | 62 | } else { |
63 | - $endDateInSeconds = $firstAccess + $duration * 24*60*60; |
|
63 | + $endDateInSeconds = $firstAccess + $duration * 24 * 60 * 60; |
|
64 | 64 | $last = api_convert_and_format_date($endDateInSeconds, DATE_FORMAT_SHORT); |
65 | 65 | $msg = sprintf(get_lang('FirstAccessWasXSessionDurationYEndDateWasZ'), $firstAccessString, $duration, $last); |
66 | 66 | } |
@@ -108,7 +108,7 @@ |
||
108 | 108 | ], |
109 | 109 | ['BulletedList', 'NumberedList', 'HorizontalRule'], |
110 | 110 | ['JustifyLeft', 'JustifyCenter', 'JustifyBlock'], |
111 | - [ 'Styles', |
|
111 | + ['Styles', |
|
112 | 112 | 'Format', |
113 | 113 | 'Font', |
114 | 114 | 'FontSize', |
@@ -56,11 +56,11 @@ discard block |
||
56 | 56 | '-', |
57 | 57 | 'Find' |
58 | 58 | ], |
59 | - ['Wikilink','Link','Unlink','Anchor'], |
|
60 | - ['Image','Video','Flash','Oembed','Youtube','Audio','Asciimath'], |
|
61 | - ['Table','HorizontalRule','Smiley','SpecialChar','leaflet'], |
|
62 | - ['Format','Font','FontSize'], |
|
63 | - ['Bold','Italic','Underline'], |
|
59 | + ['Wikilink', 'Link', 'Unlink', 'Anchor'], |
|
60 | + ['Image', 'Video', 'Flash', 'Oembed', 'Youtube', 'Audio', 'Asciimath'], |
|
61 | + ['Table', 'HorizontalRule', 'Smiley', 'SpecialChar', 'leaflet'], |
|
62 | + ['Format', 'Font', 'FontSize'], |
|
63 | + ['Bold', 'Italic', 'Underline'], |
|
64 | 64 | [ |
65 | 65 | 'Subscript', |
66 | 66 | 'Superscript', |
@@ -94,10 +94,10 @@ discard block |
||
94 | 94 | return [ |
95 | 95 | ['Save', 'NewPage', 'Templates', '-', 'PasteText'], |
96 | 96 | ['Undo', 'Redo'], |
97 | - ['Wikilink', 'Link', 'Image', 'Video', 'Flash', 'Audio', 'Table', 'Asciimath', 'Asciisvg'], |
|
97 | + ['Wikilink', 'Link', 'Image', 'Video', 'Flash', 'Audio', 'Table', 'Asciimath', 'Asciisvg'], |
|
98 | 98 | ['BulletedList', 'NumberedList', 'HorizontalRule'], |
99 | 99 | ['JustifyLeft', 'JustifyCenter', 'JustifyRight', 'JustifyBlock'], |
100 | - ['Styles','Format', 'Font', 'FontSize', 'Bold', 'Italic', 'Underline', 'TextColor', 'BGColor', 'Source'], |
|
100 | + ['Styles', 'Format', 'Font', 'FontSize', 'Bold', 'Italic', 'Underline', 'TextColor', 'BGColor', 'Source'], |
|
101 | 101 | api_get_setting('enabled_wiris') == 'true' ? ['ckeditor_wiris_formulaEditor', 'ckeditor_wiris_CAS'] : [''], |
102 | 102 | ['Toolbarswitch'] |
103 | 103 | ]; |
@@ -55,7 +55,7 @@ discard block |
||
55 | 55 | public function createHtmlStyle() |
56 | 56 | { |
57 | 57 | $style = ''; |
58 | - if (trim($this->value) == '<html><head><title></title></head><body></body></html>' || $this->value == '' ) { |
|
58 | + if (trim($this->value) == '<html><head><title></title></head><body></body></html>' || $this->value == '') { |
|
59 | 59 | $cssFile = api_get_path(SYS_CSS_PATH).'themes/'.api_get_visual_theme().'/editor.css'; |
60 | 60 | if (!is_file($cssFile)) { |
61 | 61 | $cssFile = api_get_path(WEB_CSS_PATH).'editor.css'; |
@@ -147,14 +147,14 @@ discard block |
||
147 | 147 | return [[ |
148 | 148 | 'title' => get_lang('EmptyTemplate'), |
149 | 149 | 'description' => null, |
150 | - 'image' => api_get_path(WEB_APP_PATH) . 'home/default_platform_document/template_thumb/empty.gif', |
|
150 | + 'image' => api_get_path(WEB_APP_PATH).'home/default_platform_document/template_thumb/empty.gif', |
|
151 | 151 | 'html' => ' |
152 | 152 | <!DOCYTPE html> |
153 | 153 | <html> |
154 | 154 | <head> |
155 | - <meta charset="' . api_get_system_encoding() . '" /> |
|
155 | + <meta charset="' . api_get_system_encoding().'" /> |
|
156 | 156 | </head> |
157 | - <body dir="' . api_get_text_direction() . '"> |
|
157 | + <body dir="' . api_get_text_direction().'"> |
|
158 | 158 | <p> |
159 | 159 | <br/> |
160 | 160 | </p> |
@@ -177,7 +177,7 @@ discard block |
||
177 | 177 | $search = array('{CSS}', '{IMG_DIR}', '{REL_PATH}', '{COURSE_DIR}'); |
178 | 178 | $replace = array( |
179 | 179 | '', |
180 | - api_get_path(REL_CODE_PATH) . 'img/', |
|
180 | + api_get_path(REL_CODE_PATH).'img/', |
|
181 | 181 | api_get_path(REL_PATH), |
182 | 182 | api_get_path(REL_DEFAULT_COURSE_DOCUMENT_PATH), |
183 | 183 | api_get_path(REL_DEFAULT_COURSE_DOCUMENT_PATH) |
@@ -188,7 +188,7 @@ discard block |
||
188 | 188 | foreach ($systemTemplates as $template) { |
189 | 189 | $image = $template->getImage(); |
190 | 190 | $image = !empty($image) ? $image : 'empty.gif'; |
191 | - $image = api_get_path(WEB_APP_PATH) . 'home/default_platform_document/template_thumb/' . $image; |
|
191 | + $image = api_get_path(WEB_APP_PATH).'home/default_platform_document/template_thumb/'.$image; |
|
192 | 192 | |
193 | 193 | /*$image = $this->urlGenerator->generate( |
194 | 194 | 'get_document_template_action', |
@@ -240,12 +240,12 @@ discard block |
||
240 | 240 | $templateItem['image'] = api_get_path(WEB_APP_PATH) |
241 | 241 | . 'home/default_platform_document/template_thumb/noimage.gif'; |
242 | 242 | $templateItem['html'] = file_get_contents(api_get_path(SYS_COURSE_PATH) |
243 | - . $courseDirectory . '/document' . $templateData['path']); |
|
243 | + . $courseDirectory.'/document'.$templateData['path']); |
|
244 | 244 | |
245 | 245 | $image = $template->getImage(); |
246 | 246 | if (!empty($image)) { |
247 | 247 | $templateItem['image'] = api_get_path(WEB_COURSE_PATH) |
248 | - . $courseDirectory . '/upload/template_thumbnails/' . $template->getImage(); |
|
248 | + . $courseDirectory.'/upload/template_thumbnails/'.$template->getImage(); |
|
249 | 249 | } |
250 | 250 | |
251 | 251 | $templateList[] = $templateItem; |
@@ -338,7 +338,7 @@ |
||
338 | 338 | |
339 | 339 | if (empty($certificatesItem) && empty($searchItem)) { |
340 | 340 | return null; |
341 | - }else{ |
|
341 | + } else{ |
|
342 | 342 | $content.= $certificatesItem; |
343 | 343 | $content.= $searchItem; |
344 | 344 | } |
@@ -276,7 +276,7 @@ discard block |
||
276 | 276 | $content = '<div class="help">'; |
277 | 277 | $content .= Display::url( |
278 | 278 | Display::return_icon('help.large.png', get_lang('Help')), |
279 | - api_get_path(WEB_CODE_PATH) . 'help/help.php?open=' . $help, |
|
279 | + api_get_path(WEB_CODE_PATH).'help/help.php?open='.$help, |
|
280 | 280 | [ |
281 | 281 | 'class' => 'ajax', |
282 | 282 | 'data-title' => get_lang('Help') |
@@ -490,7 +490,7 @@ discard block |
||
490 | 490 | 'web_course' => api_get_path(WEB_COURSE_PATH), |
491 | 491 | 'web_main' => api_get_path(WEB_CODE_PATH), |
492 | 492 | 'web_css' => api_get_path(WEB_CSS_PATH), |
493 | - 'web_css_theme' => api_get_path(WEB_CSS_PATH) . 'themes/' . $this->theme . '/', |
|
493 | + 'web_css_theme' => api_get_path(WEB_CSS_PATH).'themes/'.$this->theme.'/', |
|
494 | 494 | 'web_ajax' => api_get_path(WEB_AJAX_PATH), |
495 | 495 | 'web_img' => api_get_path(WEB_IMG_PATH), |
496 | 496 | 'web_plugin' => api_get_path(WEB_PLUGIN_PATH), |
@@ -548,12 +548,12 @@ discard block |
||
548 | 548 | foreach ($bowerCSSFiles as $file) { |
549 | 549 | $css[] = api_get_path(WEB_PATH).'web/assets/'.$file; |
550 | 550 | } |
551 | - $css[] = api_get_path(WEB_LIBRARY_PATH) . 'javascript/bootstrap-select/css/bootstrap-select.min.css'; |
|
552 | - $css[] = api_get_path(WEB_LIBRARY_PATH) . 'javascript/chosen/chosen.css'; |
|
553 | - $css[] = api_get_path(WEB_LIBRARY_PATH) . 'javascript/tag/style.css'; |
|
551 | + $css[] = api_get_path(WEB_LIBRARY_PATH).'javascript/bootstrap-select/css/bootstrap-select.min.css'; |
|
552 | + $css[] = api_get_path(WEB_LIBRARY_PATH).'javascript/chosen/chosen.css'; |
|
553 | + $css[] = api_get_path(WEB_LIBRARY_PATH).'javascript/tag/style.css'; |
|
554 | 554 | |
555 | 555 | if (api_is_global_chat_enabled()) { |
556 | - $css[] = api_get_path(WEB_LIBRARY_PATH) . 'javascript/chat/css/chat.css'; |
|
556 | + $css[] = api_get_path(WEB_LIBRARY_PATH).'javascript/chat/css/chat.css'; |
|
557 | 557 | } |
558 | 558 | |
559 | 559 | //THEME CSS STYLE |
@@ -597,7 +597,7 @@ discard block |
||
597 | 597 | |
598 | 598 | if (is_file(api_get_path(SYS_CSS_PATH).'themes/'.$this->theme.'/editor.css')) { |
599 | 599 | $css[] = api_get_path(WEB_CSS_PATH).'themes/'.$this->theme.'/editor.css'; |
600 | - }else{ |
|
600 | + } else { |
|
601 | 601 | $css[] = api_get_cdn_path(api_get_path(WEB_CSS_PATH).'editor.css'); |
602 | 602 | } |
603 | 603 | |
@@ -632,7 +632,7 @@ discard block |
||
632 | 632 | |
633 | 633 | $style_print = ''; |
634 | 634 | if (is_readable(api_get_path(SYS_CSS_PATH).$this->theme.'/print.css')) { |
635 | - $style_print = api_get_css(api_get_cdn_path(api_get_path(WEB_CSS_PATH) . $this->theme . '/print.css'), |
|
635 | + $style_print = api_get_css(api_get_cdn_path(api_get_path(WEB_CSS_PATH).$this->theme.'/print.css'), |
|
636 | 636 | 'print'); |
637 | 637 | } |
638 | 638 | $this->assign('css_style_print', $style_print); |
@@ -655,10 +655,10 @@ discard block |
||
655 | 655 | |
656 | 656 | $isoCode = api_get_language_isocode(); |
657 | 657 | |
658 | - $selectLink = 'bootstrap-select/js/i18n/defaults-' . $isoCode . '_' . strtoupper($isoCode) . '.min.js'; |
|
658 | + $selectLink = 'bootstrap-select/js/i18n/defaults-'.$isoCode.'_'.strtoupper($isoCode).'.min.js'; |
|
659 | 659 | |
660 | 660 | if ($isoCode == 'en') { |
661 | - $selectLink = 'bootstrap-select/js/i18n/defaults-' . $isoCode . '_US.min.js'; |
|
661 | + $selectLink = 'bootstrap-select/js/i18n/defaults-'.$isoCode.'_US.min.js'; |
|
662 | 662 | } |
663 | 663 | // JS files |
664 | 664 | $js_files = array( |
@@ -710,8 +710,8 @@ discard block |
||
710 | 710 | } |
711 | 711 | |
712 | 712 | if ($isoCode != 'en') { |
713 | - $bowerJsFiles[] = 'jqueryui-timepicker-addon/dist/i18n/jquery-ui-timepicker-' . $isoCode . '.js'; |
|
714 | - $bowerJsFiles[] = 'jquery-ui/ui/minified/i18n/datepicker-' . $isoCode . '.min.js'; |
|
713 | + $bowerJsFiles[] = 'jqueryui-timepicker-addon/dist/i18n/jquery-ui-timepicker-'.$isoCode.'.js'; |
|
714 | + $bowerJsFiles[] = 'jquery-ui/ui/minified/i18n/datepicker-'.$isoCode.'.min.js'; |
|
715 | 715 | } |
716 | 716 | |
717 | 717 | foreach ($bowerJsFiles as $file) { |
@@ -792,7 +792,7 @@ discard block |
||
792 | 792 | } |
793 | 793 | |
794 | 794 | $this->assign('online_button', Display::return_icon('statusonline.png', null, null, ICON_SIZE_ATOM)); |
795 | - $this->assign('offline_button',Display::return_icon('statusoffline.png', null, null, ICON_SIZE_ATOM)); |
|
795 | + $this->assign('offline_button', Display::return_icon('statusoffline.png', null, null, ICON_SIZE_ATOM)); |
|
796 | 796 | |
797 | 797 | // Get language iso-code for this page - ignore errors |
798 | 798 | $this->assign('document_language', api_get_language_isocode()); |
@@ -851,14 +851,14 @@ discard block |
||
851 | 851 | $this->assign('section_name', 'section-'.$this_section); |
852 | 852 | |
853 | 853 | //Defaul root chamilo favicon |
854 | - $favico = '<link rel="shortcut icon" href="' . api_get_path(WEB_PATH) . 'favicon.ico" type="image/x-icon" />'; |
|
854 | + $favico = '<link rel="shortcut icon" href="'.api_get_path(WEB_PATH).'favicon.ico" type="image/x-icon" />'; |
|
855 | 855 | |
856 | 856 | //Added to verify if in the current Chamilo Theme exist a favicon |
857 | - $favicoThemeUrl = api_get_path(SYS_CSS_PATH) . 'themes/' . $this->theme . '/images/'; |
|
857 | + $favicoThemeUrl = api_get_path(SYS_CSS_PATH).'themes/'.$this->theme.'/images/'; |
|
858 | 858 | |
859 | 859 | //If exist pick the current chamilo theme favicon |
860 | - if (is_file($favicoThemeUrl . 'favicon.ico')) { |
|
861 | - $favico = '<link rel="shortcut icon" href="' . api_get_path(WEB_CSS_PATH). 'themes/' . $this->theme . '/images/favicon.ico" type="image/x-icon" />'; |
|
860 | + if (is_file($favicoThemeUrl.'favicon.ico')) { |
|
861 | + $favico = '<link rel="shortcut icon" href="'.api_get_path(WEB_CSS_PATH).'themes/'.$this->theme.'/images/favicon.ico" type="image/x-icon" />'; |
|
862 | 862 | } |
863 | 863 | |
864 | 864 | if (api_is_multiple_url_enabled()) { |
@@ -888,7 +888,7 @@ discard block |
||
888 | 888 | if (api_get_setting('show_link_bug_notification') == 'true' && $this->user_is_logged_in) { |
889 | 889 | $rightFloatMenu = '<div class="report"> |
890 | 890 | <a href="http://support.chamilo.org/projects/chamilo-18/wiki/How_to_report_bugs" target="_blank"> |
891 | - '. $iconBug . ' |
|
891 | + '. $iconBug.' |
|
892 | 892 | </a> |
893 | 893 | </div>'; |
894 | 894 | } |
@@ -904,7 +904,7 @@ discard block |
||
904 | 904 | $url = api_get_path(WEB_CODE_PATH).'ticket/new_ticket.php?project_id=1&'.$courseParams; |
905 | 905 | $rightFloatMenu .= '<div class="report"> |
906 | 906 | <a href="'.$url.'" target="_blank"> |
907 | - '. $iconTicket . ' |
|
907 | + '. $iconTicket.' |
|
908 | 908 | </a> |
909 | 909 | </div>'; |
910 | 910 | } |
@@ -1023,13 +1023,13 @@ discard block |
||
1023 | 1023 | $socialMeta = ''; |
1024 | 1024 | $metaTitle = api_get_setting('meta_title'); |
1025 | 1025 | if (!empty($metaTitle)) { |
1026 | - $socialMeta .= '<meta name="twitter:card" content="summary" />' . "\n"; |
|
1026 | + $socialMeta .= '<meta name="twitter:card" content="summary" />'."\n"; |
|
1027 | 1027 | $metaSite = api_get_setting('meta_twitter_site'); |
1028 | 1028 | if (!empty($metaSite)) { |
1029 | - $socialMeta .= '<meta name="twitter:site" content="' . $metaSite . '" />' . "\n"; |
|
1029 | + $socialMeta .= '<meta name="twitter:site" content="'.$metaSite.'" />'."\n"; |
|
1030 | 1030 | $metaCreator = api_get_setting('meta_twitter_creator'); |
1031 | 1031 | if (!empty($metaCreator)) { |
1032 | - $socialMeta .= '<meta name="twitter:creator" content="' . $metaCreator . '" />' . "\n"; |
|
1032 | + $socialMeta .= '<meta name="twitter:creator" content="'.$metaCreator.'" />'."\n"; |
|
1033 | 1033 | } |
1034 | 1034 | } |
1035 | 1035 | |
@@ -1041,19 +1041,19 @@ discard block |
||
1041 | 1041 | if (!$userId && !$skillId) { |
1042 | 1042 | // no combination of user and skill ID has been defined, |
1043 | 1043 | // so print the normal OpenGraph meta tags |
1044 | - $socialMeta .= '<meta property="og:title" content="' . $metaTitle . '" />' . "\n"; |
|
1045 | - $socialMeta .= '<meta property="og:url" content="' . api_get_path(WEB_PATH) . '" />' . "\n"; |
|
1044 | + $socialMeta .= '<meta property="og:title" content="'.$metaTitle.'" />'."\n"; |
|
1045 | + $socialMeta .= '<meta property="og:url" content="'.api_get_path(WEB_PATH).'" />'."\n"; |
|
1046 | 1046 | |
1047 | 1047 | $metaDescription = api_get_setting('meta_description'); |
1048 | 1048 | if (!empty($metaDescription)) { |
1049 | - $socialMeta .= '<meta property="og:description" content="' . $metaDescription . '" />' . "\n"; |
|
1049 | + $socialMeta .= '<meta property="og:description" content="'.$metaDescription.'" />'."\n"; |
|
1050 | 1050 | } |
1051 | 1051 | |
1052 | 1052 | $metaImage = api_get_setting('meta_image_path'); |
1053 | 1053 | if (!empty($metaImage)) { |
1054 | - if (is_file(api_get_path(SYS_PATH) . $metaImage)) { |
|
1055 | - $path = api_get_path(WEB_PATH) . $metaImage; |
|
1056 | - $socialMeta .= '<meta property="og:image" content="' . $path . '" />' . "\n"; |
|
1054 | + if (is_file(api_get_path(SYS_PATH).$metaImage)) { |
|
1055 | + $path = api_get_path(WEB_PATH).$metaImage; |
|
1056 | + $socialMeta .= '<meta property="og:image" content="'.$path.'" />'."\n"; |
|
1057 | 1057 | } |
1058 | 1058 | } |
1059 | 1059 | } |
@@ -1087,7 +1087,7 @@ discard block |
||
1087 | 1087 | // Tutor name |
1088 | 1088 | if (api_get_setting('show_tutor_data') == 'true') { |
1089 | 1089 | // Course manager |
1090 | - $courseId = api_get_course_int_id(); |
|
1090 | + $courseId = api_get_course_int_id(); |
|
1091 | 1091 | $id_session = api_get_session_id(); |
1092 | 1092 | if (!empty($courseId)) { |
1093 | 1093 | $tutor_data = ''; |
@@ -1119,7 +1119,7 @@ discard block |
||
1119 | 1119 | $courseId = api_get_course_int_id(); |
1120 | 1120 | if (!empty($courseId)) { |
1121 | 1121 | $teacher_data = ''; |
1122 | - $mail= CourseManager::get_emails_of_tutors_to_course($courseId); |
|
1122 | + $mail = CourseManager::get_emails_of_tutors_to_course($courseId); |
|
1123 | 1123 | if (!empty($mail)) { |
1124 | 1124 | $teachers_parsed = array(); |
1125 | 1125 | foreach ($mail as $value) { |
@@ -1375,7 +1375,7 @@ discard block |
||
1375 | 1375 | 'sessionVar' => basename(__FILE__, '.php'), |
1376 | 1376 | 'imageOptions' => array( |
1377 | 1377 | 'font_size' => 20, |
1378 | - 'font_path' => api_get_path(SYS_FONTS_PATH) . 'opensans/', |
|
1378 | + 'font_path' => api_get_path(SYS_FONTS_PATH).'opensans/', |
|
1379 | 1379 | 'font_file' => 'OpenSans-Regular.ttf', |
1380 | 1380 | //'output' => 'gif' |
1381 | 1381 | ) |
@@ -8,8 +8,8 @@ discard block |
||
8 | 8 | /** |
9 | 9 | * Code |
10 | 10 | */ |
11 | -include_once dirname(__FILE__) . '/../../../global.inc.php'; |
|
12 | -require_once dirname(__FILE__) . '/search_processor.class.php'; |
|
11 | +include_once dirname(__FILE__).'/../../../global.inc.php'; |
|
12 | +require_once dirname(__FILE__).'/search_processor.class.php'; |
|
13 | 13 | |
14 | 14 | /** |
15 | 15 | * Process links before pass it to search listing scripts |
@@ -104,11 +104,11 @@ discard block |
||
104 | 104 | |
105 | 105 | $link_id = intval($link_id); |
106 | 106 | $sql = "SELECT insert_user_id FROM $item_property_table |
107 | - WHERE ref = $link_id AND tool = '" . TOOL_LINK . "' AND c_id = $course_id |
|
107 | + WHERE ref = $link_id AND tool = '".TOOL_LINK."' AND c_id = $course_id |
|
108 | 108 | LIMIT 1"; |
109 | 109 | |
110 | 110 | $name = get_lang('Links'); |
111 | - $url = api_get_path(WEB_PATH) . 'main/link/link.php?cidReq=%s'; |
|
111 | + $url = api_get_path(WEB_PATH).'main/link/link.php?cidReq=%s'; |
|
112 | 112 | $url = sprintf($url, $course_id_alpha); |
113 | 113 | // Get the image path |
114 | 114 | $thumbnail = Display::returnIconPath('link.png'); |
@@ -8,8 +8,8 @@ discard block |
||
8 | 8 | /** |
9 | 9 | * Code |
10 | 10 | */ |
11 | -include_once dirname(__FILE__) . '/../../../global.inc.php'; |
|
12 | -require_once dirname(__FILE__) . '/search_processor.class.php'; |
|
11 | +include_once dirname(__FILE__).'/../../../global.inc.php'; |
|
12 | +require_once dirname(__FILE__).'/search_processor.class.php'; |
|
13 | 13 | |
14 | 14 | /** |
15 | 15 | * Process documents before pass it to search listing scripts |
@@ -82,7 +82,7 @@ discard block |
||
82 | 82 | $dk_result = Database::query($sql); |
83 | 83 | |
84 | 84 | $sql = "SELECT insert_user_id FROM $item_property_table |
85 | - WHERE ref = $doc_id AND tool = '" . TOOL_DOCUMENT . "' AND c_id = $course_id |
|
85 | + WHERE ref = $doc_id AND tool = '".TOOL_DOCUMENT."' AND c_id = $course_id |
|
86 | 86 | LIMIT 1"; |
87 | 87 | $name = ''; |
88 | 88 | if ($row = Database::fetch_array($dk_result)) { |
@@ -27,7 +27,7 @@ |
||
27 | 27 | $tool_name = get_lang('AddSpecificSearchField'); |
28 | 28 | |
29 | 29 | if (isset($_GET['action']) && $_GET['action'] === 'edit') { |
30 | - $tool_name = get_lang('EditSpecificSearchField'); |
|
30 | + $tool_name = get_lang('EditSpecificSearchField'); |
|
31 | 31 | } |
32 | 32 | // Create the form |
33 | 33 | $form = new FormValidator('specific_fields_add'); |
@@ -32,18 +32,18 @@ discard block |
||
32 | 32 | // Create the form |
33 | 33 | $form = new FormValidator('specific_fields_add'); |
34 | 34 | // Field variable name |
35 | -$form->addElement('hidden','field_id', $fieldId); |
|
36 | -$form->addElement('text','field_name',get_lang('FieldName')); |
|
37 | -$form->applyFilter('field_name','html_filter'); |
|
38 | -$form->applyFilter('field_name','trim'); |
|
35 | +$form->addElement('hidden', 'field_id', $fieldId); |
|
36 | +$form->addElement('text', 'field_name', get_lang('FieldName')); |
|
37 | +$form->applyFilter('field_name', 'html_filter'); |
|
38 | +$form->applyFilter('field_name', 'trim'); |
|
39 | 39 | $form->addRule('field_name', get_lang('ThisFieldIsRequired'), 'required'); |
40 | 40 | $form->addRule('field_name', get_lang('OnlyLettersAndNumbersAllowed'), 'username'); |
41 | -$form->addRule('field_name', '', 'maxlength',20); |
|
41 | +$form->addRule('field_name', '', 'maxlength', 20); |
|
42 | 42 | |
43 | 43 | // Set default values (only not empty when editing) |
44 | 44 | $defaults = array(); |
45 | 45 | if ($fieldId) { |
46 | - $form_information = get_specific_field_list(array( 'id' => $fieldId )); |
|
46 | + $form_information = get_specific_field_list(array('id' => $fieldId)); |
|
47 | 47 | $defaults['field_name'] = $form_information[0]['name']; |
48 | 48 | } |
49 | 49 | $form->setDefaults($defaults); |
@@ -54,7 +54,7 @@ discard block |
||
54 | 54 | if ($form->validate()) { |
55 | 55 | $field = $form->exportValues(); |
56 | 56 | $field_name = $field['field_name']; |
57 | - if (is_numeric($field['field_id']) && $field['field_id']<>0 && !empty($field['field_id'])) { |
|
57 | + if (is_numeric($field['field_id']) && $field['field_id'] <> 0 && !empty($field['field_id'])) { |
|
58 | 58 | edit_specific_field($field['field_id'], $field['field_name']); |
59 | 59 | $message = get_lang('FieldEdited'); |
60 | 60 | } else { |