@@ -121,9 +121,9 @@ discard block |
||
| 121 | 121 | */ |
| 122 | 122 | function bigbluebuttonbn_get_join_url($meetingid, $username, $pw, $logouturl, $configtoken = null, $userid = null) { |
| 123 | 123 | $data = ['meetingID' => $meetingid, |
| 124 | - 'fullName' => $username, |
|
| 125 | - 'password' => $pw, |
|
| 126 | - 'logoutURL' => $logouturl, |
|
| 124 | + 'fullName' => $username, |
|
| 125 | + 'password' => $pw, |
|
| 126 | + 'logoutURL' => $logouturl, |
|
| 127 | 127 | ]; |
| 128 | 128 | if (!is_null($configtoken)) { |
| 129 | 129 | $data['configToken'] = $configtoken; |
@@ -175,23 +175,23 @@ discard block |
||
| 175 | 175 | function bigbluebuttonbn_get_meeting_info_array($meetingid) { |
| 176 | 176 | $xml = bigbluebuttonbn_wrap_xml_load_file( |
| 177 | 177 | \mod_bigbluebuttonbn\locallib\bigbluebutton::action_url('getMeetingInfo', ['meetingID' => $meetingid]) |
| 178 | - ); |
|
| 178 | + ); |
|
| 179 | 179 | if ($xml && $xml->returncode == 'SUCCESS' && empty($xml->messageKey)) { |
| 180 | 180 | // Meeting info was returned. |
| 181 | 181 | return array('returncode' => $xml->returncode, |
| 182 | - 'meetingID' => $xml->meetingID, |
|
| 183 | - 'moderatorPW' => $xml->moderatorPW, |
|
| 184 | - 'attendeePW' => $xml->attendeePW, |
|
| 185 | - 'hasBeenForciblyEnded' => $xml->hasBeenForciblyEnded, |
|
| 186 | - 'running' => $xml->running, |
|
| 187 | - 'recording' => $xml->recording, |
|
| 188 | - 'startTime' => $xml->startTime, |
|
| 189 | - 'endTime' => $xml->endTime, |
|
| 190 | - 'participantCount' => $xml->participantCount, |
|
| 191 | - 'moderatorCount' => $xml->moderatorCount, |
|
| 192 | - 'attendees' => $xml->attendees, |
|
| 193 | - 'metadata' => $xml->metadata, |
|
| 194 | - ); |
|
| 182 | + 'meetingID' => $xml->meetingID, |
|
| 183 | + 'moderatorPW' => $xml->moderatorPW, |
|
| 184 | + 'attendeePW' => $xml->attendeePW, |
|
| 185 | + 'hasBeenForciblyEnded' => $xml->hasBeenForciblyEnded, |
|
| 186 | + 'running' => $xml->running, |
|
| 187 | + 'recording' => $xml->recording, |
|
| 188 | + 'startTime' => $xml->startTime, |
|
| 189 | + 'endTime' => $xml->endTime, |
|
| 190 | + 'participantCount' => $xml->participantCount, |
|
| 191 | + 'moderatorCount' => $xml->moderatorCount, |
|
| 192 | + 'attendees' => $xml->attendees, |
|
| 193 | + 'metadata' => $xml->metadata, |
|
| 194 | + ); |
|
| 195 | 195 | } |
| 196 | 196 | if ($xml) { |
| 197 | 197 | // Either failure or success without meeting info. |
@@ -327,7 +327,7 @@ discard block |
||
| 327 | 327 | function bigbluebuttonbn_get_default_config_xml() { |
| 328 | 328 | $xml = bigbluebuttonbn_wrap_xml_load_file( |
| 329 | 329 | \mod_bigbluebuttonbn\locallib\bigbluebutton::action_url('getDefaultConfigXML') |
| 330 | - ); |
|
| 330 | + ); |
|
| 331 | 331 | return $xml; |
| 332 | 332 | } |
| 333 | 333 | |
@@ -428,7 +428,7 @@ discard block |
||
| 428 | 428 | foreach ($ids as $id) { |
| 429 | 429 | $xml = bigbluebuttonbn_wrap_xml_load_file( |
| 430 | 430 | \mod_bigbluebuttonbn\locallib\bigbluebutton::action_url('deleteRecordings', ['recordID' => $id]) |
| 431 | - ); |
|
| 431 | + ); |
|
| 432 | 432 | if ($xml && $xml->returncode != 'SUCCESS') { |
| 433 | 433 | return false; |
| 434 | 434 | } |
@@ -447,7 +447,7 @@ discard block |
||
| 447 | 447 | foreach ($ids as $id) { |
| 448 | 448 | $xml = bigbluebuttonbn_wrap_xml_load_file( |
| 449 | 449 | \mod_bigbluebuttonbn\locallib\bigbluebutton::action_url('publishRecordings', ['recordID' => $id, 'publish' => $publish]) |
| 450 | - ); |
|
| 450 | + ); |
|
| 451 | 451 | if ($xml && $xml->returncode != 'SUCCESS') { |
| 452 | 452 | return false; |
| 453 | 453 | } |
@@ -466,7 +466,7 @@ discard block |
||
| 466 | 466 | foreach ($ids as $id) { |
| 467 | 467 | $xml = bigbluebuttonbn_wrap_xml_load_file( |
| 468 | 468 | \mod_bigbluebuttonbn\locallib\bigbluebutton::action_url('updateRecordings', ['recordID' => $id] + (array) $params) |
| 469 | - ); |
|
| 469 | + ); |
|
| 470 | 470 | if ($xml && $xml->returncode != 'SUCCESS') { |
| 471 | 471 | return false; |
| 472 | 472 | } |
@@ -483,7 +483,7 @@ discard block |
||
| 483 | 483 | function bigbluebuttonbn_end_meeting($meetingid, $modpw) { |
| 484 | 484 | $xml = bigbluebuttonbn_wrap_xml_load_file( |
| 485 | 485 | \mod_bigbluebuttonbn\locallib\bigbluebutton::action_url('end', ['meetingID' => $meetingid, 'password' => $modpw]) |
| 486 | - ); |
|
| 486 | + ); |
|
| 487 | 487 | if ($xml) { |
| 488 | 488 | // If the xml packet returned failure it displays the message to the user. |
| 489 | 489 | return array('returncode' => $xml->returncode, 'message' => $xml->message, 'messageKey' => $xml->messageKey); |
@@ -500,7 +500,7 @@ discard block |
||
| 500 | 500 | function bigbluebuttonbn_get_server_version() { |
| 501 | 501 | $xml = bigbluebuttonbn_wrap_xml_load_file( |
| 502 | 502 | \mod_bigbluebuttonbn\locallib\bigbluebutton::action_url() |
| 503 | - ); |
|
| 503 | + ); |
|
| 504 | 504 | if ($xml && $xml->returncode == 'SUCCESS') { |
| 505 | 505 | return $xml->version; |
| 506 | 506 | } |
@@ -567,10 +567,10 @@ discard block |
||
| 567 | 567 | } |
| 568 | 568 | $options = array(); |
| 569 | 569 | $options['CURLOPT_HTTPHEADER'] = array( |
| 570 | - 'Content-Type: '.$contenttype, |
|
| 571 | - 'Content-Length: '.strlen($data), |
|
| 572 | - 'Content-Language: en-US', |
|
| 573 | - ); |
|
| 570 | + 'Content-Type: '.$contenttype, |
|
| 571 | + 'Content-Length: '.strlen($data), |
|
| 572 | + 'Content-Language: en-US', |
|
| 573 | + ); |
|
| 574 | 574 | |
| 575 | 575 | return $c->post($url, $data, $options); |
| 576 | 576 | } |
@@ -717,16 +717,16 @@ discard block |
||
| 717 | 717 | 'all' => array( |
| 718 | 718 | 'name' => get_string('mod_form_field_participant_list_type_all', 'bigbluebuttonbn'), |
| 719 | 719 | 'children' => [] |
| 720 | - ) |
|
| 721 | - ); |
|
| 720 | + ) |
|
| 721 | + ); |
|
| 722 | 722 | $data['role'] = array( |
| 723 | 723 | 'name' => get_string('mod_form_field_participant_list_type_role', 'bigbluebuttonbn'), |
| 724 | 724 | 'children' => bigbluebuttonbn_get_roles_select($context) |
| 725 | - ); |
|
| 725 | + ); |
|
| 726 | 726 | $data['user'] = array( |
| 727 | 727 | 'name' => get_string('mod_form_field_participant_list_type_user', 'bigbluebuttonbn'), |
| 728 | 728 | 'children' => bigbluebuttonbn_get_users_select($context) |
| 729 | - ); |
|
| 729 | + ); |
|
| 730 | 730 | return $data; |
| 731 | 731 | } |
| 732 | 732 | |
@@ -771,9 +771,9 @@ discard block |
||
| 771 | 771 | continue; |
| 772 | 772 | } |
| 773 | 773 | $participantlistarray[] = array( |
| 774 | - 'selectiontype' => 'role', |
|
| 775 | - 'selectionid' => $moderatordefault, |
|
| 776 | - 'role' => BIGBLUEBUTTONBN_ROLE_MODERATOR); |
|
| 774 | + 'selectiontype' => 'role', |
|
| 775 | + 'selectionid' => $moderatordefault, |
|
| 776 | + 'role' => BIGBLUEBUTTONBN_ROLE_MODERATOR); |
|
| 777 | 777 | } |
| 778 | 778 | return $participantlistarray; |
| 779 | 779 | } |
@@ -816,11 +816,11 @@ discard block |
||
| 816 | 816 | 'all' => get_string('mod_form_field_participant_list_type_all', 'bigbluebuttonbn'), |
| 817 | 817 | 'role' => get_string('mod_form_field_participant_list_type_role', 'bigbluebuttonbn'), |
| 818 | 818 | 'user' => get_string('mod_form_field_participant_list_type_user', 'bigbluebuttonbn'), |
| 819 | - ], |
|
| 819 | + ], |
|
| 820 | 820 | 'type_selected' => 'all', |
| 821 | 821 | 'options' => ['all' => '---------------'], |
| 822 | 822 | 'selected' => 'all', |
| 823 | - ]; |
|
| 823 | + ]; |
|
| 824 | 824 | } |
| 825 | 825 | |
| 826 | 826 | /** |
@@ -1102,7 +1102,7 @@ discard block |
||
| 1102 | 1102 | $eventproperties['other'] = $options['other']; |
| 1103 | 1103 | } |
| 1104 | 1104 | $event = call_user_func_array('\mod_bigbluebuttonbn\event\bigbluebuttonbn_'.$eventtype.'::create', |
| 1105 | - array($eventproperties)); |
|
| 1105 | + array($eventproperties)); |
|
| 1106 | 1106 | $event->trigger(); |
| 1107 | 1107 | } |
| 1108 | 1108 | |
@@ -1146,7 +1146,7 @@ discard block |
||
| 1146 | 1146 | // Ping again and refresh the cache. |
| 1147 | 1147 | $meetinginfo = (array) bigbluebuttonbn_wrap_xml_load_file( |
| 1148 | 1148 | \mod_bigbluebuttonbn\locallib\bigbluebutton::action_url('getMeetingInfo', ['meetingID' => $meetingid]) |
| 1149 | - ); |
|
| 1149 | + ); |
|
| 1150 | 1150 | $cache->set($meetingid, array('creation_time' => time(), 'meeting_info' => json_encode($meetinginfo))); |
| 1151 | 1151 | return $meetinginfo; |
| 1152 | 1152 | } |
@@ -1558,8 +1558,8 @@ discard block |
||
| 1558 | 1558 | } |
| 1559 | 1559 | $id = 'playbacks-'.$recording['recordID']; |
| 1560 | 1560 | $recordingtypes = html_writer::start_tag('div', array('id' => $id, 'data-imported' => $dataimported, |
| 1561 | - 'data-meetingid' => $recording['meetingID'], 'data-recordingid' => $recording['recordID'], |
|
| 1562 | - 'title' => $title, $visibility => $visibility)); |
|
| 1561 | + 'data-meetingid' => $recording['meetingID'], 'data-recordingid' => $recording['recordID'], |
|
| 1562 | + 'title' => $title, $visibility => $visibility)); |
|
| 1563 | 1563 | foreach ($recording['playbacks'] as $playback) { |
| 1564 | 1564 | $recordingtypes .= bigbluebuttonbn_get_recording_data_row_type($recording, $bbbsession, $playback); |
| 1565 | 1565 | } |
@@ -1583,7 +1583,7 @@ discard block |
||
| 1583 | 1583 | } |
| 1584 | 1584 | $text = get_string('view_recording_format_'.$playback['type'], 'bigbluebuttonbn'); |
| 1585 | 1585 | $href = $CFG->wwwroot . '/mod/bigbluebuttonbn/bbb_view.php?action=play&bn=' . $bbbsession['bigbluebuttonbn']->id . |
| 1586 | - '&mid='.$recording['meetingID'] . '&rid=' . $recording['recordID'] . '&rtype=' . $playback['type']; |
|
| 1586 | + '&mid='.$recording['meetingID'] . '&rid=' . $recording['recordID'] . '&rtype=' . $playback['type']; |
|
| 1587 | 1587 | if (!isset($recording['imported']) || !isset($recording['protected']) || $recording['protected'] === 'false') { |
| 1588 | 1588 | $href .= '&href='.urlencode(trim($playback['url'])); |
| 1589 | 1589 | } |
@@ -1594,7 +1594,7 @@ discard block |
||
| 1594 | 1594 | 'data-action' => 'play', |
| 1595 | 1595 | 'data-target' => $playback['type'], |
| 1596 | 1596 | 'data-href' => $href, |
| 1597 | - ); |
|
| 1597 | + ); |
|
| 1598 | 1598 | if (!bigbluebuttonbn_is_bn_server() && !bigbluebuttonbn_is_valid_resource(trim($playback['url']))) { |
| 1599 | 1599 | $linkattributes['class'] = 'btn btn-sm btn-warning'; |
| 1600 | 1600 | $linkattributes['title'] = get_string('view_recording_format_errror_unreachable', 'bigbluebuttonbn'); |
@@ -1744,10 +1744,10 @@ discard block |
||
| 1744 | 1744 | 'id' => $id, |
| 1745 | 1745 | 'onclick' => $onclick, |
| 1746 | 1746 | 'data-action' => $data['action'] |
| 1747 | - ); |
|
| 1747 | + ); |
|
| 1748 | 1748 | if (!isset($recording['imported'])) { |
| 1749 | 1749 | $linkattributes['data-links'] = bigbluebuttonbn_count_recording_imported_instances( |
| 1750 | - $recording['recordID']); |
|
| 1750 | + $recording['recordID']); |
|
| 1751 | 1751 | } |
| 1752 | 1752 | if (isset($data['disabled'])) { |
| 1753 | 1753 | $iconattributes['class'] .= ' fa-' . $data['disabled']; |
@@ -2288,8 +2288,8 @@ discard block |
||
| 2288 | 2288 | $activitytime = ''; |
| 2289 | 2289 | if ($time) { |
| 2290 | 2290 | $activitytime = calendar_day_representation($time).' '. |
| 2291 | - get_string('mod_form_field_notification_msg_at', 'bigbluebuttonbn').' '. |
|
| 2292 | - calendar_time_representation($time); |
|
| 2291 | + get_string('mod_form_field_notification_msg_at', 'bigbluebuttonbn').' '. |
|
| 2292 | + calendar_time_representation($time); |
|
| 2293 | 2293 | } |
| 2294 | 2294 | return $activitytime; |
| 2295 | 2295 | } |
@@ -2385,7 +2385,7 @@ discard block |
||
| 2385 | 2385 | global $BIGBLUEBUTTONBN_CFG; |
| 2386 | 2386 | if (isset($BIGBLUEBUTTONBN_CFG)) { |
| 2387 | 2387 | $renderer->render_warning_message('general_warning', |
| 2388 | - get_string('config_warning_bigbluebuttonbn_cfg_deprecated', 'bigbluebuttonbn')); |
|
| 2388 | + get_string('config_warning_bigbluebuttonbn_cfg_deprecated', 'bigbluebuttonbn')); |
|
| 2389 | 2389 | } |
| 2390 | 2390 | } |
| 2391 | 2391 | |
@@ -2593,7 +2593,7 @@ discard block |
||
| 2593 | 2593 | $renderer->render_group_element('participant_moderator_default', |
| 2594 | 2594 | $renderer->render_group_element_configmultiselect('participant_moderator_default', |
| 2595 | 2595 | array_keys($owner), array_merge($owner, $roles)) |
| 2596 | - ); |
|
| 2596 | + ); |
|
| 2597 | 2597 | } |
| 2598 | 2598 | } |
| 2599 | 2599 | |
@@ -2697,7 +2697,7 @@ discard block |
||
| 2697 | 2697 | return $output; |
| 2698 | 2698 | } |
| 2699 | 2699 | $output .= $OUTPUT->box_start('box boxalignleft adminerror alert alert-' . $type . ' alert-block fade in', |
| 2700 | - 'bigbluebuttonbn_view_general_warning') . "\n"; |
|
| 2700 | + 'bigbluebuttonbn_view_general_warning') . "\n"; |
|
| 2701 | 2701 | $output .= ' ' . $message . "\n"; |
| 2702 | 2702 | $output .= ' <div class="singlebutton pull-right">' . "\n"; |
| 2703 | 2703 | if (!empty($href)) { |