@@ -7,22 +7,22 @@ |
||
7 | 7 | */ |
8 | 8 | class SelectLanguage extends HTML_QuickForm_select |
9 | 9 | { |
10 | - /** |
|
11 | - * Class constructor |
|
12 | - */ |
|
13 | - public function __construct($elementName = null, $elementLabel = null, $options = null, $attributes = null) |
|
14 | - { |
|
15 | - parent::__construct($elementName, $elementLabel, $options, $attributes); |
|
16 | - // Get all languages |
|
17 | - $languages = api_get_languages(); |
|
18 | - $this->_options = array(); |
|
19 | - $this->_values = array(); |
|
20 | - foreach ($languages['name'] as $index => $name) { |
|
21 | - if ($languages['folder'][$index] == api_get_setting('platformLanguage')) { |
|
22 | - $this->addOption($name, $languages['folder'][$index], array('selected'=>'selected')); |
|
23 | - } else { |
|
24 | - $this->addOption($name, $languages['folder'][$index]); |
|
25 | - } |
|
26 | - } |
|
27 | - } |
|
10 | + /** |
|
11 | + * Class constructor |
|
12 | + */ |
|
13 | + public function __construct($elementName = null, $elementLabel = null, $options = null, $attributes = null) |
|
14 | + { |
|
15 | + parent::__construct($elementName, $elementLabel, $options, $attributes); |
|
16 | + // Get all languages |
|
17 | + $languages = api_get_languages(); |
|
18 | + $this->_options = array(); |
|
19 | + $this->_values = array(); |
|
20 | + foreach ($languages['name'] as $index => $name) { |
|
21 | + if ($languages['folder'][$index] == api_get_setting('platformLanguage')) { |
|
22 | + $this->addOption($name, $languages['folder'][$index], array('selected'=>'selected')); |
|
23 | + } else { |
|
24 | + $this->addOption($name, $languages['folder'][$index]); |
|
25 | + } |
|
26 | + } |
|
27 | + } |
|
28 | 28 | } |
@@ -149,8 +149,8 @@ discard block |
||
149 | 149 | ); |
150 | 150 | } |
151 | 151 | } else { |
152 | - foreach($document_data['parents'] as $document_sub_data) { |
|
153 | - if (!isset($_GET['createdir']) && $document_sub_data['id'] == $document_data['id']) { |
|
152 | + foreach ($document_data['parents'] as $document_sub_data) { |
|
153 | + if (!isset($_GET['createdir']) && $document_sub_data['id'] == $document_data['id']) { |
|
154 | 154 | $document_sub_data['document_url'] = '#'; |
155 | 155 | } |
156 | 156 | $interbreadcrumb[] = array( |
@@ -180,7 +180,7 @@ discard block |
||
180 | 180 | } |
181 | 181 | $js_glossary_in_documents = ''; |
182 | 182 | |
183 | -$js_glossary_in_documents = ' |
|
183 | +$js_glossary_in_documents = ' |
|
184 | 184 | $.frameReady(function(){ |
185 | 185 | // $("<div>I am a div courses</div>").prependTo("body"); |
186 | 186 | }, "top.mainFrame", |
@@ -200,7 +200,7 @@ discard block |
||
200 | 200 | // PDF should be displayed with viewerJS |
201 | 201 | $web_odf_supported_files[] = 'pdf'; |
202 | 202 | if (in_array(strtolower($pathinfo['extension']), $web_odf_supported_files)) { |
203 | - $show_web_odf = true; |
|
203 | + $show_web_odf = true; |
|
204 | 204 | /* |
205 | 205 | $htmlHeadXtra[] = api_get_js('webodf/webodf.js'); |
206 | 206 | $htmlHeadXtra[] = api_get_css(api_get_path(WEB_LIBRARY_PATH).'javascript/webodf/webodf.css'); |
@@ -243,7 +243,7 @@ discard block |
||
243 | 243 | $htmlHeadXtra[] = api_get_js('highlight/highlight.pack.js'); |
244 | 244 | $htmlHeadXtra[] = api_get_css(api_get_path(WEB_CSS_PATH).'chat.css'); |
245 | 245 | $htmlHeadXtra[] = api_get_css( |
246 | - api_get_path(WEB_LIBRARY_PATH) . 'javascript/highlight/styles/github.css' |
|
246 | + api_get_path(WEB_LIBRARY_PATH).'javascript/highlight/styles/github.css' |
|
247 | 247 | ); |
248 | 248 | $htmlHeadXtra[] = ' |
249 | 249 | <script> |
@@ -254,7 +254,7 @@ discard block |
||
254 | 254 | $execute_iframe = true; |
255 | 255 | if ($jplayer_supported) { |
256 | 256 | $extension = api_strtolower($pathinfo['extension']); |
257 | - if ($extension == 'mp4') { |
|
257 | + if ($extension == 'mp4') { |
|
258 | 258 | $extension = 'm4v'; |
259 | 259 | } |
260 | 260 | $js_path = api_get_path(WEB_LIBRARY_PATH).'javascript/'; |
@@ -295,7 +295,7 @@ discard block |
||
295 | 295 | $execute_iframe = false; |
296 | 296 | } |
297 | 297 | |
298 | -$is_freemind_available = $pathinfo['extension']=='mm' && api_get_setting('enable_freemind') == 'true'; |
|
298 | +$is_freemind_available = $pathinfo['extension'] == 'mm' && api_get_setting('enable_freemind') == 'true'; |
|
299 | 299 | if ($is_freemind_available) { |
300 | 300 | $execute_iframe = false; |
301 | 301 | } |
@@ -339,18 +339,18 @@ discard block |
||
339 | 339 | $file_url_web = $file_url.'?'.api_get_cidreq(); |
340 | 340 | |
341 | 341 | if (in_array(strtolower($pathinfo['extension']), array('html', "htm"))) { |
342 | - echo '<a class="btn btn-default" href="' . $file_url_web . '" target="_blank">' . get_lang('CutPasteLink') . '</a>'; |
|
342 | + echo '<a class="btn btn-default" href="'.$file_url_web.'" target="_blank">'.get_lang('CutPasteLink').'</a>'; |
|
343 | 343 | } |
344 | 344 | |
345 | 345 | if ($show_web_odf) { |
346 | 346 | $browser = api_get_navigator(); |
347 | - $pdfUrl = api_get_path(WEB_LIBRARY_PATH) . 'javascript/ViewerJS/index.html#' . $file_url; |
|
347 | + $pdfUrl = api_get_path(WEB_LIBRARY_PATH).'javascript/ViewerJS/index.html#'.$file_url; |
|
348 | 348 | if ($browser['name'] == 'Mozilla' && preg_match('|.*\.pdf|i', $header_file)) { |
349 | 349 | $pdfUrl = $file_url; |
350 | 350 | } |
351 | 351 | echo '<div id="viewerJS">'; |
352 | 352 | echo '<iframe id="viewerJSContent" frameborder="0" allowfullscreen="allowfullscreen" webkitallowfullscreen style="width:100%;" |
353 | - src="' . $pdfUrl. '"> |
|
353 | + src="' . $pdfUrl.'"> |
|
354 | 354 | </iframe>'; |
355 | 355 | echo '</div>'; |
356 | 356 | } elseif (!$originIsLearnpath) { |
@@ -91,11 +91,11 @@ |
||
91 | 91 | $pathinfo = pathinfo($header_file); |
92 | 92 | |
93 | 93 | if ($pathinfo['extension']=='swf') { |
94 | - $width='83%'; |
|
95 | - $height='83%'; |
|
94 | + $width='83%'; |
|
95 | + $height='83%'; |
|
96 | 96 | } else { |
97 | - $width='100%'; |
|
98 | - $height='100%'; |
|
97 | + $width='100%'; |
|
98 | + $height='100%'; |
|
99 | 99 | } |
100 | 100 | |
101 | 101 | echo '<iframe border="0" frameborder="0" scrolling="no" style="width:'.$width.'; height:'.$height.';background-color:#ffffff;" id="mainFrame" name="mainFrame" src="'.$file_url_web.'?'.api_get_cidreq().'&rand='.mt_rand(1, 1000).'"></iframe>'; |
@@ -90,12 +90,12 @@ |
||
90 | 90 | $file_url_web = api_get_path(WEB_COURSE_PATH).$_course['path'].'/document'.$header_file.'?'.api_get_cidreq(); |
91 | 91 | $pathinfo = pathinfo($header_file); |
92 | 92 | |
93 | -if ($pathinfo['extension']=='swf') { |
|
94 | - $width='83%'; |
|
95 | - $height='83%'; |
|
93 | +if ($pathinfo['extension'] == 'swf') { |
|
94 | + $width = '83%'; |
|
95 | + $height = '83%'; |
|
96 | 96 | } else { |
97 | - $width='100%'; |
|
98 | - $height='100%'; |
|
97 | + $width = '100%'; |
|
98 | + $height = '100%'; |
|
99 | 99 | } |
100 | 100 | |
101 | 101 | echo '<iframe border="0" frameborder="0" scrolling="no" style="width:'.$width.'; height:'.$height.';background-color:#ffffff;" id="mainFrame" name="mainFrame" src="'.$file_url_web.'?'.api_get_cidreq().'&rand='.mt_rand(1, 1000).'"></iframe>'; |
@@ -15,16 +15,16 @@ discard block |
||
15 | 15 | //Add the JS needed to use the jqgrid |
16 | 16 | $htmlHeadXtra[] = api_get_jqgrid_js(); |
17 | 17 | // setting breadcrumbs |
18 | -$interbreadcrumb[] = array('url' => 'index.php','name' => get_lang('PlatformAdmin')); |
|
18 | +$interbreadcrumb[] = array('url' => 'index.php', 'name' => get_lang('PlatformAdmin')); |
|
19 | 19 | $action = isset($_GET['action']) ? $_GET['action'] : null; |
20 | 20 | if ($action == 'add') { |
21 | - $interbreadcrumb[] = array('url' => 'usergroups.php','name' => get_lang('Classes')); |
|
22 | - $interbreadcrumb[] = array('url' => '#','name' => get_lang('Add')); |
|
21 | + $interbreadcrumb[] = array('url' => 'usergroups.php', 'name' => get_lang('Classes')); |
|
22 | + $interbreadcrumb[] = array('url' => '#', 'name' => get_lang('Add')); |
|
23 | 23 | } elseif ($action == 'edit') { |
24 | - $interbreadcrumb[] = array('url' => 'usergroups.php','name' => get_lang('Classes')); |
|
25 | - $interbreadcrumb[] = array('url' => '#','name' => get_lang('Edit')); |
|
24 | + $interbreadcrumb[] = array('url' => 'usergroups.php', 'name' => get_lang('Classes')); |
|
25 | + $interbreadcrumb[] = array('url' => '#', 'name' => get_lang('Edit')); |
|
26 | 26 | } else { |
27 | - $interbreadcrumb[] = array('url' => '#','name' => get_lang('Classes')); |
|
27 | + $interbreadcrumb[] = array('url' => '#', 'name' => get_lang('Classes')); |
|
28 | 28 | } |
29 | 29 | |
30 | 30 | // The header. |
@@ -55,13 +55,13 @@ discard block |
||
55 | 55 | ); |
56 | 56 | |
57 | 57 | //Column config |
58 | -$column_model = array( |
|
59 | - array('name'=>'name', 'index'=>'name', 'width'=>'35', 'align'=>'left'), |
|
60 | - array('name'=>'users', 'index'=>'users', 'width'=>'15', 'align'=>'left'), |
|
61 | - array('name'=>'courses', 'index'=>'courses', 'width'=>'15', 'align'=>'left'), |
|
62 | - array('name'=>'sessions', 'index'=>'sessions', 'width'=>'15', 'align'=>'left'), |
|
63 | - array('name'=>'group_type', 'index'=>'group_type', 'width'=>'15', 'align'=>'center'), |
|
64 | - array('name'=>'actions', 'index'=>'actions', 'width'=>'20', 'align'=>'center', 'sortable'=>'false','formatter'=>'action_formatter'), |
|
58 | +$column_model = array( |
|
59 | + array('name'=>'name', 'index'=>'name', 'width'=>'35', 'align'=>'left'), |
|
60 | + array('name'=>'users', 'index'=>'users', 'width'=>'15', 'align'=>'left'), |
|
61 | + array('name'=>'courses', 'index'=>'courses', 'width'=>'15', 'align'=>'left'), |
|
62 | + array('name'=>'sessions', 'index'=>'sessions', 'width'=>'15', 'align'=>'left'), |
|
63 | + array('name'=>'group_type', 'index'=>'group_type', 'width'=>'15', 'align'=>'center'), |
|
64 | + array('name'=>'actions', 'index'=>'actions', 'width'=>'20', 'align'=>'center', 'sortable'=>'false', 'formatter'=>'action_formatter'), |
|
65 | 65 | ); |
66 | 66 | |
67 | 67 | //Autowidth |
@@ -73,11 +73,11 @@ discard block |
||
73 | 73 | //With this function we can add actions to the jgrid |
74 | 74 | $action_links = 'function action_formatter (cellvalue, options, rowObject) { |
75 | 75 | return \'' |
76 | - .' <a href="add_users_to_usergroup.php?id=\'+options.rowId+\'">' . Display::return_icon('user_to_class.png', get_lang('SubscribeUsersToClass'), null, ICON_SIZE_MEDIUM) . '</a>' |
|
77 | - .' <a href="add_courses_to_usergroup.php?id=\'+options.rowId+\'">' . Display::return_icon('course_to_class.png', get_lang('SubscribeClassToCourses'), null, ICON_SIZE_MEDIUM) . '</a>' |
|
78 | - .' <a href="add_sessions_to_usergroup.php?id=\'+options.rowId+\'">' . Display::return_icon('sessions_to_class.png', get_lang('SubscribeClassToSessions'), null, ICON_SIZE_MEDIUM) . '</a>' |
|
79 | - .' <a href="?action=edit&id=\'+options.rowId+\'">' . Display::return_icon('edit.png', get_lang('Edit'), null, ICON_SIZE_SMALL) . '</a>' |
|
80 | - .' <a onclick="javascript:if(!confirm('."\'".addslashes(api_htmlentities(get_lang("ConfirmYourChoice"),ENT_QUOTES))."\'".')) return false;" href="?action=delete&id=\'+options.rowId+\'">' . Display::return_icon('delete.png', get_lang('Delete'), null, ICON_SIZE_SMALL) . '</a>\'; |
|
76 | + .' <a href="add_users_to_usergroup.php?id=\'+options.rowId+\'">'.Display::return_icon('user_to_class.png', get_lang('SubscribeUsersToClass'), null, ICON_SIZE_MEDIUM).'</a>' |
|
77 | + .' <a href="add_courses_to_usergroup.php?id=\'+options.rowId+\'">'.Display::return_icon('course_to_class.png', get_lang('SubscribeClassToCourses'), null, ICON_SIZE_MEDIUM).'</a>' |
|
78 | + .' <a href="add_sessions_to_usergroup.php?id=\'+options.rowId+\'">'.Display::return_icon('sessions_to_class.png', get_lang('SubscribeClassToSessions'), null, ICON_SIZE_MEDIUM).'</a>' |
|
79 | + .' <a href="?action=edit&id=\'+options.rowId+\'">'.Display::return_icon('edit.png', get_lang('Edit'), null, ICON_SIZE_SMALL).'</a>' |
|
80 | + .' <a onclick="javascript:if(!confirm('."\'".addslashes(api_htmlentities(get_lang("ConfirmYourChoice"), ENT_QUOTES))."\'".')) return false;" href="?action=delete&id=\'+options.rowId+\'">'.Display::return_icon('delete.png', get_lang('Delete'), null, ICON_SIZE_SMALL).'</a>\'; |
|
81 | 81 | }'; |
82 | 82 | |
83 | 83 | ?> |
@@ -128,7 +128,7 @@ discard block |
||
128 | 128 | } else { |
129 | 129 | echo '<div class="actions">'; |
130 | 130 | echo '<a href="'.api_get_self().'">'. |
131 | - Display::return_icon('back.png',get_lang('Back'),'',ICON_SIZE_MEDIUM).'</a>'; |
|
131 | + Display::return_icon('back.png', get_lang('Back'), '', ICON_SIZE_MEDIUM).'</a>'; |
|
132 | 132 | echo '</div>'; |
133 | 133 | $token = Security::get_token(); |
134 | 134 | $form->addElement('hidden', 'sec_token'); |
@@ -42,7 +42,7 @@ |
||
42 | 42 | |
43 | 43 | return $this->render( |
44 | 44 | '@ChamiloPage/latest.html.twig', |
45 | - [ 'pages' => $pagesToShow ] |
|
45 | + ['pages' => $pagesToShow] |
|
46 | 46 | ); |
47 | 47 | } |
48 | 48 | } |
49 | 49 | \ No newline at end of file |
@@ -136,7 +136,7 @@ |
||
136 | 136 | ); |
137 | 137 | /** @var Category $category */ |
138 | 138 | foreach ($categories as $category) { |
139 | - $faq->addChild( |
|
139 | + $faq->addChild( |
|
140 | 140 | $category->getHeadline(), |
141 | 141 | array( |
142 | 142 | 'route' => 'faq', |
@@ -56,7 +56,7 @@ discard block |
||
56 | 56 | $indent = $post['indent_cnt']; |
57 | 57 | |
58 | 58 | $html = ''; |
59 | - $html .= '<div class="col-md-offset-' . $indent . '" >'; |
|
59 | + $html .= '<div class="col-md-offset-'.$indent.'" >'; |
|
60 | 60 | $html .= '<div class="panel panel-default forum-post">'; |
61 | 61 | $html .= '<div class="panel-body">'; |
62 | 62 | |
@@ -73,7 +73,7 @@ discard block |
||
73 | 73 | |
74 | 74 | if ($origin != 'learnpath') { |
75 | 75 | if (api_get_course_setting('allow_user_image_forum')) { |
76 | - $html .= '<div class="thumbnail">' . display_user_image($post['user_id'], $name, $origin) . '</div>'; |
|
76 | + $html .= '<div class="thumbnail">'.display_user_image($post['user_id'], $name, $origin).'</div>'; |
|
77 | 77 | } |
78 | 78 | |
79 | 79 | $html .= Display::tag( |
@@ -83,7 +83,7 @@ discard block |
||
83 | 83 | ); |
84 | 84 | } else { |
85 | 85 | if (api_get_course_setting('allow_user_image_forum')) { |
86 | - $html .= '<div class="thumbnail">' . display_user_image($post['user_id'], $name, $origin) . '</div>'; |
|
86 | + $html .= '<div class="thumbnail">'.display_user_image($post['user_id'], $name, $origin).'</div>'; |
|
87 | 87 | } |
88 | 88 | |
89 | 89 | $html .= Display::tag( |
@@ -124,7 +124,7 @@ discard block |
||
124 | 124 | (api_is_allowed_to_edit(false, true) && !(api_is_course_coach() && $current_forum['session_id'] != $sessionId)) |
125 | 125 | ) { |
126 | 126 | if ($locked == false) { |
127 | - $iconEdit .= "<a href=\"editpost.php?" . api_get_cidreq() |
|
127 | + $iconEdit .= "<a href=\"editpost.php?".api_get_cidreq() |
|
128 | 128 | . "&forum=$clean_forum_id&thread=$clean_thread_id&post={$post['post_id']}&id_attach=$id_attach" |
129 | 129 | . "\">" |
130 | 130 | . Display::return_icon('edit.png', get_lang('Edit'), array(), ICON_SIZE_SMALL) |
@@ -138,7 +138,7 @@ discard block |
||
138 | 138 | !(api_is_course_coach() && $current_forum['session_id'] != $sessionId) |
139 | 139 | ) { |
140 | 140 | if ($locked == false) { |
141 | - $deleteUrl = api_get_self() . '?' . api_get_cidreq() . '&' . http_build_query([ |
|
141 | + $deleteUrl = api_get_self().'?'.api_get_cidreq().'&'.http_build_query([ |
|
142 | 142 | 'forum' => $clean_forum_id, |
143 | 143 | 'thread' => $clean_thread_id, |
144 | 144 | 'action' => 'delete', |
@@ -176,9 +176,9 @@ discard block |
||
176 | 176 | ); |
177 | 177 | |
178 | 178 | if ($count > 0) { |
179 | - $iconEdit .= "<a href=\"viewthread.php?" . api_get_cidreq() |
|
179 | + $iconEdit .= "<a href=\"viewthread.php?".api_get_cidreq() |
|
180 | 180 | . "&forum=$clean_forum_id&thread=$clean_thread_id&action=move&origin=$origin&post={$post['post_id']}" |
181 | - . "\">" . Display::return_icon('move.png', get_lang('MovePost'), array(), ICON_SIZE_SMALL) . "</a>"; |
|
181 | + . "\">".Display::return_icon('move.png', get_lang('MovePost'), array(), ICON_SIZE_SMALL)."</a>"; |
|
182 | 182 | } |
183 | 183 | } |
184 | 184 | |
@@ -197,11 +197,11 @@ discard block |
||
197 | 197 | '1', $post['user_id'], $_GET['thread'] |
198 | 198 | ); |
199 | 199 | if ($locked == false) { |
200 | - $iconEdit .= "<a href=\"forumqualify.php?" . api_get_cidreq() |
|
200 | + $iconEdit .= "<a href=\"forumqualify.php?".api_get_cidreq() |
|
201 | 201 | . "&forum=$clean_forum_id&thread=$clean_thread_id&action=list&post={$post['post_id']}" |
202 | 202 | . "&user={$post['user_id']}&user_id={$post['user_id']}&origin=$origin" |
203 | 203 | . "&idtextqualify=$current_qualify_thread" |
204 | - . "\" >" . Display::return_icon('quiz.gif', get_lang('Qualify')) . "</a>"; |
|
204 | + . "\" >".Display::return_icon('quiz.gif', get_lang('Qualify'))."</a>"; |
|
205 | 205 | } |
206 | 206 | } |
207 | 207 | } |
@@ -209,7 +209,7 @@ discard block |
||
209 | 209 | $statusIcon = getPostStatus($current_forum, $post); |
210 | 210 | |
211 | 211 | if ($iconEdit != '') { |
212 | - $html .= '<div class="tools-icons">' . $iconEdit . ' '.$statusIcon.'</div>'; |
|
212 | + $html .= '<div class="tools-icons">'.$iconEdit.' '.$statusIcon.'</div>'; |
|
213 | 213 | } |
214 | 214 | |
215 | 215 | if (($current_forum_category && $current_forum_category['locked'] == 0) && |
@@ -219,7 +219,7 @@ discard block |
||
219 | 219 | if (!api_is_anonymous() && api_is_allowed_to_session_edit(false, true)) { |
220 | 220 | $buttonReply = Display::toolbarButton( |
221 | 221 | get_lang('ReplyToMessage'), |
222 | - 'reply.php?' . api_get_cidreq() . '&' . http_build_query([ |
|
222 | + 'reply.php?'.api_get_cidreq().'&'.http_build_query([ |
|
223 | 223 | 'forum' => $clean_forum_id, |
224 | 224 | 'thread' => $clean_thread_id, |
225 | 225 | 'post' => $post['post_id'], |
@@ -232,7 +232,7 @@ discard block |
||
232 | 232 | |
233 | 233 | $buttonQuote = Display::toolbarButton( |
234 | 234 | get_lang('QuoteMessage'), |
235 | - 'reply.php?' . api_get_cidreq() . '&' . http_build_query([ |
|
235 | + 'reply.php?'.api_get_cidreq().'&'.http_build_query([ |
|
236 | 236 | 'forum' => $clean_forum_id, |
237 | 237 | 'thread' => $clean_thread_id, |
238 | 238 | 'post' => $post['post_id'], |
@@ -248,21 +248,21 @@ discard block |
||
248 | 248 | if ($current_forum_category && $current_forum_category['locked'] == 1) { |
249 | 249 | $closedPost = Display::tag( |
250 | 250 | 'div', |
251 | - '<em class="fa fa-exclamation-triangle"></em> ' . get_lang('ForumcategoryLocked'), |
|
251 | + '<em class="fa fa-exclamation-triangle"></em> '.get_lang('ForumcategoryLocked'), |
|
252 | 252 | array('class' => 'alert alert-warning post-closed') |
253 | 253 | ); |
254 | 254 | } |
255 | 255 | if ($current_forum['locked'] == 1) { |
256 | 256 | $closedPost = Display::tag( |
257 | 257 | 'div', |
258 | - '<em class="fa fa-exclamation-triangle"></em> ' . get_lang('ForumLocked'), |
|
258 | + '<em class="fa fa-exclamation-triangle"></em> '.get_lang('ForumLocked'), |
|
259 | 259 | array('class' => 'alert alert-warning post-closed') |
260 | 260 | ); |
261 | 261 | } |
262 | 262 | if ($current_thread['locked'] == 1) { |
263 | 263 | $closedPost = Display::tag( |
264 | 264 | 'div', |
265 | - '<em class="fa fa-exclamation-triangle"></em> ' . get_lang('ThreadLocked'), |
|
265 | + '<em class="fa fa-exclamation-triangle"></em> '.get_lang('ThreadLocked'), |
|
266 | 266 | array('class' => 'alert alert-warning post-closed') |
267 | 267 | ); |
268 | 268 | } |
@@ -314,24 +314,24 @@ discard block |
||
314 | 314 | $html .= Display::return_icon('attachment.gif', get_lang('Attachment')); |
315 | 315 | $html .= '<a href="download.php?file='; |
316 | 316 | $html .= $realname; |
317 | - $html .= ' "> ' . $user_filename . ' </a>'; |
|
318 | - $html .= '<span class="forum_attach_comment" >' . $attachment['comment'] . '</span>'; |
|
317 | + $html .= ' "> '.$user_filename.' </a>'; |
|
318 | + $html .= '<span class="forum_attach_comment" >'.$attachment['comment'].'</span>'; |
|
319 | 319 | if (($current_forum['allow_edit'] == 1 && $post['user_id'] == $userId) || |
320 | 320 | (api_is_allowed_to_edit(false, true) && !(api_is_course_coach() && $current_forum['session_id'] != $sessionId)) |
321 | 321 | ) { |
322 | - $html .= ' <a href="' . api_get_self() . '?' . api_get_cidreq() . '&origin=' |
|
323 | - . Security::remove_XSS($_GET['origin']) . '&action=delete_attach&id_attach=' |
|
324 | - . $attachment['iid'] . '&forum=' . $clean_forum_id . '&thread=' . $clean_thread_id |
|
322 | + $html .= ' <a href="'.api_get_self().'?'.api_get_cidreq().'&origin=' |
|
323 | + . Security::remove_XSS($_GET['origin']).'&action=delete_attach&id_attach=' |
|
324 | + . $attachment['iid'].'&forum='.$clean_forum_id.'&thread='.$clean_thread_id |
|
325 | 325 | . '" onclick="javascript:if(!confirm(\'' |
326 | - . addslashes(api_htmlentities(get_lang('ConfirmYourChoice'), ENT_QUOTES)) . '\')) return false;">' |
|
327 | - . Display::return_icon('delete.gif', get_lang('Delete')) . '</a><br />'; |
|
326 | + . addslashes(api_htmlentities(get_lang('ConfirmYourChoice'), ENT_QUOTES)).'\')) return false;">' |
|
327 | + . Display::return_icon('delete.gif', get_lang('Delete')).'</a><br />'; |
|
328 | 328 | } |
329 | 329 | } |
330 | 330 | } |
331 | 331 | |
332 | 332 | $html .= '</div>'; |
333 | 333 | $html .= '<div class="col-md-6 text-right">'; |
334 | - $html .= $buttonReply . ' ' . $buttonQuote; |
|
334 | + $html .= $buttonReply.' '.$buttonQuote; |
|
335 | 335 | $html .= '</div>'; |
336 | 336 | $html .= '</div>'; |
337 | 337 | // The post has been displayed => it can be removed from the what's new array |
@@ -64,7 +64,7 @@ discard block |
||
64 | 64 | if (!api_is_anonymous() && api_is_allowed_to_session_edit(false, true)) { |
65 | 65 | $buttonReply = Display::toolbarButton( |
66 | 66 | get_lang('ReplyToMessage'), |
67 | - 'reply.php?' . api_get_cidreq() . '&' . http_build_query([ |
|
67 | + 'reply.php?'.api_get_cidreq().'&'.http_build_query([ |
|
68 | 68 | 'forum' => $clean_forum_id, |
69 | 69 | 'thread' => $clean_thread_id, |
70 | 70 | 'post' => $row['post_id'], |
@@ -77,7 +77,7 @@ discard block |
||
77 | 77 | |
78 | 78 | $buttonQuote = Display::toolbarButton( |
79 | 79 | get_lang('QuoteMessage'), |
80 | - 'reply.php?' . api_get_cidreq() . '&' . http_build_query([ |
|
80 | + 'reply.php?'.api_get_cidreq().'&'.http_build_query([ |
|
81 | 81 | 'forum' => $clean_forum_id, |
82 | 82 | 'thread' => $clean_thread_id, |
83 | 83 | 'post' => $row['post_id'], |
@@ -94,21 +94,21 @@ discard block |
||
94 | 94 | if (($current_forum_category && $current_forum_category['locked'] == 1)) { |
95 | 95 | $closedPost = Display::tag( |
96 | 96 | 'div', |
97 | - '<em class="fa fa-exclamation-triangle"></em> ' . get_lang('ForumcategoryLocked'), |
|
97 | + '<em class="fa fa-exclamation-triangle"></em> '.get_lang('ForumcategoryLocked'), |
|
98 | 98 | array('class' => 'alert alert-warning post-closed') |
99 | 99 | ); |
100 | 100 | } |
101 | 101 | if ($current_forum['locked'] == 1) { |
102 | 102 | $closedPost = Display::tag( |
103 | 103 | 'div', |
104 | - '<em class="fa fa-exclamation-triangle"></em> ' . get_lang('ForumLocked'), |
|
104 | + '<em class="fa fa-exclamation-triangle"></em> '.get_lang('ForumLocked'), |
|
105 | 105 | array('class' => 'alert alert-warning post-closed') |
106 | 106 | ); |
107 | 107 | } |
108 | 108 | if ($current_thread['locked'] == 1) { |
109 | 109 | $closedPost = Display::tag( |
110 | 110 | 'div', |
111 | - '<em class="fa fa-exclamation-triangle"></em> ' . get_lang('ThreadLocked'), |
|
111 | + '<em class="fa fa-exclamation-triangle"></em> '.get_lang('ThreadLocked'), |
|
112 | 112 | array('class' => 'alert alert-warning post-closed') |
113 | 113 | ); |
114 | 114 | } |
@@ -123,7 +123,7 @@ discard block |
||
123 | 123 | |
124 | 124 | if ($origin != 'learnpath') { |
125 | 125 | if (api_get_course_setting('allow_user_image_forum')) { |
126 | - $html .= '<div class="thumbnail">' . display_user_image($row['user_id'], $name, $origin) . '</div>'; |
|
126 | + $html .= '<div class="thumbnail">'.display_user_image($row['user_id'], $name, $origin).'</div>'; |
|
127 | 127 | } |
128 | 128 | $html .= Display::tag( |
129 | 129 | 'h4', |
@@ -132,9 +132,9 @@ discard block |
||
132 | 132 | ); |
133 | 133 | } else { |
134 | 134 | if (api_get_course_setting('allow_user_image_forum')) { |
135 | - $html .= '<div class="thumbnail">' . display_user_image($row['user_id'], $name, $origin) . '</div>'; |
|
135 | + $html .= '<div class="thumbnail">'.display_user_image($row['user_id'], $name, $origin).'</div>'; |
|
136 | 136 | } |
137 | - $name = Display::tag('strong', "#" . $postCount--, ['class' => 'text-info']) . " | $name"; |
|
137 | + $name = Display::tag('strong', "#".$postCount--, ['class' => 'text-info'])." | $name"; |
|
138 | 138 | $html .= Display::tag( |
139 | 139 | 'p', |
140 | 140 | $name, |
@@ -176,10 +176,10 @@ discard block |
||
176 | 176 | ) { |
177 | 177 | if (api_is_allowed_to_session_edit(false, true)) { |
178 | 178 | if ($locked == false) { |
179 | - $iconEdit .= "<a href=\"editpost.php?" . api_get_cidreq() . "&forum=" . $clean_forum_id |
|
180 | - . "&thread=" . $clean_thread_id . "&post=" . $row['post_id'] . "&origin=" |
|
181 | - . $origin . "&edit=edition&id_attach=" . $id_attach . "\">" |
|
182 | - . Display::return_icon('edit.png', get_lang('Edit'), array(), ICON_SIZE_SMALL) . "</a>"; |
|
179 | + $iconEdit .= "<a href=\"editpost.php?".api_get_cidreq()."&forum=".$clean_forum_id |
|
180 | + . "&thread=".$clean_thread_id."&post=".$row['post_id']."&origin=" |
|
181 | + . $origin."&edit=edition&id_attach=".$id_attach."\">" |
|
182 | + . Display::return_icon('edit.png', get_lang('Edit'), array(), ICON_SIZE_SMALL)."</a>"; |
|
183 | 183 | } |
184 | 184 | } |
185 | 185 | } |
@@ -191,7 +191,7 @@ discard block |
||
191 | 191 | ) { |
192 | 192 | |
193 | 193 | if ($locked == false) { |
194 | - $deleteUrl = api_get_self() . '?' . api_get_cidreq() . '&' . http_build_query([ |
|
194 | + $deleteUrl = api_get_self().'?'.api_get_cidreq().'&'.http_build_query([ |
|
195 | 195 | 'forum' => $clean_forum_id, |
196 | 196 | 'thread' => $clean_thread_id, |
197 | 197 | 'action' => 'delete', |
@@ -227,9 +227,9 @@ discard block |
||
227 | 227 | ); |
228 | 228 | $iconEdit .= ""; |
229 | 229 | if ($increment > 0) { |
230 | - $iconEdit .= "<a href=\"viewthread.php?" . api_get_cidreq() . "&forum=" . $clean_forum_id |
|
231 | - . "&thread=" . $clean_thread_id . "&action=move&post=" . $row['post_id'] |
|
232 | - . "&origin=" . $origin . "\">" |
|
230 | + $iconEdit .= "<a href=\"viewthread.php?".api_get_cidreq()."&forum=".$clean_forum_id |
|
231 | + . "&thread=".$clean_thread_id."&action=move&post=".$row['post_id'] |
|
232 | + . "&origin=".$origin."\">" |
|
233 | 233 | . Display::return_icon('move.png', get_lang('MovePost'), array(), ICON_SIZE_SMALL) |
234 | 234 | . "</a>"; |
235 | 235 | } |
@@ -256,16 +256,16 @@ discard block |
||
256 | 256 | $userCanEdit = true; |
257 | 257 | } |
258 | 258 | if ($increment > 0 && $locked == false && $userCanEdit) { |
259 | - $iconEdit .= "<a href=\"forumqualify.php?" . api_get_cidreq() . "&forum=" . $my_forum_id |
|
260 | - . "&thread=" . $clean_thread_id . "&action=list&post=" . $row['post_id'] |
|
261 | - . "&user=" . $row['poster_id'] . "&user_id=" . $row['poster_id'] |
|
262 | - . "&origin=" . $origin . "&idtextqualify=" . $current_qualify_thread . "\" >" |
|
259 | + $iconEdit .= "<a href=\"forumqualify.php?".api_get_cidreq()."&forum=".$my_forum_id |
|
260 | + . "&thread=".$clean_thread_id."&action=list&post=".$row['post_id'] |
|
261 | + . "&user=".$row['poster_id']."&user_id=".$row['poster_id'] |
|
262 | + . "&origin=".$origin."&idtextqualify=".$current_qualify_thread."\" >" |
|
263 | 263 | . Display::return_icon('quiz.gif', get_lang('Qualify')) |
264 | 264 | . "</a> "; |
265 | 265 | } |
266 | 266 | } |
267 | 267 | if ($iconEdit != '') { |
268 | - $html .= '<div class="tools-icons">' . $iconEdit . $statusIcon.'</div>'; |
|
268 | + $html .= '<div class="tools-icons">'.$iconEdit.$statusIcon.'</div>'; |
|
269 | 269 | } |
270 | 270 | |
271 | 271 | |
@@ -327,27 +327,27 @@ discard block |
||
327 | 327 | $realname = $attachment['path']; |
328 | 328 | $user_filename = $attachment['filename']; |
329 | 329 | $html .= Display::return_icon('attachment.gif', get_lang('Attachment')); |
330 | - $html .= '<a href="download.php?file=' . $realname . '"> ' . $user_filename . ' </a>'; |
|
330 | + $html .= '<a href="download.php?file='.$realname.'"> '.$user_filename.' </a>'; |
|
331 | 331 | |
332 | 332 | if (($current_forum['allow_edit'] == 1 && $row['user_id'] == $_user['user_id']) || |
333 | 333 | (api_is_allowed_to_edit(false, true) && !(api_is_course_coach() && $current_forum['session_id'] != $sessionId)) |
334 | 334 | ) { |
335 | - $html .= ' <a href="' . api_get_self() . '?' . api_get_cidreq() . '&origin=' |
|
336 | - . Security::remove_XSS($origin) . '&action=delete_attach&id_attach=' |
|
337 | - . $attachment['iid'] . '&forum=' . $clean_forum_id . '&thread=' . $clean_thread_id |
|
335 | + $html .= ' <a href="'.api_get_self().'?'.api_get_cidreq().'&origin=' |
|
336 | + . Security::remove_XSS($origin).'&action=delete_attach&id_attach=' |
|
337 | + . $attachment['iid'].'&forum='.$clean_forum_id.'&thread='.$clean_thread_id |
|
338 | 338 | . '" onclick="javascript:if(!confirm(\'' |
339 | 339 | . addslashes(api_htmlentities(get_lang('ConfirmYourChoice'), ENT_QUOTES)) |
340 | 340 | . '\')) return false;">' |
341 | 341 | . Display::return_icon('delete.png', get_lang('Delete'), array(), ICON_SIZE_SMALL) |
342 | 342 | . '</a><br />'; |
343 | 343 | } |
344 | - $html .= '<span class="forum_attach_comment" >' . $attachment['comment'] . '</span>'; |
|
344 | + $html .= '<span class="forum_attach_comment" >'.$attachment['comment'].'</span>'; |
|
345 | 345 | } |
346 | 346 | } |
347 | 347 | |
348 | 348 | $html .= '</div>'; |
349 | 349 | $html .= '<div class="col-md-5 text-right">'; |
350 | - $html .= $buttonReply . ' ' . $buttonQuote; |
|
350 | + $html .= $buttonReply.' '.$buttonQuote; |
|
351 | 351 | $html .= '</div>'; |
352 | 352 | $html .= '</div>'; |
353 | 353 |
@@ -428,7 +428,7 @@ discard block |
||
428 | 428 | * @param $stok |
429 | 429 | * @param $code |
430 | 430 | * @param $search_term |
431 | - * @return html |
|
431 | + * @return string |
|
432 | 432 | */ |
433 | 433 | function return_register_button($course, $stok, $code, $search_term) |
434 | 434 | { |
@@ -443,7 +443,7 @@ discard block |
||
443 | 443 | * @param $stok |
444 | 444 | * @param $search_term |
445 | 445 | * @param $code |
446 | - * @return html |
|
446 | + * @return string |
|
447 | 447 | */ |
448 | 448 | function return_unregister_button($course, $stok, $search_term, $code) |
449 | 449 | { |
@@ -60,7 +60,7 @@ discard block |
||
60 | 60 | $el.prepend('<?php echo Display::display_icon('nolines_minus.gif'); ?>'); |
61 | 61 | |
62 | 62 | $.ajax({ |
63 | - url: '<?php echo api_get_path(WEB_AJAX_PATH) . 'course.ajax.php' ?>', |
|
63 | + url: '<?php echo api_get_path(WEB_AJAX_PATH).'course.ajax.php' ?>', |
|
64 | 64 | type: 'GET', |
65 | 65 | dataType: 'json', |
66 | 66 | data: { |
@@ -128,9 +128,9 @@ discard block |
||
128 | 128 | $pageLength = (!empty($_REQUEST['pageLength']) ? intval($_REQUEST['pageLength']) : 10); |
129 | 129 | $pageCurrent = (!empty($_REQUEST['pageCurrent']) ? intval($_REQUEST['pageCurrent']) : 1); |
130 | 130 | $form = '<form action="'.$webAction.'" method="GET" class="form-horizontal">'; |
131 | - $form .= '<input type="hidden" name="action" value="' . $action . '">'; |
|
132 | - $form .= '<input type="hidden" name="pageCurrent" value="' . $pageCurrent . '">'; |
|
133 | - $form .= '<input type="hidden" name="pageLength" value="' . $pageLength . '">'; |
|
131 | + $form .= '<input type="hidden" name="action" value="'.$action.'">'; |
|
132 | + $form .= '<input type="hidden" name="pageCurrent" value="'.$pageCurrent.'">'; |
|
133 | + $form .= '<input type="hidden" name="pageLength" value="'.$pageLength.'">'; |
|
134 | 134 | $form .= '<div class="form-group">'; |
135 | 135 | $form .= '<div class="col-sm-12">'; |
136 | 136 | $form .= '<select name="category_code" onchange="submit();" class="selectpicker show-tick form-control">'; |
@@ -138,11 +138,11 @@ discard block |
||
138 | 138 | foreach ($browse_course_categories[0] as $category) { |
139 | 139 | $categoryCode = $category['code']; |
140 | 140 | $countCourse = $category['count_courses']; |
141 | - $form .= '<option '. ($categoryCode == $codeType? 'selected="selected" ':'') .' value="' . $category['code'] . '">' . $category['name'] . ' ( '. $countCourse .' ) </option>'; |
|
141 | + $form .= '<option '.($categoryCode == $codeType ? 'selected="selected" ' : '').' value="'.$category['code'].'">'.$category['name'].' ( '.$countCourse.' ) </option>'; |
|
142 | 142 | if (!empty($browse_course_categories[$categoryCode])) { |
143 | - foreach ($browse_course_categories[$categoryCode] as $subCategory){ |
|
143 | + foreach ($browse_course_categories[$categoryCode] as $subCategory) { |
|
144 | 144 | $subCategoryCode = $subCategory['code']; |
145 | - $form .= '<option '. ($subCategoryCode == $codeType ? 'selected="selected" ':'') .' value="' . $subCategory['code'] . '"> ---' . $subCategory['name'] . ' ( '. $subCategory['count_courses'] .' ) </option>'; |
|
145 | + $form .= '<option '.($subCategoryCode == $codeType ? 'selected="selected" ' : '').' value="'.$subCategory['code'].'"> ---'.$subCategory['name'].' ( '.$subCategory['count_courses'].' ) </option>'; |
|
146 | 146 | } |
147 | 147 | } |
148 | 148 | } |
@@ -320,7 +320,7 @@ discard block |
||
320 | 320 | if (!empty($categoryTitle)) { |
321 | 321 | $listCategory = CourseManager::getCategoriesList(); |
322 | 322 | $categoryTitle = $listCategory[$categoryTitle]; |
323 | - $html .= '<span class="category">'. $categoryTitle.'</span>'; |
|
323 | + $html .= '<span class="category">'.$categoryTitle.'</span>'; |
|
324 | 324 | $html .= '<div class="cribbon"></div>'; |
325 | 325 | } |
326 | 326 | $teachers = CourseManager::getTeachersFromCourseByCode($course['code']); |
@@ -331,13 +331,13 @@ discard block |
||
331 | 331 | if ($count > 2) { |
332 | 332 | break; |
333 | 333 | } |
334 | - $name = $value['firstname'].' ' . $value['lastname']; |
|
334 | + $name = $value['firstname'].' '.$value['lastname']; |
|
335 | 335 | $html .= '<a href="'.$value['url'].'" class="ajax" data-title="'.$name.'"> |
336 | 336 | <img src="'.$value['avatar'].'"/></a>'; |
337 | 337 | $html .= '<div class="teachers-details"><h5> |
338 | 338 | <a href="'.$value['url'].'" class="ajax" data-title="'.$name.'">' |
339 | - . $name . '</a></h5></div>'; |
|
340 | - $count ++; |
|
339 | + . $name.'</a></h5></div>'; |
|
340 | + $count++; |
|
341 | 341 | } |
342 | 342 | $html .= '</div></div>'; |
343 | 343 | $html .= '<div class="user-actions">'; |
@@ -360,8 +360,8 @@ discard block |
||
360 | 360 | $title = cut($course['title'], 70); |
361 | 361 | $ajax_url = api_get_path(WEB_AJAX_PATH).'course.ajax.php?a=add_course_vote'; |
362 | 362 | $rating = Display::return_rating_system('star_'.$course['real_id'], $ajax_url.'&course_id='.$course['real_id'], $course['point_info']); |
363 | - $html .= '<h4 class="title"><a href="' . $linkCourse . '">' . cut($title, 60) . '</a></h4>'; |
|
364 | - $html .= '<div class="ranking">'. $rating . '</div>'; |
|
363 | + $html .= '<h4 class="title"><a href="'.$linkCourse.'">'.cut($title, 60).'</a></h4>'; |
|
364 | + $html .= '<div class="ranking">'.$rating.'</div>'; |
|
365 | 365 | |
366 | 366 | return $html; |
367 | 367 | } |
@@ -376,8 +376,8 @@ discard block |
||
376 | 376 | $title = $course['title']; |
377 | 377 | $html = ''; |
378 | 378 | if (api_get_setting('show_courses_descriptions_in_catalog') == 'true') { |
379 | - $html = '<a data-title="' . $title . '" class="ajax btn btn-default btn-sm" href="'.api_get_path(WEB_CODE_PATH).'inc/ajax/course_home.ajax.php?a=show_course_information&code='.$course['code'].'" title="' . get_lang('Description') . '">' . |
|
380 | - Display::returnFontAwesomeIcon('info-circle') . '</a>'; |
|
379 | + $html = '<a data-title="'.$title.'" class="ajax btn btn-default btn-sm" href="'.api_get_path(WEB_CODE_PATH).'inc/ajax/course_home.ajax.php?a=show_course_information&code='.$course['code'].'" title="'.get_lang('Description').'">'. |
|
380 | + Display::returnFontAwesomeIcon('info-circle').'</a>'; |
|
381 | 381 | } |
382 | 382 | |
383 | 383 | return $html; |
@@ -390,7 +390,7 @@ discard block |
||
390 | 390 | */ |
391 | 391 | function return_goto_button($course) |
392 | 392 | { |
393 | - $html = ' <a class="btn btn-default btn-sm" title="' . get_lang('GoToCourse') . '" href="'.api_get_course_url($course['code']).'">'. |
|
393 | + $html = ' <a class="btn btn-default btn-sm" title="'.get_lang('GoToCourse').'" href="'.api_get_course_url($course['code']).'">'. |
|
394 | 394 | Display::returnFontAwesomeIcon('share').'</a>'; |
395 | 395 | |
396 | 396 | return $html; |
@@ -429,8 +429,8 @@ discard block |
||
429 | 429 | */ |
430 | 430 | function return_register_button($course, $stok, $code, $search_term) |
431 | 431 | { |
432 | - $html = ' <a class="btn btn-success btn-sm" title="' . get_lang('Subscribe') . '" href="'.api_get_self().'?action=subscribe_course&sec_token='.$stok.'&subscribe_course='.$course['code'].'&search_term='.$search_term.'&category_code='.$code.'">' . |
|
433 | - Display::returnFontAwesomeIcon('sign-in') . '</a>'; |
|
432 | + $html = ' <a class="btn btn-success btn-sm" title="'.get_lang('Subscribe').'" href="'.api_get_self().'?action=subscribe_course&sec_token='.$stok.'&subscribe_course='.$course['code'].'&search_term='.$search_term.'&category_code='.$code.'">'. |
|
433 | + Display::returnFontAwesomeIcon('sign-in').'</a>'; |
|
434 | 434 | return $html; |
435 | 435 | } |
436 | 436 | |
@@ -444,7 +444,7 @@ discard block |
||
444 | 444 | */ |
445 | 445 | function return_unregister_button($course, $stok, $search_term, $code) |
446 | 446 | { |
447 | - $html = ' <a class="btn btn-danger btn-sm" title="' . get_lang('Unsubscribe') . '" href="'. api_get_self().'?action=unsubscribe&sec_token='.$stok.'&unsubscribe='.$course['code'].'&search_term='.$search_term.'&category_code='.$code.'">' . |
|
448 | - Display::returnFontAwesomeIcon('sign-out') . '</a>'; |
|
447 | + $html = ' <a class="btn btn-danger btn-sm" title="'.get_lang('Unsubscribe').'" href="'.api_get_self().'?action=unsubscribe&sec_token='.$stok.'&unsubscribe='.$course['code'].'&search_term='.$search_term.'&category_code='.$code.'">'. |
|
448 | + Display::returnFontAwesomeIcon('sign-out').'</a>'; |
|
449 | 449 | return $html; |
450 | 450 | } |