@@ -7,7 +7,7 @@ discard block |
||
7 | 7 | * @package chamilo.exercise |
8 | 8 | */ |
9 | 9 | |
10 | -if ( count( get_included_files() ) == 1 ) die( '---' ); |
|
10 | +if (count(get_included_files()) == 1) die('---'); |
|
11 | 11 | |
12 | 12 | if (!function_exists('mime_content_type')) { |
13 | 13 | |
@@ -16,7 +16,7 @@ discard block |
||
16 | 16 | * @return string |
17 | 17 | */ |
18 | 18 | function mime_content_type($filename) { |
19 | - return DocumentManager::file_get_mime_type((string)$filename); |
|
19 | + return DocumentManager::file_get_mime_type((string) $filename); |
|
20 | 20 | } |
21 | 21 | } |
22 | 22 | |
@@ -30,7 +30,7 @@ discard block |
||
30 | 30 | */ |
31 | 31 | function setAnswer() |
32 | 32 | { |
33 | - switch($this->type) |
|
33 | + switch ($this->type) |
|
34 | 34 | { |
35 | 35 | case MCUA : |
36 | 36 | $answer = new AikenAnswerMultipleChoice($this->id); |
@@ -4,7 +4,7 @@ |
||
4 | 4 | use ChamiloSession as Session; |
5 | 5 | |
6 | 6 | require_once __DIR__.'/../inc/global.inc.php'; |
7 | -$current_course_tool = TOOL_STUDENTPUBLICATION; |
|
7 | +$current_course_tool = TOOL_STUDENTPUBLICATION; |
|
8 | 8 | |
9 | 9 | api_protect_course_script(true); |
10 | 10 |
@@ -204,9 +204,9 @@ discard block |
||
204 | 204 | $myCache = new pCache(array('CacheFolder' => substr($cachePath, 0, strlen($cachePath) - 1))); |
205 | 205 | $chartHash = $myCache->getHash($dataSet); |
206 | 206 | if ($myCache->isInCache($chartHash)) { |
207 | - $imgPath = api_get_path(SYS_ARCHIVE_PATH) . $chartHash; |
|
207 | + $imgPath = api_get_path(SYS_ARCHIVE_PATH).$chartHash; |
|
208 | 208 | $myCache->saveFromCache($chartHash, $imgPath); |
209 | - $imgPath = api_get_path(WEB_ARCHIVE_PATH) . $chartHash; |
|
209 | + $imgPath = api_get_path(WEB_ARCHIVE_PATH).$chartHash; |
|
210 | 210 | } else { |
211 | 211 | /* Create the pChart object */ |
212 | 212 | $widthSize = 480; |
@@ -233,7 +233,7 @@ discard block |
||
233 | 233 | /* Set the default font */ |
234 | 234 | $myPicture->setFontProperties( |
235 | 235 | array( |
236 | - 'FontName' => api_get_path(SYS_FONTS_PATH) . 'opensans/OpenSans-Regular.ttf', |
|
236 | + 'FontName' => api_get_path(SYS_FONTS_PATH).'opensans/OpenSans-Regular.ttf', |
|
237 | 237 | 'FontSize' => 10 |
238 | 238 | ) |
239 | 239 | ); |
@@ -305,11 +305,11 @@ discard block |
||
305 | 305 | /* Render the picture (choose the best way) */ |
306 | 306 | |
307 | 307 | $myCache->writeToCache($chartHash, $myPicture); |
308 | - $imgPath = api_get_path(SYS_ARCHIVE_PATH) . $chartHash; |
|
308 | + $imgPath = api_get_path(SYS_ARCHIVE_PATH).$chartHash; |
|
309 | 309 | $myCache->saveFromCache($chartHash, $imgPath); |
310 | - $imgPath = api_get_path(WEB_ARCHIVE_PATH) . $chartHash; |
|
310 | + $imgPath = api_get_path(WEB_ARCHIVE_PATH).$chartHash; |
|
311 | 311 | } |
312 | - echo '<img src="' . $imgPath . '" >'; |
|
312 | + echo '<img src="'.$imgPath.'" >'; |
|
313 | 313 | if ($i % 2 == 0 && $i != 0) { |
314 | 314 | echo '<br /><br />'; |
315 | 315 | } else { |
@@ -352,10 +352,10 @@ discard block |
||
352 | 352 | // previous X |
353 | 353 | $header .= '<td style="width:100%;">'; |
354 | 354 | if ($this->offset >= GRADEBOOK_ITEM_LIMIT) { |
355 | - $header .= '<a href="' . api_get_self() |
|
356 | - . '?selectcat=' . Security::remove_XSS($_GET['selectcat']) |
|
357 | - . '&offset=' . (($this->offset) - GRADEBOOK_ITEM_LIMIT) |
|
358 | - . (isset($_GET['search']) ? '&search=' . Security::remove_XSS($_GET['search']) : '') . '">' |
|
355 | + $header .= '<a href="'.api_get_self() |
|
356 | + . '?selectcat='.Security::remove_XSS($_GET['selectcat']) |
|
357 | + . '&offset='.(($this->offset) - GRADEBOOK_ITEM_LIMIT) |
|
358 | + . (isset($_GET['search']) ? '&search='.Security::remove_XSS($_GET['search']) : '').'">' |
|
359 | 359 | . Display::return_icon('action_prev.png', get_lang('PreviousPage'), array(), 32) |
360 | 360 | . '</a>'; |
361 | 361 | } else { |
@@ -367,10 +367,10 @@ discard block |
||
367 | 367 | ($totalitems - (GRADEBOOK_ITEM_LIMIT + $this->offset)) : GRADEBOOK_ITEM_LIMIT; |
368 | 368 | |
369 | 369 | if ($calcnext > 0) { |
370 | - $header .= '<a href="' . api_get_self() |
|
371 | - . '?selectcat=' . Security::remove_XSS($_GET['selectcat']) |
|
372 | - . '&offset=' . ($this->offset + GRADEBOOK_ITEM_LIMIT) |
|
373 | - . (isset($_GET['search']) ? '&search=' . Security::remove_XSS($_GET['search']) : '') . '">' |
|
370 | + $header .= '<a href="'.api_get_self() |
|
371 | + . '?selectcat='.Security::remove_XSS($_GET['selectcat']) |
|
372 | + . '&offset='.($this->offset + GRADEBOOK_ITEM_LIMIT) |
|
373 | + . (isset($_GET['search']) ? '&search='.Security::remove_XSS($_GET['search']) : '').'">' |
|
374 | 374 | . Display::return_icon('action_next.png', get_lang('NextPage'), array(), 32) |
375 | 375 | . '</a>'; |
376 | 376 | } else { |
@@ -477,6 +477,6 @@ discard block |
||
477 | 477 | */ |
478 | 478 | private function build_name_link($userId, $name) |
479 | 479 | { |
480 | - return '<a href="user_stats.php?userid=' . $userId . '&selectcat=' . $this->selectcat->get_id() . '&'.api_get_cidreq().'">' . $name . '</a>'; |
|
480 | + return '<a href="user_stats.php?userid='.$userId.'&selectcat='.$this->selectcat->get_id().'&'.api_get_cidreq().'">'.$name.'</a>'; |
|
481 | 481 | } |
482 | 482 | } |
@@ -23,7 +23,7 @@ |
||
23 | 23 | if ($id) { |
24 | 24 | $mode = 'update'; |
25 | 25 | } else { |
26 | - $mode = $registeronly ? 'register' : 'add' ; |
|
26 | + $mode = $registeronly ? 'register' : 'add'; |
|
27 | 27 | } |
28 | 28 | |
29 | 29 | $vhost = (array) Virtual::getInstance($id); |
@@ -23,7 +23,7 @@ discard block |
||
23 | 23 | } |
24 | 24 | |
25 | 25 | $content = ''; |
26 | -$currentUrl = api_get_self() . "?name=$pluginName"; |
|
26 | +$currentUrl = api_get_self()."?name=$pluginName"; |
|
27 | 27 | |
28 | 28 | if (isset($pluginInfo['settings_form'])) { |
29 | 29 | /** @var FormValidator $form */ |
@@ -66,7 +66,7 @@ discard block |
||
66 | 66 | $value = trim($value); |
67 | 67 | api_add_setting( |
68 | 68 | $value, |
69 | - Database::escape_string($pluginName . '_' . $key), |
|
69 | + Database::escape_string($pluginName.'_'.$key), |
|
70 | 70 | $pluginName, |
71 | 71 | 'setting', |
72 | 72 | 'Plugins', |
@@ -96,11 +96,11 @@ discard block |
||
96 | 96 | } |
97 | 97 | |
98 | 98 | $interbreadcrumb[] = array( |
99 | - 'url' => api_get_path(WEB_CODE_PATH) . 'admin/index.php', |
|
99 | + 'url' => api_get_path(WEB_CODE_PATH).'admin/index.php', |
|
100 | 100 | 'name' => get_lang('PlatformAdmin') |
101 | 101 | ); |
102 | 102 | $interbreadcrumb[] = array( |
103 | - 'url' => api_get_path(WEB_CODE_PATH) . 'admin/settings.php?category=Plugins', |
|
103 | + 'url' => api_get_path(WEB_CODE_PATH).'admin/settings.php?category=Plugins', |
|
104 | 104 | 'name' => get_lang('Plugins') |
105 | 105 | ); |
106 | 106 |
@@ -356,7 +356,7 @@ discard block |
||
356 | 356 | array(), |
357 | 357 | null, |
358 | 358 | ICON_SIZE_MEDIUM |
359 | - ) . ' ' . $tool_name . '</a>'; |
|
359 | + ).' '.$tool_name.'</a>'; |
|
360 | 360 | |
361 | 361 | // This part displays the links to hide or remove a tool. |
362 | 362 | // These links are only visible by the course manager. |
@@ -698,7 +698,7 @@ discard block |
||
698 | 698 | } |
699 | 699 | } |
700 | 700 | |
701 | - if ($session_id == 0 ) { |
|
701 | + if ($session_id == 0) { |
|
702 | 702 | $is_allowed_to_edit = api_is_allowed_to_edit(null, true) && api_is_course_admin(); |
703 | 703 | } else { |
704 | 704 | $is_allowed_to_edit = api_is_allowed_to_edit(null, true) && !api_is_coach(); |
@@ -1086,8 +1086,8 @@ discard block |
||
1086 | 1086 | |
1087 | 1087 | $toolName = api_underscore_to_camel_case($toolName); |
1088 | 1088 | |
1089 | - if (isset($GLOBALS['Tool' . $toolName])) { |
|
1090 | - return get_lang('Tool' . $toolName); |
|
1089 | + if (isset($GLOBALS['Tool'.$toolName])) { |
|
1090 | + return get_lang('Tool'.$toolName); |
|
1091 | 1091 | } |
1092 | 1092 | |
1093 | 1093 | return $toolName; |
@@ -1186,7 +1186,7 @@ discard block |
||
1186 | 1186 | $navigation_items = self::get_navigation_items(true); |
1187 | 1187 | $course_id = api_get_course_id(); |
1188 | 1188 | |
1189 | - $class= null; |
|
1189 | + $class = null; |
|
1190 | 1190 | $idLearn = null; |
1191 | 1191 | $item = null; |
1192 | 1192 | $marginLeft = 160; |
@@ -1211,10 +1211,10 @@ discard block |
||
1211 | 1211 | } else if (api_get_setting('show_navigation_menu') == 'icons') { |
1212 | 1212 | $class = 'icons'; |
1213 | 1213 | $marginLeft = 25; |
1214 | - $item = Display::return_icon(substr($navigation_item['image'],0,-3)."png", $navigation_item['name'], array('class'=>'tool-img'), ICON_SIZE_SMALL); |
|
1214 | + $item = Display::return_icon(substr($navigation_item['image'], 0, -3)."png", $navigation_item['name'], array('class'=>'tool-img'), ICON_SIZE_SMALL); |
|
1215 | 1215 | } else { |
1216 | 1216 | $class = 'icons-text'; |
1217 | - $item = $navigation_item['name'] . Display::return_icon(substr($navigation_item['image'],0,-3)."png", $navigation_item['name'], array('class'=>'tool-img'), ICON_SIZE_SMALL); |
|
1217 | + $item = $navigation_item['name'].Display::return_icon(substr($navigation_item['image'], 0, -3)."png", $navigation_item['name'], array('class'=>'tool-img'), ICON_SIZE_SMALL); |
|
1218 | 1218 | } |
1219 | 1219 | |
1220 | 1220 | if (stristr($url_item['path'], $url_current['path'])) { |
@@ -1226,13 +1226,13 @@ discard block |
||
1226 | 1226 | if (strpos($navigation_item['link'], 'chat') !== false && |
1227 | 1227 | api_get_course_setting('allow_open_chat_window', $course_id) |
1228 | 1228 | ) { |
1229 | - $html .= '<a ' . $idLearn . ' class="btn btn-default text-left ' . $class . ' " href="javascript: void(0);" onclick="javascript: window.open(\''.$navigation_item['link'].'\',\'window_chat'.api_get_course_id().'\',config=\'height=\'+600+\', width=\'+825+\', left=2, top=2, toolbar=no, menubar=no, scrollbars=yes, resizable=yes, location=no, directories=no, status=no\')" target="'.$navigation_item['target'].'"'; |
|
1229 | + $html .= '<a '.$idLearn.' class="btn btn-default text-left '.$class.' " href="javascript: void(0);" onclick="javascript: window.open(\''.$navigation_item['link'].'\',\'window_chat'.api_get_course_id().'\',config=\'height=\'+600+\', width=\'+825+\', left=2, top=2, toolbar=no, menubar=no, scrollbars=yes, resizable=yes, location=no, directories=no, status=no\')" target="'.$navigation_item['target'].'"'; |
|
1230 | 1230 | $html .= ' title="'.$navigation_item['name'].'">'; |
1231 | - $html .= $item; |
|
1231 | + $html .= $item; |
|
1232 | 1232 | $html .= '</a>'; |
1233 | 1233 | } else { |
1234 | - $html .= '<a ' . $idLearn . ' class="btn btn-default text-left ' . $class . '" href="'.$navigation_item['link'].'" target="_top" title="'.$navigation_item['name'].'">'; |
|
1235 | - $html .= $item; |
|
1234 | + $html .= '<a '.$idLearn.' class="btn btn-default text-left '.$class.'" href="'.$navigation_item['link'].'" target="_top" title="'.$navigation_item['name'].'">'; |
|
1235 | + $html .= $item; |
|
1236 | 1236 | $html .= '</a>'; |
1237 | 1237 | } |
1238 | 1238 | |
@@ -1240,14 +1240,14 @@ discard block |
||
1240 | 1240 | } |
1241 | 1241 | $html .= '</ul>'; |
1242 | 1242 | $html .= '<script>$(function() { |
1243 | - $("#toolnavbox a").stop().animate({"margin-left":"-' . $marginLeft . 'px"},1000); |
|
1243 | + $("#toolnavbox a").stop().animate({"margin-left":"-' . $marginLeft.'px"},1000); |
|
1244 | 1244 | $("#toolnavbox > li").hover( |
1245 | 1245 | function () { |
1246 | 1246 | $("a",$(this)).stop().animate({"margin-left":"-2px"},200); |
1247 | 1247 | $("span",$(this)).css("display","block"); |
1248 | 1248 | }, |
1249 | 1249 | function () { |
1250 | - $("a",$(this)).stop().animate({"margin-left":"-' . $marginLeft . 'px"},200); |
|
1250 | + $("a",$(this)).stop().animate({"margin-left":"-' . $marginLeft.'px"},200); |
|
1251 | 1251 | $("span",$(this)).css("display","initial"); |
1252 | 1252 | } |
1253 | 1253 | ); |
@@ -1343,7 +1343,7 @@ discard block |
||
1343 | 1343 | return array(); |
1344 | 1344 | } |
1345 | 1345 | |
1346 | - $table = Database::get_course_table(TABLE_TOOL_LIST); |
|
1346 | + $table = Database::get_course_table(TABLE_TOOL_LIST); |
|
1347 | 1347 | $sql = "SELECT * FROM $table |
1348 | 1348 | WHERE category in ('authoring','interaction') |
1349 | 1349 | AND c_id = $courseId |
@@ -1449,7 +1449,7 @@ discard block |
||
1449 | 1449 | $temp = new Image($path); |
1450 | 1450 | $r = $temp->convert2bw(); |
1451 | 1451 | $ext = pathinfo($path, PATHINFO_EXTENSION); |
1452 | - $bwPath = substr($path,0,-(strlen($ext)+1)) . '_na.' . $ext; |
|
1452 | + $bwPath = substr($path, 0, -(strlen($ext) + 1)).'_na.'.$ext; |
|
1453 | 1453 | |
1454 | 1454 | if ($r === false) { |
1455 | 1455 | error_log('Conversion to B&W of '.$path.' failed in '.__FILE__.' at line '.__LINE__); |
@@ -25,7 +25,7 @@ discard block |
||
25 | 25 | api_not_allowed(true); |
26 | 26 | } |
27 | 27 | |
28 | - $urlToRedirect = api_get_self() . '?'; |
|
28 | + $urlToRedirect = api_get_self().'?'; |
|
29 | 29 | |
30 | 30 | switch ($_GET['action']) { |
31 | 31 | case 'confirm': |
@@ -94,10 +94,10 @@ discard block |
||
94 | 94 | get_lang('Filter'), |
95 | 95 | [$plugin->get_lang('ByStatus'), $plugin->get_lang('ByUser')] |
96 | 96 | ); |
97 | -$form->addHtml('<div id="report-by-status" ' . ($selectedFilterType !== '0' ? 'style="display:none"' : '') . '>'); |
|
97 | +$form->addHtml('<div id="report-by-status" '.($selectedFilterType !== '0' ? 'style="display:none"' : '').'>'); |
|
98 | 98 | $form->addSelect('status', $plugin->get_lang('OrderStatus'), $saleStatuses); |
99 | 99 | $form->addHtml('</div>'); |
100 | -$form->addHtml('<div id="report-by-user" ' . ($selectedFilterType !== '1' ? 'style="display:none"' : '') . '>'); |
|
100 | +$form->addHtml('<div id="report-by-user" '.($selectedFilterType !== '1' ? 'style="display:none"' : '').'>'); |
|
101 | 101 | $form->addText('user', get_lang('UserName'), false); |
102 | 102 | $form->addHtml('</div>'); |
103 | 103 | $form->addButtonFilter(get_lang('Search')); |
@@ -145,7 +145,7 @@ discard block |
||
145 | 145 | |
146 | 146 | $toolbar .= Display::toolbarButton( |
147 | 147 | $plugin->get_lang('PaypalPayoutCommissions'), |
148 | - api_get_path(WEB_PLUGIN_PATH) . 'buycourses/src/paypal_payout.php', |
|
148 | + api_get_path(WEB_PLUGIN_PATH).'buycourses/src/paypal_payout.php', |
|
149 | 149 | 'paypal', |
150 | 150 | 'primary', |
151 | 151 | ['title' => $plugin->get_lang('PaypalPayoutCommissions')] |
@@ -157,7 +157,7 @@ discard block |
||
157 | 157 | if ($commissionsEnable == "true") { |
158 | 158 | $toolbar .= Display::toolbarButton( |
159 | 159 | $plugin->get_lang('PayoutReport'), |
160 | - api_get_path(WEB_PLUGIN_PATH) . 'buycourses/src/payout_report.php', |
|
160 | + api_get_path(WEB_PLUGIN_PATH).'buycourses/src/payout_report.php', |
|
161 | 161 | 'money', |
162 | 162 | 'info', |
163 | 163 | ['title' => $plugin->get_lang('PayoutReport')] |
@@ -54,7 +54,7 @@ discard block |
||
54 | 54 | if ($paypalEnable == 'true' && $commissionsEnable == 'true') { |
55 | 55 | $toolbar .= Display::toolbarButton( |
56 | 56 | $plugin->get_lang('PaypalPayoutCommissions'), |
57 | - api_get_path(WEB_PLUGIN_PATH) . 'buycourses/src/paypal_payout.php', |
|
57 | + api_get_path(WEB_PLUGIN_PATH).'buycourses/src/paypal_payout.php', |
|
58 | 58 | 'paypal', |
59 | 59 | 'primary', |
60 | 60 | ['title' => $plugin->get_lang('PaypalPayoutCommissions')] |
@@ -66,7 +66,7 @@ discard block |
||
66 | 66 | if ($commissionsEnable == 'true') { |
67 | 67 | $toolbar .= Display::toolbarButton( |
68 | 68 | $plugin->get_lang('PayoutReport'), |
69 | - api_get_path(WEB_PLUGIN_PATH) . 'buycourses/src/payout_report.php', |
|
69 | + api_get_path(WEB_PLUGIN_PATH).'buycourses/src/payout_report.php', |
|
70 | 70 | 'money', |
71 | 71 | 'info', |
72 | 72 | ['title' => $plugin->get_lang('PayoutReport')] |
@@ -6,7 +6,7 @@ |
||
6 | 6 | * @package chamilo.plugin.advanced_subscription |
7 | 7 | */ |
8 | 8 | |
9 | -require_once __DIR__ . '/../config.php'; |
|
9 | +require_once __DIR__.'/../config.php'; |
|
10 | 10 | |
11 | 11 | $plugin = AdvancedSubscriptionPlugin::create(); |
12 | 12 | // Get validation hash |