@@ -22,7 +22,7 @@ discard block |
||
22 | 22 | $commissionsEnable = $plugin->get('commissions_enable'); |
23 | 23 | |
24 | 24 | if ($commissionsEnable == 'true') { |
25 | - $htmlHeadXtra[] = '<script type="text/javascript" src="' . api_get_path(WEB_PLUGIN_PATH) . 'buycourses/resources/js/commissions.js"></script>'; |
|
25 | + $htmlHeadXtra[] = '<script type="text/javascript" src="'.api_get_path(WEB_PLUGIN_PATH).'buycourses/resources/js/commissions.js"></script>'; |
|
26 | 26 | $defaultCommissions = []; |
27 | 27 | $commissions = ''; |
28 | 28 | } |
@@ -166,9 +166,9 @@ discard block |
||
166 | 166 | . '<script>' |
167 | 167 | . '$(function(){' |
168 | 168 | . 'if ($("[name=\'commissions\']").val() === "") {' |
169 | - . '$("#panelSliders").html("<button id=\"setCommissionsButton\" class=\"btn btn-warning\">' . get_plugin_lang("SetCommissions", "BuyCoursesPlugin") . '</button>");' |
|
169 | + . '$("#panelSliders").html("<button id=\"setCommissionsButton\" class=\"btn btn-warning\">'.get_plugin_lang("SetCommissions", "BuyCoursesPlugin").'</button>");' |
|
170 | 170 | . '} else {' |
171 | - . 'showSliders(100, "default", "' . $commissions . '");' |
|
171 | + . 'showSliders(100, "default", "'.$commissions.'");' |
|
172 | 172 | . '}' |
173 | 173 | . '});' |
174 | 174 | |
@@ -219,14 +219,14 @@ discard block |
||
219 | 219 | |
220 | 220 | if ($commissionsEnable === 'true') { |
221 | 221 | $platformCommission = $plugin->getPlatformCommission(); |
222 | - $form->addHtml( '' |
|
222 | + $form->addHtml('' |
|
223 | 223 | . '<div class="form-group">' |
224 | 224 | . '<label for="sliders" class="col-sm-2 control-label">' |
225 | 225 | . get_plugin_lang('Commissions', 'BuyCoursesPlugin') |
226 | 226 | . '</label>' |
227 | 227 | . '<div class="col-sm-8">' |
228 | 228 | . Display::return_message( |
229 | - sprintf($plugin->get_lang('TheActualPlatformCommissionIsX'), $platformCommission['commission']. '%'), |
|
229 | + sprintf($plugin->get_lang('TheActualPlatformCommissionIsX'), $platformCommission['commission'].'%'), |
|
230 | 230 | 'info', |
231 | 231 | false |
232 | 232 | ) |
@@ -284,7 +284,7 @@ discard block |
||
284 | 284 | $plugin->deleteItem($productItem['id']); |
285 | 285 | } |
286 | 286 | |
287 | - header('Location: ' . api_get_path(WEB_PLUGIN_PATH) . 'buycourses/src/configuration.php'); |
|
287 | + header('Location: '.api_get_path(WEB_PLUGIN_PATH).'buycourses/src/configuration.php'); |
|
288 | 288 | exit; |
289 | 289 | } |
290 | 290 |
@@ -29,5 +29,5 @@ |
||
29 | 29 | * @see Requests_Hooks::register |
30 | 30 | * @param Requests_Hooks $hooks Hook system |
31 | 31 | */ |
32 | - public function register(Requests_Hooks &$hooks); |
|
32 | + public function register(Requests_Hooks & $hooks); |
|
33 | 33 | } |
34 | 34 | \ No newline at end of file |
@@ -4,7 +4,7 @@ discard block |
||
4 | 4 | * @package chamilo.plugin.bigbluebutton |
5 | 5 | */ |
6 | 6 | |
7 | -require __DIR__ . '/../../vendor/autoload.php'; |
|
7 | +require __DIR__.'/../../vendor/autoload.php'; |
|
8 | 8 | |
9 | 9 | $course_plugin = 'bbb'; //needed in order to load the plugin lang variables |
10 | 10 | require_once __DIR__.'/config.php'; |
@@ -16,22 +16,22 @@ discard block |
||
16 | 16 | $host = ''; |
17 | 17 | $salt = ''; |
18 | 18 | $isGlobal = isset($_GET['global']) ? true : false; |
19 | -$isGlobalPerUser = isset($_GET['user_id']) ? (int) $_GET['user_id']: false; |
|
19 | +$isGlobalPerUser = isset($_GET['user_id']) ? (int) $_GET['user_id'] : false; |
|
20 | 20 | $bbb = new bbb('', '', $isGlobal, $isGlobalPerUser); |
21 | 21 | |
22 | 22 | if ($bbb->pluginEnabled) { |
23 | 23 | if ($bbb->isServerRunning()) { |
24 | 24 | if (isset($_GET['launch']) && $_GET['launch'] == 1) { |
25 | - if (file_exists(__DIR__ . '/config.vm.php')) { |
|
26 | - $config = require __DIR__ . '/config.vm.php'; |
|
25 | + if (file_exists(__DIR__.'/config.vm.php')) { |
|
26 | + $config = require __DIR__.'/config.vm.php'; |
|
27 | 27 | $vmIsEnabled = true; |
28 | 28 | $host = ''; |
29 | 29 | $salt = ''; |
30 | 30 | |
31 | - require __DIR__ . '/lib/vm/AbstractVM.php'; |
|
32 | - require __DIR__ . '/lib/vm/VMInterface.php'; |
|
33 | - require __DIR__ . '/lib/vm/DigitalOceanVM.php'; |
|
34 | - require __DIR__ . '/lib/VM.php'; |
|
31 | + require __DIR__.'/lib/vm/AbstractVM.php'; |
|
32 | + require __DIR__.'/lib/vm/VMInterface.php'; |
|
33 | + require __DIR__.'/lib/vm/DigitalOceanVM.php'; |
|
34 | + require __DIR__.'/lib/VM.php'; |
|
35 | 35 | |
36 | 36 | $vm = new VM($config); |
37 | 37 | |
@@ -60,7 +60,7 @@ discard block |
||
60 | 60 | $bbb->redirectToBBB($url); |
61 | 61 | } else { |
62 | 62 | $url = $bbb->getListingUrl(); |
63 | - header('Location: ' . $url); |
|
63 | + header('Location: '.$url); |
|
64 | 64 | exit; |
65 | 65 | } |
66 | 66 | } else { |
@@ -3,7 +3,7 @@ |
||
3 | 3 | |
4 | 4 | /* bbb parameters that will be registered in the course settings */ |
5 | 5 | |
6 | -require_once __DIR__ . '/../../main/inc/global.inc.php'; |
|
6 | +require_once __DIR__.'/../../main/inc/global.inc.php'; |
|
7 | 7 | |
8 | 8 | require_once 'lib/bbb.lib.php'; |
9 | 9 | require_once 'lib/bbb_api.php'; |
@@ -55,25 +55,25 @@ discard block |
||
55 | 55 | */ |
56 | 56 | // BASE CONFIGS - set these for your BBB server in config.php and they will |
57 | 57 | // simply flow in here via the constants: |
58 | - $this->_securitySalt = CONFIG_SECURITY_SALT; |
|
59 | - $this->_bbbServerBaseUrl = CONFIG_SERVER_BASE_URL; |
|
58 | + $this->_securitySalt = CONFIG_SECURITY_SALT; |
|
59 | + $this->_bbbServerBaseUrl = CONFIG_SERVER_BASE_URL; |
|
60 | 60 | } |
61 | 61 | |
62 | - private function _processXmlResponse($url){ |
|
62 | + private function _processXmlResponse($url) { |
|
63 | 63 | /* |
64 | 64 | A private utility method used by other public methods to process XML responses. |
65 | 65 | */ |
66 | 66 | if (extension_loaded('curl')) { |
67 | - $ch = curl_init() or die ( curl_error($ch) ); |
|
67 | + $ch = curl_init() or die (curl_error($ch)); |
|
68 | 68 | $timeout = 10; |
69 | - curl_setopt( $ch, CURLOPT_SSL_VERIFYPEER, false); |
|
70 | - curl_setopt( $ch, CURLOPT_URL, $url ); |
|
71 | - curl_setopt( $ch, CURLOPT_RETURNTRANSFER, 1 ); |
|
72 | - curl_setopt( $ch, CURLOPT_CONNECTTIMEOUT, $timeout); |
|
73 | - $data = curl_exec( $ch ); |
|
74 | - curl_close( $ch ); |
|
75 | - |
|
76 | - if($data) |
|
69 | + curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false); |
|
70 | + curl_setopt($ch, CURLOPT_URL, $url); |
|
71 | + curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); |
|
72 | + curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, $timeout); |
|
73 | + $data = curl_exec($ch); |
|
74 | + curl_close($ch); |
|
75 | + |
|
76 | + if ($data) |
|
77 | 77 | return (new SimpleXMLElement($data)); |
78 | 78 | else |
79 | 79 | return false; |
@@ -137,10 +137,10 @@ discard block |
||
137 | 137 | '&duration='.urlencode($creationParams['duration']); |
138 | 138 | //'&meta_category='.urlencode($creationParams['meta_category']); |
139 | 139 | $welcomeMessage = $creationParams['welcomeMsg']; |
140 | - if(trim($welcomeMessage)) |
|
140 | + if (trim($welcomeMessage)) |
|
141 | 141 | $params .= '&welcome='.urlencode($welcomeMessage); |
142 | 142 | // Return the complete URL: |
143 | - return ( $creationUrl.$params.'&checksum='.sha1("create".$params.$this->_securitySalt) ); |
|
143 | + return ($creationUrl.$params.'&checksum='.sha1("create".$params.$this->_securitySalt)); |
|
144 | 144 | } |
145 | 145 | |
146 | 146 | public function createMeetingWithXmlResponseArray($creationParams) { |
@@ -165,7 +165,7 @@ discard block |
||
165 | 165 | $xml = $this->_processXmlResponse($this->getCreateMeetingURL($creationParams)); |
166 | 166 | |
167 | 167 | if ($xml) { |
168 | - if($xml->meetingID) |
|
168 | + if ($xml->meetingID) |
|
169 | 169 | return array( |
170 | 170 | 'returncode' => $xml->returncode->__toString(), |
171 | 171 | 'message' => $xml->message->__toString(), |
@@ -283,7 +283,7 @@ discard block |
||
283 | 283 | $meetingId = '1234' -- REQUIRED - The unique id for the meeting |
284 | 284 | */ |
285 | 285 | $xml = $this->_processXmlResponse($this->getIsMeetingRunningUrl($meetingId)); |
286 | - if($xml) { |
|
286 | + if ($xml) { |
|
287 | 287 | return array( |
288 | 288 | 'returncode' => $xml->returncode->__toString(), |
289 | 289 | 'running' => $xml->running->__toString() // -- Returns true/false. |
@@ -310,7 +310,7 @@ discard block |
||
310 | 310 | and then handle the results that we get in the XML response. |
311 | 311 | */ |
312 | 312 | $xml = $this->_processXmlResponse($this->getGetMeetingsUrl()); |
313 | - if($xml) { |
|
313 | + if ($xml) { |
|
314 | 314 | // If we don't get a success code, stop processing and return just the returncode: |
315 | 315 | if ($xml->returncode != 'SUCCESS') { |
316 | 316 | $result = array( |
@@ -379,7 +379,7 @@ discard block |
||
379 | 379 | ); |
380 | 380 | */ |
381 | 381 | $xml = $this->_processXmlResponse($this->getMeetingInfoUrl($infoParams)); |
382 | - if($xml) { |
|
382 | + if ($xml) { |
|
383 | 383 | // If we don't get a success code or messageKey, find out why: |
384 | 384 | if (($xml->returncode != 'SUCCESS') || ($xml->messageKey == null)) { |
385 | 385 | $result = array( |
@@ -454,7 +454,7 @@ discard block |
||
454 | 454 | probably be required in user code when 'recording' is set to true. |
455 | 455 | */ |
456 | 456 | $xml = $this->_processXmlResponse($this->getRecordingsUrl($recordingParams)); |
457 | - if($xml) { |
|
457 | + if ($xml) { |
|
458 | 458 | // If we don't get a success code or messageKey, find out why: |
459 | 459 | if (($xml->returncode != 'SUCCESS') || ($xml->messageKey == null)) { |
460 | 460 | $result = array( |
@@ -524,7 +524,7 @@ discard block |
||
524 | 524 | ); |
525 | 525 | */ |
526 | 526 | $xml = $this->_processXmlResponse($this->getPublishRecordingsUrl($recordingParams)); |
527 | - if($xml) { |
|
527 | + if ($xml) { |
|
528 | 528 | return array( |
529 | 529 | 'returncode' => $xml->returncode->__toString(), |
530 | 530 | 'published' => $xml->published->__toString() // -- Returns true/false. |
@@ -557,7 +557,7 @@ discard block |
||
557 | 557 | */ |
558 | 558 | |
559 | 559 | $xml = $this->_processXmlResponse($this->getDeleteRecordingsUrl($recordingParams)); |
560 | - if($xml) { |
|
560 | + if ($xml) { |
|
561 | 561 | return array( |
562 | 562 | 'returncode' => $xml->returncode->__toString(), |
563 | 563 | 'deleted' => $xml->deleted->__toString() // -- Returns true/false. |
@@ -1,5 +1,5 @@ |
||
1 | 1 | <?php |
2 | 2 | /* For licensing terms, see /license.txt */ |
3 | 3 | |
4 | -require_once __DIR__ . '/../../main/inc/global.inc.php'; |
|
4 | +require_once __DIR__.'/../../main/inc/global.inc.php'; |
|
5 | 5 | require_once __DIR__.'/CourseLegalPlugin.php'; |
@@ -1,4 +1,4 @@ |
||
1 | 1 | <?php |
2 | 2 | |
3 | -require_once __DIR__ . '/config.php'; |
|
3 | +require_once __DIR__.'/config.php'; |
|
4 | 4 | $plugin_info = CourseLegalPlugin::create()->get_info(); |
@@ -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 |
@@ -79,7 +79,7 @@ discard block |
||
79 | 79 | $result = $client->__soapCall('HookAdvancedSubscription..WSSessionGetDetailsByUser', array($params)); |
80 | 80 | if (is_object($result) && isset($result->action_url)) { |
81 | 81 | echo '<br />'; |
82 | - echo Display::url("message" . $result->message, $result->action_url); |
|
82 | + echo Display::url("message".$result->message, $result->action_url); |
|
83 | 83 | } |
84 | 84 | } catch (\Exception $e) { |
85 | 85 | var_dump($e); |
@@ -49,9 +49,9 @@ discard block |
||
49 | 49 | global $_configuration; |
50 | 50 | $this->name = 'C'.api_get_course_int_id().'-'.api_get_session_id(); |
51 | 51 | $accessUrl = api_get_access_url($_configuration['access_url']); |
52 | - $this->externalRoomType = substr($accessUrl['url'], strpos($accessUrl['url'],'://')+3,-1); |
|
52 | + $this->externalRoomType = substr($accessUrl['url'], strpos($accessUrl['url'], '://') + 3, -1); |
|
53 | 53 | if (strcmp($this->externalRoomType, 'localhost') == 0) { |
54 | - $this->externalRoomType = substr(api_get_path(WEB_PATH), strpos(api_get_path(WEB_PATH),'://')+3, -1); |
|
54 | + $this->externalRoomType = substr(api_get_path(WEB_PATH), strpos(api_get_path(WEB_PATH), '://') + 3, -1); |
|
55 | 55 | } |
56 | 56 | $this->externalRoomType = 'chamilolms.'.$this->externalRoomType; |
57 | 57 | } |
@@ -110,6 +110,6 @@ discard block |
||
110 | 110 | if (!isset($this->$attribute)) { |
111 | 111 | return $voidReturn; |
112 | 112 | } |
113 | - return $this->$attribute?'true':'false'; |
|
113 | + return $this->$attribute ? 'true' : 'false'; |
|
114 | 114 | } |
115 | 115 | } |