@@ -309,10 +309,10 @@ discard block |
||
| 309 | 309 | */ |
| 310 | 310 | function bigbluebutton_bbb_view_create_meeting_data(&$bbbsession) { |
| 311 | 311 | $data = ['meetingID' => $bbbsession['meetingid'], |
| 312 | - 'name' => bigbluebuttonbn_html2text($bbbsession['meetingname'], 64), |
|
| 313 | - 'attendeePW' => $bbbsession['viewerPW'], |
|
| 314 | - 'moderatorPW' => $bbbsession['modPW'], |
|
| 315 | - 'logoutURL' => $bbbsession['logoutURL'], |
|
| 312 | + 'name' => bigbluebuttonbn_html2text($bbbsession['meetingname'], 64), |
|
| 313 | + 'attendeePW' => $bbbsession['viewerPW'], |
|
| 314 | + 'moderatorPW' => $bbbsession['modPW'], |
|
| 315 | + 'logoutURL' => $bbbsession['logoutURL'], |
|
| 316 | 316 | ]; |
| 317 | 317 | $data['record'] = bigbluebutton_bbb_view_create_meeting_data_record($bbbsession['record']); |
| 318 | 318 | // Check if auto_start_record is enable. |
@@ -334,7 +334,7 @@ discard block |
||
| 334 | 334 | '%duration%', |
| 335 | 335 | (string) $durationtime, |
| 336 | 336 | get_string('bbbdurationwarning', 'bigbluebuttonbn') |
| 337 | - ); |
|
| 337 | + ); |
|
| 338 | 338 | } |
| 339 | 339 | $voicebridge = intval($bbbsession['voicebridge']); |
| 340 | 340 | if ($voicebridge > 0 && $voicebridge < 79999) { |
@@ -385,22 +385,22 @@ discard block |
||
| 385 | 385 | function bigbluebutton_bbb_view_create_meeting_metadata(&$bbbsession) { |
| 386 | 386 | global $USER; |
| 387 | 387 | $metadata = ['bbb-origin' => $bbbsession['origin'], |
| 388 | - 'bbb-origin-version' => $bbbsession['originVersion'], |
|
| 389 | - 'bbb-origin-server-name' => $bbbsession['originServerName'], |
|
| 390 | - 'bbb-origin-server-common-name' => $bbbsession['originServerCommonName'], |
|
| 391 | - 'bbb-origin-tag' => $bbbsession['originTag'], |
|
| 392 | - 'bbb-context' => $bbbsession['course']->fullname, |
|
| 393 | - 'bbb-recording-name' => bigbluebuttonbn_html2text($bbbsession['meetingname'], 64), |
|
| 394 | - 'bbb-recording-description' => bigbluebuttonbn_html2text($bbbsession['meetingdescription'], 64), |
|
| 395 | - 'bbb-recording-tags' => bigbluebuttonbn_get_tags($bbbsession['cm']->id), // Same as $id. |
|
| 388 | + 'bbb-origin-version' => $bbbsession['originVersion'], |
|
| 389 | + 'bbb-origin-server-name' => $bbbsession['originServerName'], |
|
| 390 | + 'bbb-origin-server-common-name' => $bbbsession['originServerCommonName'], |
|
| 391 | + 'bbb-origin-tag' => $bbbsession['originTag'], |
|
| 392 | + 'bbb-context' => $bbbsession['course']->fullname, |
|
| 393 | + 'bbb-recording-name' => bigbluebuttonbn_html2text($bbbsession['meetingname'], 64), |
|
| 394 | + 'bbb-recording-description' => bigbluebuttonbn_html2text($bbbsession['meetingdescription'], 64), |
|
| 395 | + 'bbb-recording-tags' => bigbluebuttonbn_get_tags($bbbsession['cm']->id), // Same as $id. |
|
| 396 | 396 | ]; |
| 397 | 397 | if ((boolean)\mod_bigbluebuttonbn\locallib\config::get('recordingstatus_enabled')) { |
| 398 | 398 | $metadata["bn-recording-status"] = json_encode( |
| 399 | 399 | array( |
| 400 | 400 | 'email' => array('"' . fullname($USER) . '" <' . $USER->email . '>'), |
| 401 | 401 | 'context' => $bbbsession['bigbluebuttonbnURL'] |
| 402 | - ) |
|
| 403 | - ); |
|
| 402 | + ) |
|
| 403 | + ); |
|
| 404 | 404 | } |
| 405 | 405 | if ((boolean)\mod_bigbluebuttonbn\locallib\config::get('recordingready_enabled')) { |
| 406 | 406 | $metadata['bn-recording-ready-url'] = $bbbsession['recordingReadyURL']; |
@@ -85,15 +85,15 @@ discard block |
||
| 85 | 85 | $bbbsession['serverversion'] = (string) $serverversion; |
| 86 | 86 | |
| 87 | 87 | // Operation URLs. |
| 88 | - $bbbsession['bigbluebuttonbnURL'] = $CFG->wwwroot . '/mod/bigbluebuttonbn/view.php?id=' . $bbbsession['cm']->id; |
|
| 89 | - $bbbsession['logoutURL'] = $CFG->wwwroot . '/mod/bigbluebuttonbn/bbb_view.php?action=logout&id='.$id . |
|
| 90 | - '&bn=' . $bbbsession['bigbluebuttonbn']->id; |
|
| 91 | - $bbbsession['recordingReadyURL'] = $CFG->wwwroot . '/mod/bigbluebuttonbn/bbb_broker.php?action=recording_' . |
|
| 92 | - 'ready&bigbluebuttonbn=' . $bbbsession['bigbluebuttonbn']->id; |
|
| 93 | - $bbbsession['meetingEventsURL'] = $CFG->wwwroot . '/mod/bigbluebuttonbn/bbb_broker.php?action=meeting' . |
|
| 94 | - '_events&bigbluebuttonbn=' . $bbbsession['bigbluebuttonbn']->id; |
|
| 95 | - $bbbsession['joinURL'] = $CFG->wwwroot . '/mod/bigbluebuttonbn/bbb_view.php?action=join&id=' . $cm->id . |
|
| 96 | - '&bn=' . $bbbsession['bigbluebuttonbn']->id; |
|
| 88 | + $bbbsession['bigbluebuttonbnURL'] = $CFG->wwwroot.'/mod/bigbluebuttonbn/view.php?id='.$bbbsession['cm']->id; |
|
| 89 | + $bbbsession['logoutURL'] = $CFG->wwwroot.'/mod/bigbluebuttonbn/bbb_view.php?action=logout&id='.$id. |
|
| 90 | + '&bn='.$bbbsession['bigbluebuttonbn']->id; |
|
| 91 | + $bbbsession['recordingReadyURL'] = $CFG->wwwroot.'/mod/bigbluebuttonbn/bbb_broker.php?action=recording_'. |
|
| 92 | + 'ready&bigbluebuttonbn='.$bbbsession['bigbluebuttonbn']->id; |
|
| 93 | + $bbbsession['meetingEventsURL'] = $CFG->wwwroot.'/mod/bigbluebuttonbn/bbb_broker.php?action=meeting'. |
|
| 94 | + '_events&bigbluebuttonbn='.$bbbsession['bigbluebuttonbn']->id; |
|
| 95 | + $bbbsession['joinURL'] = $CFG->wwwroot.'/mod/bigbluebuttonbn/bbb_view.php?action=join&id='.$cm->id. |
|
| 96 | + '&bn='.$bbbsession['bigbluebuttonbn']->id; |
|
| 97 | 97 | |
| 98 | 98 | // Check status and set extra values. |
| 99 | 99 | $activitystatus = bigbluebuttonbn_view_get_activity_status($bbbsession); |
@@ -155,7 +155,7 @@ discard block |
||
| 155 | 155 | $lastaccess = json_decode($lastaccess->meta); |
| 156 | 156 | // If the user acceded from Timeline it should be redirected to the Dashboard. |
| 157 | 157 | if (isset($lastaccess->origin) && $lastaccess->origin == BIGBLUEBUTTON_ORIGIN_TIMELINE) { |
| 158 | - redirect($CFG->wwwroot . '/my/'); |
|
| 158 | + redirect($CFG->wwwroot.'/my/'); |
|
| 159 | 159 | } |
| 160 | 160 | // Close the tab or window where BBB was opened. |
| 161 | 161 | bigbluebutton_bbb_view_close_window(); |
@@ -357,7 +357,7 @@ discard block |
||
| 357 | 357 | * @return string |
| 358 | 358 | */ |
| 359 | 359 | function bigbluebutton_bbb_view_create_meeting_data_record($record) { |
| 360 | - if ((boolean)\mod_bigbluebuttonbn\locallib\config::recordings_enabled() && $record) { |
|
| 360 | + if ((boolean) \mod_bigbluebuttonbn\locallib\config::recordings_enabled() && $record) { |
|
| 361 | 361 | return 'true'; |
| 362 | 362 | } |
| 363 | 363 | return 'false'; |
@@ -370,7 +370,7 @@ discard block |
||
| 370 | 370 | * @return integer |
| 371 | 371 | */ |
| 372 | 372 | function bigbluebutton_bbb_view_create_meeting_data_duration($closingtime) { |
| 373 | - if ((boolean)\mod_bigbluebuttonbn\locallib\config::get('scheduled_duration_enabled')) { |
|
| 373 | + if ((boolean) \mod_bigbluebuttonbn\locallib\config::get('scheduled_duration_enabled')) { |
|
| 374 | 374 | return bigbluebuttonbn_get_duration($closingtime); |
| 375 | 375 | } |
| 376 | 376 | return 0; |
@@ -394,18 +394,18 @@ discard block |
||
| 394 | 394 | 'bbb-recording-description' => bigbluebuttonbn_html2text($bbbsession['meetingdescription'], 64), |
| 395 | 395 | 'bbb-recording-tags' => bigbluebuttonbn_get_tags($bbbsession['cm']->id), // Same as $id. |
| 396 | 396 | ]; |
| 397 | - if ((boolean)\mod_bigbluebuttonbn\locallib\config::get('recordingstatus_enabled')) { |
|
| 397 | + if ((boolean) \mod_bigbluebuttonbn\locallib\config::get('recordingstatus_enabled')) { |
|
| 398 | 398 | $metadata["bn-recording-status"] = json_encode( |
| 399 | 399 | array( |
| 400 | - 'email' => array('"' . fullname($USER) . '" <' . $USER->email . '>'), |
|
| 400 | + 'email' => array('"'.fullname($USER).'" <'.$USER->email.'>'), |
|
| 401 | 401 | 'context' => $bbbsession['bigbluebuttonbnURL'] |
| 402 | 402 | ) |
| 403 | 403 | ); |
| 404 | 404 | } |
| 405 | - if ((boolean)\mod_bigbluebuttonbn\locallib\config::get('recordingready_enabled')) { |
|
| 405 | + if ((boolean) \mod_bigbluebuttonbn\locallib\config::get('recordingready_enabled')) { |
|
| 406 | 406 | $metadata['bn-recording-ready-url'] = $bbbsession['recordingReadyURL']; |
| 407 | 407 | } |
| 408 | - if ((boolean)\mod_bigbluebuttonbn\locallib\config::get('meetingevents_enabled')) { |
|
| 408 | + if ((boolean) \mod_bigbluebuttonbn\locallib\config::get('meetingevents_enabled')) { |
|
| 409 | 409 | $metadata['bn-meeting-events-url'] = $bbbsession['meetingEventsURL']; |
| 410 | 410 | } |
| 411 | 411 | return $metadata; |
@@ -50,8 +50,8 @@ discard block |
||
| 50 | 50 | // The endpoints for recording_ready and live_session_event callbacks must be moved to services (CONTRIB-7440). |
| 51 | 51 | // But in order to support the transition, requests other than the callbacks are redirected to bbb_ajax.php. |
| 52 | 52 | if ($params['action'] != 'recording_ready' && $params['action'] != 'live_session_events') { |
| 53 | - $url = $CFG->wwwroot . '/mod/bigbluebuttonbn/bbb_ajax.php?' . http_build_query($params, '', '&'); |
|
| 54 | - header("Location: " . $url); |
|
| 53 | + $url = $CFG->wwwroot.'/mod/bigbluebuttonbn/bbb_ajax.php?'.http_build_query($params, '', '&'); |
|
| 54 | + header("Location: ".$url); |
|
| 55 | 55 | exit; |
| 56 | 56 | } |
| 57 | 57 | |
@@ -76,7 +76,7 @@ discard block |
||
| 76 | 76 | bigbluebuttonbn_broker_live_session_events($params, $bigbluebuttonbn); |
| 77 | 77 | return; |
| 78 | 78 | } |
| 79 | - header('HTTP/1.0 400 Bad request. The action '. $a . ' doesn\'t exist'); |
|
| 79 | + header('HTTP/1.0 400 Bad request. The action '.$a.' doesn\'t exist'); |
|
| 80 | 80 | } catch (Exception $e) { |
| 81 | 81 | header('HTTP/1.0 500 Internal Server Error. '.$e->getMessage()); |
| 82 | 82 | } |
@@ -121,7 +121,7 @@ |
||
| 121 | 121 | echo bigbluebuttonbn_broker_recording_import($bbbsession, $params); |
| 122 | 122 | return; |
| 123 | 123 | } |
| 124 | - header('HTTP/1.0 400 Bad request. The action '. $a . ' doesn\'t exist'); |
|
| 124 | + header('HTTP/1.0 400 Bad request. The action '.$a.' doesn\'t exist'); |
|
| 125 | 125 | } catch (Exception $e) { |
| 126 | 126 | header('HTTP/1.0 500 Internal Server Error. '.$e->getMessage()); |
| 127 | 127 | } |
@@ -26,7 +26,7 @@ discard block |
||
| 26 | 26 | |
| 27 | 27 | defined('MOODLE_INTERNAL') || die(); |
| 28 | 28 | |
| 29 | -require_once($CFG->dirroot . '/mod/bigbluebuttonbn/locallib.php'); |
|
| 29 | +require_once($CFG->dirroot.'/mod/bigbluebuttonbn/locallib.php'); |
|
| 30 | 30 | |
| 31 | 31 | /** |
| 32 | 32 | * Methods used to render view BBB in mobile. |
@@ -62,8 +62,8 @@ discard block |
||
| 62 | 62 | $session['bigbluebuttonbn']->id; |
| 63 | 63 | $session['meetingname'] = $session['bigbluebuttonbn']->name; |
| 64 | 64 | $session['meetingdescription'] = $session['bigbluebuttonbn']->intro; |
| 65 | - $session['userlimit'] = intval((int)\mod_bigbluebuttonbn\locallib\config::get('userlimit_default')); |
|
| 66 | - if ((boolean)\mod_bigbluebuttonbn\locallib\config::get('userlimit_editable')) { |
|
| 65 | + $session['userlimit'] = intval((int) \mod_bigbluebuttonbn\locallib\config::get('userlimit_default')); |
|
| 66 | + if ((boolean) \mod_bigbluebuttonbn\locallib\config::get('userlimit_editable')) { |
|
| 67 | 67 | $session['userlimit'] = intval($session['bigbluebuttonbn']->userlimit); |
| 68 | 68 | } |
| 69 | 69 | $session['voicebridge'] = $session['bigbluebuttonbn']->voicebridge; |
@@ -180,18 +180,18 @@ discard block |
||
| 180 | 180 | 'bbb-recording-tags' => bigbluebuttonbn_get_tags($bbbsession['cm']->id), // Same as $id. |
| 181 | 181 | ]; |
| 182 | 182 | // Check recording status. |
| 183 | - if ((boolean)\mod_bigbluebuttonbn\locallib\config::get('recordingstatus_enabled')) { |
|
| 183 | + if ((boolean) \mod_bigbluebuttonbn\locallib\config::get('recordingstatus_enabled')) { |
|
| 184 | 184 | $metadatabbb["bn-recording-status"] = json_encode( |
| 185 | 185 | array( |
| 186 | - 'email' => array('"' . fullname($USER) . '" <' . $USER->email . '>'), |
|
| 186 | + 'email' => array('"'.fullname($USER).'" <'.$USER->email.'>'), |
|
| 187 | 187 | 'context' => $bbbsession['bigbluebuttonbnURL'] |
| 188 | 188 | ) |
| 189 | 189 | ); |
| 190 | 190 | } |
| 191 | - if ((boolean)\mod_bigbluebuttonbn\locallib\config::get('recordingready_enabled')) { |
|
| 191 | + if ((boolean) \mod_bigbluebuttonbn\locallib\config::get('recordingready_enabled')) { |
|
| 192 | 192 | $metadatabbb['bn-recording-ready-url'] = $bbbsession['recordingReadyURL']; |
| 193 | 193 | } |
| 194 | - if ((boolean)\mod_bigbluebuttonbn\locallib\config::get('meetingevents_enabled')) { |
|
| 194 | + if ((boolean) \mod_bigbluebuttonbn\locallib\config::get('meetingevents_enabled')) { |
|
| 195 | 195 | $metadatabbb['bn-meeting-events-url'] = $bbbsession['meetingEventsURL']; |
| 196 | 196 | } |
| 197 | 197 | return $metadatabbb; |
@@ -252,7 +252,7 @@ discard block |
||
| 252 | 252 | * @return string |
| 253 | 253 | */ |
| 254 | 254 | public static function bigbluebutton_bbb_view_create_meeting_data_record($record) { |
| 255 | - if ((boolean)\mod_bigbluebuttonbn\locallib\config::recordings_enabled() && $record) { |
|
| 255 | + if ((boolean) \mod_bigbluebuttonbn\locallib\config::recordings_enabled() && $record) { |
|
| 256 | 256 | return 'true'; |
| 257 | 257 | } |
| 258 | 258 | return 'false'; |
@@ -265,7 +265,7 @@ discard block |
||
| 265 | 265 | * @return integer |
| 266 | 266 | */ |
| 267 | 267 | public static function bigbluebutton_bbb_view_create_meeting_data_duration($closingtime) { |
| 268 | - if ((boolean)\mod_bigbluebuttonbn\locallib\config::get('scheduled_duration_enabled')) { |
|
| 268 | + if ((boolean) \mod_bigbluebuttonbn\locallib\config::get('scheduled_duration_enabled')) { |
|
| 269 | 269 | return bigbluebuttonbn_get_duration($closingtime); |
| 270 | 270 | } |
| 271 | 271 | return 0; |
@@ -296,7 +296,7 @@ discard block |
||
| 296 | 296 | * Helper function to retrieve imported recordings from the Moodle database. |
| 297 | 297 | * The references are stored as events in bigbluebuttonbn_logs. |
| 298 | 298 | * |
| 299 | - * @param string $courseid |
|
| 299 | + * @param integer $courseid |
|
| 300 | 300 | * @param string $bigbluebuttonbnid |
| 301 | 301 | * @param bool $subset |
| 302 | 302 | * |
@@ -324,7 +324,7 @@ discard block |
||
| 324 | 324 | /** |
| 325 | 325 | * Helper function to retrive the default config.xml file. |
| 326 | 326 | * |
| 327 | - * @return string |
|
| 327 | + * @return null|SimpleXMLElement |
|
| 328 | 328 | */ |
| 329 | 329 | function bigbluebuttonbn_get_default_config_xml() { |
| 330 | 330 | $xml = bigbluebuttonbn_wrap_xml_load_file( |
@@ -406,7 +406,7 @@ discard block |
||
| 406 | 406 | * @param object $a |
| 407 | 407 | * @param object $b |
| 408 | 408 | * |
| 409 | - * @return array |
|
| 409 | + * @return integer |
|
| 410 | 410 | */ |
| 411 | 411 | function bigbluebuttonbn_recording_build_sorter($a, $b) { |
| 412 | 412 | global $CFG; |
@@ -520,7 +520,7 @@ discard block |
||
| 520 | 520 | * @param string $data |
| 521 | 521 | * @param string $contenttype |
| 522 | 522 | * |
| 523 | - * @return object |
|
| 523 | + * @return null|SimpleXMLElement |
|
| 524 | 524 | */ |
| 525 | 525 | function bigbluebuttonbn_wrap_xml_load_file($url, $method = 'GET', $data = null, $contenttype = 'text/xml') { |
| 526 | 526 | if (extension_loaded('curl')) { |
@@ -561,7 +561,7 @@ discard block |
||
| 561 | 561 | * @param string $data |
| 562 | 562 | * @param string $contenttype |
| 563 | 563 | * |
| 564 | - * @return object |
|
| 564 | + * @return string |
|
| 565 | 565 | */ |
| 566 | 566 | function bigbluebuttonbn_wrap_xml_load_file_curl_request($url, $method = 'GET', $data = null, $contenttype = 'text/xml') { |
| 567 | 567 | global $CFG; |
@@ -956,7 +956,7 @@ discard block |
||
| 956 | 956 | * @param integer $instance |
| 957 | 957 | * @param integer $voicebridge |
| 958 | 958 | * |
| 959 | - * @return string |
|
| 959 | + * @return boolean |
|
| 960 | 960 | */ |
| 961 | 961 | function bigbluebuttonbn_voicebridge_unique($instance, $voicebridge) { |
| 962 | 962 | global $DB; |
@@ -1279,7 +1279,7 @@ discard block |
||
| 1279 | 1279 | * @param string $meetingid |
| 1280 | 1280 | * @param string $configxml |
| 1281 | 1281 | * |
| 1282 | - * @return object |
|
| 1282 | + * @return null|SimpleXMLElement |
|
| 1283 | 1283 | */ |
| 1284 | 1284 | function bigbluebuttonbn_set_config_xml($meetingid, $configxml) { |
| 1285 | 1285 | $urldefaultconfig = \mod_bigbluebuttonbn\locallib\config::get('server_url').'api/setConfigXML?'; |
@@ -1328,7 +1328,7 @@ discard block |
||
| 1328 | 1328 | * @param array $recording |
| 1329 | 1329 | * @param array $tools |
| 1330 | 1330 | * |
| 1331 | - * @return array |
|
| 1331 | + * @return null|stdClass |
|
| 1332 | 1332 | */ |
| 1333 | 1333 | function bigbluebuttonbn_get_recording_data_row($bbbsession, $recording, $tools = ['protect', 'publish', 'delete']) { |
| 1334 | 1334 | if (!bigbluebuttonbn_include_recording_table_row($bbbsession, $recording)) { |
@@ -1962,7 +1962,7 @@ discard block |
||
| 1962 | 1962 | * |
| 1963 | 1963 | * @param array $bbbsession |
| 1964 | 1964 | * @param array $recording |
| 1965 | - * @param object $rowdata |
|
| 1965 | + * @param stdClass $rowdata |
|
| 1966 | 1966 | * |
| 1967 | 1967 | * @return object |
| 1968 | 1968 | */ |
@@ -2080,7 +2080,7 @@ discard block |
||
| 2080 | 2080 | * |
| 2081 | 2081 | * @param array $bbbsession |
| 2082 | 2082 | * @param array $recordings |
| 2083 | - * @param array $tools |
|
| 2083 | + * @param string[] $tools |
|
| 2084 | 2084 | * |
| 2085 | 2085 | * @return array |
| 2086 | 2086 | */ |
@@ -2158,7 +2158,7 @@ discard block |
||
| 2158 | 2158 | * Helper function to define the sql used for gattering the bigbluebuttonbnids whose meetingids should be included |
| 2159 | 2159 | * in the getRecordings request considering only those that belong to deleted activities. |
| 2160 | 2160 | * |
| 2161 | - * @param string $courseid |
|
| 2161 | + * @param integer $courseid |
|
| 2162 | 2162 | * @param string $bigbluebuttonbnid |
| 2163 | 2163 | * @param bool $subset |
| 2164 | 2164 | * |
@@ -2182,7 +2182,7 @@ discard block |
||
| 2182 | 2182 | * Helper function to define the sql used for gattering the bigbluebuttonbnids whose meetingids should be included |
| 2183 | 2183 | * in the getRecordings request considering only those that belong to imported recordings. |
| 2184 | 2184 | * |
| 2185 | - * @param string $courseid |
|
| 2185 | + * @param integer $courseid |
|
| 2186 | 2186 | * @param string $bigbluebuttonbnid |
| 2187 | 2187 | * @param bool $subset |
| 2188 | 2188 | * |
@@ -2205,7 +2205,7 @@ discard block |
||
| 2205 | 2205 | /** |
| 2206 | 2206 | * Helper function to get recordings and imported recordings together. |
| 2207 | 2207 | * |
| 2208 | - * @param string $courseid |
|
| 2208 | + * @param integer $courseid |
|
| 2209 | 2209 | * @param string $bigbluebuttonbnid |
| 2210 | 2210 | * @param bool $subset |
| 2211 | 2211 | * @param bool $includedeleted |
@@ -2223,7 +2223,7 @@ discard block |
||
| 2223 | 2223 | * Helper function to retrieve recordings from the BigBlueButton. The references are stored as events |
| 2224 | 2224 | * in bigbluebuttonbn_logs. |
| 2225 | 2225 | * |
| 2226 | - * @param string $courseid |
|
| 2226 | + * @param integer $courseid |
|
| 2227 | 2227 | * @param string $bigbluebuttonbnid |
| 2228 | 2228 | * @param bool $subset |
| 2229 | 2229 | * @param bool $includedeleted |
@@ -108,7 +108,7 @@ discard block |
||
| 108 | 108 | 'logoutURL' => $logouturl, |
| 109 | 109 | ]; |
| 110 | 110 | // Choose between Adobe Flash or HTML5 Client. |
| 111 | - if ( $clienttype == BIGBLUEBUTTON_CLIENTTYPE_HTML5 ) { |
|
| 111 | + if ($clienttype == BIGBLUEBUTTON_CLIENTTYPE_HTML5) { |
|
| 112 | 112 | $data['joinViaHtml5'] = 'true'; |
| 113 | 113 | } |
| 114 | 114 | if (!is_null($configtoken)) { |
@@ -181,7 +181,7 @@ discard block |
||
| 181 | 181 | } |
| 182 | 182 | if ($xml) { |
| 183 | 183 | // Either failure or success without meeting info. |
| 184 | - return (array)$xml; |
|
| 184 | + return (array) $xml; |
|
| 185 | 185 | } |
| 186 | 186 | // If the server is unreachable, then prompts the user of the necessary action. |
| 187 | 187 | return array('returncode' => 'FAILED', 'message' => 'unreachable', 'messageKey' => 'Server is unreachable'); |
@@ -565,7 +565,7 @@ discard block |
||
| 565 | 565 | */ |
| 566 | 566 | function bigbluebuttonbn_wrap_xml_load_file_curl_request($url, $method = 'GET', $data = null, $contenttype = 'text/xml') { |
| 567 | 567 | global $CFG; |
| 568 | - require_once($CFG->libdir . '/filelib.php'); |
|
| 568 | + require_once($CFG->libdir.'/filelib.php'); |
|
| 569 | 569 | $c = new curl(); |
| 570 | 570 | $c->setopt(array('SSL_VERIFYPEER' => true)); |
| 571 | 571 | if ($method == 'POST') { |
@@ -616,7 +616,7 @@ discard block |
||
| 616 | 616 | if ($userroles) { |
| 617 | 617 | $where = ''; |
| 618 | 618 | foreach ($userroles as $userrole) { |
| 619 | - $where .= (empty($where) ? ' WHERE' : ' OR').' id=' . $userrole->roleid; |
|
| 619 | + $where .= (empty($where) ? ' WHERE' : ' OR').' id='.$userrole->roleid; |
|
| 620 | 620 | } |
| 621 | 621 | $userroles = $DB->get_records_sql('SELECT * FROM {role}'.$where); |
| 622 | 622 | } |
@@ -723,7 +723,7 @@ discard block |
||
| 723 | 723 | function bigbluebuttonbn_get_role($id) { |
| 724 | 724 | $roles = (array) role_get_names(); |
| 725 | 725 | if (is_numeric($id) && isset($roles[$id])) { |
| 726 | - return (object)$roles[$id]; |
|
| 726 | + return (object) $roles[$id]; |
|
| 727 | 727 | } |
| 728 | 728 | foreach ($roles as $role) { |
| 729 | 729 | if ($role->shortname == $id) { |
@@ -803,7 +803,7 @@ discard block |
||
| 803 | 803 | if (!empty($ownerid) && is_enrolled($context, $ownerid)) { |
| 804 | 804 | $participantlist[] = array( |
| 805 | 805 | 'selectiontype' => 'user', |
| 806 | - 'selectionid' => (string)$ownerid, |
|
| 806 | + 'selectionid' => (string) $ownerid, |
|
| 807 | 807 | 'role' => BIGBLUEBUTTONBN_ROLE_MODERATOR); |
| 808 | 808 | } |
| 809 | 809 | continue; |
@@ -878,7 +878,7 @@ discard block |
||
| 878 | 878 | if (!isguestuser()) { |
| 879 | 879 | $userroles = bigbluebuttonbn_get_user_roles($context, $userid); |
| 880 | 880 | } |
| 881 | - return bigbluebuttonbn_is_moderator_validator($participantlist, $userid , $userroles); |
|
| 881 | + return bigbluebuttonbn_is_moderator_validator($participantlist, $userid, $userroles); |
|
| 882 | 882 | } |
| 883 | 883 | |
| 884 | 884 | /** |
@@ -963,9 +963,9 @@ discard block |
||
| 963 | 963 | if ($voicebridge == 0) { |
| 964 | 964 | return true; |
| 965 | 965 | } |
| 966 | - $select = 'voicebridge = ' . $voicebridge; |
|
| 966 | + $select = 'voicebridge = '.$voicebridge; |
|
| 967 | 967 | if ($instance != 0) { |
| 968 | - $select .= ' AND id <>' . $instance; |
|
| 968 | + $select .= ' AND id <>'.$instance; |
|
| 969 | 969 | } |
| 970 | 970 | if (!$DB->get_records_select('bigbluebuttonbn', $select)) { |
| 971 | 971 | return true; |
@@ -985,7 +985,7 @@ discard block |
||
| 985 | 985 | $now = time(); |
| 986 | 986 | if ($closingtime > 0 && $now < $closingtime) { |
| 987 | 987 | $duration = ceil(($closingtime - $now) / 60); |
| 988 | - $compensationtime = intval((int)\mod_bigbluebuttonbn\locallib\config::get('scheduled_duration_compensation')); |
|
| 988 | + $compensationtime = intval((int) \mod_bigbluebuttonbn\locallib\config::get('scheduled_duration_compensation')); |
|
| 989 | 989 | $duration = intval($duration) + $compensationtime; |
| 990 | 990 | } |
| 991 | 991 | return $duration; |
@@ -1125,7 +1125,7 @@ discard block |
||
| 1125 | 1125 | if (array_key_exists('other', $options)) { |
| 1126 | 1126 | $params['other'] = $options['other']; |
| 1127 | 1127 | } |
| 1128 | - $event = call_user_func_array('\mod_bigbluebuttonbn\event\\' . $type . '::create', |
|
| 1128 | + $event = call_user_func_array('\mod_bigbluebuttonbn\event\\'.$type.'::create', |
|
| 1129 | 1129 | array($params)); |
| 1130 | 1130 | $event->add_record_snapshot('course_modules', $cm); |
| 1131 | 1131 | $event->add_record_snapshot('course', $course); |
@@ -1162,7 +1162,7 @@ discard block |
||
| 1162 | 1162 | * @return array |
| 1163 | 1163 | */ |
| 1164 | 1164 | function bigbluebuttonbn_get_meeting_info($meetingid, $updatecache = false) { |
| 1165 | - $cachettl = (int)\mod_bigbluebuttonbn\locallib\config::get('waitformoderator_cache_ttl'); |
|
| 1165 | + $cachettl = (int) \mod_bigbluebuttonbn\locallib\config::get('waitformoderator_cache_ttl'); |
|
| 1166 | 1166 | $cache = cache::make_from_params(cache_store::MODE_APPLICATION, 'mod_bigbluebuttonbn', 'meetings_cache'); |
| 1167 | 1167 | $result = $cache->get($meetingid); |
| 1168 | 1168 | $now = time(); |
@@ -1368,7 +1368,7 @@ discard block |
||
| 1368 | 1368 | * @return boolean |
| 1369 | 1369 | */ |
| 1370 | 1370 | function bigbluebuttonbn_get_recording_data_row_editable($bbbsession) { |
| 1371 | - return ($bbbsession['managerecordings'] && ((double)$bbbsession['serverversion'] >= 1.0 || $bbbsession['bnserver'])); |
|
| 1371 | + return ($bbbsession['managerecordings'] && ((double) $bbbsession['serverversion'] >= 1.0 || $bbbsession['bnserver'])); |
|
| 1372 | 1372 | } |
| 1373 | 1373 | |
| 1374 | 1374 | /** |
@@ -1379,7 +1379,7 @@ discard block |
||
| 1379 | 1379 | * @return boolean |
| 1380 | 1380 | */ |
| 1381 | 1381 | function bigbluebuttonbn_get_recording_data_preview_enabled($bbbsession) { |
| 1382 | - return ((double)$bbbsession['serverversion'] >= 1.0 && $bbbsession['bigbluebuttonbn']->recordings_preview == '1'); |
|
| 1382 | + return ((double) $bbbsession['serverversion'] >= 1.0 && $bbbsession['bigbluebuttonbn']->recordings_preview == '1'); |
|
| 1383 | 1383 | } |
| 1384 | 1384 | |
| 1385 | 1385 | /** |
@@ -1455,11 +1455,11 @@ discard block |
||
| 1455 | 1455 | $actionbar .= bigbluebuttonbn_actionbar_render_button($recording, $buttonpayload); |
| 1456 | 1456 | } |
| 1457 | 1457 | $head = html_writer::start_tag('div', array( |
| 1458 | - 'id' => 'recording-actionbar-' . $recording['recordID'], |
|
| 1458 | + 'id' => 'recording-actionbar-'.$recording['recordID'], |
|
| 1459 | 1459 | 'data-recordingid' => $recording['recordID'], |
| 1460 | 1460 | 'data-meetingid' => $recording['meetingID'])); |
| 1461 | 1461 | $tail = html_writer::end_tag('div'); |
| 1462 | - return $head . $actionbar . $tail; |
|
| 1462 | + return $head.$actionbar.$tail; |
|
| 1463 | 1463 | } |
| 1464 | 1464 | |
| 1465 | 1465 | /** |
@@ -1554,7 +1554,7 @@ discard block |
||
| 1554 | 1554 | } |
| 1555 | 1555 | $recordingpreview .= html_writer::start_tag('div', array('class' => '')); |
| 1556 | 1556 | $recordingpreview .= html_writer::empty_tag('img', |
| 1557 | - array('src' => trim($image['url']) . '?' . time(), 'class' => 'recording-thumbnail pull-left')); |
|
| 1557 | + array('src' => trim($image['url']).'?'.time(), 'class' => 'recording-thumbnail pull-left')); |
|
| 1558 | 1558 | $recordingpreview .= html_writer::end_tag('div'); |
| 1559 | 1559 | } |
| 1560 | 1560 | $recordingpreview .= html_writer::end_tag('div'); |
@@ -1611,13 +1611,13 @@ discard block |
||
| 1611 | 1611 | return ''; |
| 1612 | 1612 | } |
| 1613 | 1613 | $text = bigbluebuttonbn_get_recording_type_text($playback['type']); |
| 1614 | - $href = $CFG->wwwroot . '/mod/bigbluebuttonbn/bbb_view.php?action=play&bn=' . $bbbsession['bigbluebuttonbn']->id . |
|
| 1615 | - '&mid=' . $recording['meetingID'] . '&rid=' . $recording['recordID'] . '&rtype=' . $playback['type']; |
|
| 1614 | + $href = $CFG->wwwroot.'/mod/bigbluebuttonbn/bbb_view.php?action=play&bn='.$bbbsession['bigbluebuttonbn']->id. |
|
| 1615 | + '&mid='.$recording['meetingID'].'&rid='.$recording['recordID'].'&rtype='.$playback['type']; |
|
| 1616 | 1616 | if (!isset($recording['imported']) || !isset($recording['protected']) || $recording['protected'] === 'false') { |
| 1617 | - $href .= '&href=' . urlencode(trim($playback['url'])); |
|
| 1617 | + $href .= '&href='.urlencode(trim($playback['url'])); |
|
| 1618 | 1618 | } |
| 1619 | 1619 | $linkattributes = array( |
| 1620 | - 'id' => 'recording-play-' . $playback['type'] . '-' . $recording['recordID'], |
|
| 1620 | + 'id' => 'recording-play-'.$playback['type'].'-'.$recording['recordID'], |
|
| 1621 | 1621 | 'class' => 'btn btn-sm btn-default', |
| 1622 | 1622 | 'onclick' => 'M.mod_bigbluebuttonbn.recordings.recordingPlay(this);', |
| 1623 | 1623 | 'data-action' => 'play', |
@@ -1629,7 +1629,7 @@ discard block |
||
| 1629 | 1629 | $linkattributes['title'] = get_string('view_recording_format_errror_unreachable', 'bigbluebuttonbn'); |
| 1630 | 1630 | unset($linkattributes['data-href']); |
| 1631 | 1631 | } |
| 1632 | - return $OUTPUT->action_link('#', $text, null, $linkattributes) . ' '; |
|
| 1632 | + return $OUTPUT->action_link('#', $text, null, $linkattributes).' '; |
|
| 1633 | 1633 | } |
| 1634 | 1634 | |
| 1635 | 1635 | /** |
@@ -1642,7 +1642,7 @@ discard block |
||
| 1642 | 1642 | function bigbluebuttonbn_get_recording_type_text($playbacktype) { |
| 1643 | 1643 | // Check first if string exists, and if it does'nt just default to the capitalised version of the string. |
| 1644 | 1644 | $text = ucwords($playbacktype); |
| 1645 | - $typestringid = 'view_recording_format_' . $playbacktype; |
|
| 1645 | + $typestringid = 'view_recording_format_'.$playbacktype; |
|
| 1646 | 1646 | if (get_string_manager()->string_exists($typestringid, 'bigbluebuttonbn')) { |
| 1647 | 1647 | $text = get_string($typestringid, 'bigbluebuttonbn'); |
| 1648 | 1648 | } |
@@ -1672,7 +1672,7 @@ discard block |
||
| 1672 | 1672 | $validatedurls[$urlhost] = true; |
| 1673 | 1673 | $curlinfo = bigbluebuttonbn_wrap_xml_load_file_curl_request($url, 'HEAD'); |
| 1674 | 1674 | if (!isset($curlinfo['http_code']) || $curlinfo['http_code'] != 200) { |
| 1675 | - $error = "Resources hosted by " . $urlhost . " are unreachable. Server responded with code " . $curlinfo['http_code']; |
|
| 1675 | + $error = "Resources hosted by ".$urlhost." are unreachable. Server responded with code ".$curlinfo['http_code']; |
|
| 1676 | 1676 | debugging($error, DEBUG_DEVELOPER); |
| 1677 | 1677 | $validatedurls[$urlhost] = false; |
| 1678 | 1678 | } |
@@ -1763,12 +1763,12 @@ discard block |
||
| 1763 | 1763 | * @return string |
| 1764 | 1764 | */ |
| 1765 | 1765 | function bigbluebuttonbn_get_recording_data_row_text($recording, $text, $source, $data) { |
| 1766 | - $htmltext = '<span>' . htmlentities($text) . '</span>'; |
|
| 1766 | + $htmltext = '<span>'.htmlentities($text).'</span>'; |
|
| 1767 | 1767 | if (empty($data)) { |
| 1768 | 1768 | return $htmltext; |
| 1769 | 1769 | } |
| 1770 | - $target = $data['action'] . '-' . $data['target']; |
|
| 1771 | - $id = 'recording-' . $target . '-' . $data['recordingid']; |
|
| 1770 | + $target = $data['action'].'-'.$data['target']; |
|
| 1771 | + $id = 'recording-'.$target.'-'.$data['recordingid']; |
|
| 1772 | 1772 | $attributes = array('id' => $id, 'class' => 'quickeditlink col-md-20', |
| 1773 | 1773 | 'data-recordingid' => $data['recordingid'], 'data-meetingid' => $data['meetingid'], |
| 1774 | 1774 | 'data-target' => $data['target'], 'data-source' => $source); |
@@ -1776,7 +1776,7 @@ discard block |
||
| 1776 | 1776 | $tail = html_writer::end_tag('div'); |
| 1777 | 1777 | $payload = array('action' => $data['action'], 'tag' => $data['tag'], 'target' => $data['target']); |
| 1778 | 1778 | $htmllink = bigbluebuttonbn_actionbar_render_button($recording, $payload); |
| 1779 | - return $head . $htmltext . $htmllink . $tail; |
|
| 1779 | + return $head.$htmltext.$htmllink.$tail; |
|
| 1780 | 1780 | } |
| 1781 | 1781 | |
| 1782 | 1782 | /** |
@@ -1794,10 +1794,10 @@ discard block |
||
| 1794 | 1794 | } |
| 1795 | 1795 | $target = $data['action']; |
| 1796 | 1796 | if (isset($data['target'])) { |
| 1797 | - $target .= '-' . $data['target']; |
|
| 1797 | + $target .= '-'.$data['target']; |
|
| 1798 | 1798 | } |
| 1799 | - $id = 'recording-' . $target . '-' . $recording['recordID']; |
|
| 1800 | - $onclick = 'M.mod_bigbluebuttonbn.recordings.recording' . ucfirst($data['action']) . '(this); return false;'; |
|
| 1799 | + $id = 'recording-'.$target.'-'.$recording['recordID']; |
|
| 1800 | + $onclick = 'M.mod_bigbluebuttonbn.recordings.recording'.ucfirst($data['action']).'(this); return false;'; |
|
| 1801 | 1801 | if ((boolean) \mod_bigbluebuttonbn\locallib\config::get('recording_icons_enabled')) { |
| 1802 | 1802 | // With icon for $manageaction. |
| 1803 | 1803 | $iconattributes = array('id' => $id, 'class' => 'iconsmall'); |
@@ -1811,12 +1811,12 @@ discard block |
||
| 1811 | 1811 | $recording['recordID']); |
| 1812 | 1812 | } |
| 1813 | 1813 | if (isset($data['disabled'])) { |
| 1814 | - $iconattributes['class'] .= ' fa-' . $data['disabled']; |
|
| 1814 | + $iconattributes['class'] .= ' fa-'.$data['disabled']; |
|
| 1815 | 1815 | $linkattributes['class'] = 'disabled'; |
| 1816 | 1816 | unset($linkattributes['onclick']); |
| 1817 | 1817 | } |
| 1818 | 1818 | $icon = new pix_icon('i/'.$data['tag'], |
| 1819 | - get_string('view_recording_list_actionbar_' . $data['action'], 'bigbluebuttonbn'), |
|
| 1819 | + get_string('view_recording_list_actionbar_'.$data['action'], 'bigbluebuttonbn'), |
|
| 1820 | 1820 | 'moodle', $iconattributes); |
| 1821 | 1821 | return $OUTPUT->action_icon('#', $icon, null, $linkattributes, false); |
| 1822 | 1822 | } |
@@ -1912,7 +1912,7 @@ discard block |
||
| 1912 | 1912 | if ($bbbsession['managerecordings']) { |
| 1913 | 1913 | $table->head[] = get_string('view_recording_actionbar', 'bigbluebuttonbn'); |
| 1914 | 1914 | $table->align[] = 'left'; |
| 1915 | - $table->size[] = (count($tools) * 40) . 'px'; |
|
| 1915 | + $table->size[] = (count($tools) * 40).'px'; |
|
| 1916 | 1916 | } |
| 1917 | 1917 | // Get the groups of the user. |
| 1918 | 1918 | $usergroups = groups_get_all_groups($bbbsession['course']->id, $bbbsession['userID']); |
@@ -1980,14 +1980,14 @@ discard block |
||
| 1980 | 1980 | } |
| 1981 | 1981 | $rowdata->date_formatted = str_replace(' ', ' ', $rowdata->date_formatted); |
| 1982 | 1982 | $row->cells = array(); |
| 1983 | - $row->cells[] = $texthead . $rowdata->recording . $texttail; |
|
| 1984 | - $row->cells[] = $texthead . $rowdata->meeting . $texttail;; |
|
| 1985 | - $row->cells[] = $texthead . $rowdata->activity . $texttail; |
|
| 1986 | - $row->cells[] = $texthead . $rowdata->description . $texttail; |
|
| 1983 | + $row->cells[] = $texthead.$rowdata->recording.$texttail; |
|
| 1984 | + $row->cells[] = $texthead.$rowdata->meeting.$texttail; ; |
|
| 1985 | + $row->cells[] = $texthead.$rowdata->activity.$texttail; |
|
| 1986 | + $row->cells[] = $texthead.$rowdata->description.$texttail; |
|
| 1987 | 1987 | if (bigbluebuttonbn_get_recording_data_preview_enabled($bbbsession)) { |
| 1988 | 1988 | $row->cells[] = $rowdata->preview; |
| 1989 | 1989 | } |
| 1990 | - $row->cells[] = $texthead . $rowdata->date_formatted . $texttail; |
|
| 1990 | + $row->cells[] = $texthead.$rowdata->date_formatted.$texttail; |
|
| 1991 | 1991 | $row->cells[] = $rowdata->duration_formatted; |
| 1992 | 1992 | if ($bbbsession['managerecordings']) { |
| 1993 | 1993 | $row->cells[] = $rowdata->actionbar; |
@@ -2030,7 +2030,7 @@ discard block |
||
| 2030 | 2030 | $sender = get_admin(); |
| 2031 | 2031 | // Prepare message. |
| 2032 | 2032 | $messagetext = '<p>'.get_string('email_body_recording_ready_for', 'bigbluebuttonbn'). |
| 2033 | - ' "' . $bigbluebuttonbn->name . '" '. |
|
| 2033 | + ' "'.$bigbluebuttonbn->name.'" '. |
|
| 2034 | 2034 | get_string('email_body_recording_ready_is_ready', 'bigbluebuttonbn').'.</p>'; |
| 2035 | 2035 | $context = context_course::instance($bigbluebuttonbn->course); |
| 2036 | 2036 | \mod_bigbluebuttonbn\locallib\notifier::notification_send($sender, $bigbluebuttonbn, $messagetext); |
@@ -2165,17 +2165,17 @@ discard block |
||
| 2165 | 2165 | * @return string containing the sql used for getting the target bigbluebuttonbn instances |
| 2166 | 2166 | */ |
| 2167 | 2167 | function bigbluebuttonbn_get_recordings_deleted_sql_select($courseid = 0, $bigbluebuttonbnid = null, $subset = true) { |
| 2168 | - $sql = "log = '" . BIGBLUEBUTTONBN_LOG_EVENT_DELETE . "' AND meta like '%has_recordings%' AND meta like '%true%'"; |
|
| 2168 | + $sql = "log = '".BIGBLUEBUTTONBN_LOG_EVENT_DELETE."' AND meta like '%has_recordings%' AND meta like '%true%'"; |
|
| 2169 | 2169 | if (empty($courseid)) { |
| 2170 | 2170 | $courseid = 0; |
| 2171 | 2171 | } |
| 2172 | 2172 | if (empty($bigbluebuttonbnid)) { |
| 2173 | - return $sql . " AND courseid = {$courseid}"; |
|
| 2173 | + return $sql." AND courseid = {$courseid}"; |
|
| 2174 | 2174 | } |
| 2175 | 2175 | if ($subset) { |
| 2176 | - return $sql . " AND bigbluebuttonbnid = '{$bigbluebuttonbnid}'"; |
|
| 2176 | + return $sql." AND bigbluebuttonbnid = '{$bigbluebuttonbnid}'"; |
|
| 2177 | 2177 | } |
| 2178 | - return $sql . " AND courseid = {$courseid} AND bigbluebuttonbnid <> '{$bigbluebuttonbnid}'"; |
|
| 2178 | + return $sql." AND courseid = {$courseid} AND bigbluebuttonbnid <> '{$bigbluebuttonbnid}'"; |
|
| 2179 | 2179 | } |
| 2180 | 2180 | |
| 2181 | 2181 | /** |
@@ -2189,17 +2189,17 @@ discard block |
||
| 2189 | 2189 | * @return string containing the sql used for getting the target bigbluebuttonbn instances |
| 2190 | 2190 | */ |
| 2191 | 2191 | function bigbluebuttonbn_get_recordings_imported_sql_select($courseid = 0, $bigbluebuttonbnid = null, $subset = true) { |
| 2192 | - $sql = "log = '" . BIGBLUEBUTTONBN_LOG_EVENT_IMPORT . "'"; |
|
| 2192 | + $sql = "log = '".BIGBLUEBUTTONBN_LOG_EVENT_IMPORT."'"; |
|
| 2193 | 2193 | if (empty($courseid)) { |
| 2194 | 2194 | $courseid = 0; |
| 2195 | 2195 | } |
| 2196 | 2196 | if (empty($bigbluebuttonbnid)) { |
| 2197 | - return $sql . " AND courseid = '{$courseid}'"; |
|
| 2197 | + return $sql." AND courseid = '{$courseid}'"; |
|
| 2198 | 2198 | } |
| 2199 | 2199 | if ($subset) { |
| 2200 | - return $sql . " AND bigbluebuttonbnid = '{$bigbluebuttonbnid}'"; |
|
| 2200 | + return $sql." AND bigbluebuttonbnid = '{$bigbluebuttonbnid}'"; |
|
| 2201 | 2201 | } |
| 2202 | - return $sql . " AND courseid = '{$courseid}' AND bigbluebuttonbnid <> '{$bigbluebuttonbnid}'"; |
|
| 2202 | + return $sql." AND courseid = '{$courseid}' AND bigbluebuttonbnid <> '{$bigbluebuttonbnid}'"; |
|
| 2203 | 2203 | } |
| 2204 | 2204 | |
| 2205 | 2205 | /** |
@@ -2525,7 +2525,7 @@ discard block |
||
| 2525 | 2525 | */ |
| 2526 | 2526 | function bigbluebuttonbn_settings_general(&$renderer) { |
| 2527 | 2527 | // Configuration for BigBlueButton. |
| 2528 | - if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_general_shown()) { |
|
| 2528 | + if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_general_shown()) { |
|
| 2529 | 2529 | $renderer->render_group_header('general'); |
| 2530 | 2530 | $renderer->render_group_element('server_url', |
| 2531 | 2531 | $renderer->render_group_element_text('server_url', BIGBLUEBUTTONBN_DEFAULT_SERVER_URL)); |
@@ -2543,7 +2543,7 @@ discard block |
||
| 2543 | 2543 | */ |
| 2544 | 2544 | function bigbluebuttonbn_settings_record(&$renderer) { |
| 2545 | 2545 | // Configuration for 'recording' feature. |
| 2546 | - if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_record_meeting_shown()) { |
|
| 2546 | + if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_record_meeting_shown()) { |
|
| 2547 | 2547 | $renderer->render_group_header('recording'); |
| 2548 | 2548 | $renderer->render_group_element('recording_default', |
| 2549 | 2549 | $renderer->render_group_element_checkbox('recording_default', 1)); |
@@ -2573,7 +2573,7 @@ discard block |
||
| 2573 | 2573 | */ |
| 2574 | 2574 | function bigbluebuttonbn_settings_importrecordings(&$renderer) { |
| 2575 | 2575 | // Configuration for 'import recordings' feature. |
| 2576 | - if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_import_recordings_shown()) { |
|
| 2576 | + if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_import_recordings_shown()) { |
|
| 2577 | 2577 | $renderer->render_group_header('importrecordings'); |
| 2578 | 2578 | $renderer->render_group_element('importrecordings_enabled', |
| 2579 | 2579 | $renderer->render_group_element_checkbox('importrecordings_enabled', 0)); |
@@ -2591,7 +2591,7 @@ discard block |
||
| 2591 | 2591 | */ |
| 2592 | 2592 | function bigbluebuttonbn_settings_showrecordings(&$renderer) { |
| 2593 | 2593 | // Configuration for 'show recordings' feature. |
| 2594 | - if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_show_recordings_shown()) { |
|
| 2594 | + if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_show_recordings_shown()) { |
|
| 2595 | 2595 | $renderer->render_group_header('recordings'); |
| 2596 | 2596 | $renderer->render_group_element('recordings_html_default', |
| 2597 | 2597 | $renderer->render_group_element_checkbox('recordings_html_default', 1)); |
@@ -2623,7 +2623,7 @@ discard block |
||
| 2623 | 2623 | */ |
| 2624 | 2624 | function bigbluebuttonbn_settings_waitmoderator(&$renderer) { |
| 2625 | 2625 | // Configuration for wait for moderator feature. |
| 2626 | - if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_wait_moderator_shown()) { |
|
| 2626 | + if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_wait_moderator_shown()) { |
|
| 2627 | 2627 | $renderer->render_group_header('waitformoderator'); |
| 2628 | 2628 | $renderer->render_group_element('waitformoderator_default', |
| 2629 | 2629 | $renderer->render_group_element_checkbox('waitformoderator_default', 0)); |
@@ -2645,7 +2645,7 @@ discard block |
||
| 2645 | 2645 | */ |
| 2646 | 2646 | function bigbluebuttonbn_settings_voicebridge(&$renderer) { |
| 2647 | 2647 | // Configuration for "static voice bridge" feature. |
| 2648 | - if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_static_voice_bridge_shown()) { |
|
| 2648 | + if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_static_voice_bridge_shown()) { |
|
| 2649 | 2649 | $renderer->render_group_header('voicebridge'); |
| 2650 | 2650 | $renderer->render_group_element('voicebridge_editable', |
| 2651 | 2651 | $renderer->render_group_element_checkbox('voicebridge_editable', 0)); |
@@ -2661,7 +2661,7 @@ discard block |
||
| 2661 | 2661 | */ |
| 2662 | 2662 | function bigbluebuttonbn_settings_preupload(&$renderer) { |
| 2663 | 2663 | // Configuration for "preupload presentation" feature. |
| 2664 | - if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_preupload_presentation_shown()) { |
|
| 2664 | + if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_preupload_presentation_shown()) { |
|
| 2665 | 2665 | // This feature only works if curl is installed. |
| 2666 | 2666 | $preuploaddescripion = get_string('config_preuploadpresentation_description', 'bigbluebuttonbn'); |
| 2667 | 2667 | if (!extension_loaded('curl')) { |
@@ -2687,7 +2687,7 @@ discard block |
||
| 2687 | 2687 | */ |
| 2688 | 2688 | function bigbluebuttonbn_settings_preupload_manage_default_file(&$renderer) { |
| 2689 | 2689 | // Configuration for "preupload presentation" feature. |
| 2690 | - if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_preupload_presentation_shown()) { |
|
| 2690 | + if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_preupload_presentation_shown()) { |
|
| 2691 | 2691 | if (extension_loaded('curl')) { |
| 2692 | 2692 | // This feature only works if curl is installed. |
| 2693 | 2693 | $renderer->render_filemanager_default_file_presentation("presentation_default"); |
@@ -2704,7 +2704,7 @@ discard block |
||
| 2704 | 2704 | */ |
| 2705 | 2705 | function bigbluebuttonbn_settings_userlimit(&$renderer) { |
| 2706 | 2706 | // Configuration for "user limit" feature. |
| 2707 | - if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_user_limit_shown()) { |
|
| 2707 | + if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_user_limit_shown()) { |
|
| 2708 | 2708 | $renderer->render_group_header('userlimit'); |
| 2709 | 2709 | $renderer->render_group_element('userlimit_default', |
| 2710 | 2710 | $renderer->render_group_element_text('userlimit_default', 0, PARAM_INT)); |
@@ -2722,7 +2722,7 @@ discard block |
||
| 2722 | 2722 | */ |
| 2723 | 2723 | function bigbluebuttonbn_settings_duration(&$renderer) { |
| 2724 | 2724 | // Configuration for "scheduled duration" feature. |
| 2725 | - if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_scheduled_duration_shown()) { |
|
| 2725 | + if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_scheduled_duration_shown()) { |
|
| 2726 | 2726 | $renderer->render_group_header('scheduled'); |
| 2727 | 2727 | $renderer->render_group_element('scheduled_duration_enabled', |
| 2728 | 2728 | $renderer->render_group_element_checkbox('scheduled_duration_enabled', 1)); |
@@ -2742,7 +2742,7 @@ discard block |
||
| 2742 | 2742 | */ |
| 2743 | 2743 | function bigbluebuttonbn_settings_participants(&$renderer) { |
| 2744 | 2744 | // Configuration for defining the default role/user that will be moderator on new activities. |
| 2745 | - if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_moderator_default_shown()) { |
|
| 2745 | + if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_moderator_default_shown()) { |
|
| 2746 | 2746 | $renderer->render_group_header('participant'); |
| 2747 | 2747 | // UI for 'participants' feature. |
| 2748 | 2748 | $roles = bigbluebuttonbn_get_roles(); |
@@ -2763,7 +2763,7 @@ discard block |
||
| 2763 | 2763 | */ |
| 2764 | 2764 | function bigbluebuttonbn_settings_notifications(&$renderer) { |
| 2765 | 2765 | // Configuration for "send notifications" feature. |
| 2766 | - if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_send_notifications_shown()) { |
|
| 2766 | + if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_send_notifications_shown()) { |
|
| 2767 | 2767 | $renderer->render_group_header('sendnotifications'); |
| 2768 | 2768 | $renderer->render_group_element('sendnotifications_enabled', |
| 2769 | 2769 | $renderer->render_group_element_checkbox('sendnotifications_enabled', 1)); |
@@ -2779,12 +2779,12 @@ discard block |
||
| 2779 | 2779 | */ |
| 2780 | 2780 | function bigbluebuttonbn_settings_clienttype(&$renderer) { |
| 2781 | 2781 | // Configuration for "clienttype" feature. |
| 2782 | - if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_clienttype_shown()) { |
|
| 2782 | + if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_clienttype_shown()) { |
|
| 2783 | 2783 | $renderer->render_group_header('clienttype'); |
| 2784 | 2784 | $renderer->render_group_element('clienttype_editable', |
| 2785 | 2785 | $renderer->render_group_element_checkbox('clienttype_editable', 0)); |
| 2786 | 2786 | // Web Client default. |
| 2787 | - $default = intval((int)\mod_bigbluebuttonbn\locallib\config::get('clienttype_default')); |
|
| 2787 | + $default = intval((int) \mod_bigbluebuttonbn\locallib\config::get('clienttype_default')); |
|
| 2788 | 2788 | $choices = array(BIGBLUEBUTTON_CLIENTTYPE_FLASH => get_string('mod_form_block_clienttype_flash', 'bigbluebuttonbn'), |
| 2789 | 2789 | BIGBLUEBUTTON_CLIENTTYPE_HTML5 => get_string('mod_form_block_clienttype_html5', 'bigbluebuttonbn')); |
| 2790 | 2790 | $renderer->render_group_element('clienttype_default', |
@@ -2802,7 +2802,7 @@ discard block |
||
| 2802 | 2802 | */ |
| 2803 | 2803 | function bigbluebuttonbn_settings_muteonstart(&$renderer) { |
| 2804 | 2804 | // Configuration for BigBlueButton. |
| 2805 | - if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_muteonstart_shown()) { |
|
| 2805 | + if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_muteonstart_shown()) { |
|
| 2806 | 2806 | $renderer->render_group_header('muteonstart'); |
| 2807 | 2807 | $renderer->render_group_element('muteonstart_default', |
| 2808 | 2808 | $renderer->render_group_element_checkbox('muteonstart_default', 0)); |
@@ -2824,7 +2824,7 @@ discard block |
||
| 2824 | 2824 | return; |
| 2825 | 2825 | } |
| 2826 | 2826 | // Configuration for 'notify users when recording ready' feature. |
| 2827 | - if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_settings_extended_shown()) { |
|
| 2827 | + if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_settings_extended_shown()) { |
|
| 2828 | 2828 | $renderer->render_group_header('extended_capabilities'); |
| 2829 | 2829 | // UI for 'notify users when recording ready' feature. |
| 2830 | 2830 | $renderer->render_group_element('recordingready_enabled', |
@@ -2844,7 +2844,7 @@ discard block |
||
| 2844 | 2844 | global $DB; |
| 2845 | 2845 | do { |
| 2846 | 2846 | $encodedseed = sha1(bigbluebuttonbn_random_password(12)); |
| 2847 | - $meetingid = (string)$DB->get_field('bigbluebuttonbn', 'meetingid', array('meetingid' => $encodedseed)); |
|
| 2847 | + $meetingid = (string) $DB->get_field('bigbluebuttonbn', 'meetingid', array('meetingid' => $encodedseed)); |
|
| 2848 | 2848 | } while ($meetingid == $encodedseed); |
| 2849 | 2849 | return $encodedseed; |
| 2850 | 2850 | } |
@@ -2889,22 +2889,22 @@ discard block |
||
| 2889 | 2889 | * |
| 2890 | 2890 | * @return string |
| 2891 | 2891 | */ |
| 2892 | -function bigbluebuttonbn_render_warning($message, $type='info', $href='', $text='', $class='') { |
|
| 2892 | +function bigbluebuttonbn_render_warning($message, $type = 'info', $href = '', $text = '', $class = '') { |
|
| 2893 | 2893 | global $OUTPUT; |
| 2894 | 2894 | $output = "\n"; |
| 2895 | 2895 | // Evaluates if config_warning is enabled. |
| 2896 | 2896 | if (empty($message)) { |
| 2897 | 2897 | return $output; |
| 2898 | 2898 | } |
| 2899 | - $output .= $OUTPUT->box_start('box boxalignleft adminerror alert alert-' . $type . ' alert-block fade in', |
|
| 2900 | - 'bigbluebuttonbn_view_general_warning') . "\n"; |
|
| 2901 | - $output .= ' ' . $message . "\n"; |
|
| 2902 | - $output .= ' <div class="singlebutton pull-right">' . "\n"; |
|
| 2899 | + $output .= $OUTPUT->box_start('box boxalignleft adminerror alert alert-'.$type.' alert-block fade in', |
|
| 2900 | + 'bigbluebuttonbn_view_general_warning')."\n"; |
|
| 2901 | + $output .= ' '.$message."\n"; |
|
| 2902 | + $output .= ' <div class="singlebutton pull-right">'."\n"; |
|
| 2903 | 2903 | if (!empty($href)) { |
| 2904 | 2904 | $output .= bigbluebuttonbn_render_warning_button($href, $text, $class); |
| 2905 | 2905 | } |
| 2906 | - $output .= ' </div>' . "\n"; |
|
| 2907 | - $output .= $OUTPUT->box_end() . "\n"; |
|
| 2906 | + $output .= ' </div>'."\n"; |
|
| 2907 | + $output .= $OUTPUT->box_end()."\n"; |
|
| 2908 | 2908 | return $output; |
| 2909 | 2909 | } |
| 2910 | 2910 | |
@@ -2928,10 +2928,10 @@ discard block |
||
| 2928 | 2928 | if ($class == '') { |
| 2929 | 2929 | $class = 'btn btn-secondary'; |
| 2930 | 2930 | } |
| 2931 | - $output = ' <form method="post" action="' . $href . '" class="form-inline">'."\n"; |
|
| 2932 | - $output .= ' <button type="submit" class="' . $class . '"'."\n"; |
|
| 2933 | - $output .= ' title="' . $title . '"'."\n"; |
|
| 2934 | - $output .= ' >' . $text . '</button>'."\n"; |
|
| 2931 | + $output = ' <form method="post" action="'.$href.'" class="form-inline">'."\n"; |
|
| 2932 | + $output .= ' <button type="submit" class="'.$class.'"'."\n"; |
|
| 2933 | + $output .= ' title="'.$title.'"'."\n"; |
|
| 2934 | + $output .= ' >'.$text.'</button>'."\n"; |
|
| 2935 | 2935 | $output .= ' </form>'."\n"; |
| 2936 | 2936 | return $output; |
| 2937 | 2937 | } |
@@ -2998,7 +2998,7 @@ discard block |
||
| 2998 | 2998 | |
| 2999 | 2999 | // By default, use a meetingid without groups. |
| 3000 | 3000 | if (empty($mid)) { |
| 3001 | - $mid = $bigbluebuttonbn->meetingid . '-' . $bigbluebuttonbn->course . '-' . $bigbluebuttonbn->id; |
|
| 3001 | + $mid = $bigbluebuttonbn->meetingid.'-'.$bigbluebuttonbn->course.'-'.$bigbluebuttonbn->id; |
|
| 3002 | 3002 | } |
| 3003 | 3003 | |
| 3004 | 3004 | // When meeting is running, all authorized users can join right in. |
@@ -3059,7 +3059,7 @@ discard block |
||
| 3059 | 3059 | function bigbluebuttonbn_instance_ownerid($bigbluebuttonbn) { |
| 3060 | 3060 | global $DB; |
| 3061 | 3061 | $filters = array('bigbluebuttonbnid' => $bigbluebuttonbn->id, 'log' => 'Add'); |
| 3062 | - $ownerid = (integer)$DB->get_field('bigbluebuttonbn_logs', 'userid', $filters); |
|
| 3062 | + $ownerid = (integer) $DB->get_field('bigbluebuttonbn_logs', 'userid', $filters); |
|
| 3063 | 3063 | return $ownerid; |
| 3064 | 3064 | } |
| 3065 | 3065 | |
@@ -3069,7 +3069,7 @@ discard block |
||
| 3069 | 3069 | * @return boolean |
| 3070 | 3070 | */ |
| 3071 | 3071 | function bigbluebuttonbn_has_html5_client() { |
| 3072 | - $checkurl = \mod_bigbluebuttonbn\locallib\bigbluebutton::root() . "html5client/check"; |
|
| 3072 | + $checkurl = \mod_bigbluebuttonbn\locallib\bigbluebutton::root()."html5client/check"; |
|
| 3073 | 3073 | $curlinfo = bigbluebuttonbn_wrap_xml_load_file_curl_request($checkurl, 'HEAD'); |
| 3074 | 3074 | return (isset($curlinfo['http_code']) && $curlinfo['http_code'] == 200); |
| 3075 | 3075 | } |
@@ -3102,8 +3102,8 @@ discard block |
||
| 3102 | 3102 | $bbbsession['meetingname'] = $bbbsession['bigbluebuttonbn']->name; |
| 3103 | 3103 | $bbbsession['meetingdescription'] = $bbbsession['bigbluebuttonbn']->intro; |
| 3104 | 3104 | // Extra data for setting up the Meeting. |
| 3105 | - $bbbsession['userlimit'] = intval((int)\mod_bigbluebuttonbn\locallib\config::get('userlimit_default')); |
|
| 3106 | - if ((boolean)\mod_bigbluebuttonbn\locallib\config::get('userlimit_editable')) { |
|
| 3105 | + $bbbsession['userlimit'] = intval((int) \mod_bigbluebuttonbn\locallib\config::get('userlimit_default')); |
|
| 3106 | + if ((boolean) \mod_bigbluebuttonbn\locallib\config::get('userlimit_editable')) { |
|
| 3107 | 3107 | $bbbsession['userlimit'] = intval($bbbsession['bigbluebuttonbn']->userlimit); |
| 3108 | 3108 | } |
| 3109 | 3109 | $bbbsession['voicebridge'] = $bbbsession['bigbluebuttonbn']->voicebridge; |
@@ -3209,7 +3209,7 @@ discard block |
||
| 3209 | 3209 | ); |
| 3210 | 3210 | |
| 3211 | 3211 | // Check status and set extra values. |
| 3212 | - $activitystatus = bigbluebuttonbn_view_get_activity_status($bbbsession); // In locallib. |
|
| 3212 | + $activitystatus = bigbluebuttonbn_view_get_activity_status($bbbsession); // In locallib. |
|
| 3213 | 3213 | if ($activitystatus == 'ended') { |
| 3214 | 3214 | $bbbsession['presentation'] = bigbluebuttonbn_get_presentation_array( |
| 3215 | 3215 | $bbbsession['context'], $bbbsession['bigbluebuttonbn']->presentation); |
@@ -103,9 +103,9 @@ discard block |
||
| 103 | 103 | function bigbluebuttonbn_get_join_url($meetingid, $username, $pw, $logouturl, $configtoken = null, |
| 104 | 104 | $userid = null, $clienttype = BIGBLUEBUTTON_CLIENTTYPE_FLASH) { |
| 105 | 105 | $data = ['meetingID' => $meetingid, |
| 106 | - 'fullName' => $username, |
|
| 107 | - 'password' => $pw, |
|
| 108 | - 'logoutURL' => $logouturl, |
|
| 106 | + 'fullName' => $username, |
|
| 107 | + 'password' => $pw, |
|
| 108 | + 'logoutURL' => $logouturl, |
|
| 109 | 109 | ]; |
| 110 | 110 | // Choose between Adobe Flash or HTML5 Client. |
| 111 | 111 | if ( $clienttype == BIGBLUEBUTTON_CLIENTTYPE_HTML5 ) { |
@@ -161,23 +161,23 @@ discard block |
||
| 161 | 161 | function bigbluebuttonbn_get_meeting_info_array($meetingid) { |
| 162 | 162 | $xml = bigbluebuttonbn_wrap_xml_load_file( |
| 163 | 163 | \mod_bigbluebuttonbn\locallib\bigbluebutton::action_url('getMeetingInfo', ['meetingID' => $meetingid]) |
| 164 | - ); |
|
| 164 | + ); |
|
| 165 | 165 | if ($xml && $xml->returncode == 'SUCCESS' && empty($xml->messageKey)) { |
| 166 | 166 | // Meeting info was returned. |
| 167 | 167 | return array('returncode' => $xml->returncode, |
| 168 | - 'meetingID' => $xml->meetingID, |
|
| 169 | - 'moderatorPW' => $xml->moderatorPW, |
|
| 170 | - 'attendeePW' => $xml->attendeePW, |
|
| 171 | - 'hasBeenForciblyEnded' => $xml->hasBeenForciblyEnded, |
|
| 172 | - 'running' => $xml->running, |
|
| 173 | - 'recording' => $xml->recording, |
|
| 174 | - 'startTime' => $xml->startTime, |
|
| 175 | - 'endTime' => $xml->endTime, |
|
| 176 | - 'participantCount' => $xml->participantCount, |
|
| 177 | - 'moderatorCount' => $xml->moderatorCount, |
|
| 178 | - 'attendees' => $xml->attendees, |
|
| 179 | - 'metadata' => $xml->metadata, |
|
| 180 | - ); |
|
| 168 | + 'meetingID' => $xml->meetingID, |
|
| 169 | + 'moderatorPW' => $xml->moderatorPW, |
|
| 170 | + 'attendeePW' => $xml->attendeePW, |
|
| 171 | + 'hasBeenForciblyEnded' => $xml->hasBeenForciblyEnded, |
|
| 172 | + 'running' => $xml->running, |
|
| 173 | + 'recording' => $xml->recording, |
|
| 174 | + 'startTime' => $xml->startTime, |
|
| 175 | + 'endTime' => $xml->endTime, |
|
| 176 | + 'participantCount' => $xml->participantCount, |
|
| 177 | + 'moderatorCount' => $xml->moderatorCount, |
|
| 178 | + 'attendees' => $xml->attendees, |
|
| 179 | + 'metadata' => $xml->metadata, |
|
| 180 | + ); |
|
| 181 | 181 | } |
| 182 | 182 | if ($xml) { |
| 183 | 183 | // Either failure or success without meeting info. |
@@ -329,7 +329,7 @@ discard block |
||
| 329 | 329 | function bigbluebuttonbn_get_default_config_xml() { |
| 330 | 330 | $xml = bigbluebuttonbn_wrap_xml_load_file( |
| 331 | 331 | \mod_bigbluebuttonbn\locallib\bigbluebutton::action_url('getDefaultConfigXML') |
| 332 | - ); |
|
| 332 | + ); |
|
| 333 | 333 | return $xml; |
| 334 | 334 | } |
| 335 | 335 | |
@@ -433,7 +433,7 @@ discard block |
||
| 433 | 433 | foreach ($ids as $id) { |
| 434 | 434 | $xml = bigbluebuttonbn_wrap_xml_load_file( |
| 435 | 435 | \mod_bigbluebuttonbn\locallib\bigbluebutton::action_url('deleteRecordings', ['recordID' => $id]) |
| 436 | - ); |
|
| 436 | + ); |
|
| 437 | 437 | if ($xml && $xml->returncode != 'SUCCESS') { |
| 438 | 438 | return false; |
| 439 | 439 | } |
@@ -452,7 +452,7 @@ discard block |
||
| 452 | 452 | foreach ($ids as $id) { |
| 453 | 453 | $xml = bigbluebuttonbn_wrap_xml_load_file( |
| 454 | 454 | \mod_bigbluebuttonbn\locallib\bigbluebutton::action_url('publishRecordings', ['recordID' => $id, 'publish' => $publish]) |
| 455 | - ); |
|
| 455 | + ); |
|
| 456 | 456 | if ($xml && $xml->returncode != 'SUCCESS') { |
| 457 | 457 | return false; |
| 458 | 458 | } |
@@ -471,7 +471,7 @@ discard block |
||
| 471 | 471 | foreach ($ids as $id) { |
| 472 | 472 | $xml = bigbluebuttonbn_wrap_xml_load_file( |
| 473 | 473 | \mod_bigbluebuttonbn\locallib\bigbluebutton::action_url('updateRecordings', ['recordID' => $id] + (array) $params) |
| 474 | - ); |
|
| 474 | + ); |
|
| 475 | 475 | if ($xml && $xml->returncode != 'SUCCESS') { |
| 476 | 476 | return false; |
| 477 | 477 | } |
@@ -488,7 +488,7 @@ discard block |
||
| 488 | 488 | function bigbluebuttonbn_end_meeting($meetingid, $modpw) { |
| 489 | 489 | $xml = bigbluebuttonbn_wrap_xml_load_file( |
| 490 | 490 | \mod_bigbluebuttonbn\locallib\bigbluebutton::action_url('end', ['meetingID' => $meetingid, 'password' => $modpw]) |
| 491 | - ); |
|
| 491 | + ); |
|
| 492 | 492 | if ($xml) { |
| 493 | 493 | // If the xml packet returned failure it displays the message to the user. |
| 494 | 494 | return array('returncode' => $xml->returncode, 'message' => $xml->message, 'messageKey' => $xml->messageKey); |
@@ -505,7 +505,7 @@ discard block |
||
| 505 | 505 | function bigbluebuttonbn_get_server_version() { |
| 506 | 506 | $xml = bigbluebuttonbn_wrap_xml_load_file( |
| 507 | 507 | \mod_bigbluebuttonbn\locallib\bigbluebutton::action_url() |
| 508 | - ); |
|
| 508 | + ); |
|
| 509 | 509 | if ($xml && $xml->returncode == 'SUCCESS') { |
| 510 | 510 | return $xml->version; |
| 511 | 511 | } |
@@ -574,10 +574,10 @@ discard block |
||
| 574 | 574 | } |
| 575 | 575 | $options = array(); |
| 576 | 576 | $options['CURLOPT_HTTPHEADER'] = array( |
| 577 | - 'Content-Type: '.$contenttype, |
|
| 578 | - 'Content-Length: '.strlen($data), |
|
| 579 | - 'Content-Language: en-US', |
|
| 580 | - ); |
|
| 577 | + 'Content-Type: '.$contenttype, |
|
| 578 | + 'Content-Length: '.strlen($data), |
|
| 579 | + 'Content-Language: en-US', |
|
| 580 | + ); |
|
| 581 | 581 | |
| 582 | 582 | return $c->post($url, $data, $options); |
| 583 | 583 | } |
@@ -744,12 +744,12 @@ discard block |
||
| 744 | 744 | 'all' => array( |
| 745 | 745 | 'name' => get_string('mod_form_field_participant_list_type_all', 'bigbluebuttonbn'), |
| 746 | 746 | 'children' => [] |
| 747 | - ) |
|
| 748 | - ); |
|
| 747 | + ) |
|
| 748 | + ); |
|
| 749 | 749 | $data['role'] = array( |
| 750 | 750 | 'name' => get_string('mod_form_field_participant_list_type_role', 'bigbluebuttonbn'), |
| 751 | 751 | 'children' => bigbluebuttonbn_get_roles_select($context) |
| 752 | - ); |
|
| 752 | + ); |
|
| 753 | 753 | $data['user'] = array( |
| 754 | 754 | 'name' => get_string('mod_form_field_participant_list_type_user', 'bigbluebuttonbn'), |
| 755 | 755 | 'children' => bigbluebuttonbn_get_users_select($context, $bbactivity), |
@@ -796,7 +796,7 @@ discard block |
||
| 796 | 796 | 'selectiontype' => 'all', |
| 797 | 797 | 'selectionid' => 'all', |
| 798 | 798 | 'role' => BIGBLUEBUTTONBN_ROLE_VIEWER |
| 799 | - ); |
|
| 799 | + ); |
|
| 800 | 800 | $defaultrules = explode(',', \mod_bigbluebuttonbn\locallib\config::get('participant_moderator_default')); |
| 801 | 801 | foreach ($defaultrules as $defaultrule) { |
| 802 | 802 | if ($defaultrule == '0') { |
@@ -809,9 +809,9 @@ discard block |
||
| 809 | 809 | continue; |
| 810 | 810 | } |
| 811 | 811 | $participantlist[] = array( |
| 812 | - 'selectiontype' => 'role', |
|
| 813 | - 'selectionid' => $defaultrule, |
|
| 814 | - 'role' => BIGBLUEBUTTONBN_ROLE_MODERATOR); |
|
| 812 | + 'selectiontype' => 'role', |
|
| 813 | + 'selectionid' => $defaultrule, |
|
| 814 | + 'role' => BIGBLUEBUTTONBN_ROLE_MODERATOR); |
|
| 815 | 815 | } |
| 816 | 816 | return $participantlist; |
| 817 | 817 | } |
@@ -850,11 +850,11 @@ discard block |
||
| 850 | 850 | 'all' => get_string('mod_form_field_participant_list_type_all', 'bigbluebuttonbn'), |
| 851 | 851 | 'role' => get_string('mod_form_field_participant_list_type_role', 'bigbluebuttonbn'), |
| 852 | 852 | 'user' => get_string('mod_form_field_participant_list_type_user', 'bigbluebuttonbn'), |
| 853 | - ], |
|
| 853 | + ], |
|
| 854 | 854 | 'type_selected' => 'all', |
| 855 | 855 | 'options' => ['all' => '---------------'], |
| 856 | 856 | 'selected' => 'all', |
| 857 | - ]; |
|
| 857 | + ]; |
|
| 858 | 858 | } |
| 859 | 859 | |
| 860 | 860 | /** |
@@ -1173,7 +1173,7 @@ discard block |
||
| 1173 | 1173 | // Ping again and refresh the cache. |
| 1174 | 1174 | $meetinginfo = (array) bigbluebuttonbn_wrap_xml_load_file( |
| 1175 | 1175 | \mod_bigbluebuttonbn\locallib\bigbluebutton::action_url('getMeetingInfo', ['meetingID' => $meetingid]) |
| 1176 | - ); |
|
| 1176 | + ); |
|
| 1177 | 1177 | $cache->set($meetingid, array('creation_time' => time(), 'meeting_info' => json_encode($meetinginfo))); |
| 1178 | 1178 | return $meetinginfo; |
| 1179 | 1179 | } |
@@ -1588,8 +1588,8 @@ discard block |
||
| 1588 | 1588 | } |
| 1589 | 1589 | $id = 'playbacks-'.$recording['recordID']; |
| 1590 | 1590 | $recordingtypes = html_writer::start_tag('div', array('id' => $id, 'data-imported' => $dataimported, |
| 1591 | - 'data-meetingid' => $recording['meetingID'], 'data-recordingid' => $recording['recordID'], |
|
| 1592 | - 'title' => $title, $visibility => $visibility)); |
|
| 1591 | + 'data-meetingid' => $recording['meetingID'], 'data-recordingid' => $recording['recordID'], |
|
| 1592 | + 'title' => $title, $visibility => $visibility)); |
|
| 1593 | 1593 | foreach ($recording['playbacks'] as $playback) { |
| 1594 | 1594 | $recordingtypes .= bigbluebuttonbn_get_recording_data_row_type($recording, $bbbsession, $playback); |
| 1595 | 1595 | } |
@@ -1624,7 +1624,7 @@ discard block |
||
| 1624 | 1624 | 'data-action' => 'play', |
| 1625 | 1625 | 'data-target' => $playback['type'], |
| 1626 | 1626 | 'data-href' => $href, |
| 1627 | - ); |
|
| 1627 | + ); |
|
| 1628 | 1628 | if ($CFG->bigbluebuttonbn_recordings_validate_url && !bigbluebuttonbn_is_bn_server() && !bigbluebuttonbn_is_valid_resource(trim($playback['url']))) { |
| 1629 | 1629 | $linkattributes['class'] = 'btn btn-sm btn-warning'; |
| 1630 | 1630 | $linkattributes['title'] = get_string('view_recording_format_errror_unreachable', 'bigbluebuttonbn'); |
@@ -1806,10 +1806,10 @@ discard block |
||
| 1806 | 1806 | 'id' => $id, |
| 1807 | 1807 | 'onclick' => $onclick, |
| 1808 | 1808 | 'data-action' => $data['action'] |
| 1809 | - ); |
|
| 1809 | + ); |
|
| 1810 | 1810 | if (!isset($recording['imported'])) { |
| 1811 | 1811 | $linkattributes['data-links'] = bigbluebuttonbn_count_recording_imported_instances( |
| 1812 | - $recording['recordID']); |
|
| 1812 | + $recording['recordID']); |
|
| 1813 | 1813 | } |
| 1814 | 1814 | if (isset($data['disabled'])) { |
| 1815 | 1815 | $iconattributes['class'] .= ' fa-' . $data['disabled']; |
@@ -2332,17 +2332,17 @@ discard block |
||
| 2332 | 2332 | function bigbluebuttonbn_get_instance_type_profiles() { |
| 2333 | 2333 | $instanceprofiles = array( |
| 2334 | 2334 | BIGBLUEBUTTONBN_TYPE_ALL => array('id' => BIGBLUEBUTTONBN_TYPE_ALL, |
| 2335 | - 'name' => get_string('instance_type_default', 'bigbluebuttonbn'), |
|
| 2336 | - 'features' => array('all')), |
|
| 2335 | + 'name' => get_string('instance_type_default', 'bigbluebuttonbn'), |
|
| 2336 | + 'features' => array('all')), |
|
| 2337 | 2337 | BIGBLUEBUTTONBN_TYPE_ROOM_ONLY => array('id' => BIGBLUEBUTTONBN_TYPE_ROOM_ONLY, |
| 2338 | - 'name' => get_string('instance_type_room_only', 'bigbluebuttonbn'), |
|
| 2339 | - 'features' => array('showroom', 'welcomemessage', 'voicebridge', 'waitformoderator', 'userlimit', |
|
| 2340 | - 'recording', 'sendnotifications', 'preuploadpresentation', 'permissions', 'schedule', 'groups', |
|
| 2341 | - 'modstandardelshdr', 'availabilityconditionsheader', 'tagshdr', 'competenciessection', |
|
| 2342 | - 'clienttype', 'availabilityconditionsheader')), |
|
| 2338 | + 'name' => get_string('instance_type_room_only', 'bigbluebuttonbn'), |
|
| 2339 | + 'features' => array('showroom', 'welcomemessage', 'voicebridge', 'waitformoderator', 'userlimit', |
|
| 2340 | + 'recording', 'sendnotifications', 'preuploadpresentation', 'permissions', 'schedule', 'groups', |
|
| 2341 | + 'modstandardelshdr', 'availabilityconditionsheader', 'tagshdr', 'competenciessection', |
|
| 2342 | + 'clienttype', 'availabilityconditionsheader')), |
|
| 2343 | 2343 | BIGBLUEBUTTONBN_TYPE_RECORDING_ONLY => array('id' => BIGBLUEBUTTONBN_TYPE_RECORDING_ONLY, |
| 2344 | - 'name' => get_string('instance_type_recording_only', 'bigbluebuttonbn'), |
|
| 2345 | - 'features' => array('showrecordings', 'importrecordings', 'availabilityconditionsheader')) |
|
| 2344 | + 'name' => get_string('instance_type_recording_only', 'bigbluebuttonbn'), |
|
| 2345 | + 'features' => array('showrecordings', 'importrecordings', 'availabilityconditionsheader')) |
|
| 2346 | 2346 | ); |
| 2347 | 2347 | return $instanceprofiles; |
| 2348 | 2348 | } |
@@ -2431,8 +2431,8 @@ discard block |
||
| 2431 | 2431 | $activitytime = ''; |
| 2432 | 2432 | if ($time) { |
| 2433 | 2433 | $activitytime = calendar_day_representation($time).' '. |
| 2434 | - get_string('mod_form_field_notification_msg_at', 'bigbluebuttonbn').' '. |
|
| 2435 | - calendar_time_representation($time); |
|
| 2434 | + get_string('mod_form_field_notification_msg_at', 'bigbluebuttonbn').' '. |
|
| 2435 | + calendar_time_representation($time); |
|
| 2436 | 2436 | } |
| 2437 | 2437 | return $activitytime; |
| 2438 | 2438 | } |
@@ -2753,7 +2753,7 @@ discard block |
||
| 2753 | 2753 | $renderer->render_group_element('participant_moderator_default', |
| 2754 | 2754 | $renderer->render_group_element_configmultiselect('participant_moderator_default', |
| 2755 | 2755 | array_keys($owner), array_merge($owner, $roles)) |
| 2756 | - ); |
|
| 2756 | + ); |
|
| 2757 | 2757 | } |
| 2758 | 2758 | } |
| 2759 | 2759 | |
@@ -2789,7 +2789,7 @@ discard block |
||
| 2789 | 2789 | // Web Client default. |
| 2790 | 2790 | $default = intval((int)\mod_bigbluebuttonbn\locallib\config::get('clienttype_default')); |
| 2791 | 2791 | $choices = array(BIGBLUEBUTTON_CLIENTTYPE_FLASH => get_string('mod_form_block_clienttype_flash', 'bigbluebuttonbn'), |
| 2792 | - BIGBLUEBUTTON_CLIENTTYPE_HTML5 => get_string('mod_form_block_clienttype_html5', 'bigbluebuttonbn')); |
|
| 2792 | + BIGBLUEBUTTON_CLIENTTYPE_HTML5 => get_string('mod_form_block_clienttype_html5', 'bigbluebuttonbn')); |
|
| 2793 | 2793 | $renderer->render_group_element('clienttype_default', |
| 2794 | 2794 | $renderer->render_group_element_configselect('clienttype_default', |
| 2795 | 2795 | $default, $choices)); |
@@ -2900,7 +2900,7 @@ discard block |
||
| 2900 | 2900 | return $output; |
| 2901 | 2901 | } |
| 2902 | 2902 | $output .= $OUTPUT->box_start('box boxalignleft adminerror alert alert-' . $type . ' alert-block fade in', |
| 2903 | - 'bigbluebuttonbn_view_general_warning') . "\n"; |
|
| 2903 | + 'bigbluebuttonbn_view_general_warning') . "\n"; |
|
| 2904 | 2904 | $output .= ' ' . $message . "\n"; |
| 2905 | 2905 | $output .= ' <div class="singlebutton pull-right">' . "\n"; |
| 2906 | 2906 | if (!empty($href)) { |
@@ -27,7 +27,7 @@ discard block |
||
| 27 | 27 | |
| 28 | 28 | defined('MOODLE_INTERNAL') || die(); |
| 29 | 29 | |
| 30 | -require_once($CFG->dirroot . '/mod/bigbluebuttonbn/locallib.php'); |
|
| 30 | +require_once($CFG->dirroot.'/mod/bigbluebuttonbn/locallib.php'); |
|
| 31 | 31 | |
| 32 | 32 | /** |
| 33 | 33 | * Wrapper for executing http requests on a BigBlueButton server. |
@@ -46,18 +46,18 @@ discard block |
||
| 46 | 46 | * @return string |
| 47 | 47 | */ |
| 48 | 48 | public static function action_url($action = '', $data = array(), $metadata = array()) { |
| 49 | - $baseurl = self::sanitized_url() . $action . '?'; |
|
| 49 | + $baseurl = self::sanitized_url().$action.'?'; |
|
| 50 | 50 | $metadata = array_combine( |
| 51 | 51 | array_map( |
| 52 | 52 | function($k) { |
| 53 | - return 'meta_' . $k; |
|
| 53 | + return 'meta_'.$k; |
|
| 54 | 54 | } |
| 55 | 55 | , array_keys($metadata) |
| 56 | 56 | ), |
| 57 | 57 | $metadata |
| 58 | 58 | ); |
| 59 | 59 | $params = http_build_query($data + $metadata, '', '&'); |
| 60 | - return $baseurl . $params . '&checksum=' . sha1($action . $params . self::sanitized_secret()); |
|
| 60 | + return $baseurl.$params.'&checksum='.sha1($action.$params.self::sanitized_secret()); |
|
| 61 | 61 | } |
| 62 | 62 | |
| 63 | 63 | /** |
@@ -73,7 +73,7 @@ discard block |
||
| 73 | 73 | if (substr($serverurl, -4) == '/api') { |
| 74 | 74 | $serverurl = rtrim($serverurl, '/api'); |
| 75 | 75 | } |
| 76 | - return $serverurl . '/api/'; |
|
| 76 | + return $serverurl.'/api/'; |
|
| 77 | 77 | } |
| 78 | 78 | |
| 79 | 79 | /** |
@@ -94,8 +94,8 @@ discard block |
||
| 94 | 94 | $pserverurl = parse_url(trim(\mod_bigbluebuttonbn\locallib\config::get('server_url'))); |
| 95 | 95 | $pserverurlport = ""; |
| 96 | 96 | if (isset($pserverurl['port'])) { |
| 97 | - $pserverurlport = ":" . $pserverurl['port']; |
|
| 97 | + $pserverurlport = ":".$pserverurl['port']; |
|
| 98 | 98 | } |
| 99 | - return $pserverurl['scheme'] . "://" . $pserverurl['host'] . $pserverurlport . "/"; |
|
| 99 | + return $pserverurl['scheme']."://".$pserverurl['host'].$pserverurlport."/"; |
|
| 100 | 100 | } |
| 101 | 101 | } |
@@ -103,7 +103,7 @@ discard block |
||
| 103 | 103 | * recordings from a different activity even from a different course. |
| 104 | 104 | **/ |
| 105 | 105 | |
| 106 | - /* |
|
| 106 | + /* |
|
| 107 | 107 | * When the value is set to 1 (checked) the bigbluebuttonbn rooms or |
| 108 | 108 | * activities will have the 'import recordings' capability enabled. |
| 109 | 109 | * $CFG->bigbluebuttonbn['importrecordings_enabled'] = 0; |
@@ -124,7 +124,7 @@ discard block |
||
| 124 | 124 | * 'Join session' button enabled |
| 125 | 125 | **/ |
| 126 | 126 | |
| 127 | - /* |
|
| 127 | + /* |
|
| 128 | 128 | * When the value is set to 1 (checked) the bigbluebuttonbn rooms or |
| 129 | 129 | * activities will have the 'wait for moderator' capability enabled by |
| 130 | 130 | * default. |
@@ -276,7 +276,7 @@ discard block |
||
| 276 | 276 | * $CFG->bigbluebuttonbn['recordings_preview_editable'] = 0; |
| 277 | 277 | */ |
| 278 | 278 | |
| 279 | - /* When the value is set to 1 (checked) the playback URLs will be validated |
|
| 279 | + /* When the value is set to 1 (checked) the playback URLs will be validated |
|
| 280 | 280 | * before the user access it. |
| 281 | 281 | * $CFG->bigbluebuttonbn['recordings_validate_url'] = 1; |
| 282 | 282 | */ |
@@ -366,27 +366,27 @@ discard block |
||
| 366 | 366 | * $CFG->bigbluebuttonbn['general_warning_message'] = "Would you like to record your BigBlueButton sessions for later viewing? "; |
| 367 | 367 | */ |
| 368 | 368 | |
| 369 | - /* |
|
| 369 | + /* |
|
| 370 | 370 | * The warning box is always shown to administrators, but it is also possible to define other roles |
| 371 | 371 | * to whom the it will be shown. The roles are based on the shortnames defined by Moodle: |
| 372 | 372 | * 'manager,coursecreator,editingteacher,teacher,student,guest,user,frontpage' |
| 373 | 373 | * $CFG->bigbluebuttonbn['general_warning_roles'] = 'editingteacher,teacher'; |
| 374 | 374 | */ |
| 375 | 375 | |
| 376 | - /* |
|
| 376 | + /* |
|
| 377 | 377 | * As the general_warning_message is shown in a box, its type can be defined with general_warning_type |
| 378 | 378 | * The default type is 'info' which is normaly rendered in blue when using a bootstrap theme. |
| 379 | 379 | * All the modifiers for boxed in bootstrap can be used [info|success|warning|danger]. |
| 380 | 380 | * $CFG->bigbluebuttonbn['general_warning_box_type'] = 'info'; |
| 381 | 381 | */ |
| 382 | 382 | |
| 383 | - /* |
|
| 383 | + /* |
|
| 384 | 384 | * Additionally, when general_warning_button_href value is different than "", a button |
| 385 | 385 | * can also be shown right after the message. |
| 386 | 386 | * $CFG->bigbluebuttonbn['general_warning_button_href'] = "http://blindsidenetworks.com/"; |
| 387 | 387 | */ |
| 388 | 388 | |
| 389 | - /* |
|
| 389 | + /* |
|
| 390 | 390 | * Finally, the text and class for the button can be modified |
| 391 | 391 | * $CFG->bigbluebuttonbn['general_warning_button_text'] = "Upgrade your site"; |
| 392 | 392 | * $CFG->bigbluebuttonbn['general_warning_button_class'] = "btn btn-primary"; |