@@ -95,9 +95,9 @@ discard block |
||
| 95 | 95 | function bigbluebuttonbn_get_join_url($meetingid, $username, $pw, $logouturl, $configtoken = null, |
| 96 | 96 | $userid = null, $clienttype = BIGBLUEBUTTON_CLIENTTYPE_FLASH) { |
| 97 | 97 | $data = ['meetingID' => $meetingid, |
| 98 | - 'fullName' => $username, |
|
| 99 | - 'password' => $pw, |
|
| 100 | - 'logoutURL' => $logouturl, |
|
| 98 | + 'fullName' => $username, |
|
| 99 | + 'password' => $pw, |
|
| 100 | + 'logoutURL' => $logouturl, |
|
| 101 | 101 | ]; |
| 102 | 102 | // Choose between Adobe Flash or HTML5 Client. |
| 103 | 103 | if ( $clienttype == BIGBLUEBUTTON_CLIENTTYPE_HTML5 ) { |
@@ -153,23 +153,23 @@ discard block |
||
| 153 | 153 | function bigbluebuttonbn_get_meeting_info_array($meetingid) { |
| 154 | 154 | $xml = bigbluebuttonbn_wrap_xml_load_file( |
| 155 | 155 | \mod_bigbluebuttonbn\locallib\bigbluebutton::action_url('getMeetingInfo', ['meetingID' => $meetingid]) |
| 156 | - ); |
|
| 156 | + ); |
|
| 157 | 157 | if ($xml && $xml->returncode == 'SUCCESS' && empty($xml->messageKey)) { |
| 158 | 158 | // Meeting info was returned. |
| 159 | 159 | return array('returncode' => $xml->returncode, |
| 160 | - 'meetingID' => $xml->meetingID, |
|
| 161 | - 'moderatorPW' => $xml->moderatorPW, |
|
| 162 | - 'attendeePW' => $xml->attendeePW, |
|
| 163 | - 'hasBeenForciblyEnded' => $xml->hasBeenForciblyEnded, |
|
| 164 | - 'running' => $xml->running, |
|
| 165 | - 'recording' => $xml->recording, |
|
| 166 | - 'startTime' => $xml->startTime, |
|
| 167 | - 'endTime' => $xml->endTime, |
|
| 168 | - 'participantCount' => $xml->participantCount, |
|
| 169 | - 'moderatorCount' => $xml->moderatorCount, |
|
| 170 | - 'attendees' => $xml->attendees, |
|
| 171 | - 'metadata' => $xml->metadata, |
|
| 172 | - ); |
|
| 160 | + 'meetingID' => $xml->meetingID, |
|
| 161 | + 'moderatorPW' => $xml->moderatorPW, |
|
| 162 | + 'attendeePW' => $xml->attendeePW, |
|
| 163 | + 'hasBeenForciblyEnded' => $xml->hasBeenForciblyEnded, |
|
| 164 | + 'running' => $xml->running, |
|
| 165 | + 'recording' => $xml->recording, |
|
| 166 | + 'startTime' => $xml->startTime, |
|
| 167 | + 'endTime' => $xml->endTime, |
|
| 168 | + 'participantCount' => $xml->participantCount, |
|
| 169 | + 'moderatorCount' => $xml->moderatorCount, |
|
| 170 | + 'attendees' => $xml->attendees, |
|
| 171 | + 'metadata' => $xml->metadata, |
|
| 172 | + ); |
|
| 173 | 173 | } |
| 174 | 174 | if ($xml) { |
| 175 | 175 | // Either failure or success without meeting info. |
@@ -305,7 +305,7 @@ discard block |
||
| 305 | 305 | function bigbluebuttonbn_get_default_config_xml() { |
| 306 | 306 | $xml = bigbluebuttonbn_wrap_xml_load_file( |
| 307 | 307 | \mod_bigbluebuttonbn\locallib\bigbluebutton::action_url('getDefaultConfigXML') |
| 308 | - ); |
|
| 308 | + ); |
|
| 309 | 309 | return $xml; |
| 310 | 310 | } |
| 311 | 311 | |
@@ -406,7 +406,7 @@ discard block |
||
| 406 | 406 | foreach ($ids as $id) { |
| 407 | 407 | $xml = bigbluebuttonbn_wrap_xml_load_file( |
| 408 | 408 | \mod_bigbluebuttonbn\locallib\bigbluebutton::action_url('deleteRecordings', ['recordID' => $id]) |
| 409 | - ); |
|
| 409 | + ); |
|
| 410 | 410 | if ($xml && $xml->returncode != 'SUCCESS') { |
| 411 | 411 | return false; |
| 412 | 412 | } |
@@ -425,7 +425,7 @@ discard block |
||
| 425 | 425 | foreach ($ids as $id) { |
| 426 | 426 | $xml = bigbluebuttonbn_wrap_xml_load_file( |
| 427 | 427 | \mod_bigbluebuttonbn\locallib\bigbluebutton::action_url('publishRecordings', ['recordID' => $id, 'publish' => $publish]) |
| 428 | - ); |
|
| 428 | + ); |
|
| 429 | 429 | if ($xml && $xml->returncode != 'SUCCESS') { |
| 430 | 430 | return false; |
| 431 | 431 | } |
@@ -444,7 +444,7 @@ discard block |
||
| 444 | 444 | foreach ($ids as $id) { |
| 445 | 445 | $xml = bigbluebuttonbn_wrap_xml_load_file( |
| 446 | 446 | \mod_bigbluebuttonbn\locallib\bigbluebutton::action_url('updateRecordings', ['recordID' => $id] + (array) $params) |
| 447 | - ); |
|
| 447 | + ); |
|
| 448 | 448 | if ($xml && $xml->returncode != 'SUCCESS') { |
| 449 | 449 | return false; |
| 450 | 450 | } |
@@ -461,7 +461,7 @@ discard block |
||
| 461 | 461 | function bigbluebuttonbn_end_meeting($meetingid, $modpw) { |
| 462 | 462 | $xml = bigbluebuttonbn_wrap_xml_load_file( |
| 463 | 463 | \mod_bigbluebuttonbn\locallib\bigbluebutton::action_url('end', ['meetingID' => $meetingid, 'password' => $modpw]) |
| 464 | - ); |
|
| 464 | + ); |
|
| 465 | 465 | if ($xml) { |
| 466 | 466 | // If the xml packet returned failure it displays the message to the user. |
| 467 | 467 | return array('returncode' => $xml->returncode, 'message' => $xml->message, 'messageKey' => $xml->messageKey); |
@@ -478,7 +478,7 @@ discard block |
||
| 478 | 478 | function bigbluebuttonbn_get_server_version() { |
| 479 | 479 | $xml = bigbluebuttonbn_wrap_xml_load_file( |
| 480 | 480 | \mod_bigbluebuttonbn\locallib\bigbluebutton::action_url() |
| 481 | - ); |
|
| 481 | + ); |
|
| 482 | 482 | if ($xml && $xml->returncode == 'SUCCESS') { |
| 483 | 483 | return $xml->version; |
| 484 | 484 | } |
@@ -545,10 +545,10 @@ discard block |
||
| 545 | 545 | } |
| 546 | 546 | $options = array(); |
| 547 | 547 | $options['CURLOPT_HTTPHEADER'] = array( |
| 548 | - 'Content-Type: '.$contenttype, |
|
| 549 | - 'Content-Length: '.strlen($data), |
|
| 550 | - 'Content-Language: en-US', |
|
| 551 | - ); |
|
| 548 | + 'Content-Type: '.$contenttype, |
|
| 549 | + 'Content-Length: '.strlen($data), |
|
| 550 | + 'Content-Language: en-US', |
|
| 551 | + ); |
|
| 552 | 552 | |
| 553 | 553 | return $c->post($url, $data, $options); |
| 554 | 554 | } |
@@ -695,16 +695,16 @@ discard block |
||
| 695 | 695 | 'all' => array( |
| 696 | 696 | 'name' => get_string('mod_form_field_participant_list_type_all', 'bigbluebuttonbn'), |
| 697 | 697 | 'children' => [] |
| 698 | - ) |
|
| 699 | - ); |
|
| 698 | + ) |
|
| 699 | + ); |
|
| 700 | 700 | $data['role'] = array( |
| 701 | 701 | 'name' => get_string('mod_form_field_participant_list_type_role', 'bigbluebuttonbn'), |
| 702 | 702 | 'children' => bigbluebuttonbn_get_roles_select($context) |
| 703 | - ); |
|
| 703 | + ); |
|
| 704 | 704 | $data['user'] = array( |
| 705 | 705 | 'name' => get_string('mod_form_field_participant_list_type_user', 'bigbluebuttonbn'), |
| 706 | 706 | 'children' => bigbluebuttonbn_get_users_select($context) |
| 707 | - ); |
|
| 707 | + ); |
|
| 708 | 708 | return $data; |
| 709 | 709 | } |
| 710 | 710 | |
@@ -747,7 +747,7 @@ discard block |
||
| 747 | 747 | 'selectiontype' => 'all', |
| 748 | 748 | 'selectionid' => 'all', |
| 749 | 749 | 'role' => BIGBLUEBUTTONBN_ROLE_VIEWER |
| 750 | - ); |
|
| 750 | + ); |
|
| 751 | 751 | $defaultrules = explode(',', \mod_bigbluebuttonbn\locallib\config::get('participant_moderator_default')); |
| 752 | 752 | foreach ($defaultrules as $defaultrule) { |
| 753 | 753 | if ($defaultrule == '0') { |
@@ -760,9 +760,9 @@ discard block |
||
| 760 | 760 | continue; |
| 761 | 761 | } |
| 762 | 762 | $participantlist[] = array( |
| 763 | - 'selectiontype' => 'role', |
|
| 764 | - 'selectionid' => $defaultrule, |
|
| 765 | - 'role' => BIGBLUEBUTTONBN_ROLE_MODERATOR); |
|
| 763 | + 'selectiontype' => 'role', |
|
| 764 | + 'selectionid' => $defaultrule, |
|
| 765 | + 'role' => BIGBLUEBUTTONBN_ROLE_MODERATOR); |
|
| 766 | 766 | } |
| 767 | 767 | return $participantlist; |
| 768 | 768 | } |
@@ -801,11 +801,11 @@ discard block |
||
| 801 | 801 | 'all' => get_string('mod_form_field_participant_list_type_all', 'bigbluebuttonbn'), |
| 802 | 802 | 'role' => get_string('mod_form_field_participant_list_type_role', 'bigbluebuttonbn'), |
| 803 | 803 | 'user' => get_string('mod_form_field_participant_list_type_user', 'bigbluebuttonbn'), |
| 804 | - ], |
|
| 804 | + ], |
|
| 805 | 805 | 'type_selected' => 'all', |
| 806 | 806 | 'options' => ['all' => '---------------'], |
| 807 | 807 | 'selected' => 'all', |
| 808 | - ]; |
|
| 808 | + ]; |
|
| 809 | 809 | } |
| 810 | 810 | |
| 811 | 811 | /** |
@@ -1080,7 +1080,7 @@ discard block |
||
| 1080 | 1080 | // Ping again and refresh the cache. |
| 1081 | 1081 | $meetinginfo = (array) bigbluebuttonbn_wrap_xml_load_file( |
| 1082 | 1082 | \mod_bigbluebuttonbn\locallib\bigbluebutton::action_url('getMeetingInfo', ['meetingID' => $meetingid]) |
| 1083 | - ); |
|
| 1083 | + ); |
|
| 1084 | 1084 | $cache->set($meetingid, array('creation_time' => time(), 'meeting_info' => json_encode($meetinginfo))); |
| 1085 | 1085 | return $meetinginfo; |
| 1086 | 1086 | } |
@@ -1492,8 +1492,8 @@ discard block |
||
| 1492 | 1492 | } |
| 1493 | 1493 | $id = 'playbacks-'.$recording['recordID']; |
| 1494 | 1494 | $recordingtypes = html_writer::start_tag('div', array('id' => $id, 'data-imported' => $dataimported, |
| 1495 | - 'data-meetingid' => $recording['meetingID'], 'data-recordingid' => $recording['recordID'], |
|
| 1496 | - 'title' => $title, $visibility => $visibility)); |
|
| 1495 | + 'data-meetingid' => $recording['meetingID'], 'data-recordingid' => $recording['recordID'], |
|
| 1496 | + 'title' => $title, $visibility => $visibility)); |
|
| 1497 | 1497 | foreach ($recording['playbacks'] as $playback) { |
| 1498 | 1498 | $recordingtypes .= bigbluebuttonbn_get_recording_data_row_type($recording, $bbbsession, $playback); |
| 1499 | 1499 | } |
@@ -1517,7 +1517,7 @@ discard block |
||
| 1517 | 1517 | } |
| 1518 | 1518 | $text = get_string('view_recording_format_'.$playback['type'], 'bigbluebuttonbn'); |
| 1519 | 1519 | $href = $CFG->wwwroot . '/mod/bigbluebuttonbn/bbb_view.php?action=play&bn=' . $bbbsession['bigbluebuttonbn']->id . |
| 1520 | - '&mid='.$recording['meetingID'] . '&rid=' . $recording['recordID'] . '&rtype=' . $playback['type']; |
|
| 1520 | + '&mid='.$recording['meetingID'] . '&rid=' . $recording['recordID'] . '&rtype=' . $playback['type']; |
|
| 1521 | 1521 | if (!isset($recording['imported']) || !isset($recording['protected']) || $recording['protected'] === 'false') { |
| 1522 | 1522 | $href .= '&href='.urlencode(trim($playback['url'])); |
| 1523 | 1523 | } |
@@ -1528,7 +1528,7 @@ discard block |
||
| 1528 | 1528 | 'data-action' => 'play', |
| 1529 | 1529 | 'data-target' => $playback['type'], |
| 1530 | 1530 | 'data-href' => $href, |
| 1531 | - ); |
|
| 1531 | + ); |
|
| 1532 | 1532 | if (!bigbluebuttonbn_is_bn_server() && !bigbluebuttonbn_is_valid_resource(trim($playback['url']))) { |
| 1533 | 1533 | $linkattributes['class'] = 'btn btn-sm btn-warning'; |
| 1534 | 1534 | $linkattributes['title'] = get_string('view_recording_format_errror_unreachable', 'bigbluebuttonbn'); |
@@ -1678,10 +1678,10 @@ discard block |
||
| 1678 | 1678 | 'id' => $id, |
| 1679 | 1679 | 'onclick' => $onclick, |
| 1680 | 1680 | 'data-action' => $data['action'] |
| 1681 | - ); |
|
| 1681 | + ); |
|
| 1682 | 1682 | if (!isset($recording['imported'])) { |
| 1683 | 1683 | $linkattributes['data-links'] = bigbluebuttonbn_count_recording_imported_instances( |
| 1684 | - $recording['recordID']); |
|
| 1684 | + $recording['recordID']); |
|
| 1685 | 1685 | } |
| 1686 | 1686 | if (isset($data['disabled'])) { |
| 1687 | 1687 | $iconattributes['class'] .= ' fa-' . $data['disabled']; |
@@ -2167,17 +2167,17 @@ discard block |
||
| 2167 | 2167 | function bigbluebuttonbn_get_instance_type_profiles() { |
| 2168 | 2168 | $instanceprofiles = array( |
| 2169 | 2169 | BIGBLUEBUTTONBN_TYPE_ALL => array('id' => BIGBLUEBUTTONBN_TYPE_ALL, |
| 2170 | - 'name' => get_string('instance_type_default', 'bigbluebuttonbn'), |
|
| 2171 | - 'features' => array('all')), |
|
| 2170 | + 'name' => get_string('instance_type_default', 'bigbluebuttonbn'), |
|
| 2171 | + 'features' => array('all')), |
|
| 2172 | 2172 | BIGBLUEBUTTONBN_TYPE_ROOM_ONLY => array('id' => BIGBLUEBUTTONBN_TYPE_ROOM_ONLY, |
| 2173 | - 'name' => get_string('instance_type_room_only', 'bigbluebuttonbn'), |
|
| 2174 | - 'features' => array('showroom', 'welcomemessage', 'voicebridge', 'waitformoderator', 'userlimit', |
|
| 2175 | - 'recording', 'sendnotifications', 'preuploadpresentation', 'permissions', 'schedule', 'groups', |
|
| 2176 | - 'modstandardelshdr', 'availabilityconditionsheader', 'tagshdr', 'competenciessection', |
|
| 2177 | - 'clienttype')), |
|
| 2173 | + 'name' => get_string('instance_type_room_only', 'bigbluebuttonbn'), |
|
| 2174 | + 'features' => array('showroom', 'welcomemessage', 'voicebridge', 'waitformoderator', 'userlimit', |
|
| 2175 | + 'recording', 'sendnotifications', 'preuploadpresentation', 'permissions', 'schedule', 'groups', |
|
| 2176 | + 'modstandardelshdr', 'availabilityconditionsheader', 'tagshdr', 'competenciessection', |
|
| 2177 | + 'clienttype')), |
|
| 2178 | 2178 | BIGBLUEBUTTONBN_TYPE_RECORDING_ONLY => array('id' => BIGBLUEBUTTONBN_TYPE_RECORDING_ONLY, |
| 2179 | - 'name' => get_string('instance_type_recording_only', 'bigbluebuttonbn'), |
|
| 2180 | - 'features' => array('showrecordings', 'importrecordings')) |
|
| 2179 | + 'name' => get_string('instance_type_recording_only', 'bigbluebuttonbn'), |
|
| 2180 | + 'features' => array('showrecordings', 'importrecordings')) |
|
| 2181 | 2181 | ); |
| 2182 | 2182 | return $instanceprofiles; |
| 2183 | 2183 | } |
@@ -2244,8 +2244,8 @@ discard block |
||
| 2244 | 2244 | $activitytime = ''; |
| 2245 | 2245 | if ($time) { |
| 2246 | 2246 | $activitytime = calendar_day_representation($time).' '. |
| 2247 | - get_string('mod_form_field_notification_msg_at', 'bigbluebuttonbn').' '. |
|
| 2248 | - calendar_time_representation($time); |
|
| 2247 | + get_string('mod_form_field_notification_msg_at', 'bigbluebuttonbn').' '. |
|
| 2248 | + calendar_time_representation($time); |
|
| 2249 | 2249 | } |
| 2250 | 2250 | return $activitytime; |
| 2251 | 2251 | } |
@@ -2545,7 +2545,7 @@ discard block |
||
| 2545 | 2545 | $renderer->render_group_element('participant_moderator_default', |
| 2546 | 2546 | $renderer->render_group_element_configmultiselect('participant_moderator_default', |
| 2547 | 2547 | array_keys($owner), array_merge($owner, $roles)) |
| 2548 | - ); |
|
| 2548 | + ); |
|
| 2549 | 2549 | } |
| 2550 | 2550 | } |
| 2551 | 2551 | |
@@ -2581,7 +2581,7 @@ discard block |
||
| 2581 | 2581 | // Web Client default. |
| 2582 | 2582 | $default = intval((int)\mod_bigbluebuttonbn\locallib\config::get('clienttype_default')); |
| 2583 | 2583 | $choices = array(BIGBLUEBUTTON_CLIENTTYPE_FLASH => get_string('mod_form_block_clienttype_flash', 'bigbluebuttonbn'), |
| 2584 | - BIGBLUEBUTTON_CLIENTTYPE_HTML5 => get_string('mod_form_block_clienttype_html5', 'bigbluebuttonbn')); |
|
| 2584 | + BIGBLUEBUTTON_CLIENTTYPE_HTML5 => get_string('mod_form_block_clienttype_html5', 'bigbluebuttonbn')); |
|
| 2585 | 2585 | $renderer->render_group_element('clienttype_default', |
| 2586 | 2586 | $renderer->render_group_element_configselect('clienttype_default', |
| 2587 | 2587 | $default, $choices)); |
@@ -2674,7 +2674,7 @@ discard block |
||
| 2674 | 2674 | return $output; |
| 2675 | 2675 | } |
| 2676 | 2676 | $output .= $OUTPUT->box_start('box boxalignleft adminerror alert alert-' . $type . ' alert-block fade in', |
| 2677 | - 'bigbluebuttonbn_view_general_warning') . "\n"; |
|
| 2677 | + 'bigbluebuttonbn_view_general_warning') . "\n"; |
|
| 2678 | 2678 | $output .= ' ' . $message . "\n"; |
| 2679 | 2679 | $output .= ' <div class="singlebutton pull-right">' . "\n"; |
| 2680 | 2680 | if (!empty($href)) { |
@@ -30,7 +30,7 @@ discard block |
||
| 30 | 30 | |
| 31 | 31 | global $CFG; |
| 32 | 32 | |
| 33 | -require_once(__DIR__.'/lib.php'); |
|
| 33 | +require_once(__DIR__ . '/lib.php'); |
|
| 34 | 34 | |
| 35 | 35 | /** @var BIGBLUEBUTTONBN_UPDATE_CACHE boolean set to true indicates that cache has to be updated */ |
| 36 | 36 | const BIGBLUEBUTTONBN_UPDATE_CACHE = true; |
@@ -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)) { |
@@ -136,8 +136,8 @@ discard block |
||
| 136 | 136 | $data = null; |
| 137 | 137 | if (!is_null($pname) && !is_null($purl)) { |
| 138 | 138 | $method = 'POST'; |
| 139 | - $data = "<?xml version='1.0' encoding='UTF-8'?><modules><module name='presentation'><document url='". |
|
| 140 | - $purl."' /></module></modules>"; |
|
| 139 | + $data = "<?xml version='1.0' encoding='UTF-8'?><modules><module name='presentation'><document url='" . |
|
| 140 | + $purl . "' /></module></modules>"; |
|
| 141 | 141 | } |
| 142 | 142 | $xml = bigbluebuttonbn_wrap_xml_load_file($createmeetingurl, $method, $data); |
| 143 | 143 | if ($xml) { |
@@ -259,7 +259,7 @@ discard block |
||
| 259 | 259 | if (isset($recordingxml->breakoutRooms->breakoutRoom)) { |
| 260 | 260 | foreach ($recordingxml->breakoutRooms->breakoutRoom as $breakoutroom) { |
| 261 | 261 | $url = \mod_bigbluebuttonbn\locallib\bigbluebutton::action_url('getRecordings', |
| 262 | - ['recordID' => implode(',', (array) $breakoutroom)]); |
|
| 262 | + ['recordID' => implode(',', (array)$breakoutroom)]); |
|
| 263 | 263 | $xml = bigbluebuttonbn_wrap_xml_load_file($url); |
| 264 | 264 | if ($xml && $xml->returncode == 'SUCCESS' && isset($xml->recordings)) { |
| 265 | 265 | // If there were meetings already created. |
@@ -314,7 +314,7 @@ discard block |
||
| 314 | 314 | // Override imported flag with actual ID. |
| 315 | 315 | $recording['imported'] = $recordimported->id; |
| 316 | 316 | if (isset($recordimported->protected)) { |
| 317 | - $recording['protected'] = (string) $recordimported->protected; |
|
| 317 | + $recording['protected'] = (string)$recordimported->protected; |
|
| 318 | 318 | } |
| 319 | 319 | $recordsimportedarray[$recording['recordID']] = $recording; |
| 320 | 320 | } |
@@ -344,21 +344,21 @@ discard block |
||
| 344 | 344 | // Add formats. |
| 345 | 345 | $playbackarray = array(); |
| 346 | 346 | foreach ($recording->playback->format as $format) { |
| 347 | - $playbackarray[(string) $format->type] = array('type' => (string) $format->type, |
|
| 348 | - 'url' => trim((string) $format->url), 'length' => (string) $format->length); |
|
| 347 | + $playbackarray[(string)$format->type] = array('type' => (string)$format->type, |
|
| 348 | + 'url' => trim((string)$format->url), 'length' => (string)$format->length); |
|
| 349 | 349 | // Add preview per format when existing. |
| 350 | 350 | if ($format->preview) { |
| 351 | - $playbackarray[(string) $format->type]['preview'] = bigbluebuttonbn_get_recording_preview_images($format->preview); |
|
| 351 | + $playbackarray[(string)$format->type]['preview'] = bigbluebuttonbn_get_recording_preview_images($format->preview); |
|
| 352 | 352 | } |
| 353 | 353 | } |
| 354 | 354 | // Add the metadata to the recordings array. |
| 355 | 355 | $metadataarray = bigbluebuttonbn_get_recording_array_meta(get_object_vars($recording->metadata)); |
| 356 | - $recordingarray = array('recordID' => (string) $recording->recordID, |
|
| 357 | - 'meetingID' => (string) $recording->meetingID, 'meetingName' => (string) $recording->name, |
|
| 358 | - 'published' => (string) $recording->published, 'startTime' => (string) $recording->startTime, |
|
| 359 | - 'endTime' => (string) $recording->endTime, 'playbacks' => $playbackarray); |
|
| 356 | + $recordingarray = array('recordID' => (string)$recording->recordID, |
|
| 357 | + 'meetingID' => (string)$recording->meetingID, 'meetingName' => (string)$recording->name, |
|
| 358 | + 'published' => (string)$recording->published, 'startTime' => (string)$recording->startTime, |
|
| 359 | + 'endTime' => (string)$recording->endTime, 'playbacks' => $playbackarray); |
|
| 360 | 360 | if (isset($recording->protected)) { |
| 361 | - $recordingarray['protected'] = (string) $recording->protected; |
|
| 361 | + $recordingarray['protected'] = (string)$recording->protected; |
|
| 362 | 362 | } |
| 363 | 363 | return $recordingarray + $metadataarray; |
| 364 | 364 | } |
@@ -373,9 +373,9 @@ discard block |
||
| 373 | 373 | function bigbluebuttonbn_get_recording_preview_images($preview) { |
| 374 | 374 | $imagesarray = array(); |
| 375 | 375 | foreach ($preview->images->image as $image) { |
| 376 | - $imagearray = array('url' => trim((string) $image)); |
|
| 376 | + $imagearray = array('url' => trim((string)$image)); |
|
| 377 | 377 | foreach ($image->attributes() as $attkey => $attvalue) { |
| 378 | - $imagearray[$attkey] = (string) $attvalue; |
|
| 378 | + $imagearray[$attkey] = (string)$attvalue; |
|
| 379 | 379 | } |
| 380 | 380 | array_push($imagesarray, $imagearray); |
| 381 | 381 | } |
@@ -395,7 +395,7 @@ discard block |
||
| 395 | 395 | if (is_object($value)) { |
| 396 | 396 | $value = ''; |
| 397 | 397 | } |
| 398 | - $metadataarray['meta_'.$key] = $value; |
|
| 398 | + $metadataarray['meta_' . $key] = $value; |
|
| 399 | 399 | } |
| 400 | 400 | return $metadataarray; |
| 401 | 401 | } |
@@ -470,7 +470,7 @@ discard block |
||
| 470 | 470 | $ids = explode(',', $recordids); |
| 471 | 471 | foreach ($ids as $id) { |
| 472 | 472 | $xml = bigbluebuttonbn_wrap_xml_load_file( |
| 473 | - \mod_bigbluebuttonbn\locallib\bigbluebutton::action_url('updateRecordings', ['recordID' => $id] + (array) $params) |
|
| 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; |
@@ -535,7 +535,7 @@ discard block |
||
| 535 | 535 | return $xml; |
| 536 | 536 | } catch (Exception $e) { |
| 537 | 537 | libxml_use_internal_errors($previous); |
| 538 | - $error = 'Caught exception: '.$e->getMessage(); |
|
| 538 | + $error = 'Caught exception: ' . $e->getMessage(); |
|
| 539 | 539 | debugging($error, DEBUG_DEVELOPER); |
| 540 | 540 | return null; |
| 541 | 541 | } |
@@ -546,7 +546,7 @@ discard block |
||
| 546 | 546 | $response = simplexml_load_file($url, 'SimpleXMLElement', LIBXML_NOCDATA | LIBXML_NOBLANKS); |
| 547 | 547 | return $response; |
| 548 | 548 | } catch (Exception $e) { |
| 549 | - $error = 'Caught exception: '.$e->getMessage(); |
|
| 549 | + $error = 'Caught exception: ' . $e->getMessage(); |
|
| 550 | 550 | debugging($error, DEBUG_DEVELOPER); |
| 551 | 551 | libxml_use_internal_errors($previous); |
| 552 | 552 | return null; |
@@ -572,8 +572,8 @@ discard block |
||
| 572 | 572 | } |
| 573 | 573 | $options = array(); |
| 574 | 574 | $options['CURLOPT_HTTPHEADER'] = array( |
| 575 | - 'Content-Type: '.$contenttype, |
|
| 576 | - 'Content-Length: '.strlen($data), |
|
| 575 | + 'Content-Type: ' . $contenttype, |
|
| 576 | + 'Content-Length: ' . strlen($data), |
|
| 577 | 577 | 'Content-Language: en-US', |
| 578 | 578 | ); |
| 579 | 579 | |
@@ -594,7 +594,7 @@ discard block |
||
| 594 | 594 | * @return void |
| 595 | 595 | */ |
| 596 | 596 | function bigbluebuttonbn_end_meeting_if_running($bigbluebuttonbn) { |
| 597 | - $meetingid = $bigbluebuttonbn->meetingid.'-'.$bigbluebuttonbn->course.'-'.$bigbluebuttonbn->id; |
|
| 597 | + $meetingid = $bigbluebuttonbn->meetingid . '-' . $bigbluebuttonbn->course . '-' . $bigbluebuttonbn->id; |
|
| 598 | 598 | if (bigbluebuttonbn_is_meeting_running($meetingid)) { |
| 599 | 599 | bigbluebuttonbn_end_meeting($meetingid, $bigbluebuttonbn->moderatorpass); |
| 600 | 600 | } |
@@ -614,9 +614,9 @@ discard block |
||
| 614 | 614 | if ($userroles) { |
| 615 | 615 | $where = ''; |
| 616 | 616 | foreach ($userroles as $userrole) { |
| 617 | - $where .= (empty($where) ? ' WHERE' : ' OR').' id=' . $userrole->roleid; |
|
| 617 | + $where .= (empty($where) ? ' WHERE' : ' OR') . ' id=' . $userrole->roleid; |
|
| 618 | 618 | } |
| 619 | - $userroles = $DB->get_records_sql('SELECT * FROM {role}'.$where); |
|
| 619 | + $userroles = $DB->get_records_sql('SELECT * FROM {role}' . $where); |
|
| 620 | 620 | } |
| 621 | 621 | return $userroles; |
| 622 | 622 | } |
@@ -639,7 +639,7 @@ discard block |
||
| 639 | 639 | * @return array $users |
| 640 | 640 | */ |
| 641 | 641 | function bigbluebuttonbn_get_users(context $context = null) { |
| 642 | - $users = (array) get_enrolled_users($context, '', 0, 'u.*', null, 0, 0, true); |
|
| 642 | + $users = (array)get_enrolled_users($context, '', 0, 'u.*', null, 0, 0, true); |
|
| 643 | 643 | foreach ($users as $key => $value) { |
| 644 | 644 | $users[$key] = fullname($value); |
| 645 | 645 | } |
@@ -654,7 +654,7 @@ discard block |
||
| 654 | 654 | * @return array $users |
| 655 | 655 | */ |
| 656 | 656 | function bigbluebuttonbn_get_users_select(context $context = null) { |
| 657 | - $users = (array) get_enrolled_users($context, '', 0, 'u.*', null, 0, 0, true); |
|
| 657 | + $users = (array)get_enrolled_users($context, '', 0, 'u.*', null, 0, 0, true); |
|
| 658 | 658 | foreach ($users as $key => $value) { |
| 659 | 659 | $users[$key] = array('id' => $value->id, 'name' => fullname($value)); |
| 660 | 660 | } |
@@ -669,7 +669,7 @@ discard block |
||
| 669 | 669 | * @return array $roles |
| 670 | 670 | */ |
| 671 | 671 | function bigbluebuttonbn_get_roles(context $context = null) { |
| 672 | - $roles = (array) role_get_names($context); |
|
| 672 | + $roles = (array)role_get_names($context); |
|
| 673 | 673 | foreach ($roles as $key => $value) { |
| 674 | 674 | $roles[$key] = $value->localname; |
| 675 | 675 | } |
@@ -684,7 +684,7 @@ discard block |
||
| 684 | 684 | * @return array $users |
| 685 | 685 | */ |
| 686 | 686 | function bigbluebuttonbn_get_roles_select(context $context = null) { |
| 687 | - $roles = (array) role_get_names($context); |
|
| 687 | + $roles = (array)role_get_names($context); |
|
| 688 | 688 | foreach ($roles as $key => $value) { |
| 689 | 689 | $roles[$key] = array('id' => $value->id, 'name' => $value->localname); |
| 690 | 690 | } |
@@ -699,7 +699,7 @@ discard block |
||
| 699 | 699 | * @return object $role |
| 700 | 700 | */ |
| 701 | 701 | function bigbluebuttonbn_get_role($id) { |
| 702 | - $roles = (array) role_get_names(); |
|
| 702 | + $roles = (array)role_get_names(); |
|
| 703 | 703 | if (is_numeric($id) && isset($roles[$id])) { |
| 704 | 704 | return (object)$roles[$id]; |
| 705 | 705 | } |
@@ -856,7 +856,7 @@ discard block |
||
| 856 | 856 | if (!isguestuser()) { |
| 857 | 857 | $userroles = bigbluebuttonbn_get_user_roles($context, $userid); |
| 858 | 858 | } |
| 859 | - return bigbluebuttonbn_is_moderator_validator($participantlist, $userid , $userroles); |
|
| 859 | + return bigbluebuttonbn_is_moderator_validator($participantlist, $userid, $userroles); |
|
| 860 | 860 | } |
| 861 | 861 | |
| 862 | 862 | /** |
@@ -1056,7 +1056,7 @@ discard block |
||
| 1056 | 1056 | function bigbluebuttonbn_generate_nonce() { |
| 1057 | 1057 | $mt = microtime(); |
| 1058 | 1058 | $rand = mt_rand(); |
| 1059 | - return md5($mt.$rand); |
|
| 1059 | + return md5($mt . $rand); |
|
| 1060 | 1060 | } |
| 1061 | 1061 | |
| 1062 | 1062 | /** |
@@ -1146,10 +1146,10 @@ discard block |
||
| 1146 | 1146 | $now = time(); |
| 1147 | 1147 | if (!$updatecache && isset($result) && $now < ($result['creation_time'] + $cachettl)) { |
| 1148 | 1148 | // Use the value in the cache. |
| 1149 | - return (array) json_decode($result['meeting_info']); |
|
| 1149 | + return (array)json_decode($result['meeting_info']); |
|
| 1150 | 1150 | } |
| 1151 | 1151 | // Ping again and refresh the cache. |
| 1152 | - $meetinginfo = (array) bigbluebuttonbn_wrap_xml_load_file( |
|
| 1152 | + $meetinginfo = (array)bigbluebuttonbn_wrap_xml_load_file( |
|
| 1153 | 1153 | \mod_bigbluebuttonbn\locallib\bigbluebutton::action_url('getMeetingInfo', ['meetingID' => $meetingid]) |
| 1154 | 1154 | ); |
| 1155 | 1155 | $cache->set($meetingid, array('creation_time' => time(), 'meeting_info' => json_encode($meetinginfo))); |
@@ -1260,7 +1260,7 @@ discard block |
||
| 1260 | 1260 | * @return object |
| 1261 | 1261 | */ |
| 1262 | 1262 | function bigbluebuttonbn_set_config_xml($meetingid, $configxml) { |
| 1263 | - $urldefaultconfig = \mod_bigbluebuttonbn\locallib\config::get('server_url').'api/setConfigXML?'; |
|
| 1263 | + $urldefaultconfig = \mod_bigbluebuttonbn\locallib\config::get('server_url') . 'api/setConfigXML?'; |
|
| 1264 | 1264 | $configxmlparams = bigbluebuttonbn_set_config_xml_params($meetingid, $configxml); |
| 1265 | 1265 | $xml = bigbluebuttonbn_wrap_xml_load_file($urldefaultconfig, 'POST', |
| 1266 | 1266 | $configxmlparams, 'application/x-www-form-urlencoded'); |
@@ -1276,8 +1276,8 @@ discard block |
||
| 1276 | 1276 | * @return string |
| 1277 | 1277 | */ |
| 1278 | 1278 | function bigbluebuttonbn_set_config_xml_params($meetingid, $configxml) { |
| 1279 | - $params = 'configXML='.urlencode($configxml).'&meetingID='.urlencode($meetingid); |
|
| 1280 | - $configxmlparams = $params.'&checksum='.sha1('setConfigXML'.$params.\mod_bigbluebuttonbn\locallib\config::get('shared_secret')); |
|
| 1279 | + $params = 'configXML=' . urlencode($configxml) . '&meetingID=' . urlencode($meetingid); |
|
| 1280 | + $configxmlparams = $params . '&checksum=' . sha1('setConfigXML' . $params . \mod_bigbluebuttonbn\locallib\config::get('shared_secret')); |
|
| 1281 | 1281 | return $configxmlparams; |
| 1282 | 1282 | } |
| 1283 | 1283 | |
@@ -1291,7 +1291,7 @@ discard block |
||
| 1291 | 1291 | */ |
| 1292 | 1292 | function bigbluebuttonbn_set_config_xml_array($meetingid, $configxml) { |
| 1293 | 1293 | $configxml = bigbluebuttonbn_setConfigXML($meetingid, $configxml); |
| 1294 | - $configxmlarray = (array) $configxml; |
|
| 1294 | + $configxmlarray = (array)$configxml; |
|
| 1295 | 1295 | if ($configxmlarray['returncode'] != 'SUCCESS') { |
| 1296 | 1296 | debugging('BigBlueButton was not able to set the custom config.xml file', DEBUG_DEVELOPER); |
| 1297 | 1297 | return ''; |
@@ -1385,7 +1385,7 @@ discard block |
||
| 1385 | 1385 | global $USER; |
| 1386 | 1386 | $starttime = $starttime - ($starttime % 1000); |
| 1387 | 1387 | // Set formatted date. |
| 1388 | - $dateformat = get_string('strftimerecentfull', 'langconfig').' %Z'; |
|
| 1388 | + $dateformat = get_string('strftimerecentfull', 'langconfig') . ' %Z'; |
|
| 1389 | 1389 | return userdate($starttime / 1000, $dateformat, usertimezone($USER->timezone)); |
| 1390 | 1390 | } |
| 1391 | 1391 | |
@@ -1501,7 +1501,7 @@ discard block |
||
| 1501 | 1501 | * @return string |
| 1502 | 1502 | */ |
| 1503 | 1503 | function bigbluebuttonbn_get_recording_data_row_preview($recording) { |
| 1504 | - $options = array('id' => 'preview-'.$recording['recordID']); |
|
| 1504 | + $options = array('id' => 'preview-' . $recording['recordID']); |
|
| 1505 | 1505 | if ($recording['published'] === 'false') { |
| 1506 | 1506 | $options['hidden'] = 'hidden'; |
| 1507 | 1507 | } |
@@ -1563,7 +1563,7 @@ discard block |
||
| 1563 | 1563 | if ($recording['published'] === 'false') { |
| 1564 | 1564 | $visibility = 'hidden '; |
| 1565 | 1565 | } |
| 1566 | - $id = 'playbacks-'.$recording['recordID']; |
|
| 1566 | + $id = 'playbacks-' . $recording['recordID']; |
|
| 1567 | 1567 | $recordingtypes = html_writer::start_tag('div', array('id' => $id, 'data-imported' => $dataimported, |
| 1568 | 1568 | 'data-meetingid' => $recording['meetingID'], 'data-recordingid' => $recording['recordID'], |
| 1569 | 1569 | 'title' => $title, $visibility => $visibility)); |
@@ -1588,11 +1588,11 @@ discard block |
||
| 1588 | 1588 | if (!bigbluebuttonbn_include_recording_data_row_type($recording, $bbbsession, $playback)) { |
| 1589 | 1589 | return ''; |
| 1590 | 1590 | } |
| 1591 | - $text = get_string('view_recording_format_'.$playback['type'], 'bigbluebuttonbn'); |
|
| 1591 | + $text = get_string('view_recording_format_' . $playback['type'], 'bigbluebuttonbn'); |
|
| 1592 | 1592 | $href = $CFG->wwwroot . '/mod/bigbluebuttonbn/bbb_view.php?action=play&bn=' . $bbbsession['bigbluebuttonbn']->id . |
| 1593 | - '&mid='.$recording['meetingID'] . '&rid=' . $recording['recordID'] . '&rtype=' . $playback['type']; |
|
| 1593 | + '&mid=' . $recording['meetingID'] . '&rid=' . $recording['recordID'] . '&rtype=' . $playback['type']; |
|
| 1594 | 1594 | if (!isset($recording['imported']) || !isset($recording['protected']) || $recording['protected'] === 'false') { |
| 1595 | - $href .= '&href='.urlencode(trim($playback['url'])); |
|
| 1595 | + $href .= '&href=' . urlencode(trim($playback['url'])); |
|
| 1596 | 1596 | } |
| 1597 | 1597 | $linkattributes = array( |
| 1598 | 1598 | 'id' => 'recording-play-' . $playback['type'] . '-' . $recording['recordID'], |
@@ -1776,7 +1776,7 @@ discard block |
||
| 1776 | 1776 | $linkattributes['class'] = 'disabled'; |
| 1777 | 1777 | unset($linkattributes['onclick']); |
| 1778 | 1778 | } |
| 1779 | - $icon = new pix_icon('i/'.$data['tag'], |
|
| 1779 | + $icon = new pix_icon('i/' . $data['tag'], |
|
| 1780 | 1780 | get_string('view_recording_list_actionbar_' . $data['action'], 'bigbluebuttonbn'), |
| 1781 | 1781 | 'moodle', $iconattributes); |
| 1782 | 1782 | return $OUTPUT->action_icon('#', $icon, null, $linkattributes, false); |
@@ -1938,7 +1938,7 @@ discard block |
||
| 1938 | 1938 | */ |
| 1939 | 1939 | function bigbluebuttonbn_get_recording_table_row($bbbsession, $recording, $rowdata) { |
| 1940 | 1940 | $row = new html_table_row(); |
| 1941 | - $row->id = 'recording-tr-'.$recording['recordID']; |
|
| 1941 | + $row->id = 'recording-tr-' . $recording['recordID']; |
|
| 1942 | 1942 | $row->attributes['data-imported'] = 'false'; |
| 1943 | 1943 | $texthead = ''; |
| 1944 | 1944 | $texttail = ''; |
@@ -1951,7 +1951,7 @@ discard block |
||
| 1951 | 1951 | $rowdata->date_formatted = str_replace(' ', ' ', $rowdata->date_formatted); |
| 1952 | 1952 | $row->cells = array(); |
| 1953 | 1953 | $row->cells[] = $texthead . $rowdata->recording . $texttail; |
| 1954 | - $row->cells[] = $texthead . $rowdata->meeting . $texttail;; |
|
| 1954 | + $row->cells[] = $texthead . $rowdata->meeting . $texttail; ; |
|
| 1955 | 1955 | $row->cells[] = $texthead . $rowdata->activity . $texttail; |
| 1956 | 1956 | $row->cells[] = $texthead . $rowdata->description . $texttail; |
| 1957 | 1957 | if (bigbluebuttonbn_get_recording_data_preview_enabled($bbbsession)) { |
@@ -1999,9 +1999,9 @@ discard block |
||
| 1999 | 1999 | function bigbluebuttonbn_send_notification_recording_ready($bigbluebuttonbn) { |
| 2000 | 2000 | $sender = get_admin(); |
| 2001 | 2001 | // Prepare message. |
| 2002 | - $messagetext = '<p>'.get_string('email_body_recording_ready_for', 'bigbluebuttonbn'). |
|
| 2003 | - ' "' . $bigbluebuttonbn->name . '" '. |
|
| 2004 | - get_string('email_body_recording_ready_is_ready', 'bigbluebuttonbn').'.</p>'; |
|
| 2002 | + $messagetext = '<p>' . get_string('email_body_recording_ready_for', 'bigbluebuttonbn') . |
|
| 2003 | + ' "' . $bigbluebuttonbn->name . '" ' . |
|
| 2004 | + get_string('email_body_recording_ready_is_ready', 'bigbluebuttonbn') . '.</p>'; |
|
| 2005 | 2005 | $context = context_course::instance($bigbluebuttonbn->course); |
| 2006 | 2006 | \mod_bigbluebuttonbn\locallib\notifier::notification_send($context, $sender, $bigbluebuttonbn, $messagetext); |
| 2007 | 2007 | } |
@@ -2223,7 +2223,7 @@ discard block |
||
| 2223 | 2223 | } |
| 2224 | 2224 | // Prepare select for loading records based on existent bigbluebuttonbns. |
| 2225 | 2225 | $sql = 'SELECT DISTINCT meetingid, bigbluebuttonbnid FROM {bigbluebuttonbn_logs} WHERE '; |
| 2226 | - $sql .= '(bigbluebuttonbnid='.implode(' OR bigbluebuttonbnid=', array_keys($bigbluebuttonbns)).')'; |
|
| 2226 | + $sql .= '(bigbluebuttonbnid=' . implode(' OR bigbluebuttonbnid=', array_keys($bigbluebuttonbns)) . ')'; |
|
| 2227 | 2227 | // Include only Create events and exclude those with record not true. |
| 2228 | 2228 | $sql .= ' AND log = ? AND meta LIKE ? AND meta LIKE ?'; |
| 2229 | 2229 | // Execute select for loading records based on existent bigbluebuttonbns. |
@@ -2397,8 +2397,8 @@ discard block |
||
| 2397 | 2397 | function bigbluebuttonbn_format_activity_time($time) { |
| 2398 | 2398 | $activitytime = ''; |
| 2399 | 2399 | if ($time) { |
| 2400 | - $activitytime = calendar_day_representation($time).' '. |
|
| 2401 | - get_string('mod_form_field_notification_msg_at', 'bigbluebuttonbn').' '. |
|
| 2400 | + $activitytime = calendar_day_representation($time) . ' ' . |
|
| 2401 | + get_string('mod_form_field_notification_msg_at', 'bigbluebuttonbn') . ' ' . |
|
| 2402 | 2402 | calendar_time_representation($time); |
| 2403 | 2403 | } |
| 2404 | 2404 | return $activitytime; |
@@ -2868,7 +2868,7 @@ discard block |
||
| 2868 | 2868 | * |
| 2869 | 2869 | * @return string |
| 2870 | 2870 | */ |
| 2871 | -function bigbluebuttonbn_render_warning($message, $type='info', $href='', $text='', $class='') { |
|
| 2871 | +function bigbluebuttonbn_render_warning($message, $type = 'info', $href = '', $text = '', $class = '') { |
|
| 2872 | 2872 | global $OUTPUT; |
| 2873 | 2873 | $output = "\n"; |
| 2874 | 2874 | // Evaluates if config_warning is enabled. |
@@ -2907,11 +2907,11 @@ discard block |
||
| 2907 | 2907 | if ($class == '') { |
| 2908 | 2908 | $class = 'btn btn-secondary'; |
| 2909 | 2909 | } |
| 2910 | - $output = ' <form method="post" action="' . $href . '" class="form-inline">'."\n"; |
|
| 2911 | - $output .= ' <button type="submit" class="' . $class . '"'."\n"; |
|
| 2912 | - $output .= ' title="' . $title . '"'."\n"; |
|
| 2913 | - $output .= ' >' . $text . '</button>'."\n"; |
|
| 2914 | - $output .= ' </form>'."\n"; |
|
| 2910 | + $output = ' <form method="post" action="' . $href . '" class="form-inline">' . "\n"; |
|
| 2911 | + $output .= ' <button type="submit" class="' . $class . '"' . "\n"; |
|
| 2912 | + $output .= ' title="' . $title . '"' . "\n"; |
|
| 2913 | + $output .= ' >' . $text . '</button>' . "\n"; |
|
| 2914 | + $output .= ' </form>' . "\n"; |
|
| 2915 | 2915 | return $output; |
| 2916 | 2916 | } |
| 2917 | 2917 | |
@@ -3076,7 +3076,7 @@ discard block |
||
| 3076 | 3076 | $bbbsession['modPW'] = $bbbsession['bigbluebuttonbn']->moderatorpass; |
| 3077 | 3077 | $bbbsession['viewerPW'] = $bbbsession['bigbluebuttonbn']->viewerpass; |
| 3078 | 3078 | // Database info related to the activity. |
| 3079 | - $bbbsession['meetingid'] = $bbbsession['bigbluebuttonbn']->meetingid.'-'.$bbbsession['course']->id.'-'. |
|
| 3079 | + $bbbsession['meetingid'] = $bbbsession['bigbluebuttonbn']->meetingid . '-' . $bbbsession['course']->id . '-' . |
|
| 3080 | 3080 | $bbbsession['bigbluebuttonbn']->id; |
| 3081 | 3081 | $bbbsession['meetingname'] = $bbbsession['bigbluebuttonbn']->name; |
| 3082 | 3082 | $bbbsession['meetingdescription'] = $bbbsession['bigbluebuttonbn']->intro; |
@@ -3108,10 +3108,10 @@ discard block |
||
| 3108 | 3108 | if ($bbbsession['bigbluebuttonbn']->record) { |
| 3109 | 3109 | // Check if is enable record all from start. |
| 3110 | 3110 | if ($bbbsession['recordallfromstart']) { |
| 3111 | - $bbbsession['welcome'] .= '<br><br>'.get_string('bbbrecordallfromstartwarning', |
|
| 3111 | + $bbbsession['welcome'] .= '<br><br>' . get_string('bbbrecordallfromstartwarning', |
|
| 3112 | 3112 | 'bigbluebuttonbn'); |
| 3113 | 3113 | } else { |
| 3114 | - $bbbsession['welcome'] .= '<br><br>'.get_string('bbbrecordwarning', 'bigbluebuttonbn'); |
|
| 3114 | + $bbbsession['welcome'] .= '<br><br>' . get_string('bbbrecordwarning', 'bigbluebuttonbn'); |
|
| 3115 | 3115 | } |
| 3116 | 3116 | } |
| 3117 | 3117 | $bbbsession['openingtime'] = $bbbsession['bigbluebuttonbn']->openingtime; |
@@ -3126,7 +3126,7 @@ discard block |
||
| 3126 | 3126 | $bbbsession['originServerName'] = $parsedurl['host']; |
| 3127 | 3127 | $bbbsession['originServerUrl'] = $CFG->wwwroot; |
| 3128 | 3128 | $bbbsession['originServerCommonName'] = ''; |
| 3129 | - $bbbsession['originTag'] = 'moodle-mod_bigbluebuttonbn ('.get_config('mod_bigbluebuttonbn', 'version').')'; |
|
| 3129 | + $bbbsession['originTag'] = 'moodle-mod_bigbluebuttonbn (' . get_config('mod_bigbluebuttonbn', 'version') . ')'; |
|
| 3130 | 3130 | $bbbsession['bnserver'] = bigbluebuttonbn_is_bn_server(); |
| 3131 | 3131 | // Setting for clienttype, assign flash if not enabled, or default if not editable. |
| 3132 | 3132 | $bbbsession['clienttype'] = BIGBLUEBUTTON_CLIENTTYPE_FLASH; |
@@ -3187,7 +3187,7 @@ discard block |
||
| 3187 | 3187 | ); |
| 3188 | 3188 | |
| 3189 | 3189 | // Check status and set extra values. |
| 3190 | - $activitystatus = bigbluebuttonbn_view_get_activity_status($bbbsession); // In locallib. |
|
| 3190 | + $activitystatus = bigbluebuttonbn_view_get_activity_status($bbbsession); // In locallib. |
|
| 3191 | 3191 | if ($activitystatus == 'ended') { |
| 3192 | 3192 | $bbbsession['presentation'] = bigbluebuttonbn_get_presentation_array( |
| 3193 | 3193 | $bbbsession['context'], $bbbsession['bigbluebuttonbn']->presentation); |
@@ -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 | $c = new curl(); |
@@ -934,7 +934,7 @@ discard block |
||
| 934 | 934 | * @param integer $instance |
| 935 | 935 | * @param integer $voicebridge |
| 936 | 936 | * |
| 937 | - * @return string |
|
| 937 | + * @return boolean |
|
| 938 | 938 | */ |
| 939 | 939 | function bigbluebuttonbn_voicebridge_unique($instance, $voicebridge) { |
| 940 | 940 | global $DB; |
@@ -1257,7 +1257,7 @@ discard block |
||
| 1257 | 1257 | * @param string $meetingid |
| 1258 | 1258 | * @param string $configxml |
| 1259 | 1259 | * |
| 1260 | - * @return object |
|
| 1260 | + * @return null|SimpleXMLElement |
|
| 1261 | 1261 | */ |
| 1262 | 1262 | function bigbluebuttonbn_set_config_xml($meetingid, $configxml) { |
| 1263 | 1263 | $urldefaultconfig = \mod_bigbluebuttonbn\locallib\config::get('server_url').'api/setConfigXML?'; |
@@ -1306,7 +1306,7 @@ discard block |
||
| 1306 | 1306 | * @param array $recording |
| 1307 | 1307 | * @param array $tools |
| 1308 | 1308 | * |
| 1309 | - * @return array |
|
| 1309 | + * @return null|stdClass |
|
| 1310 | 1310 | */ |
| 1311 | 1311 | function bigbluebuttonbn_get_recording_data_row($bbbsession, $recording, $tools = ['protect', 'publish', 'delete']) { |
| 1312 | 1312 | if (!bigbluebuttonbn_include_recording_table_row($bbbsession, $recording)) { |
@@ -1933,7 +1933,7 @@ discard block |
||
| 1933 | 1933 | * |
| 1934 | 1934 | * @param array $bbbsession |
| 1935 | 1935 | * @param array $recording |
| 1936 | - * @param object $rowdata |
|
| 1936 | + * @param stdClass $rowdata |
|
| 1937 | 1937 | * |
| 1938 | 1938 | * @return object |
| 1939 | 1939 | */ |
@@ -2051,7 +2051,7 @@ discard block |
||
| 2051 | 2051 | * |
| 2052 | 2052 | * @param array $bbbsession |
| 2053 | 2053 | * @param array $recordings |
| 2054 | - * @param array $tools |
|
| 2054 | + * @param string[] $tools |
|
| 2055 | 2055 | * |
| 2056 | 2056 | * @return array |
| 2057 | 2057 | */ |
@@ -2129,7 +2129,7 @@ discard block |
||
| 2129 | 2129 | * Helper function to define the sql used for gattering the bigbluebuttonbnids whose meetingids should be included |
| 2130 | 2130 | * in the getRecordings request considering only those that belong to deleted activities. |
| 2131 | 2131 | * |
| 2132 | - * @param string $courseid |
|
| 2132 | + * @param integer $courseid |
|
| 2133 | 2133 | * @param string $bigbluebuttonbnid |
| 2134 | 2134 | * @param bool $subset |
| 2135 | 2135 | * |
@@ -2153,7 +2153,7 @@ discard block |
||
| 2153 | 2153 | * Helper function to define the sql used for gattering the bigbluebuttonbnids whose meetingids should be included |
| 2154 | 2154 | * in the getRecordings request considering only those that belong to imported recordings. |
| 2155 | 2155 | * |
| 2156 | - * @param string $courseid |
|
| 2156 | + * @param integer $courseid |
|
| 2157 | 2157 | * @param string $bigbluebuttonbnid |
| 2158 | 2158 | * @param bool $subset |
| 2159 | 2159 | * |
@@ -2176,7 +2176,7 @@ discard block |
||
| 2176 | 2176 | /** |
| 2177 | 2177 | * Helper function to get recordings and imported recordings together. |
| 2178 | 2178 | * |
| 2179 | - * @param string $courseid |
|
| 2179 | + * @param integer $courseid |
|
| 2180 | 2180 | * @param string $bigbluebuttonbnid |
| 2181 | 2181 | * @param bool $subset |
| 2182 | 2182 | * @param bool $includedeleted |
@@ -2194,7 +2194,7 @@ discard block |
||
| 2194 | 2194 | * Helper function to retrieve recordings from the BigBlueButton. The references are stored as events |
| 2195 | 2195 | * in bigbluebuttonbn_logs. |
| 2196 | 2196 | * |
| 2197 | - * @param string $courseid |
|
| 2197 | + * @param integer $courseid |
|
| 2198 | 2198 | * @param string $bigbluebuttonbnid |
| 2199 | 2199 | * @param bool $subset |
| 2200 | 2200 | * @param bool $includedeleted |
@@ -23,8 +23,8 @@ discard block |
||
| 23 | 23 | * @author Jesus Federico (jesus [at] blindsidenetworks [dt] com) |
| 24 | 24 | */ |
| 25 | 25 | |
| 26 | -require_once(dirname(dirname(dirname(__FILE__))).'/config.php'); |
|
| 27 | -require_once(dirname(__FILE__).'/locallib.php'); |
|
| 26 | +require_once(dirname(dirname(dirname(__FILE__))) . '/config.php'); |
|
| 27 | +require_once(dirname(__FILE__) . '/locallib.php'); |
|
| 28 | 28 | |
| 29 | 29 | global $SESSION; |
| 30 | 30 | |
@@ -70,23 +70,23 @@ discard block |
||
| 70 | 70 | if (is_null($serverversion)) { |
| 71 | 71 | if ($bbbsession['administrator']) { |
| 72 | 72 | print_error('view_error_unable_join', 'bigbluebuttonbn', |
| 73 | - $CFG->wwwroot.'/admin/settings.php?section=modsettingbigbluebuttonbn'); |
|
| 73 | + $CFG->wwwroot . '/admin/settings.php?section=modsettingbigbluebuttonbn'); |
|
| 74 | 74 | exit; |
| 75 | 75 | } |
| 76 | 76 | if ($bbbsession['moderator']) { |
| 77 | 77 | print_error('view_error_unable_join_teacher', 'bigbluebuttonbn', |
| 78 | - $CFG->wwwroot.'/course/view.php?id='.$bigbluebuttonbn->course); |
|
| 78 | + $CFG->wwwroot . '/course/view.php?id=' . $bigbluebuttonbn->course); |
|
| 79 | 79 | exit; |
| 80 | 80 | } |
| 81 | 81 | print_error('view_error_unable_join_student', 'bigbluebuttonbn', |
| 82 | - $CFG->wwwroot.'/course/view.php?id='.$bigbluebuttonbn->course); |
|
| 82 | + $CFG->wwwroot . '/course/view.php?id=' . $bigbluebuttonbn->course); |
|
| 83 | 83 | exit; |
| 84 | 84 | } |
| 85 | - $bbbsession['serverversion'] = (string) $serverversion; |
|
| 85 | + $bbbsession['serverversion'] = (string)$serverversion; |
|
| 86 | 86 | |
| 87 | 87 | // Operation URLs. |
| 88 | 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 . |
|
| 89 | + $bbbsession['logoutURL'] = $CFG->wwwroot . '/mod/bigbluebuttonbn/bbb_view.php?action=logout&id=' . $id . |
|
| 90 | 90 | '&bn=' . $bbbsession['bigbluebuttonbn']->id; |
| 91 | 91 | $bbbsession['recordingReadyURL'] = $CFG->wwwroot . '/mod/bigbluebuttonbn/bbb_broker.php?action=recording_' . |
| 92 | 92 | 'ready&bigbluebuttonbn=' . $bbbsession['bigbluebuttonbn']->id; |
@@ -114,8 +114,8 @@ discard block |
||
| 114 | 114 | } |
| 115 | 115 | |
| 116 | 116 | // Assign group default values. |
| 117 | - $bbbsession['meetingid'] .= '['.$bbbsession['group'].']'; |
|
| 118 | - $bbbsession['meetingname'] .= ' ('.$groupname.')'; |
|
| 117 | + $bbbsession['meetingid'] .= '[' . $bbbsession['group'] . ']'; |
|
| 118 | + $bbbsession['meetingname'] .= ' (' . $groupname . ')'; |
|
| 119 | 119 | } |
| 120 | 120 | |
| 121 | 121 | // Initialize session variable used across views. |
@@ -178,7 +178,7 @@ discard block |
||
| 178 | 178 | } |
| 179 | 179 | // If user is not administrator nor moderator (user is steudent) and waiting is required. |
| 180 | 180 | if (!$bbbsession['administrator'] && !$bbbsession['moderator'] && $bbbsession['wait']) { |
| 181 | - header('Location: '.$bbbsession['logoutURL']); |
|
| 181 | + header('Location: ' . $bbbsession['logoutURL']); |
|
| 182 | 182 | break; |
| 183 | 183 | } |
| 184 | 184 | // As the meeting doesn't exist, try to create it. |
@@ -192,16 +192,16 @@ discard block |
||
| 192 | 192 | // The server is unreachable. |
| 193 | 193 | if ($bbbsession['administrator']) { |
| 194 | 194 | print_error('view_error_unable_join', 'bigbluebuttonbn', |
| 195 | - $CFG->wwwroot.'/admin/settings.php?section=modsettingbigbluebuttonbn'); |
|
| 195 | + $CFG->wwwroot . '/admin/settings.php?section=modsettingbigbluebuttonbn'); |
|
| 196 | 196 | break; |
| 197 | 197 | } |
| 198 | 198 | if ($bbbsession['moderator']) { |
| 199 | 199 | print_error('view_error_unable_join_teacher', 'bigbluebuttonbn', |
| 200 | - $CFG->wwwroot.'/admin/settings.php?section=modsettingbigbluebuttonbn'); |
|
| 200 | + $CFG->wwwroot . '/admin/settings.php?section=modsettingbigbluebuttonbn'); |
|
| 201 | 201 | break; |
| 202 | 202 | } |
| 203 | 203 | print_error('view_error_unable_join_student', 'bigbluebuttonbn', |
| 204 | - $CFG->wwwroot.'/admin/settings.php?section=modsettingbigbluebuttonbn'); |
|
| 204 | + $CFG->wwwroot . '/admin/settings.php?section=modsettingbigbluebuttonbn'); |
|
| 205 | 205 | break; |
| 206 | 206 | } |
| 207 | 207 | if ($response['returncode'] == 'FAILED') { |
@@ -222,7 +222,7 @@ discard block |
||
| 222 | 222 | bigbluebuttonbn_event_log(\mod_bigbluebuttonbn\event\events::$events['meeting_create'], $bigbluebuttonbn); |
| 223 | 223 | // Internal logger: Insert a record with the meeting created. |
| 224 | 224 | $overrides = array('meetingid' => $bbbsession['meetingid']); |
| 225 | - $meta = '{"record":'.($bbbsession['record'] ? 'true' : 'false').'}'; |
|
| 225 | + $meta = '{"record":' . ($bbbsession['record'] ? 'true' : 'false') . '}'; |
|
| 226 | 226 | bigbluebuttonbn_log($bbbsession['bigbluebuttonbn'], BIGBLUEBUTTONBN_LOG_EVENT_CREATE, $overrides, $meta); |
| 227 | 227 | // Since the meeting is already running, we just join the session. |
| 228 | 228 | bigbluebutton_bbb_view_join_meeting($bbbsession, $bigbluebuttonbn, $origin); |
@@ -233,7 +233,7 @@ discard block |
||
| 233 | 233 | bigbluebuttonbn_event_log(\mod_bigbluebuttonbn\event\events::$events['recording_play'], $bigbluebuttonbn, |
| 234 | 234 | ['other' => $rid]); |
| 235 | 235 | // Execute the redirect. |
| 236 | - header('Location: '.urldecode($href)); |
|
| 236 | + header('Location: ' . urldecode($href)); |
|
| 237 | 237 | break; |
| 238 | 238 | default: |
| 239 | 239 | bigbluebutton_bbb_view_close_window(); |
@@ -318,7 +318,7 @@ discard block |
||
| 318 | 318 | $data['welcome'] .= '<br><br>'; |
| 319 | 319 | $data['welcome'] .= str_replace( |
| 320 | 320 | '%duration%', |
| 321 | - (string) $durationtime, |
|
| 321 | + (string)$durationtime, |
|
| 322 | 322 | get_string('bbbdurationwarning', 'bigbluebuttonbn') |
| 323 | 323 | ); |
| 324 | 324 | } |
@@ -408,7 +408,7 @@ discard block |
||
| 408 | 408 | $meetinginfo = bigbluebuttonbn_get_meeting_info($bbbsession['meetingid'], BIGBLUEBUTTONBN_UPDATE_CACHE); |
| 409 | 409 | if ($bbbsession['userlimit'] > 0 && intval($meetinginfo['participantCount']) >= $bbbsession['userlimit']) { |
| 410 | 410 | // No more users allowed to join. |
| 411 | - header('Location: '.$bbbsession['logoutURL']); |
|
| 411 | + header('Location: ' . $bbbsession['logoutURL']); |
|
| 412 | 412 | return; |
| 413 | 413 | } |
| 414 | 414 | // Build the URL. |
@@ -422,13 +422,13 @@ discard block |
||
| 422 | 422 | bigbluebuttonbn_event_log(\mod_bigbluebuttonbn\event\events::$events['meeting_join'], $bigbluebuttonbn); |
| 423 | 423 | // Internal logger: Instert a record with the meeting created. |
| 424 | 424 | $overrides = array('meetingid' => $bbbsession['meetingid']); |
| 425 | - $meta = '{"origin":'.$origin.'}'; |
|
| 425 | + $meta = '{"origin":' . $origin . '}'; |
|
| 426 | 426 | bigbluebuttonbn_log($bbbsession['bigbluebuttonbn'], BIGBLUEBUTTONBN_LOG_EVENT_JOIN, $overrides, $meta); |
| 427 | 427 | // Before executing the redirect, increment the number of participants. |
| 428 | 428 | bigbluebuttonbn_participant_joined($bbbsession['meetingid'], |
| 429 | 429 | ($bbbsession['administrator'] || $bbbsession['moderator'])); |
| 430 | 430 | // Execute the redirect. |
| 431 | - header('Location: '.$joinurl); |
|
| 431 | + header('Location: ' . $joinurl); |
|
| 432 | 432 | } |
| 433 | 433 | |
| 434 | 434 | /** |
@@ -440,13 +440,13 @@ discard block |
||
| 440 | 440 | */ |
| 441 | 441 | function bigbluebutton_bbb_view_errors($serrors, $id) { |
| 442 | 442 | global $CFG, $OUTPUT; |
| 443 | - $errors = (array) json_decode(urldecode($serrors)); |
|
| 443 | + $errors = (array)json_decode(urldecode($serrors)); |
|
| 444 | 444 | $msgerrors = ''; |
| 445 | 445 | foreach ($errors as $error) { |
| 446 | - $msgerrors .= html_writer::tag('p', $error->{'message'}, array('class' => 'alert alert-danger'))."\n"; |
|
| 446 | + $msgerrors .= html_writer::tag('p', $error->{'message'}, array('class' => 'alert alert-danger')) . "\n"; |
|
| 447 | 447 | } |
| 448 | 448 | echo $OUTPUT->header(); |
| 449 | 449 | print_error('view_error_bigbluebutton', 'bigbluebuttonbn', |
| 450 | - $CFG->wwwroot.'/mod/bigbluebuttonbn/view.php?id='.$id, $msgerrors, $serrors); |
|
| 450 | + $CFG->wwwroot . '/mod/bigbluebuttonbn/view.php?id=' . $id, $msgerrors, $serrors); |
|
| 451 | 451 | echo $OUTPUT->footer(); |
| 452 | 452 | } |
@@ -304,10 +304,10 @@ discard block |
||
| 304 | 304 | */ |
| 305 | 305 | function bigbluebutton_bbb_view_create_meeting_data(&$bbbsession) { |
| 306 | 306 | $data = ['meetingID' => $bbbsession['meetingid'], |
| 307 | - 'name' => bigbluebuttonbn_html2text($bbbsession['meetingname'], 64), |
|
| 308 | - 'attendeePW' => $bbbsession['viewerPW'], |
|
| 309 | - 'moderatorPW' => $bbbsession['modPW'], |
|
| 310 | - 'logoutURL' => $bbbsession['logoutURL'], |
|
| 307 | + 'name' => bigbluebuttonbn_html2text($bbbsession['meetingname'], 64), |
|
| 308 | + 'attendeePW' => $bbbsession['viewerPW'], |
|
| 309 | + 'moderatorPW' => $bbbsession['modPW'], |
|
| 310 | + 'logoutURL' => $bbbsession['logoutURL'], |
|
| 311 | 311 | ]; |
| 312 | 312 | $data['record'] = bigbluebutton_bbb_view_create_meeting_data_record($bbbsession['record']); |
| 313 | 313 | // Check if auto_start_record is enable. |
@@ -329,7 +329,7 @@ discard block |
||
| 329 | 329 | '%duration%', |
| 330 | 330 | (string) $durationtime, |
| 331 | 331 | get_string('bbbdurationwarning', 'bigbluebuttonbn') |
| 332 | - ); |
|
| 332 | + ); |
|
| 333 | 333 | } |
| 334 | 334 | $voicebridge = intval($bbbsession['voicebridge']); |
| 335 | 335 | if ($voicebridge > 0 && $voicebridge < 79999) { |
@@ -380,22 +380,22 @@ discard block |
||
| 380 | 380 | function bigbluebutton_bbb_view_create_meeting_metadata(&$bbbsession) { |
| 381 | 381 | global $USER; |
| 382 | 382 | $metadata = ['bbb-origin' => $bbbsession['origin'], |
| 383 | - 'bbb-origin-version' => $bbbsession['originVersion'], |
|
| 384 | - 'bbb-origin-server-name' => $bbbsession['originServerName'], |
|
| 385 | - 'bbb-origin-server-common-name' => $bbbsession['originServerCommonName'], |
|
| 386 | - 'bbb-origin-tag' => $bbbsession['originTag'], |
|
| 387 | - 'bbb-context' => $bbbsession['course']->fullname, |
|
| 388 | - 'bbb-recording-name' => bigbluebuttonbn_html2text($bbbsession['meetingname'], 64), |
|
| 389 | - 'bbb-recording-description' => bigbluebuttonbn_html2text($bbbsession['meetingdescription'], 64), |
|
| 390 | - 'bbb-recording-tags' => bigbluebuttonbn_get_tags($bbbsession['cm']->id), // Same as $id. |
|
| 383 | + 'bbb-origin-version' => $bbbsession['originVersion'], |
|
| 384 | + 'bbb-origin-server-name' => $bbbsession['originServerName'], |
|
| 385 | + 'bbb-origin-server-common-name' => $bbbsession['originServerCommonName'], |
|
| 386 | + 'bbb-origin-tag' => $bbbsession['originTag'], |
|
| 387 | + 'bbb-context' => $bbbsession['course']->fullname, |
|
| 388 | + 'bbb-recording-name' => bigbluebuttonbn_html2text($bbbsession['meetingname'], 64), |
|
| 389 | + 'bbb-recording-description' => bigbluebuttonbn_html2text($bbbsession['meetingdescription'], 64), |
|
| 390 | + 'bbb-recording-tags' => bigbluebuttonbn_get_tags($bbbsession['cm']->id), // Same as $id. |
|
| 391 | 391 | ]; |
| 392 | 392 | if ((boolean)\mod_bigbluebuttonbn\locallib\config::get('recordingstatus_enabled')) { |
| 393 | 393 | $metadata["bn-recording-status"] = json_encode( |
| 394 | 394 | array( |
| 395 | 395 | 'email' => array('"' . fullname($USER) . '" <' . $USER->email . '>'), |
| 396 | 396 | 'context' => $bbbsession['bigbluebuttonbnURL'] |
| 397 | - ) |
|
| 398 | - ); |
|
| 397 | + ) |
|
| 398 | + ); |
|
| 399 | 399 | } |
| 400 | 400 | if ((boolean)\mod_bigbluebuttonbn\locallib\config::get('recordingready_enabled')) { |
| 401 | 401 | $metadata['bn-recording-ready-url'] = $bbbsession['recordingReadyURL']; |
@@ -58,7 +58,7 @@ discard block |
||
| 58 | 58 | $session['importrecordings'] = ($session['managerecordings']); |
| 59 | 59 | $session['modPW'] = $session['bigbluebuttonbn']->moderatorpass; |
| 60 | 60 | $session['viewerPW'] = $session['bigbluebuttonbn']->viewerpass; |
| 61 | - $session['meetingid'] = $session['bigbluebuttonbn']->meetingid.'-'.$session['course']->id.'-'. |
|
| 61 | + $session['meetingid'] = $session['bigbluebuttonbn']->meetingid . '-' . $session['course']->id . '-' . |
|
| 62 | 62 | $session['bigbluebuttonbn']->id; |
| 63 | 63 | $session['meetingname'] = $session['bigbluebuttonbn']->name; |
| 64 | 64 | $session['meetingdescription'] = $session['bigbluebuttonbn']->intro; |
@@ -90,10 +90,10 @@ discard block |
||
| 90 | 90 | if ($session['bigbluebuttonbn']->record) { |
| 91 | 91 | // Check if is enable record all from start. |
| 92 | 92 | if ($session['recordallfromstart']) { |
| 93 | - $session['welcome'] .= '<br><br>'.get_string('bbbrecordallfromstartwarning', |
|
| 93 | + $session['welcome'] .= '<br><br>' . get_string('bbbrecordallfromstartwarning', |
|
| 94 | 94 | 'bigbluebuttonbn'); |
| 95 | 95 | } else { |
| 96 | - $session['welcome'] .= '<br><br>'.get_string('bbbrecordwarning', 'bigbluebuttonbn'); |
|
| 96 | + $session['welcome'] .= '<br><br>' . get_string('bbbrecordwarning', 'bigbluebuttonbn'); |
|
| 97 | 97 | } |
| 98 | 98 | } |
| 99 | 99 | $session['openingtime'] = $session['bigbluebuttonbn']->openingtime; |
@@ -106,7 +106,7 @@ discard block |
||
| 106 | 106 | $session['originServerName'] = $parsedurl['host']; |
| 107 | 107 | $session['originServerUrl'] = $CFG->wwwroot; |
| 108 | 108 | $session['originServerCommonName'] = ''; |
| 109 | - $session['originTag'] = 'moodle-mod_bigbluebuttonbn ('.get_config('mod_bigbluebuttonbn', 'version').')'; |
|
| 109 | + $session['originTag'] = 'moodle-mod_bigbluebuttonbn (' . get_config('mod_bigbluebuttonbn', 'version') . ')'; |
|
| 110 | 110 | $session['bnserver'] = bigbluebuttonbn_is_bn_server(); |
| 111 | 111 | $session['clienttype'] = \mod_bigbluebuttonbn\locallib\config::get('clienttype_default'); |
| 112 | 112 | |
@@ -228,7 +228,7 @@ discard block |
||
| 228 | 228 | $data['welcome'] .= '<br><br>'; |
| 229 | 229 | $data['welcome'] .= str_replace( |
| 230 | 230 | '%duration%', |
| 231 | - (string) $durationtime, |
|
| 231 | + (string)$durationtime, |
|
| 232 | 232 | get_string('bbbdurationwarning', 'bigbluebuttonbn') |
| 233 | 233 | ); |
| 234 | 234 | } |
@@ -24,7 +24,6 @@ |
||
| 24 | 24 | */ |
| 25 | 25 | |
| 26 | 26 | namespace mod_bigbluebuttonbn\search; |
| 27 | -use core_tag\output\tag; |
|
| 28 | 27 | |
| 29 | 28 | defined('MOODLE_INTERNAL') || die(); |
| 30 | 29 | |
@@ -110,7 +110,7 @@ |
||
| 110 | 110 | * Displays the general view. |
| 111 | 111 | * |
| 112 | 112 | * @param boolean $moderator |
| 113 | - * @param object $course |
|
| 113 | + * @param stdClass $course |
|
| 114 | 114 | * @param object $bigbluebuttonbn |
| 115 | 115 | * @param object $groupobj |
| 116 | 116 | * @return array |
@@ -34,7 +34,7 @@ discard block |
||
| 34 | 34 | |
| 35 | 35 | defined('MOODLE_INTERNAL') || die(); |
| 36 | 36 | |
| 37 | -require_once($CFG->dirroot.'/mod/bigbluebuttonbn/locallib.php'); |
|
| 37 | +require_once($CFG->dirroot . '/mod/bigbluebuttonbn/locallib.php'); |
|
| 38 | 38 | |
| 39 | 39 | /** |
| 40 | 40 | * Class index |
@@ -92,7 +92,7 @@ discard block |
||
| 92 | 92 | // Add a the data for the bigbluebuttonbn instance. |
| 93 | 93 | $groupobj = null; |
| 94 | 94 | if (groups_get_activity_groupmode($cm) > 0) { |
| 95 | - $groupobj = (object) array('id' => 0, 'name' => get_string('allparticipants')); |
|
| 95 | + $groupobj = (object)array('id' => 0, 'name' => get_string('allparticipants')); |
|
| 96 | 96 | } |
| 97 | 97 | $table->data[] = self::bigbluebuttonbn_index_display_room($canmoderate, $course, $bigbluebuttonbn, $groupobj); |
| 98 | 98 | // Add a the data for the groups belonging to the bigbluebuttonbn instance, if any. |
@@ -182,7 +182,7 @@ discard block |
||
| 182 | 182 | $attendeecount = 0; |
| 183 | 183 | foreach ($meetinginfo['attendees']->attendee as $attendee) { |
| 184 | 184 | if ($attendee->role == $role) { |
| 185 | - $attendeelist .= ($attendeecount++ > 0 ? ', ' : '').$attendee->fullName; |
|
| 185 | + $attendeelist .= ($attendeecount++ > 0 ? ', ' : '') . $attendee->fullName; |
|
| 186 | 186 | } |
| 187 | 187 | } |
| 188 | 188 | } |
@@ -216,17 +216,17 @@ discard block |
||
| 216 | 216 | public static function bigbluebuttonbn_index_display_room_actions($moderator, $course, $bigbluebuttonbn, $groupobj = null) { |
| 217 | 217 | $actions = ''; |
| 218 | 218 | if ($moderator) { |
| 219 | - $actions .= '<form name="form1" method="post" action="">'."\n"; |
|
| 220 | - $actions .= ' <INPUT type="hidden" name="id" value="'.$course->id.'">'."\n"; |
|
| 221 | - $actions .= ' <INPUT type="hidden" name="a" value="'.$bigbluebuttonbn->id.'">'."\n"; |
|
| 219 | + $actions .= '<form name="form1" method="post" action="">' . "\n"; |
|
| 220 | + $actions .= ' <INPUT type="hidden" name="id" value="' . $course->id . '">' . "\n"; |
|
| 221 | + $actions .= ' <INPUT type="hidden" name="a" value="' . $bigbluebuttonbn->id . '">' . "\n"; |
|
| 222 | 222 | if ($groupobj != null) { |
| 223 | - $actions .= ' <INPUT type="hidden" name="g" value="'.$groupobj->id.'">'."\n"; |
|
| 223 | + $actions .= ' <INPUT type="hidden" name="g" value="' . $groupobj->id . '">' . "\n"; |
|
| 224 | 224 | } |
| 225 | 225 | $actions .= ' <INPUT type="submit" name="submit" value="' . |
| 226 | 226 | get_string('view_conference_action_end', 'bigbluebuttonbn') . |
| 227 | 227 | '" class="btn btn-primary btn-sm" onclick="return confirm(\'' . |
| 228 | 228 | get_string('index_confirm_end', 'bigbluebuttonbn') . '\')">' . "\n"; |
| 229 | - $actions .= '</form>'."\n"; |
|
| 229 | + $actions .= '</form>' . "\n"; |
|
| 230 | 230 | } |
| 231 | 231 | return $actions; |
| 232 | 232 | } |
@@ -28,7 +28,6 @@ |
||
| 28 | 28 | defined('MOODLE_INTERNAL') || die(); |
| 29 | 29 | |
| 30 | 30 | use context_module; |
| 31 | -use mod_bigbluebuttonbn_external; |
|
| 32 | 31 | require_once($CFG->dirroot . '/mod/bigbluebuttonbn/locallib.php'); |
| 33 | 32 | require_once($CFG->dirroot . '/lib/grouplib.php'); |
| 34 | 33 | |
@@ -55,7 +55,7 @@ discard block |
||
| 55 | 55 | |
| 56 | 56 | global $OUTPUT, $SESSION, $CFG; |
| 57 | 57 | |
| 58 | - $args = (object) $args; |
|
| 58 | + $args = (object)$args; |
|
| 59 | 59 | $viewinstance = bigbluebuttonbn_view_validator($args->cmid, null); |
| 60 | 60 | if (!$viewinstance) { |
| 61 | 61 | $error = get_string('view_error_url_missing_parameters', 'bigbluebuttonbn'); |
@@ -67,7 +67,7 @@ discard block |
||
| 67 | 67 | $bigbluebuttonbn = $viewinstance['bigbluebuttonbn']; |
| 68 | 68 | $context = context_module::instance($cm->id); |
| 69 | 69 | |
| 70 | - require_login($course->id, false , $cm, true, true); |
|
| 70 | + require_login($course->id, false, $cm, true, true); |
|
| 71 | 71 | require_capability('mod/bigbluebuttonbn:join', $context); |
| 72 | 72 | |
| 73 | 73 | // Add view event. |
@@ -112,7 +112,7 @@ discard block |
||
| 112 | 112 | |
| 113 | 113 | // Check if the BBB server is working. |
| 114 | 114 | $serverversion = bigbluebuttonbn_get_server_version(); |
| 115 | - $bbbsession['serverversion'] = (string) $serverversion; |
|
| 115 | + $bbbsession['serverversion'] = (string)$serverversion; |
|
| 116 | 116 | if (is_null($serverversion)) { |
| 117 | 117 | |
| 118 | 118 | if ($bbbsession['administrator']) { |
@@ -139,7 +139,7 @@ discard block |
||
| 139 | 139 | |
| 140 | 140 | // Operation URLs. |
| 141 | 141 | $bbbsession['bigbluebuttonbnURL'] = $CFG->wwwroot . '/mod/bigbluebuttonbn/view.php?id=' . $bbbsession['cm']->id; |
| 142 | - $bbbsession['logoutURL'] = $CFG->wwwroot . '/mod/bigbluebuttonbn/bbb_view.php?action=logout&id='.$args->cmid . |
|
| 142 | + $bbbsession['logoutURL'] = $CFG->wwwroot . '/mod/bigbluebuttonbn/bbb_view.php?action=logout&id=' . $args->cmid . |
|
| 143 | 143 | '&bn=' . $bbbsession['bigbluebuttonbn']->id; |
| 144 | 144 | $bbbsession['recordingReadyURL'] = $CFG->wwwroot . '/mod/bigbluebuttonbn/bbb_broker.php?action=recording_' . |
| 145 | 145 | 'ready&bigbluebuttonbn=' . $bbbsession['bigbluebuttonbn']->id; |
@@ -182,7 +182,7 @@ discard block |
||
| 182 | 182 | } |
| 183 | 183 | if ($response['returncode'] == 'FAILED') { |
| 184 | 184 | // The meeting could not be created. |
| 185 | - $errorkey = bigbluebuttonbn_get_error_key($response['messageKey'], 'view_error_create'); |
|
| 185 | + $errorkey = bigbluebuttonbn_get_error_key($response['messageKey'], 'view_error_create'); |
|
| 186 | 186 | $e = get_string($errorkey, 'bigbluebuttonbn'); |
| 187 | 187 | return(self::mobile_print_error($e)); |
| 188 | 188 | } |
@@ -195,7 +195,7 @@ discard block |
||
| 195 | 195 | bigbluebuttonbn_event_log(\mod_bigbluebuttonbn\event\events::$events['meeting_create'], $bigbluebuttonbn); |
| 196 | 196 | // Insert a record that meeting was created. |
| 197 | 197 | $overrides = array('meetingid' => $bbbsession['meetingid']); |
| 198 | - $meta = '{"record":'.($bbbsession['record'] ? 'true' : 'false').'}'; |
|
| 198 | + $meta = '{"record":' . ($bbbsession['record'] ? 'true' : 'false') . '}'; |
|
| 199 | 199 | bigbluebuttonbn_log($bbbsession['bigbluebuttonbn'], BIGBLUEBUTTONBN_LOG_EVENT_CREATE, $overrides, $meta); |
| 200 | 200 | } |
| 201 | 201 | |
@@ -221,7 +221,7 @@ discard block |
||
| 221 | 221 | |
| 222 | 222 | $data = array( |
| 223 | 223 | 'bigbluebuttonbn' => $bigbluebuttonbn, |
| 224 | - 'bbbsession' => (object) $bbbsession, |
|
| 224 | + 'bbbsession' => (object)$bbbsession, |
|
| 225 | 225 | 'msjgroup' => $msjgroup, |
| 226 | 226 | 'urltojoin' => $urltojoin, |
| 227 | 227 | 'cmid' => $cm->id, |
@@ -27,8 +27,8 @@ |
||
| 27 | 27 | use mod_bigbluebuttonbn\output\import_view; |
| 28 | 28 | use mod_bigbluebuttonbn\output\renderer; |
| 29 | 29 | |
| 30 | -require(__DIR__.'/../../config.php'); |
|
| 31 | -require_once(__DIR__.'/locallib.php'); |
|
| 30 | +require(__DIR__ . '/../../config.php'); |
|
| 31 | +require_once(__DIR__ . '/locallib.php'); |
|
| 32 | 32 | |
| 33 | 33 | $bn = required_param('bn', PARAM_INT); |
| 34 | 34 | $tc = optional_param('tc', 0, PARAM_INT); |
@@ -28,7 +28,7 @@ |
||
| 28 | 28 | |
| 29 | 29 | global $CFG; |
| 30 | 30 | |
| 31 | -require_once(__DIR__.'/locallib.php'); |
|
| 31 | +require_once(__DIR__ . '/locallib.php'); |
|
| 32 | 32 | |
| 33 | 33 | if ($hassiteconfig) { |
| 34 | 34 | // Configuration for BigBlueButton. |
@@ -27,9 +27,9 @@ discard block |
||
| 27 | 27 | |
| 28 | 28 | use mod_bigbluebuttonbn\plugin; |
| 29 | 29 | |
| 30 | -require(__DIR__.'/../../config.php'); |
|
| 31 | -require_once(__DIR__.'/locallib.php'); |
|
| 32 | -require_once(__DIR__.'/viewlib.php'); |
|
| 30 | +require(__DIR__ . '/../../config.php'); |
|
| 31 | +require_once(__DIR__ . '/locallib.php'); |
|
| 32 | +require_once(__DIR__ . '/viewlib.php'); |
|
| 33 | 33 | |
| 34 | 34 | $id = required_param('id', PARAM_INT); |
| 35 | 35 | $bn = optional_param('bn', 0, PARAM_INT); |
@@ -58,7 +58,7 @@ discard block |
||
| 58 | 58 | bigbluebuttonbn_view_bbbsession_set($PAGE->context, $bbbsession); |
| 59 | 59 | |
| 60 | 60 | // Validates if the BigBlueButton server is working. |
| 61 | -$serverversion = bigbluebuttonbn_get_server_version(); // In locallib. |
|
| 61 | +$serverversion = bigbluebuttonbn_get_server_version(); // In locallib. |
|
| 62 | 62 | if ($serverversion === null) { |
| 63 | 63 | $errmsg = 'view_error_unable_join_student'; |
| 64 | 64 | $errurl = '/course/view.php'; |
@@ -72,7 +72,7 @@ discard block |
||
| 72 | 72 | } |
| 73 | 73 | print_error($errmsg, plugin::COMPONENT, new moodle_url($errurl, $errurlparams)); |
| 74 | 74 | } |
| 75 | -$bbbsession['serverversion'] = (string) $serverversion; |
|
| 75 | +$bbbsession['serverversion'] = (string)$serverversion; |
|
| 76 | 76 | |
| 77 | 77 | // Mark viewed by user (if required). |
| 78 | 78 | $completion = new completion_info($course); |
@@ -116,7 +116,7 @@ discard block |
||
| 116 | 116 | echo $OUTPUT->footer(); |
| 117 | 117 | |
| 118 | 118 | // Shows version as a comment. |
| 119 | -echo '<!-- '.$bbbsession['originTag'].' -->'."\n"; |
|
| 119 | +echo '<!-- ' . $bbbsession['originTag'] . ' -->' . "\n"; |
|
| 120 | 120 | |
| 121 | 121 | // Initialize session variable used across views. |
| 122 | 122 | $SESSION->bigbluebuttonbn_bbbsession = $bbbsession; |
| 123 | 123 | \ No newline at end of file |