@@ -44,107 +44,107 @@ discard block |
||
| 44 | 44 | |
| 45 | 45 | class BigBlueButtonBN { |
| 46 | 46 | |
| 47 | - private $_securitySalt; |
|
| 48 | - private $_bbbServerBaseUrl; |
|
| 47 | + private $_securitySalt; |
|
| 48 | + private $_bbbServerBaseUrl; |
|
| 49 | 49 | |
| 50 | - /* ___________ General Methods for the BigBlueButton Class __________ */ |
|
| 50 | + /* ___________ General Methods for the BigBlueButton Class __________ */ |
|
| 51 | 51 | |
| 52 | - function __construct() { |
|
| 53 | - /* |
|
| 52 | + function __construct() { |
|
| 53 | + /* |
|
| 54 | 54 | Establish just our basic elements in the constructor: |
| 55 | 55 | */ |
| 56 | - // BASE CONFIGS - set these for your BBB server in config.php and they will |
|
| 57 | - // simply flow in here via the constants: |
|
| 58 | - $this->_securitySalt = CONFIG_SECURITY_SALT; |
|
| 59 | - $this->_bbbServerBaseUrl = CONFIG_SERVER_BASE_URL; |
|
| 60 | - } |
|
| 61 | - |
|
| 62 | - private function _processXmlResponse($url){ |
|
| 63 | - /* |
|
| 56 | + // BASE CONFIGS - set these for your BBB server in config.php and they will |
|
| 57 | + // simply flow in here via the constants: |
|
| 58 | + $this->_securitySalt = CONFIG_SECURITY_SALT; |
|
| 59 | + $this->_bbbServerBaseUrl = CONFIG_SERVER_BASE_URL; |
|
| 60 | + } |
|
| 61 | + |
|
| 62 | + private function _processXmlResponse($url){ |
|
| 63 | + /* |
|
| 64 | 64 | A private utility method used by other public methods to process XML responses. |
| 65 | 65 | */ |
| 66 | - if (extension_loaded('curl')) { |
|
| 67 | - $ch = curl_init() or die ( curl_error($ch) ); |
|
| 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) |
|
| 77 | - return (new SimpleXMLElement($data)); |
|
| 78 | - else |
|
| 79 | - return false; |
|
| 80 | - } |
|
| 81 | - return (simplexml_load_file($url)); |
|
| 82 | - } |
|
| 83 | - |
|
| 84 | - private function _requiredParam($param) { |
|
| 85 | - /* Process required params and throw errors if we don't get values */ |
|
| 86 | - if ((isset($param)) && ($param != '')) { |
|
| 87 | - return $param; |
|
| 88 | - } |
|
| 89 | - elseif (!isset($param)) { |
|
| 90 | - throw new Exception('Missing parameter.'); |
|
| 91 | - } |
|
| 92 | - else { |
|
| 93 | - throw new Exception(''.$param.' is required.'); |
|
| 94 | - } |
|
| 95 | - } |
|
| 96 | - |
|
| 97 | - private function _optionalParam($param) { |
|
| 98 | - /* Pass most optional params through as set value, or set to '' */ |
|
| 99 | - /* Don't know if we'll use this one, but let's build it in case. */ |
|
| 100 | - if ((isset($param)) && ($param != '')) { |
|
| 101 | - return $param; |
|
| 102 | - } |
|
| 103 | - else { |
|
| 104 | - $param = ''; |
|
| 105 | - return $param; |
|
| 106 | - } |
|
| 107 | - } |
|
| 108 | - |
|
| 109 | - /* __________________ BBB ADMINISTRATION METHODS _________________ */ |
|
| 110 | - /* The methods in the following section support the following categories of the BBB API: |
|
| 66 | + if (extension_loaded('curl')) { |
|
| 67 | + $ch = curl_init() or die ( curl_error($ch) ); |
|
| 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) |
|
| 77 | + return (new SimpleXMLElement($data)); |
|
| 78 | + else |
|
| 79 | + return false; |
|
| 80 | + } |
|
| 81 | + return (simplexml_load_file($url)); |
|
| 82 | + } |
|
| 83 | + |
|
| 84 | + private function _requiredParam($param) { |
|
| 85 | + /* Process required params and throw errors if we don't get values */ |
|
| 86 | + if ((isset($param)) && ($param != '')) { |
|
| 87 | + return $param; |
|
| 88 | + } |
|
| 89 | + elseif (!isset($param)) { |
|
| 90 | + throw new Exception('Missing parameter.'); |
|
| 91 | + } |
|
| 92 | + else { |
|
| 93 | + throw new Exception(''.$param.' is required.'); |
|
| 94 | + } |
|
| 95 | + } |
|
| 96 | + |
|
| 97 | + private function _optionalParam($param) { |
|
| 98 | + /* Pass most optional params through as set value, or set to '' */ |
|
| 99 | + /* Don't know if we'll use this one, but let's build it in case. */ |
|
| 100 | + if ((isset($param)) && ($param != '')) { |
|
| 101 | + return $param; |
|
| 102 | + } |
|
| 103 | + else { |
|
| 104 | + $param = ''; |
|
| 105 | + return $param; |
|
| 106 | + } |
|
| 107 | + } |
|
| 108 | + |
|
| 109 | + /* __________________ BBB ADMINISTRATION METHODS _________________ */ |
|
| 110 | + /* The methods in the following section support the following categories of the BBB API: |
|
| 111 | 111 | -- create |
| 112 | 112 | -- join |
| 113 | 113 | -- end |
| 114 | 114 | */ |
| 115 | 115 | |
| 116 | - public function getCreateMeetingUrl($creationParams) { |
|
| 117 | - /* |
|
| 116 | + public function getCreateMeetingUrl($creationParams) { |
|
| 117 | + /* |
|
| 118 | 118 | USAGE: |
| 119 | 119 | (see $creationParams array in createMeetingArray method.) |
| 120 | 120 | */ |
| 121 | - $this->_meetingId = $this->_requiredParam($creationParams['meetingId']); |
|
| 122 | - $this->_meetingName = $this->_requiredParam($creationParams['meetingName']); |
|
| 123 | - // Set up the basic creation URL: |
|
| 124 | - $creationUrl = $this->_bbbServerBaseUrl."api/create?"; |
|
| 125 | - // Add params: |
|
| 126 | - $params = |
|
| 127 | - 'name='.urlencode($this->_meetingName). |
|
| 128 | - '&meetingID='.urlencode($this->_meetingId). |
|
| 129 | - '&attendeePW='.urlencode($creationParams['attendeePw']). |
|
| 130 | - '&moderatorPW='.urlencode($creationParams['moderatorPw']). |
|
| 131 | - '&dialNumber='.urlencode($creationParams['dialNumber']). |
|
| 132 | - '&voiceBridge='.urlencode($creationParams['voiceBridge']). |
|
| 133 | - '&webVoice='.urlencode($creationParams['webVoice']). |
|
| 134 | - '&logoutURL='.urlencode($creationParams['logoutUrl']). |
|
| 135 | - '&maxParticipants='.urlencode($creationParams['maxParticipants']). |
|
| 136 | - '&record='.urlencode($creationParams['record']). |
|
| 137 | - '&duration='.urlencode($creationParams['duration']); |
|
| 138 | - //'&meta_category='.urlencode($creationParams['meta_category']); |
|
| 139 | - $welcomeMessage = $creationParams['welcomeMsg']; |
|
| 140 | - if(trim($welcomeMessage)) |
|
| 141 | - $params .= '&welcome='.urlencode($welcomeMessage); |
|
| 142 | - // Return the complete URL: |
|
| 143 | - return ( $creationUrl.$params.'&checksum='.sha1("create".$params.$this->_securitySalt) ); |
|
| 144 | - } |
|
| 145 | - |
|
| 146 | - public function createMeetingWithXmlResponseArray($creationParams) { |
|
| 147 | - /* |
|
| 121 | + $this->_meetingId = $this->_requiredParam($creationParams['meetingId']); |
|
| 122 | + $this->_meetingName = $this->_requiredParam($creationParams['meetingName']); |
|
| 123 | + // Set up the basic creation URL: |
|
| 124 | + $creationUrl = $this->_bbbServerBaseUrl."api/create?"; |
|
| 125 | + // Add params: |
|
| 126 | + $params = |
|
| 127 | + 'name='.urlencode($this->_meetingName). |
|
| 128 | + '&meetingID='.urlencode($this->_meetingId). |
|
| 129 | + '&attendeePW='.urlencode($creationParams['attendeePw']). |
|
| 130 | + '&moderatorPW='.urlencode($creationParams['moderatorPw']). |
|
| 131 | + '&dialNumber='.urlencode($creationParams['dialNumber']). |
|
| 132 | + '&voiceBridge='.urlencode($creationParams['voiceBridge']). |
|
| 133 | + '&webVoice='.urlencode($creationParams['webVoice']). |
|
| 134 | + '&logoutURL='.urlencode($creationParams['logoutUrl']). |
|
| 135 | + '&maxParticipants='.urlencode($creationParams['maxParticipants']). |
|
| 136 | + '&record='.urlencode($creationParams['record']). |
|
| 137 | + '&duration='.urlencode($creationParams['duration']); |
|
| 138 | + //'&meta_category='.urlencode($creationParams['meta_category']); |
|
| 139 | + $welcomeMessage = $creationParams['welcomeMsg']; |
|
| 140 | + if(trim($welcomeMessage)) |
|
| 141 | + $params .= '&welcome='.urlencode($welcomeMessage); |
|
| 142 | + // Return the complete URL: |
|
| 143 | + return ( $creationUrl.$params.'&checksum='.sha1("create".$params.$this->_securitySalt) ); |
|
| 144 | + } |
|
| 145 | + |
|
| 146 | + public function createMeetingWithXmlResponseArray($creationParams) { |
|
| 147 | + /* |
|
| 148 | 148 | USAGE: |
| 149 | 149 | $creationParams = array( |
| 150 | 150 | 'name' => 'Meeting Name', -- A name for the meeting (or username) |
@@ -162,34 +162,34 @@ discard block |
||
| 162 | 162 | 'meta_category' => '', -- Use to pass additional info to BBB server. See API docs to enable. |
| 163 | 163 | ); |
| 164 | 164 | */ |
| 165 | - $xml = $this->_processXmlResponse($this->getCreateMeetingURL($creationParams)); |
|
| 165 | + $xml = $this->_processXmlResponse($this->getCreateMeetingURL($creationParams)); |
|
| 166 | 166 | |
| 167 | 167 | if ($xml) { |
| 168 | - if($xml->meetingID) |
|
| 169 | - return array( |
|
| 170 | - 'returncode' => $xml->returncode->__toString(), |
|
| 171 | - 'message' => $xml->message->__toString(), |
|
| 172 | - 'messageKey' => $xml->messageKey->__toString(), |
|
| 173 | - 'meetingId' => $xml->meetingID->__toString(), |
|
| 174 | - 'attendeePw' => $xml->attendeePW->__toString(), |
|
| 175 | - 'moderatorPw' => $xml->moderatorPW->__toString(), |
|
| 176 | - 'hasBeenForciblyEnded' => $xml->hasBeenForciblyEnded->__toString(), |
|
| 177 | - 'createTime' => $xml->createTime->__toString() |
|
| 178 | - ); |
|
| 179 | - else |
|
| 180 | - return array( |
|
| 181 | - 'returncode' => $xml->returncode->__toString(), |
|
| 182 | - 'message' => $xml->message->__toString(), |
|
| 183 | - 'messageKey' => $xml->messageKey->__toString() |
|
| 184 | - ); |
|
| 185 | - } |
|
| 186 | - else { |
|
| 187 | - return null; |
|
| 188 | - } |
|
| 189 | - } |
|
| 190 | - |
|
| 191 | - public function getJoinMeetingURL($joinParams) { |
|
| 192 | - /* |
|
| 168 | + if($xml->meetingID) |
|
| 169 | + return array( |
|
| 170 | + 'returncode' => $xml->returncode->__toString(), |
|
| 171 | + 'message' => $xml->message->__toString(), |
|
| 172 | + 'messageKey' => $xml->messageKey->__toString(), |
|
| 173 | + 'meetingId' => $xml->meetingID->__toString(), |
|
| 174 | + 'attendeePw' => $xml->attendeePW->__toString(), |
|
| 175 | + 'moderatorPw' => $xml->moderatorPW->__toString(), |
|
| 176 | + 'hasBeenForciblyEnded' => $xml->hasBeenForciblyEnded->__toString(), |
|
| 177 | + 'createTime' => $xml->createTime->__toString() |
|
| 178 | + ); |
|
| 179 | + else |
|
| 180 | + return array( |
|
| 181 | + 'returncode' => $xml->returncode->__toString(), |
|
| 182 | + 'message' => $xml->message->__toString(), |
|
| 183 | + 'messageKey' => $xml->messageKey->__toString() |
|
| 184 | + ); |
|
| 185 | + } |
|
| 186 | + else { |
|
| 187 | + return null; |
|
| 188 | + } |
|
| 189 | + } |
|
| 190 | + |
|
| 191 | + public function getJoinMeetingURL($joinParams) { |
|
| 192 | + /* |
|
| 193 | 193 | NOTE: At this point, we don't use a corresponding joinMeetingWithXmlResponse here because the API |
| 194 | 194 | doesn't respond on success, but you can still code that method if you need it. Or, you can take the URL |
| 195 | 195 | that's returned from this method and simply send your users off to that URL in your code. |
@@ -203,249 +203,249 @@ discard block |
||
| 203 | 203 | 'webVoiceConf' => '' -- OPTIONAL - string |
| 204 | 204 | ); |
| 205 | 205 | */ |
| 206 | - $this->_meetingId = $this->_requiredParam($joinParams['meetingId']); |
|
| 207 | - $this->_username = $this->_requiredParam($joinParams['username']); |
|
| 208 | - $this->_password = $this->_requiredParam($joinParams['password']); |
|
| 209 | - // Establish the basic join URL: |
|
| 210 | - $joinUrl = $this->_bbbServerBaseUrl."api/join?"; |
|
| 211 | - // Add parameters to the URL: |
|
| 212 | - $params = |
|
| 213 | - 'meetingID='.urlencode($this->_meetingId). |
|
| 214 | - '&fullName='.urlencode($this->_username). |
|
| 215 | - '&password='.urlencode($this->_password). |
|
| 216 | - '&userID='.urlencode($joinParams['userID']). |
|
| 217 | - '&webVoiceConf='.urlencode($joinParams['webVoiceConf']); |
|
| 218 | - // Only use createTime if we really want to use it. If it's '', then don't pass it: |
|
| 219 | - if (((isset($joinParams['createTime'])) && ($joinParams['createTime'] != ''))) { |
|
| 220 | - $params .= '&createTime='.urlencode($joinParams['createTime']); |
|
| 221 | - } |
|
| 222 | - // Return the URL: |
|
| 223 | - return ($joinUrl.$params.'&checksum='.sha1("join".$params.$this->_securitySalt)); |
|
| 224 | - } |
|
| 225 | - |
|
| 226 | - public function getEndMeetingURL($endParams) { |
|
| 227 | - /* USAGE: |
|
| 206 | + $this->_meetingId = $this->_requiredParam($joinParams['meetingId']); |
|
| 207 | + $this->_username = $this->_requiredParam($joinParams['username']); |
|
| 208 | + $this->_password = $this->_requiredParam($joinParams['password']); |
|
| 209 | + // Establish the basic join URL: |
|
| 210 | + $joinUrl = $this->_bbbServerBaseUrl."api/join?"; |
|
| 211 | + // Add parameters to the URL: |
|
| 212 | + $params = |
|
| 213 | + 'meetingID='.urlencode($this->_meetingId). |
|
| 214 | + '&fullName='.urlencode($this->_username). |
|
| 215 | + '&password='.urlencode($this->_password). |
|
| 216 | + '&userID='.urlencode($joinParams['userID']). |
|
| 217 | + '&webVoiceConf='.urlencode($joinParams['webVoiceConf']); |
|
| 218 | + // Only use createTime if we really want to use it. If it's '', then don't pass it: |
|
| 219 | + if (((isset($joinParams['createTime'])) && ($joinParams['createTime'] != ''))) { |
|
| 220 | + $params .= '&createTime='.urlencode($joinParams['createTime']); |
|
| 221 | + } |
|
| 222 | + // Return the URL: |
|
| 223 | + return ($joinUrl.$params.'&checksum='.sha1("join".$params.$this->_securitySalt)); |
|
| 224 | + } |
|
| 225 | + |
|
| 226 | + public function getEndMeetingURL($endParams) { |
|
| 227 | + /* USAGE: |
|
| 228 | 228 | $endParams = array ( |
| 229 | 229 | 'meetingId' => '1234', -- REQUIRED - The unique id for the meeting |
| 230 | 230 | 'password' => 'mp' -- REQUIRED - The moderator password for the meeting |
| 231 | 231 | ); |
| 232 | 232 | */ |
| 233 | - $this->_meetingId = $this->_requiredParam($endParams['meetingId']); |
|
| 234 | - $this->_password = $this->_requiredParam($endParams['password']); |
|
| 235 | - $endUrl = $this->_bbbServerBaseUrl."api/end?"; |
|
| 236 | - $params = |
|
| 237 | - 'meetingID='.urlencode($this->_meetingId). |
|
| 238 | - '&password='.urlencode($this->_password); |
|
| 239 | - return ($endUrl.$params.'&checksum='.sha1("end".$params.$this->_securitySalt)); |
|
| 240 | - } |
|
| 241 | - |
|
| 242 | - public function endMeetingWithXmlResponseArray($endParams) { |
|
| 243 | - /* USAGE: |
|
| 233 | + $this->_meetingId = $this->_requiredParam($endParams['meetingId']); |
|
| 234 | + $this->_password = $this->_requiredParam($endParams['password']); |
|
| 235 | + $endUrl = $this->_bbbServerBaseUrl."api/end?"; |
|
| 236 | + $params = |
|
| 237 | + 'meetingID='.urlencode($this->_meetingId). |
|
| 238 | + '&password='.urlencode($this->_password); |
|
| 239 | + return ($endUrl.$params.'&checksum='.sha1("end".$params.$this->_securitySalt)); |
|
| 240 | + } |
|
| 241 | + |
|
| 242 | + public function endMeetingWithXmlResponseArray($endParams) { |
|
| 243 | + /* USAGE: |
|
| 244 | 244 | $endParams = array ( |
| 245 | 245 | 'meetingId' => '1234', -- REQUIRED - The unique id for the meeting |
| 246 | 246 | 'password' => 'mp' -- REQUIRED - The moderator password for the meeting |
| 247 | 247 | ); |
| 248 | 248 | */ |
| 249 | - $xml = $this->_processXmlResponse($this->getEndMeetingURL($endParams)); |
|
| 250 | - if ($xml) { |
|
| 251 | - return array( |
|
| 252 | - 'returncode' => $xml->returncode->__toString(), |
|
| 253 | - 'message' => $xml->message->__toString(), |
|
| 254 | - 'messageKey' => $xml->messageKey->__toString() |
|
| 255 | - ); |
|
| 256 | - } |
|
| 257 | - else { |
|
| 258 | - return null; |
|
| 259 | - } |
|
| 260 | - |
|
| 261 | - } |
|
| 262 | - |
|
| 263 | - /* __________________ BBB MONITORING METHODS _________________ */ |
|
| 264 | - /* The methods in the following section support the following categories of the BBB API: |
|
| 249 | + $xml = $this->_processXmlResponse($this->getEndMeetingURL($endParams)); |
|
| 250 | + if ($xml) { |
|
| 251 | + return array( |
|
| 252 | + 'returncode' => $xml->returncode->__toString(), |
|
| 253 | + 'message' => $xml->message->__toString(), |
|
| 254 | + 'messageKey' => $xml->messageKey->__toString() |
|
| 255 | + ); |
|
| 256 | + } |
|
| 257 | + else { |
|
| 258 | + return null; |
|
| 259 | + } |
|
| 260 | + |
|
| 261 | + } |
|
| 262 | + |
|
| 263 | + /* __________________ BBB MONITORING METHODS _________________ */ |
|
| 264 | + /* The methods in the following section support the following categories of the BBB API: |
|
| 265 | 265 | -- isMeetingRunning |
| 266 | 266 | -- getMeetings |
| 267 | 267 | -- getMeetingInfo |
| 268 | 268 | */ |
| 269 | 269 | |
| 270 | - public function getIsMeetingRunningUrl($meetingId) { |
|
| 271 | - /* USAGE: |
|
| 270 | + public function getIsMeetingRunningUrl($meetingId) { |
|
| 271 | + /* USAGE: |
|
| 272 | 272 | $meetingId = '1234' -- REQUIRED - The unique id for the meeting |
| 273 | 273 | */ |
| 274 | - $this->_meetingId = $this->_requiredParam($meetingId); |
|
| 275 | - $runningUrl = $this->_bbbServerBaseUrl."api/isMeetingRunning?"; |
|
| 276 | - $params = |
|
| 277 | - 'meetingID='.urlencode($this->_meetingId); |
|
| 278 | - return ($runningUrl.$params.'&checksum='.sha1("isMeetingRunning".$params.$this->_securitySalt)); |
|
| 279 | - } |
|
| 280 | - |
|
| 281 | - public function isMeetingRunningWithXmlResponseArray($meetingId) { |
|
| 282 | - /* USAGE: |
|
| 274 | + $this->_meetingId = $this->_requiredParam($meetingId); |
|
| 275 | + $runningUrl = $this->_bbbServerBaseUrl."api/isMeetingRunning?"; |
|
| 276 | + $params = |
|
| 277 | + 'meetingID='.urlencode($this->_meetingId); |
|
| 278 | + return ($runningUrl.$params.'&checksum='.sha1("isMeetingRunning".$params.$this->_securitySalt)); |
|
| 279 | + } |
|
| 280 | + |
|
| 281 | + public function isMeetingRunningWithXmlResponseArray($meetingId) { |
|
| 282 | + /* USAGE: |
|
| 283 | 283 | $meetingId = '1234' -- REQUIRED - The unique id for the meeting |
| 284 | 284 | */ |
| 285 | - $xml = $this->_processXmlResponse($this->getIsMeetingRunningUrl($meetingId)); |
|
| 286 | - if($xml) { |
|
| 287 | - return array( |
|
| 288 | - 'returncode' => $xml->returncode->__toString(), |
|
| 289 | - 'running' => $xml->running->__toString() // -- Returns true/false. |
|
| 290 | - ); |
|
| 291 | - } |
|
| 292 | - else { |
|
| 293 | - return null; |
|
| 294 | - } |
|
| 295 | - |
|
| 296 | - } |
|
| 297 | - |
|
| 298 | - public function getGetMeetingsUrl() { |
|
| 299 | - /* Simply formulate the getMeetings URL |
|
| 285 | + $xml = $this->_processXmlResponse($this->getIsMeetingRunningUrl($meetingId)); |
|
| 286 | + if($xml) { |
|
| 287 | + return array( |
|
| 288 | + 'returncode' => $xml->returncode->__toString(), |
|
| 289 | + 'running' => $xml->running->__toString() // -- Returns true/false. |
|
| 290 | + ); |
|
| 291 | + } |
|
| 292 | + else { |
|
| 293 | + return null; |
|
| 294 | + } |
|
| 295 | + |
|
| 296 | + } |
|
| 297 | + |
|
| 298 | + public function getGetMeetingsUrl() { |
|
| 299 | + /* Simply formulate the getMeetings URL |
|
| 300 | 300 | We do this in a separate function so we have the option to just get this |
| 301 | 301 | URL and print it if we want for some reason. |
| 302 | 302 | */ |
| 303 | - $getMeetingsUrl = $this->_bbbServerBaseUrl."api/getMeetings?checksum=".sha1("getMeetings".$this->_securitySalt); |
|
| 304 | - return $getMeetingsUrl; |
|
| 305 | - } |
|
| 303 | + $getMeetingsUrl = $this->_bbbServerBaseUrl."api/getMeetings?checksum=".sha1("getMeetings".$this->_securitySalt); |
|
| 304 | + return $getMeetingsUrl; |
|
| 305 | + } |
|
| 306 | 306 | |
| 307 | - public function getMeetingsWithXmlResponseArray() { |
|
| 308 | - /* USAGE: |
|
| 307 | + public function getMeetingsWithXmlResponseArray() { |
|
| 308 | + /* USAGE: |
|
| 309 | 309 | We don't need to pass any parameters with this one, so we just send the query URL off to BBB |
| 310 | 310 | and then handle the results that we get in the XML response. |
| 311 | 311 | */ |
| 312 | - $xml = $this->_processXmlResponse($this->getGetMeetingsUrl()); |
|
| 313 | - if($xml) { |
|
| 314 | - // If we don't get a success code, stop processing and return just the returncode: |
|
| 315 | - if ($xml->returncode != 'SUCCESS') { |
|
| 316 | - $result = array( |
|
| 317 | - 'returncode' => $xml->returncode->__toString() |
|
| 318 | - ); |
|
| 319 | - return $result; |
|
| 320 | - } |
|
| 321 | - elseif ($xml->messageKey == 'noMeetings') { |
|
| 322 | - /* No meetings on server, so return just this info: */ |
|
| 323 | - $result = array( |
|
| 324 | - 'returncode' => $xml->returncode->__toString(), |
|
| 325 | - 'messageKey' => $xml->messageKey->__toString(), |
|
| 326 | - 'message' => $xml->message->__toString() |
|
| 327 | - ); |
|
| 328 | - return $result; |
|
| 329 | - } |
|
| 330 | - else { |
|
| 331 | - // In this case, we have success and meetings. First return general response: |
|
| 332 | - $result = array( |
|
| 333 | - 'returncode' => $xml->returncode->__toString(), |
|
| 334 | - 'messageKey' => $xml->messageKey->__toString(), |
|
| 335 | - 'message' => $xml->message->__toString() |
|
| 336 | - ); |
|
| 337 | - // Then interate through meeting results and return them as part of the array: |
|
| 338 | - foreach ($xml->meetings->meeting as $m) { |
|
| 339 | - $result[] = array( |
|
| 340 | - 'meetingId' => $m->meetingID->__toString(), |
|
| 341 | - 'meetingName' => $m->meetingName->__toString(), |
|
| 342 | - 'createTime' => $m->createTime->__toString(), |
|
| 343 | - 'attendeePw' => $m->attendeePW->__toString(), |
|
| 344 | - 'moderatorPw' => $m->moderatorPW->__toString(), |
|
| 345 | - 'hasBeenForciblyEnded' => $m->hasBeenForciblyEnded->__toString(), |
|
| 346 | - 'running' => $m->running->__toString() |
|
| 347 | - ); |
|
| 348 | - } |
|
| 349 | - return $result; |
|
| 350 | - } |
|
| 351 | - } |
|
| 352 | - else { |
|
| 353 | - return null; |
|
| 354 | - } |
|
| 355 | - |
|
| 356 | - } |
|
| 357 | - |
|
| 358 | - public function getMeetingInfoUrl($infoParams) { |
|
| 359 | - /* USAGE: |
|
| 312 | + $xml = $this->_processXmlResponse($this->getGetMeetingsUrl()); |
|
| 313 | + if($xml) { |
|
| 314 | + // If we don't get a success code, stop processing and return just the returncode: |
|
| 315 | + if ($xml->returncode != 'SUCCESS') { |
|
| 316 | + $result = array( |
|
| 317 | + 'returncode' => $xml->returncode->__toString() |
|
| 318 | + ); |
|
| 319 | + return $result; |
|
| 320 | + } |
|
| 321 | + elseif ($xml->messageKey == 'noMeetings') { |
|
| 322 | + /* No meetings on server, so return just this info: */ |
|
| 323 | + $result = array( |
|
| 324 | + 'returncode' => $xml->returncode->__toString(), |
|
| 325 | + 'messageKey' => $xml->messageKey->__toString(), |
|
| 326 | + 'message' => $xml->message->__toString() |
|
| 327 | + ); |
|
| 328 | + return $result; |
|
| 329 | + } |
|
| 330 | + else { |
|
| 331 | + // In this case, we have success and meetings. First return general response: |
|
| 332 | + $result = array( |
|
| 333 | + 'returncode' => $xml->returncode->__toString(), |
|
| 334 | + 'messageKey' => $xml->messageKey->__toString(), |
|
| 335 | + 'message' => $xml->message->__toString() |
|
| 336 | + ); |
|
| 337 | + // Then interate through meeting results and return them as part of the array: |
|
| 338 | + foreach ($xml->meetings->meeting as $m) { |
|
| 339 | + $result[] = array( |
|
| 340 | + 'meetingId' => $m->meetingID->__toString(), |
|
| 341 | + 'meetingName' => $m->meetingName->__toString(), |
|
| 342 | + 'createTime' => $m->createTime->__toString(), |
|
| 343 | + 'attendeePw' => $m->attendeePW->__toString(), |
|
| 344 | + 'moderatorPw' => $m->moderatorPW->__toString(), |
|
| 345 | + 'hasBeenForciblyEnded' => $m->hasBeenForciblyEnded->__toString(), |
|
| 346 | + 'running' => $m->running->__toString() |
|
| 347 | + ); |
|
| 348 | + } |
|
| 349 | + return $result; |
|
| 350 | + } |
|
| 351 | + } |
|
| 352 | + else { |
|
| 353 | + return null; |
|
| 354 | + } |
|
| 355 | + |
|
| 356 | + } |
|
| 357 | + |
|
| 358 | + public function getMeetingInfoUrl($infoParams) { |
|
| 359 | + /* USAGE: |
|
| 360 | 360 | $infoParams = array( |
| 361 | 361 | 'meetingId' => '1234', -- REQUIRED - The unique id for the meeting |
| 362 | 362 | 'password' => 'mp' -- REQUIRED - The moderator password for the meeting |
| 363 | 363 | ); |
| 364 | 364 | */ |
| 365 | - $this->_meetingId = $this->_requiredParam($infoParams['meetingId']); |
|
| 366 | - $this->_password = $this->_requiredParam($infoParams['password']); |
|
| 367 | - $infoUrl = $this->_bbbServerBaseUrl."api/getMeetingInfo?"; |
|
| 368 | - $params = |
|
| 369 | - 'meetingID='.urlencode($this->_meetingId). |
|
| 370 | - '&password='.urlencode($this->_password); |
|
| 371 | - return ($infoUrl.$params.'&checksum='.sha1("getMeetingInfo".$params.$this->_securitySalt)); |
|
| 372 | - } |
|
| 373 | - |
|
| 374 | - public function getMeetingInfoWithXmlResponseArray($infoParams) { |
|
| 375 | - /* USAGE: |
|
| 365 | + $this->_meetingId = $this->_requiredParam($infoParams['meetingId']); |
|
| 366 | + $this->_password = $this->_requiredParam($infoParams['password']); |
|
| 367 | + $infoUrl = $this->_bbbServerBaseUrl."api/getMeetingInfo?"; |
|
| 368 | + $params = |
|
| 369 | + 'meetingID='.urlencode($this->_meetingId). |
|
| 370 | + '&password='.urlencode($this->_password); |
|
| 371 | + return ($infoUrl.$params.'&checksum='.sha1("getMeetingInfo".$params.$this->_securitySalt)); |
|
| 372 | + } |
|
| 373 | + |
|
| 374 | + public function getMeetingInfoWithXmlResponseArray($infoParams) { |
|
| 375 | + /* USAGE: |
|
| 376 | 376 | $infoParams = array( |
| 377 | 377 | 'meetingId' => '1234', -- REQUIRED - The unique id for the meeting |
| 378 | 378 | 'password' => 'mp' -- REQUIRED - The moderator password for the meeting |
| 379 | 379 | ); |
| 380 | 380 | */ |
| 381 | - $xml = $this->_processXmlResponse($this->getMeetingInfoUrl($infoParams)); |
|
| 382 | - if($xml) { |
|
| 383 | - // If we don't get a success code or messageKey, find out why: |
|
| 384 | - if (($xml->returncode != 'SUCCESS') || ($xml->messageKey == null)) { |
|
| 385 | - $result = array( |
|
| 386 | - 'returncode' => $xml->returncode->__toString(), |
|
| 387 | - 'messageKey' => $xml->messageKey->__toString(), |
|
| 388 | - 'message' => $xml->message->__toString() |
|
| 389 | - ); |
|
| 390 | - return $result; |
|
| 391 | - } |
|
| 392 | - else { |
|
| 393 | - // In this case, we have success and meeting info: |
|
| 394 | - $result = array( |
|
| 395 | - 'returncode' => $xml->returncode->__toString(), |
|
| 396 | - 'meetingName' => $xml->meetingName->__toString(), |
|
| 397 | - 'meetingId' => $xml->meetingID->__toString(), |
|
| 398 | - 'createTime' => $xml->createTime->__toString(), |
|
| 399 | - 'voiceBridge' => $xml->voiceBridge->__toString(), |
|
| 400 | - 'attendeePw' => $xml->attendeePW->__toString(), |
|
| 401 | - 'moderatorPw' => $xml->moderatorPW->__toString(), |
|
| 402 | - 'running' => $xml->running->__toString(), |
|
| 403 | - 'recording' => $xml->recording->__toString(), |
|
| 404 | - 'hasBeenForciblyEnded' => $xml->hasBeenForciblyEnded->__toString(), |
|
| 405 | - 'startTime' => $xml->startTime->__toString(), |
|
| 406 | - 'endTime' => $xml->endTime->__toString(), |
|
| 407 | - 'participantCount' => $xml->participantCount->__toString(), |
|
| 408 | - 'maxUsers' => $xml->maxUsers->__toString(), |
|
| 409 | - 'moderatorCount' => $xml->moderatorCount->__toString(), |
|
| 410 | - ); |
|
| 411 | - // Then interate through attendee results and return them as part of the array: |
|
| 412 | - foreach ($xml->attendees->attendee as $a) { |
|
| 413 | - $result[] = array( |
|
| 414 | - 'userId' => $a->userID->__toString(), |
|
| 415 | - 'fullName' => $a->fullName->__toString(), |
|
| 416 | - 'role' => $a->role->__toString() |
|
| 417 | - ); |
|
| 418 | - } |
|
| 419 | - return $result; |
|
| 420 | - } |
|
| 421 | - } |
|
| 422 | - else { |
|
| 423 | - return null; |
|
| 424 | - } |
|
| 425 | - |
|
| 426 | - } |
|
| 427 | - |
|
| 428 | - /* __________________ BBB RECORDING METHODS _________________ */ |
|
| 429 | - /* The methods in the following section support the following categories of the BBB API: |
|
| 381 | + $xml = $this->_processXmlResponse($this->getMeetingInfoUrl($infoParams)); |
|
| 382 | + if($xml) { |
|
| 383 | + // If we don't get a success code or messageKey, find out why: |
|
| 384 | + if (($xml->returncode != 'SUCCESS') || ($xml->messageKey == null)) { |
|
| 385 | + $result = array( |
|
| 386 | + 'returncode' => $xml->returncode->__toString(), |
|
| 387 | + 'messageKey' => $xml->messageKey->__toString(), |
|
| 388 | + 'message' => $xml->message->__toString() |
|
| 389 | + ); |
|
| 390 | + return $result; |
|
| 391 | + } |
|
| 392 | + else { |
|
| 393 | + // In this case, we have success and meeting info: |
|
| 394 | + $result = array( |
|
| 395 | + 'returncode' => $xml->returncode->__toString(), |
|
| 396 | + 'meetingName' => $xml->meetingName->__toString(), |
|
| 397 | + 'meetingId' => $xml->meetingID->__toString(), |
|
| 398 | + 'createTime' => $xml->createTime->__toString(), |
|
| 399 | + 'voiceBridge' => $xml->voiceBridge->__toString(), |
|
| 400 | + 'attendeePw' => $xml->attendeePW->__toString(), |
|
| 401 | + 'moderatorPw' => $xml->moderatorPW->__toString(), |
|
| 402 | + 'running' => $xml->running->__toString(), |
|
| 403 | + 'recording' => $xml->recording->__toString(), |
|
| 404 | + 'hasBeenForciblyEnded' => $xml->hasBeenForciblyEnded->__toString(), |
|
| 405 | + 'startTime' => $xml->startTime->__toString(), |
|
| 406 | + 'endTime' => $xml->endTime->__toString(), |
|
| 407 | + 'participantCount' => $xml->participantCount->__toString(), |
|
| 408 | + 'maxUsers' => $xml->maxUsers->__toString(), |
|
| 409 | + 'moderatorCount' => $xml->moderatorCount->__toString(), |
|
| 410 | + ); |
|
| 411 | + // Then interate through attendee results and return them as part of the array: |
|
| 412 | + foreach ($xml->attendees->attendee as $a) { |
|
| 413 | + $result[] = array( |
|
| 414 | + 'userId' => $a->userID->__toString(), |
|
| 415 | + 'fullName' => $a->fullName->__toString(), |
|
| 416 | + 'role' => $a->role->__toString() |
|
| 417 | + ); |
|
| 418 | + } |
|
| 419 | + return $result; |
|
| 420 | + } |
|
| 421 | + } |
|
| 422 | + else { |
|
| 423 | + return null; |
|
| 424 | + } |
|
| 425 | + |
|
| 426 | + } |
|
| 427 | + |
|
| 428 | + /* __________________ BBB RECORDING METHODS _________________ */ |
|
| 429 | + /* The methods in the following section support the following categories of the BBB API: |
|
| 430 | 430 | -- getRecordings |
| 431 | 431 | -- publishRecordings |
| 432 | 432 | -- deleteRecordings |
| 433 | 433 | */ |
| 434 | 434 | |
| 435 | - public function getRecordingsUrl($recordingParams) { |
|
| 436 | - /* USAGE: |
|
| 435 | + public function getRecordingsUrl($recordingParams) { |
|
| 436 | + /* USAGE: |
|
| 437 | 437 | $recordingParams = array( |
| 438 | 438 | 'meetingId' => '1234', -- OPTIONAL - comma separate if multiple ids |
| 439 | 439 | ); |
| 440 | 440 | */ |
| 441 | - $recordingsUrl = $this->_bbbServerBaseUrl."api/getRecordings?"; |
|
| 442 | - $params = 'meetingID='.urlencode($recordingParams['meetingId']); |
|
| 443 | - return ($recordingsUrl.$params.'&checksum='.sha1("getRecordings".$params.$this->_securitySalt)); |
|
| 441 | + $recordingsUrl = $this->_bbbServerBaseUrl."api/getRecordings?"; |
|
| 442 | + $params = 'meetingID='.urlencode($recordingParams['meetingId']); |
|
| 443 | + return ($recordingsUrl.$params.'&checksum='.sha1("getRecordings".$params.$this->_securitySalt)); |
|
| 444 | 444 | |
| 445 | - } |
|
| 445 | + } |
|
| 446 | 446 | |
| 447 | - public function getRecordingsWithXmlResponseArray($recordingParams) { |
|
| 448 | - /* USAGE: |
|
| 447 | + public function getRecordingsWithXmlResponseArray($recordingParams) { |
|
| 448 | + /* USAGE: |
|
| 449 | 449 | $recordingParams = array( |
| 450 | 450 | 'meetingId' => '1234', -- OPTIONAL - comma separate if multiple ids |
| 451 | 451 | ); |
@@ -453,121 +453,121 @@ discard block |
||
| 453 | 453 | when creating a meeting, it will kick users out after the duration. Should |
| 454 | 454 | probably be required in user code when 'recording' is set to true. |
| 455 | 455 | */ |
| 456 | - $xml = $this->_processXmlResponse($this->getRecordingsUrl($recordingParams)); |
|
| 457 | - if($xml) { |
|
| 458 | - // If we don't get a success code or messageKey, find out why: |
|
| 459 | - if (($xml->returncode != 'SUCCESS') || ($xml->messageKey == null)) { |
|
| 460 | - $result = array( |
|
| 461 | - 'returncode' => $xml->returncode->__toString(), |
|
| 462 | - 'messageKey' => $xml->messageKey->__toString(), |
|
| 463 | - 'message' => $xml->message->__toString() |
|
| 464 | - ); |
|
| 465 | - return $result; |
|
| 466 | - } |
|
| 467 | - else { |
|
| 468 | - // In this case, we have success and recording info: |
|
| 469 | - $result = array( |
|
| 470 | - 'returncode' => $xml->returncode->__toString(), |
|
| 471 | - 'messageKey' => $xml->messageKey->__toString(), |
|
| 472 | - 'message' => $xml->message->__toString() |
|
| 473 | - ); |
|
| 474 | - |
|
| 475 | - foreach ($xml->recordings->recording as $r) { |
|
| 476 | - $result[] = array( |
|
| 477 | - 'recordId' => $r->recordID->__toString(), |
|
| 478 | - 'meetingId' => $r->meetingID->__toString(), |
|
| 479 | - 'name' => $r->name->__toString(), |
|
| 480 | - 'published' => $r->published->__toString(), |
|
| 481 | - 'startTime' => $r->startTime->__toString(), |
|
| 482 | - 'endTime' => $r->endTime->__toString(), |
|
| 483 | - 'playbackFormatType' => $r->playback->format->type->__toString(), |
|
| 484 | - 'playbackFormatUrl' => $r->playback->format->url->__toString(), |
|
| 485 | - 'playbackFormatLength' => $r->playback->format->length->__toString(), |
|
| 486 | - 'metadataTitle' => $r->metadata->title->__toString(), |
|
| 487 | - 'metadataSubject' => $r->metadata->subject->__toString(), |
|
| 488 | - 'metadataDescription' => $r->metadata->description->__toString(), |
|
| 489 | - 'metadataCreator' => $r->metadata->creator->__toString(), |
|
| 490 | - 'metadataContributor' => $r->metadata->contributor->__toString(), |
|
| 491 | - 'metadataLanguage' => $r->metadata->language->__toString(), |
|
| 492 | - // Add more here as needed for your app depending on your |
|
| 493 | - // use of metadata when creating recordings. |
|
| 494 | - ); |
|
| 495 | - } |
|
| 496 | - return $result; |
|
| 497 | - } |
|
| 498 | - } |
|
| 499 | - else { |
|
| 500 | - return null; |
|
| 501 | - } |
|
| 502 | - } |
|
| 503 | - |
|
| 504 | - public function getPublishRecordingsUrl($recordingParams) { |
|
| 505 | - /* USAGE: |
|
| 456 | + $xml = $this->_processXmlResponse($this->getRecordingsUrl($recordingParams)); |
|
| 457 | + if($xml) { |
|
| 458 | + // If we don't get a success code or messageKey, find out why: |
|
| 459 | + if (($xml->returncode != 'SUCCESS') || ($xml->messageKey == null)) { |
|
| 460 | + $result = array( |
|
| 461 | + 'returncode' => $xml->returncode->__toString(), |
|
| 462 | + 'messageKey' => $xml->messageKey->__toString(), |
|
| 463 | + 'message' => $xml->message->__toString() |
|
| 464 | + ); |
|
| 465 | + return $result; |
|
| 466 | + } |
|
| 467 | + else { |
|
| 468 | + // In this case, we have success and recording info: |
|
| 469 | + $result = array( |
|
| 470 | + 'returncode' => $xml->returncode->__toString(), |
|
| 471 | + 'messageKey' => $xml->messageKey->__toString(), |
|
| 472 | + 'message' => $xml->message->__toString() |
|
| 473 | + ); |
|
| 474 | + |
|
| 475 | + foreach ($xml->recordings->recording as $r) { |
|
| 476 | + $result[] = array( |
|
| 477 | + 'recordId' => $r->recordID->__toString(), |
|
| 478 | + 'meetingId' => $r->meetingID->__toString(), |
|
| 479 | + 'name' => $r->name->__toString(), |
|
| 480 | + 'published' => $r->published->__toString(), |
|
| 481 | + 'startTime' => $r->startTime->__toString(), |
|
| 482 | + 'endTime' => $r->endTime->__toString(), |
|
| 483 | + 'playbackFormatType' => $r->playback->format->type->__toString(), |
|
| 484 | + 'playbackFormatUrl' => $r->playback->format->url->__toString(), |
|
| 485 | + 'playbackFormatLength' => $r->playback->format->length->__toString(), |
|
| 486 | + 'metadataTitle' => $r->metadata->title->__toString(), |
|
| 487 | + 'metadataSubject' => $r->metadata->subject->__toString(), |
|
| 488 | + 'metadataDescription' => $r->metadata->description->__toString(), |
|
| 489 | + 'metadataCreator' => $r->metadata->creator->__toString(), |
|
| 490 | + 'metadataContributor' => $r->metadata->contributor->__toString(), |
|
| 491 | + 'metadataLanguage' => $r->metadata->language->__toString(), |
|
| 492 | + // Add more here as needed for your app depending on your |
|
| 493 | + // use of metadata when creating recordings. |
|
| 494 | + ); |
|
| 495 | + } |
|
| 496 | + return $result; |
|
| 497 | + } |
|
| 498 | + } |
|
| 499 | + else { |
|
| 500 | + return null; |
|
| 501 | + } |
|
| 502 | + } |
|
| 503 | + |
|
| 504 | + public function getPublishRecordingsUrl($recordingParams) { |
|
| 505 | + /* USAGE: |
|
| 506 | 506 | $recordingParams = array( |
| 507 | 507 | 'recordId' => '1234', -- REQUIRED - comma separate if multiple ids |
| 508 | 508 | 'publish' => 'true', -- REQUIRED - boolean: true/false |
| 509 | 509 | ); |
| 510 | 510 | */ |
| 511 | - $recordingsUrl = $this->_bbbServerBaseUrl."api/publishRecordings?"; |
|
| 512 | - $params = |
|
| 513 | - 'recordID='.urlencode($recordingParams['recordId']). |
|
| 514 | - '&publish='.urlencode($recordingParams['publish']); |
|
| 515 | - return ($recordingsUrl.$params.'&checksum='.sha1("publishRecordings".$params.$this->_securitySalt)); |
|
| 511 | + $recordingsUrl = $this->_bbbServerBaseUrl."api/publishRecordings?"; |
|
| 512 | + $params = |
|
| 513 | + 'recordID='.urlencode($recordingParams['recordId']). |
|
| 514 | + '&publish='.urlencode($recordingParams['publish']); |
|
| 515 | + return ($recordingsUrl.$params.'&checksum='.sha1("publishRecordings".$params.$this->_securitySalt)); |
|
| 516 | 516 | |
| 517 | - } |
|
| 517 | + } |
|
| 518 | 518 | |
| 519 | - public function publishRecordingsWithXmlResponseArray($recordingParams) { |
|
| 520 | - /* USAGE: |
|
| 519 | + public function publishRecordingsWithXmlResponseArray($recordingParams) { |
|
| 520 | + /* USAGE: |
|
| 521 | 521 | $recordingParams = array( |
| 522 | 522 | 'recordId' => '1234', -- REQUIRED - comma separate if multiple ids |
| 523 | 523 | 'publish' => 'true', -- REQUIRED - boolean: true/false |
| 524 | 524 | ); |
| 525 | 525 | */ |
| 526 | - $xml = $this->_processXmlResponse($this->getPublishRecordingsUrl($recordingParams)); |
|
| 527 | - if($xml) { |
|
| 528 | - return array( |
|
| 529 | - 'returncode' => $xml->returncode->__toString(), |
|
| 530 | - 'published' => $xml->published->__toString() // -- Returns true/false. |
|
| 531 | - ); |
|
| 532 | - } |
|
| 533 | - else { |
|
| 534 | - return null; |
|
| 535 | - } |
|
| 536 | - |
|
| 537 | - |
|
| 538 | - } |
|
| 539 | - |
|
| 540 | - public function getDeleteRecordingsUrl($recordingParams) { |
|
| 541 | - /* USAGE: |
|
| 526 | + $xml = $this->_processXmlResponse($this->getPublishRecordingsUrl($recordingParams)); |
|
| 527 | + if($xml) { |
|
| 528 | + return array( |
|
| 529 | + 'returncode' => $xml->returncode->__toString(), |
|
| 530 | + 'published' => $xml->published->__toString() // -- Returns true/false. |
|
| 531 | + ); |
|
| 532 | + } |
|
| 533 | + else { |
|
| 534 | + return null; |
|
| 535 | + } |
|
| 536 | + |
|
| 537 | + |
|
| 538 | + } |
|
| 539 | + |
|
| 540 | + public function getDeleteRecordingsUrl($recordingParams) { |
|
| 541 | + /* USAGE: |
|
| 542 | 542 | $recordingParams = array( |
| 543 | 543 | 'recordId' => '1234', -- REQUIRED - comma separate if multiple ids |
| 544 | 544 | ); |
| 545 | 545 | */ |
| 546 | - $recordingsUrl = $this->_bbbServerBaseUrl."api/deleteRecordings?"; |
|
| 547 | - $params = |
|
| 548 | - 'recordID='.urlencode($recordingParams['recordId']); |
|
| 549 | - return ($recordingsUrl.$params.'&checksum='.sha1("deleteRecordings".$params.$this->_securitySalt)); |
|
| 550 | - } |
|
| 551 | - |
|
| 552 | - public function deleteRecordingsWithXmlResponseArray($recordingParams) { |
|
| 553 | - /* USAGE: |
|
| 546 | + $recordingsUrl = $this->_bbbServerBaseUrl."api/deleteRecordings?"; |
|
| 547 | + $params = |
|
| 548 | + 'recordID='.urlencode($recordingParams['recordId']); |
|
| 549 | + return ($recordingsUrl.$params.'&checksum='.sha1("deleteRecordings".$params.$this->_securitySalt)); |
|
| 550 | + } |
|
| 551 | + |
|
| 552 | + public function deleteRecordingsWithXmlResponseArray($recordingParams) { |
|
| 553 | + /* USAGE: |
|
| 554 | 554 | $recordingParams = array( |
| 555 | 555 | 'recordId' => '1234', -- REQUIRED - comma separate if multiple ids |
| 556 | 556 | ); |
| 557 | 557 | */ |
| 558 | 558 | |
| 559 | - $xml = $this->_processXmlResponse($this->getDeleteRecordingsUrl($recordingParams)); |
|
| 560 | - if($xml) { |
|
| 561 | - return array( |
|
| 562 | - 'returncode' => $xml->returncode->__toString(), |
|
| 563 | - 'deleted' => $xml->deleted->__toString() // -- Returns true/false. |
|
| 564 | - ); |
|
| 565 | - } |
|
| 566 | - else { |
|
| 567 | - return null; |
|
| 568 | - } |
|
| 569 | - |
|
| 570 | - } |
|
| 559 | + $xml = $this->_processXmlResponse($this->getDeleteRecordingsUrl($recordingParams)); |
|
| 560 | + if($xml) { |
|
| 561 | + return array( |
|
| 562 | + 'returncode' => $xml->returncode->__toString(), |
|
| 563 | + 'deleted' => $xml->deleted->__toString() // -- Returns true/false. |
|
| 564 | + ); |
|
| 565 | + } |
|
| 566 | + else { |
|
| 567 | + return null; |
|
| 568 | + } |
|
| 569 | + |
|
| 570 | + } |
|
| 571 | 571 | |
| 572 | 572 | |
| 573 | 573 | |
@@ -19,7 +19,7 @@ discard block |
||
| 19 | 19 | $nameTools = get_lang('PlatformAdmin'); |
| 20 | 20 | |
| 21 | 21 | $accessUrlId = 0; |
| 22 | -$adminExtraContentDir = api_get_path(SYS_APP_PATH) . "home/admin/"; |
|
| 22 | +$adminExtraContentDir = api_get_path(SYS_APP_PATH)."home/admin/"; |
|
| 23 | 23 | |
| 24 | 24 | if (api_is_multiple_url_enabled()) { |
| 25 | 25 | $accessUrlId = api_get_current_access_url_id(); |
@@ -28,7 +28,7 @@ discard block |
||
| 28 | 28 | $urlInfo = api_get_access_url($accessUrlId); |
| 29 | 29 | $url = api_remove_trailing_slash(preg_replace('/https?:\/\//i', '', $urlInfo['url'])); |
| 30 | 30 | $cleanUrl = str_replace('/', '-', $url); |
| 31 | - $adminExtraContentDir = api_get_path(SYS_APP_PATH) . "home/$cleanUrl/admin/"; |
|
| 31 | + $adminExtraContentDir = api_get_path(SYS_APP_PATH)."home/$cleanUrl/admin/"; |
|
| 32 | 32 | } |
| 33 | 33 | } |
| 34 | 34 | |
@@ -96,7 +96,7 @@ discard block |
||
| 96 | 96 | <div class="form-group"> |
| 97 | 97 | <input class="form-control" type="text" name="keyword" value=""> |
| 98 | 98 | <button class="btn btn-default" type="submit"> |
| 99 | - <em class="fa fa-search"></em> ' . get_lang('Search') . ' |
|
| 99 | + <em class="fa fa-search"></em> ' . get_lang('Search').' |
|
| 100 | 100 | </button> |
| 101 | 101 | </div> |
| 102 | 102 | </form>'; |
@@ -149,7 +149,7 @@ discard block |
||
| 149 | 149 | <div class="form-group"> |
| 150 | 150 | <input class="form-control" type="text" name="keyword" value=""> |
| 151 | 151 | <button class="btn btn-default" type="submit"> |
| 152 | - <em class="fa fa-search"></em> ' . get_lang('Search') . ' |
|
| 152 | + <em class="fa fa-search"></em> ' . get_lang('Search').' |
|
| 153 | 153 | </button> |
| 154 | 154 | </div> |
| 155 | 155 | </form>'; |
@@ -209,7 +209,7 @@ discard block |
||
| 209 | 209 | <input class="form-control" type="text" name="search_field" value="" > |
| 210 | 210 | <input type="hidden" value="search_setting" name="category"> |
| 211 | 211 | <button class="btn btn-default" type="submit"> |
| 212 | - <em class="fa fa-search"></em> ' . get_lang('Search') . ' |
|
| 212 | + <em class="fa fa-search"></em> ' . get_lang('Search').' |
|
| 213 | 213 | </button> |
| 214 | 214 | </div> |
| 215 | 215 | </form>'; |
@@ -222,18 +222,18 @@ discard block |
||
| 222 | 222 | $items[] = array('url' => 'settings.php?category=Regions', 'label' => get_lang('Regions')); |
| 223 | 223 | $items[] = array('url' => 'system_announcements.php', 'label' => get_lang('SystemAnnouncements')); |
| 224 | 224 | $items[] = array( |
| 225 | - 'url' => api_get_path(WEB_CODE_PATH) . 'calendar/agenda_js.php?type=admin', |
|
| 225 | + 'url' => api_get_path(WEB_CODE_PATH).'calendar/agenda_js.php?type=admin', |
|
| 226 | 226 | 'label' => get_lang('GlobalAgenda') |
| 227 | 227 | ); |
| 228 | 228 | $items[] = array('url' => 'configure_homepage.php', 'label' => get_lang('ConfigureHomePage')); |
| 229 | 229 | $items[] = array('url' => 'configure_inscription.php', 'label' => get_lang('ConfigureInscription')); |
| 230 | 230 | $items[] = array('url' => 'statistics/index.php', 'label' => get_lang('Statistics')); |
| 231 | 231 | $items[] = array( |
| 232 | - 'url' => api_get_path(WEB_CODE_PATH) . 'mySpace/company_reports.php', |
|
| 232 | + 'url' => api_get_path(WEB_CODE_PATH).'mySpace/company_reports.php', |
|
| 233 | 233 | 'label' => get_lang('Reports') |
| 234 | 234 | ); |
| 235 | 235 | $items[] = array( |
| 236 | - 'url' => api_get_path(WEB_CODE_PATH) . 'admin/teacher_time_report.php', |
|
| 236 | + 'url' => api_get_path(WEB_CODE_PATH).'admin/teacher_time_report.php', |
|
| 237 | 237 | 'label' => get_lang('TeacherTimeReport') |
| 238 | 238 | ); |
| 239 | 239 | |
@@ -282,7 +282,7 @@ discard block |
||
| 282 | 282 | <div class="form-group"> |
| 283 | 283 | <input class="form-control" type="text" name="keyword" value=""> |
| 284 | 284 | <button class="btn btn-default" type="submit"> |
| 285 | - <em class="fa fa-search"></em> ' . get_lang('Search') . ' |
|
| 285 | + <em class="fa fa-search"></em> ' . get_lang('Search').' |
|
| 286 | 286 | </button> |
| 287 | 287 | </div> |
| 288 | 288 | </form>'; |
@@ -310,7 +310,7 @@ discard block |
||
| 310 | 310 | |
| 311 | 311 | if (api_is_platform_admin()) { |
| 312 | 312 | // option only visible in development mode. Enable through code if required |
| 313 | - if (is_dir(api_get_path(SYS_TEST_PATH) . 'datafiller/')) { |
|
| 313 | + if (is_dir(api_get_path(SYS_TEST_PATH).'datafiller/')) { |
|
| 314 | 314 | $items[] = array('url' => 'user_move_stats.php', 'label' => get_lang('MoveUserStats')); |
| 315 | 315 | } |
| 316 | 316 | $items[] = array('url' => 'career_dashboard.php', 'label' => get_lang('CareersAndPromotions')); |
@@ -337,7 +337,7 @@ discard block |
||
| 337 | 337 | $items = array(); |
| 338 | 338 | $items[] = array('url' => 'special_exports.php', 'label' => get_lang('SpecialExports')); |
| 339 | 339 | $items[] = array('url' => 'system_status.php', 'label' => get_lang('SystemStatus')); |
| 340 | - if (is_dir(api_get_path(SYS_TEST_PATH) . 'datafiller/')) { |
|
| 340 | + if (is_dir(api_get_path(SYS_TEST_PATH).'datafiller/')) { |
|
| 341 | 341 | $items[] = array('url' => 'filler.php', 'label' => get_lang('DataFiller')); |
| 342 | 342 | } |
| 343 | 343 | |
@@ -381,12 +381,12 @@ discard block |
||
| 381 | 381 | $items[] = array('url' => 'skill_list.php', 'label' => get_lang('ManageSkills')); |
| 382 | 382 | //$items[] = array('url'=>'skills_profile.php', 'label' => get_lang('SkillsProfile')); |
| 383 | 383 | $items[] = array( |
| 384 | - 'url' => api_get_path(WEB_CODE_PATH) . 'social/skills_ranking.php', |
|
| 384 | + 'url' => api_get_path(WEB_CODE_PATH).'social/skills_ranking.php', |
|
| 385 | 385 | 'label' => get_lang('SkillsRanking') |
| 386 | 386 | ); |
| 387 | 387 | $items[] = array('url' => 'skills_gradebook.php', 'label' => get_lang('SkillsAndGradebooks')); |
| 388 | 388 | $items[] = array( |
| 389 | - 'url' => api_get_path(WEB_CODE_PATH) . 'admin/skill_badge.php', |
|
| 389 | + 'url' => api_get_path(WEB_CODE_PATH).'admin/skill_badge.php', |
|
| 390 | 390 | 'label' => get_lang('Badges') |
| 391 | 391 | ); |
| 392 | 392 | $blocks['skills']['items'] = $items; |
@@ -420,12 +420,12 @@ discard block |
||
| 420 | 420 | $itemUrl = '/start.php'; |
| 421 | 421 | } |
| 422 | 422 | |
| 423 | - if (!file_exists(api_get_path(SYS_PLUGIN_PATH) . $plugin_name . $itemUrl)) { |
|
| 423 | + if (!file_exists(api_get_path(SYS_PLUGIN_PATH).$plugin_name.$itemUrl)) { |
|
| 424 | 424 | continue; |
| 425 | 425 | } |
| 426 | 426 | |
| 427 | 427 | $items[] = array( |
| 428 | - 'url' => api_get_path(WEB_PLUGIN_PATH) . $plugin_name . $itemUrl, |
|
| 428 | + 'url' => api_get_path(WEB_PLUGIN_PATH).$plugin_name.$itemUrl, |
|
| 429 | 429 | 'label' => $plugin_info['title'] |
| 430 | 430 | ); |
| 431 | 431 | } |
@@ -503,7 +503,7 @@ discard block |
||
| 503 | 503 | } |
| 504 | 504 | //end hack |
| 505 | 505 | } |
| 506 | -$admin_ajax_url = api_get_path(WEB_AJAX_PATH) . 'admin.ajax.php'; |
|
| 506 | +$admin_ajax_url = api_get_path(WEB_AJAX_PATH).'admin.ajax.php'; |
|
| 507 | 507 | |
| 508 | 508 | $tpl = new Template(); |
| 509 | 509 | |
@@ -556,7 +556,7 @@ discard block |
||
| 556 | 556 | die; |
| 557 | 557 | } |
| 558 | 558 | |
| 559 | - $fullFilePath = $adminExtraContentDir . $extraData['block']; |
|
| 559 | + $fullFilePath = $adminExtraContentDir.$extraData['block']; |
|
| 560 | 560 | $fullFilePath .= "_extra.html"; |
| 561 | 561 | |
| 562 | 562 | file_put_contents($fullFilePath, $extraData['extra_content']); |
@@ -176,13 +176,13 @@ discard block |
||
| 176 | 176 | } |
| 177 | 177 | |
| 178 | 178 | $params['attendee_pw'] = isset($params['moderator_pw']) ? $params['moderator_pw'] : $courseCode; |
| 179 | - $attendeePassword = $params['attendee_pw']; |
|
| 179 | + $attendeePassword = $params['attendee_pw']; |
|
| 180 | 180 | $params['moderator_pw'] = isset($params['moderator_pw']) ? $params['moderator_pw'] : $this->getModMeetingPassword(); |
| 181 | 181 | $moderatorPassword = $params['moderator_pw']; |
| 182 | 182 | |
| 183 | 183 | $params['record'] = api_get_course_setting('big_blue_button_record_and_store', $courseCode) == 1 ? true : false; |
| 184 | 184 | $max = api_get_course_setting('big_blue_button_max_students_allowed', $courseCode); |
| 185 | - $max = isset($max) ? $max : -1; |
|
| 185 | + $max = isset($max) ? $max : -1; |
|
| 186 | 186 | |
| 187 | 187 | $params['status'] = 1; |
| 188 | 188 | // Generate a pseudo-global-unique-id to avoid clash of conferences on |
@@ -213,23 +213,23 @@ discard block |
||
| 213 | 213 | $duration = 300; |
| 214 | 214 | |
| 215 | 215 | $bbbParams = array( |
| 216 | - 'meetingId' => $params['remote_id'], // REQUIRED |
|
| 217 | - 'meetingName' => $meetingName, // REQUIRED |
|
| 218 | - 'attendeePw' => $attendeePassword, // Match this value in getJoinMeetingURL() to join as attendee. |
|
| 219 | - 'moderatorPw' => $moderatorPassword, // Match this value in getJoinMeetingURL() to join as moderator. |
|
| 220 | - 'welcomeMsg' => $welcomeMessage, // ''= use default. Change to customize. |
|
| 221 | - 'dialNumber' => '', // The main number to call into. Optional. |
|
| 222 | - 'voiceBridge' => $params['voice_bridge'], // PIN to join voice. Required. |
|
| 223 | - 'webVoice' => '', // Alphanumeric to join voice. Optional. |
|
| 216 | + 'meetingId' => $params['remote_id'], // REQUIRED |
|
| 217 | + 'meetingName' => $meetingName, // REQUIRED |
|
| 218 | + 'attendeePw' => $attendeePassword, // Match this value in getJoinMeetingURL() to join as attendee. |
|
| 219 | + 'moderatorPw' => $moderatorPassword, // Match this value in getJoinMeetingURL() to join as moderator. |
|
| 220 | + 'welcomeMsg' => $welcomeMessage, // ''= use default. Change to customize. |
|
| 221 | + 'dialNumber' => '', // The main number to call into. Optional. |
|
| 222 | + 'voiceBridge' => $params['voice_bridge'], // PIN to join voice. Required. |
|
| 223 | + 'webVoice' => '', // Alphanumeric to join voice. Optional. |
|
| 224 | 224 | 'logoutUrl' => $this->logoutUrl, |
| 225 | - 'maxParticipants' => $max, // Optional. -1 = unlimitted. Not supported in BBB. [number] |
|
| 226 | - 'record' => $record, // New. 'true' will tell BBB to record the meeting. |
|
| 227 | - 'duration' => $duration, // Default = 0 which means no set duration in minutes. [number] |
|
| 225 | + 'maxParticipants' => $max, // Optional. -1 = unlimitted. Not supported in BBB. [number] |
|
| 226 | + 'record' => $record, // New. 'true' will tell BBB to record the meeting. |
|
| 227 | + 'duration' => $duration, // Default = 0 which means no set duration in minutes. [number] |
|
| 228 | 228 | //'meta_category' => '', // Use to pass additional info to BBB server. See API docs. |
| 229 | 229 | ); |
| 230 | 230 | |
| 231 | 231 | if ($this->debug) { |
| 232 | - error_log("create_meeting params: ".print_r($bbbParams,1)); |
|
| 232 | + error_log("create_meeting params: ".print_r($bbbParams, 1)); |
|
| 233 | 233 | } |
| 234 | 234 | |
| 235 | 235 | $status = false; |
@@ -242,7 +242,7 @@ discard block |
||
| 242 | 242 | if (isset($result) && strval($result['returncode']) == 'SUCCESS') { |
| 243 | 243 | if ($this->debug) { |
| 244 | 244 | error_log( |
| 245 | - "create_meeting result: " . print_r($result, 1) |
|
| 245 | + "create_meeting result: ".print_r($result, 1) |
|
| 246 | 246 | ); |
| 247 | 247 | } |
| 248 | 248 | $meeting = $this->joinMeeting($meetingName, true); |
@@ -273,7 +273,7 @@ discard block |
||
| 273 | 273 | |
| 274 | 274 | $courseId = api_get_course_int_id(); |
| 275 | 275 | $sessionId = api_get_session_id(); |
| 276 | - $conditions = array( |
|
| 276 | + $conditions = array( |
|
| 277 | 277 | 'where' => array( |
| 278 | 278 | 'c_id = ? AND session_id = ? AND meeting_name = ? AND status = 1 ' => |
| 279 | 279 | array($courseId, $sessionId, $meetingName) |
@@ -282,7 +282,7 @@ discard block |
||
| 282 | 282 | |
| 283 | 283 | if ($this->hasGroupSupport()) { |
| 284 | 284 | $groupId = api_get_group_id(); |
| 285 | - $conditions = array( |
|
| 285 | + $conditions = array( |
|
| 286 | 286 | 'where' => array( |
| 287 | 287 | 'c_id = ? AND session_id = ? AND meeting_name = ? AND group_id = ? AND status = 1 ' => |
| 288 | 288 | array($courseId, $sessionId, $meetingName, $groupId) |
@@ -379,7 +379,7 @@ discard block |
||
| 379 | 379 | |
| 380 | 380 | if ($this->debug) { |
| 381 | 381 | error_log( |
| 382 | - "meeting is running: " . intval($meetingInfoExists) |
|
| 382 | + "meeting is running: ".intval($meetingInfoExists) |
|
| 383 | 383 | ); |
| 384 | 384 | } |
| 385 | 385 | |
@@ -396,11 +396,11 @@ discard block |
||
| 396 | 396 | |
| 397 | 397 | if ($meetingInfoExists) { |
| 398 | 398 | $joinParams = array( |
| 399 | - 'meetingId' => $meetingData['remote_id'], // -- REQUIRED - A unique id for the meeting |
|
| 400 | - 'username' => $this->userCompleteName, //-- REQUIRED - The name that will display for the user in the meeting |
|
| 401 | - 'password' => $pass, //-- REQUIRED - The attendee or moderator password, depending on what's passed here |
|
| 399 | + 'meetingId' => $meetingData['remote_id'], // -- REQUIRED - A unique id for the meeting |
|
| 400 | + 'username' => $this->userCompleteName, //-- REQUIRED - The name that will display for the user in the meeting |
|
| 401 | + 'password' => $pass, //-- REQUIRED - The attendee or moderator password, depending on what's passed here |
|
| 402 | 402 | //'createTime' => api_get_utc_datetime(), //-- OPTIONAL - string. Leave blank ('') unless you set this correctly. |
| 403 | - 'userID' => api_get_user_id(), //-- OPTIONAL - string |
|
| 403 | + 'userID' => api_get_user_id(), //-- OPTIONAL - string |
|
| 404 | 404 | 'webVoiceConf' => '' // -- OPTIONAL - string |
| 405 | 405 | ); |
| 406 | 406 | $url = $this->api->getJoinMeetingURL($joinParams); |
@@ -409,7 +409,7 @@ discard block |
||
| 409 | 409 | $url = $this->logoutUrl; |
| 410 | 410 | } |
| 411 | 411 | if ($this->debug) { |
| 412 | - error_log("return url :" . $url); |
|
| 412 | + error_log("return url :".$url); |
|
| 413 | 413 | } |
| 414 | 414 | |
| 415 | 415 | return $url; |
@@ -452,14 +452,14 @@ discard block |
||
| 452 | 452 | $conditions = []; |
| 453 | 453 | |
| 454 | 454 | if ($courseId || $sessionId || $groupId) { |
| 455 | - $conditions = array( |
|
| 455 | + $conditions = array( |
|
| 456 | 456 | 'where' => array( |
| 457 | 457 | 'c_id = ? AND session_id = ? ' => array($courseId, $sessionId), |
| 458 | 458 | ), |
| 459 | 459 | ); |
| 460 | 460 | |
| 461 | 461 | if ($this->hasGroupSupport()) { |
| 462 | - $conditions = array( |
|
| 462 | + $conditions = array( |
|
| 463 | 463 | 'where' => array( |
| 464 | 464 | 'c_id = ? AND session_id = ? AND group_id = ? ' => array($courseId, $sessionId, $groupId) |
| 465 | 465 | ) |
@@ -494,7 +494,7 @@ discard block |
||
| 494 | 494 | } |
| 495 | 495 | $meetingBBB['end_url'] = $this->endUrl($meetingDB); |
| 496 | 496 | |
| 497 | - if ((string)$meetingBBB['returncode'] == 'FAILED') { |
|
| 497 | + if ((string) $meetingBBB['returncode'] == 'FAILED') { |
|
| 498 | 498 | if ($meetingDB['status'] == 1 && $this->isConferenceManager()) { |
| 499 | 499 | $this->endMeeting($meetingDB['id']); |
| 500 | 500 | } |
@@ -664,7 +664,7 @@ discard block |
||
| 664 | 664 | $item['action_links'] = implode('<br />', $actionLinksArray); |
| 665 | 665 | } |
| 666 | 666 | //var_dump($recordArray); |
| 667 | - $item['show_links'] = implode('<br />', $recordArray); |
|
| 667 | + $item['show_links'] = implode('<br />', $recordArray); |
|
| 668 | 668 | $item['action_links'] = implode('<br />', $actionLinksArray); |
| 669 | 669 | } |
| 670 | 670 | |
@@ -677,11 +677,11 @@ discard block |
||
| 677 | 677 | |
| 678 | 678 | if ($meetingDB['status'] == 1) { |
| 679 | 679 | $joinParams = array( |
| 680 | - 'meetingId' => $meetingDB['remote_id'], //-- REQUIRED - A unique id for the meeting |
|
| 681 | - 'username' => $this->userCompleteName, //-- REQUIRED - The name that will display for the user in the meeting |
|
| 682 | - 'password' => $pass, //-- REQUIRED - The attendee or moderator password, depending on what's passed here |
|
| 683 | - 'createTime' => '', //-- OPTIONAL - string. Leave blank ('') unless you set this correctly. |
|
| 684 | - 'userID' => '', // -- OPTIONAL - string |
|
| 680 | + 'meetingId' => $meetingDB['remote_id'], //-- REQUIRED - A unique id for the meeting |
|
| 681 | + 'username' => $this->userCompleteName, //-- REQUIRED - The name that will display for the user in the meeting |
|
| 682 | + 'password' => $pass, //-- REQUIRED - The attendee or moderator password, depending on what's passed here |
|
| 683 | + 'createTime' => '', //-- OPTIONAL - string. Leave blank ('') unless you set this correctly. |
|
| 684 | + 'userID' => '', // -- OPTIONAL - string |
|
| 685 | 685 | 'webVoiceConf' => '' // -- OPTIONAL - string |
| 686 | 686 | ); |
| 687 | 687 | $item['go_url'] = $this->protocol.$this->api->getJoinMeetingURL($joinParams); |
@@ -746,8 +746,8 @@ discard block |
||
| 746 | 746 | $pass = $this->getUserMeetingPassword(); |
| 747 | 747 | |
| 748 | 748 | $endParams = array( |
| 749 | - 'meetingId' => $meetingData['remote_id'], // REQUIRED - We have to know which meeting to end. |
|
| 750 | - 'password' => $pass, // REQUIRED - Must match moderator pass for meeting. |
|
| 749 | + 'meetingId' => $meetingData['remote_id'], // REQUIRED - We have to know which meeting to end. |
|
| 750 | + 'password' => $pass, // REQUIRED - Must match moderator pass for meeting. |
|
| 751 | 751 | ); |
| 752 | 752 | $this->api->endMeetingWithXmlResponseArray($endParams); |
| 753 | 753 | Database::update( |
@@ -972,7 +972,7 @@ discard block |
||
| 972 | 972 | */ |
| 973 | 973 | public function redirectToBBB($url) |
| 974 | 974 | { |
| 975 | - if (file_exists(__DIR__ . '/../config.vm.php')) { |
|
| 975 | + if (file_exists(__DIR__.'/../config.vm.php')) { |
|
| 976 | 976 | // Using VM |
| 977 | 977 | echo Display::url(get_lang('ClickToContinue'), $url); |
| 978 | 978 | exit; |
@@ -7,7 +7,7 @@ |
||
| 7 | 7 | * @package chamilo.plugin.clockworksms |
| 8 | 8 | * @author Imanol Losada <[email protected]> |
| 9 | 9 | */ |
| 10 | -require_once __DIR__ . '/../../main/inc/global.inc.php'; |
|
| 10 | +require_once __DIR__.'/../../main/inc/global.inc.php'; |
|
| 11 | 11 | |
| 12 | 12 | require_once 'lib/clockworksms.lib.php'; |
| 13 | 13 | require_once 'vendor/clockworksms_api.php'; |