@@ -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 | ]; |
@@ -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 { |
@@ -103,7 +103,7 @@ discard block |
||
103 | 103 | * @param string $canHaveCourses |
104 | 104 | * @param int $parent_id |
105 | 105 | * |
106 | - * @return bool |
|
106 | + * @return false|string |
|
107 | 107 | */ |
108 | 108 | public static function addNode($code, $name, $canHaveCourses, $parent_id) |
109 | 109 | { |
@@ -297,8 +297,7 @@ discard block |
||
297 | 297 | /** |
298 | 298 | * Counts the number of children categories a category has |
299 | 299 | * @param int $categoryId The ID of the category of which we want to count the children |
300 | - * @param int $count The number of subcategories we counted this far |
|
301 | - * @return mixed The number of subcategories this category has |
|
300 | + * @return integer The number of subcategories this category has |
|
302 | 301 | */ |
303 | 302 | public static function courseCategoryChildrenCount($categoryId) |
304 | 303 | { |
@@ -476,7 +475,7 @@ discard block |
||
476 | 475 | /** |
477 | 476 | * @param int $id |
478 | 477 | * |
479 | - * @return bool |
|
478 | + * @return boolean|null |
|
480 | 479 | */ |
481 | 480 | public static function addToUrl($id) |
482 | 481 | { |
@@ -958,7 +957,7 @@ discard block |
||
958 | 957 | * Get Pagination HTML div |
959 | 958 | * @param $pageCurrent |
960 | 959 | * @param $pageLength |
961 | - * @param $pageTotal |
|
960 | + * @param integer $pageTotal |
|
962 | 961 | * @return string |
963 | 962 | */ |
964 | 963 | public static function getCatalogPagination($pageCurrent, $pageLength, $pageTotal) |
@@ -26,7 +26,7 @@ discard block |
||
26 | 26 | if ($action == 'delete') { |
27 | 27 | CourseCategory::deleteNode($categoryId); |
28 | 28 | Display::addFlash(Display::return_message(get_lang('Deleted'))); |
29 | - header('Location: ' . api_get_self() . '?category=' . Security::remove_XSS($category)); |
|
29 | + header('Location: '.api_get_self().'?category='.Security::remove_XSS($category)); |
|
30 | 30 | exit(); |
31 | 31 | } elseif (($action == 'add' || $action == 'edit') && isset($_POST['formSent']) && $_POST['formSent']) { |
32 | 32 | if ($action == 'add') { |
@@ -54,7 +54,7 @@ discard block |
||
54 | 54 | } |
55 | 55 | } elseif ($action == 'moveUp') { |
56 | 56 | CourseCategory::moveNodeUp($categoryId, $_GET['tree_pos'], $category); |
57 | - header('Location: ' . api_get_self() . '?category=' . Security::remove_XSS($category)); |
|
57 | + header('Location: '.api_get_self().'?category='.Security::remove_XSS($category)); |
|
58 | 58 | Display::addFlash(Display::return_message(get_lang('Updated'))); |
59 | 59 | exit(); |
60 | 60 | } |
@@ -78,7 +78,7 @@ discard block |
||
78 | 78 | |
79 | 79 | $form_title = ($action == 'add') ? get_lang('AddACategory') : get_lang('EditNode'); |
80 | 80 | if (!empty($category)) { |
81 | - $form_title .= ' ' . get_lang('Into') . ' ' . Security::remove_XSS($category); |
|
81 | + $form_title .= ' '.get_lang('Into').' '.Security::remove_XSS($category); |
|
82 | 82 | } |
83 | 83 | $url = api_get_self().'?action='.Security::remove_XSS($action).'&category='.Security::remove_XSS($category).'&id='.Security::remove_XSS($categoryId); |
84 | 84 | $form = new FormValidator('course_category', 'post', $url); |
@@ -61,7 +61,7 @@ discard block |
||
61 | 61 | $vimeoMatch = preg_match('#://player.vimeo.com/#i', $matches[1]); |
62 | 62 | $googleMapsMatch = preg_match('#src="https://maps.google.com/#i', $matches[1]); |
63 | 63 | $slideShare = preg_match('#src="(https?:)?//www.slideshare.net/#', $matches[1]); |
64 | - $platformDomain = preg_match('#src="https?://(.+\.)?' . $hostName[1] . '#i', $matches[1]); |
|
64 | + $platformDomain = preg_match('#src="https?://(.+\.)?'.$hostName[1].'#i', $matches[1]); |
|
65 | 65 | |
66 | 66 | if ($youTubeMatch || $vimeoMatch || $googleMapsMatch || $slideShare || $platformDomain) { |
67 | 67 | $extra = ' frameborder="0"'; |
@@ -70,7 +70,7 @@ discard block |
||
70 | 70 | } elseif ($vimeoMatch) { |
71 | 71 | $extra .= ' webkitAllowFullScreen mozallowfullscreen allowFullScreen'; |
72 | 72 | } |
73 | - return '<iframe ' . $matches[1] . $extra . '></iframe>'; |
|
73 | + return '<iframe '.$matches[1].$extra.'></iframe>'; |
|
74 | 74 | } else { |
75 | 75 | return ''; |
76 | 76 | } |