@@ -9,7 +9,7 @@ |
||
9 | 9 | |
10 | 10 | define('TABLE_TOUR_LOG', 'plugin_tour_log'); |
11 | 11 | |
12 | -require_once api_get_path(SYS_PATH) . 'main/inc/global.inc.php'; |
|
13 | -require_once api_get_path(LIBRARY_PATH) . 'plugin.class.php'; |
|
14 | -require_once api_get_path(PLUGIN_PATH) . 'tour/src/tour_plugin.class.php'; |
|
12 | +require_once api_get_path(SYS_PATH).'main/inc/global.inc.php'; |
|
13 | +require_once api_get_path(LIBRARY_PATH).'plugin.class.php'; |
|
14 | +require_once api_get_path(PLUGIN_PATH).'tour/src/tour_plugin.class.php'; |
|
15 | 15 | // Edit the config/tour.json file to add more pages or more elements to the guide |
@@ -67,7 +67,7 @@ discard block |
||
67 | 67 | if ($data['type'] === HOOK_EVENT_TYPE_PRE) { |
68 | 68 | |
69 | 69 | } elseif ($data['type'] === HOOK_EVENT_TYPE_POST) { |
70 | - /** @var \nusoap_server $server */ |
|
70 | + /** @var \nusoap_server $server */ |
|
71 | 71 | $server = &$data['server']; |
72 | 72 | |
73 | 73 | /** WSSessionListInCategory */ |
@@ -424,7 +424,7 @@ discard block |
||
424 | 424 | } |
425 | 425 | if (!WSHelperVerifyKey($params)) { |
426 | 426 | |
427 | - //return return_error(WS_ERROR_SECRET_KEY); |
|
427 | + //return return_error(WS_ERROR_SECRET_KEY); |
|
428 | 428 | } |
429 | 429 | // Check if category ID is set |
430 | 430 | if (!empty($params['id']) && empty($params['name'])) { |
@@ -6,7 +6,7 @@ discard block |
||
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 | /** |
12 | 12 | * Class HookAdvancedSubscription extends the HookObserver to implements |
@@ -420,7 +420,7 @@ discard block |
||
420 | 420 | |
421 | 421 | if ($debug) { |
422 | 422 | error_log(__FUNCTION__); |
423 | - error_log('Params ' . print_r($params, 1)); |
|
423 | + error_log('Params '.print_r($params, 1)); |
|
424 | 424 | } |
425 | 425 | if (!WSHelperVerifyKey($params)) { |
426 | 426 | |
@@ -471,7 +471,7 @@ discard block |
||
471 | 471 | |
472 | 472 | if ($debug) { |
473 | 473 | error_log('WSUserSubscribedInCourse'); |
474 | - error_log('Params ' . print_r($params, 1)); |
|
474 | + error_log('Params '.print_r($params, 1)); |
|
475 | 475 | } |
476 | 476 | if (!WSHelperVerifyKey($params)) { |
477 | 477 | return return_error(WS_ERROR_SECRET_KEY); |
@@ -576,7 +576,7 @@ discard block |
||
576 | 576 | |
577 | 577 | if ($debug) { |
578 | 578 | error_log('WSListSessionsDetailsByCategory'); |
579 | - error_log('Params ' . print_r($params, 1)); |
|
579 | + error_log('Params '.print_r($params, 1)); |
|
580 | 580 | } |
581 | 581 | $secretKey = $params['secret_key']; |
582 | 582 |
@@ -7,7 +7,7 @@ discard block |
||
7 | 7 | /** |
8 | 8 | * Init |
9 | 9 | */ |
10 | -require_once __DIR__ . '/../config.php'; |
|
10 | +require_once __DIR__.'/../config.php'; |
|
11 | 11 | // protect |
12 | 12 | api_protect_admin_script(); |
13 | 13 | // start plugin |
@@ -85,8 +85,7 @@ discard block |
||
85 | 85 | $data['newStatus'] = ADVANCED_SUBSCRIPTION_QUEUE_STATUS_ADMIN_DISAPPROVED; |
86 | 86 | $student['rejectUrl'] = $plugin->getQueueUrl($data); |
87 | 87 | $student['complete_name'] = $isWesternNameOrder ? |
88 | - $student['firstname'] . ', ' . $student['lastname'] : |
|
89 | - $student['lastname'] . ', ' . $student['firstname']; |
|
88 | + $student['firstname'].', '.$student['lastname'] : $student['lastname'].', '.$student['firstname']; |
|
90 | 89 | } |
91 | 90 | $tpl->assign('session', $sessionArray); |
92 | 91 | $tpl->assign('students', $studentList['students']); |
@@ -7,7 +7,7 @@ |
||
7 | 7 | |
8 | 8 | //exit; |
9 | 9 | |
10 | -require_once __DIR__ . '/../../config.php'; |
|
10 | +require_once __DIR__.'/../../config.php'; |
|
11 | 11 | |
12 | 12 | api_protect_admin_script(); |
13 | 13 |
@@ -7,7 +7,7 @@ discard block |
||
7 | 7 | /** |
8 | 8 | * Init |
9 | 9 | */ |
10 | -require_once __DIR__ . '/../config.php'; |
|
10 | +require_once __DIR__.'/../config.php'; |
|
11 | 11 | // start plugin |
12 | 12 | $plugin = AdvancedSubscriptionPlugin::create(); |
13 | 13 | // Session ID |
@@ -24,7 +24,7 @@ discard block |
||
24 | 24 | // Init template |
25 | 25 | $tpl = new Template($plugin->get_lang('plugin_title')); |
26 | 26 | |
27 | -$isAllowToDoRequest = $plugin->isAllowedToDoRequest( $data['studentUserId'], $data, true); |
|
27 | +$isAllowToDoRequest = $plugin->isAllowedToDoRequest($data['studentUserId'], $data, true); |
|
28 | 28 | |
29 | 29 | if (!$isAllowToDoRequest) { |
30 | 30 | $tpl->assign('errorMessages', $plugin->getErrorMessages()); |
@@ -8,7 +8,7 @@ |
||
8 | 8 | /** |
9 | 9 | * Init |
10 | 10 | */ |
11 | -require_once __DIR__ . '/../config.php'; |
|
11 | +require_once __DIR__.'/../config.php'; |
|
12 | 12 | |
13 | 13 | $plugin = AdvancedSubscriptionPlugin::create(); |
14 | 14 | // Get validation hash |
@@ -5,7 +5,7 @@ discard block |
||
5 | 5 | * @package chamilo.plugin.advanced_subscription |
6 | 6 | */ |
7 | 7 | |
8 | -require_once __DIR__ . '/../config.php'; |
|
8 | +require_once __DIR__.'/../config.php'; |
|
9 | 9 | |
10 | 10 | // Protect test |
11 | 11 | api_protect_admin_script(); |
@@ -78,8 +78,7 @@ discard block |
||
78 | 78 | $isWesternNameOrder = api_is_western_name_order(); |
79 | 79 | foreach ($adminsArray as &$admin) { |
80 | 80 | $admin['complete_name'] = $isWesternNameOrder ? |
81 | - $admin['firstname'] . ', ' . $admin['lastname'] : |
|
82 | - $admin['lastname'] . ', ' . $admin['firstname'] |
|
81 | + $admin['firstname'].', '.$admin['lastname'] : $admin['lastname'].', '.$admin['firstname'] |
|
83 | 82 | ; |
84 | 83 | } |
85 | 84 | unset($admin); |
@@ -91,8 +90,8 @@ discard block |
||
91 | 90 | $data['admin'] = current($adminsArray); |
92 | 91 | $data['session'] = $sessionArray; |
93 | 92 | $data['signature'] = api_get_setting('Institution'); |
94 | -$data['admin_view_url'] = api_get_path(WEB_PLUGIN_PATH) . |
|
95 | - 'advanced_subscription/src/admin_view.php?s=' . $data['sessionId']; |
|
93 | +$data['admin_view_url'] = api_get_path(WEB_PLUGIN_PATH). |
|
94 | + 'advanced_subscription/src/admin_view.php?s='.$data['sessionId']; |
|
96 | 95 | $data['newStatus'] = ADVANCED_SUBSCRIPTION_QUEUE_STATUS_BOSS_APPROVED; |
97 | 96 | $data['student']['acceptUrl'] = $plugin->getQueueUrl($data); |
98 | 97 | $data['newStatus'] = ADVANCED_SUBSCRIPTION_QUEUE_STATUS_BOSS_DISAPPROVED; |
@@ -116,21 +115,21 @@ discard block |
||
116 | 115 | $tpl->assign($tplParam, $data[$tplParam]); |
117 | 116 | } |
118 | 117 | |
119 | -$dir = __DIR__ . '/../views/'; |
|
118 | +$dir = __DIR__.'/../views/'; |
|
120 | 119 | $files = scandir($dir); |
121 | 120 | |
122 | -echo '<br>', '<pre>' , print_r($files, 1) , '</pre>'; |
|
121 | +echo '<br>', '<pre>', print_r($files, 1), '</pre>'; |
|
123 | 122 | |
124 | 123 | foreach ($files as $k =>&$file) { |
125 | 124 | if ( |
126 | - is_file($dir . $file) && |
|
125 | + is_file($dir.$file) && |
|
127 | 126 | strpos($file, '.tpl') && |
128 | 127 | $file != 'admin_view.tpl' |
129 | 128 | ) { |
130 | 129 | echo '<pre>', $file, '</pre>'; |
131 | - echo $tpl->fetch('/advanced_subscription/views/' . $file); |
|
130 | + echo $tpl->fetch('/advanced_subscription/views/'.$file); |
|
132 | 131 | } else { |
133 | 132 | unset($files[$k]); |
134 | 133 | } |
135 | 134 | } |
136 | -echo '<br>', '<pre>' , print_r($files, 1) , '</pre>'; |
|
135 | +echo '<br>', '<pre>', print_r($files, 1), '</pre>'; |
@@ -8,7 +8,7 @@ discard block |
||
8 | 8 | /** |
9 | 9 | * Init |
10 | 10 | */ |
11 | -require_once __DIR__ . '/../config.php'; |
|
11 | +require_once __DIR__.'/../config.php'; |
|
12 | 12 | // Protect test |
13 | 13 | api_protect_admin_script(); |
14 | 14 | |
@@ -42,7 +42,7 @@ discard block |
||
42 | 42 | } |
43 | 43 | // Check if a file that limits access from webservices exists and contains |
44 | 44 | // the restraining check |
45 | -if (is_file(api_get_path(WEB_CODE_PATH) .'webservices/webservice-auth-ip.conf.php')) { |
|
45 | +if (is_file(api_get_path(WEB_CODE_PATH).'webservices/webservice-auth-ip.conf.php')) { |
|
46 | 46 | include api_get_path(WEB_CODE_PATH).'webservices/webservice-auth-ip.conf.php'; |
47 | 47 | if (!empty($ws_auth_ip)) { |
48 | 48 | $check_ip = true; |
@@ -63,7 +63,7 @@ discard block |
||
63 | 63 | $params['secret_key'] = sha1($security_key); |
64 | 64 | |
65 | 65 | // Registration soap wsdl |
66 | -$wsUrl = api_get_path(WEB_CODE_PATH) . 'webservices/registration.soap.php?wsdl'; |
|
66 | +$wsUrl = api_get_path(WEB_CODE_PATH).'webservices/registration.soap.php?wsdl'; |
|
67 | 67 | $options = array( |
68 | 68 | 'location' => $wsUrl, |
69 | 69 | 'uri' => $wsUrl, |
@@ -80,7 +80,7 @@ discard block |
||
80 | 80 | var_dump($result); |
81 | 81 | if (is_object($result) && isset($result->action_url)) { |
82 | 82 | echo '<br />'; |
83 | - echo Display::url("message" . $result->message, $result->action_url); |
|
83 | + echo Display::url("message".$result->message, $result->action_url); |
|
84 | 84 | } |
85 | 85 | } catch (\Exception $e) { |
86 | 86 | var_dump($e); |
@@ -5,7 +5,7 @@ discard block |
||
5 | 5 | * @package chamilo.plugin.advanced_subscription |
6 | 6 | */ |
7 | 7 | |
8 | -require_once __DIR__ . '/../config.php'; |
|
8 | +require_once __DIR__.'/../config.php'; |
|
9 | 9 | |
10 | 10 | // Protect test |
11 | 11 | api_protect_admin_script(); |
@@ -39,9 +39,9 @@ discard block |
||
39 | 39 | $tpl->assign('termsContent', $termsAndConditions); |
40 | 40 | $termsAndConditions = $tpl->fetch('/advanced_subscription/views/terms_and_conditions_to_pdf.tpl'); |
41 | 41 | $pdf = new PDF(); |
42 | - $filename = 'terms' . sha1(rand(0,99999)); |
|
42 | + $filename = 'terms'.sha1(rand(0, 99999)); |
|
43 | 43 | $pdf->content_to_pdf($termsAndConditions, null, $filename, null, 'F'); |
44 | - $fileDir = api_get_path(WEB_ARCHIVE_PATH) . $filename . '.pdf'; |
|
44 | + $fileDir = api_get_path(WEB_ARCHIVE_PATH).$filename.'.pdf'; |
|
45 | 45 | echo '<pre>', print_r($fileDir, 1), '</pre>'; |
46 | 46 | } |
47 | 47 | } |