@@ -123,9 +123,9 @@ discard block |
||
| 123 | 123 | */ |
| 124 | 124 | function bigbluebuttonbn_get_join_url($meetingid, $username, $pw, $logouturl, $configtoken = null, $userid = null) { |
| 125 | 125 | $data = ['meetingID' => $meetingid, |
| 126 | - 'fullName' => $username, |
|
| 127 | - 'password' => $pw, |
|
| 128 | - 'logoutURL' => $logouturl, |
|
| 126 | + 'fullName' => $username, |
|
| 127 | + 'password' => $pw, |
|
| 128 | + 'logoutURL' => $logouturl, |
|
| 129 | 129 | ]; |
| 130 | 130 | if (!is_null($configtoken)) { |
| 131 | 131 | $data['configToken'] = $configtoken; |
@@ -177,23 +177,23 @@ discard block |
||
| 177 | 177 | function bigbluebuttonbn_get_meeting_info_array($meetingid) { |
| 178 | 178 | $xml = bigbluebuttonbn_wrap_xml_load_file( |
| 179 | 179 | \mod_bigbluebuttonbn\locallib\bigbluebutton::action_url('getMeetingInfo', ['meetingID' => $meetingid]) |
| 180 | - ); |
|
| 180 | + ); |
|
| 181 | 181 | if ($xml && $xml->returncode == 'SUCCESS' && empty($xml->messageKey)) { |
| 182 | 182 | // Meeting info was returned. |
| 183 | 183 | return array('returncode' => $xml->returncode, |
| 184 | - 'meetingID' => $xml->meetingID, |
|
| 185 | - 'moderatorPW' => $xml->moderatorPW, |
|
| 186 | - 'attendeePW' => $xml->attendeePW, |
|
| 187 | - 'hasBeenForciblyEnded' => $xml->hasBeenForciblyEnded, |
|
| 188 | - 'running' => $xml->running, |
|
| 189 | - 'recording' => $xml->recording, |
|
| 190 | - 'startTime' => $xml->startTime, |
|
| 191 | - 'endTime' => $xml->endTime, |
|
| 192 | - 'participantCount' => $xml->participantCount, |
|
| 193 | - 'moderatorCount' => $xml->moderatorCount, |
|
| 194 | - 'attendees' => $xml->attendees, |
|
| 195 | - 'metadata' => $xml->metadata, |
|
| 196 | - ); |
|
| 184 | + 'meetingID' => $xml->meetingID, |
|
| 185 | + 'moderatorPW' => $xml->moderatorPW, |
|
| 186 | + 'attendeePW' => $xml->attendeePW, |
|
| 187 | + 'hasBeenForciblyEnded' => $xml->hasBeenForciblyEnded, |
|
| 188 | + 'running' => $xml->running, |
|
| 189 | + 'recording' => $xml->recording, |
|
| 190 | + 'startTime' => $xml->startTime, |
|
| 191 | + 'endTime' => $xml->endTime, |
|
| 192 | + 'participantCount' => $xml->participantCount, |
|
| 193 | + 'moderatorCount' => $xml->moderatorCount, |
|
| 194 | + 'attendees' => $xml->attendees, |
|
| 195 | + 'metadata' => $xml->metadata, |
|
| 196 | + ); |
|
| 197 | 197 | } |
| 198 | 198 | if ($xml) { |
| 199 | 199 | // 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 | |
@@ -430,7 +430,7 @@ discard block |
||
| 430 | 430 | foreach ($ids as $id) { |
| 431 | 431 | $xml = bigbluebuttonbn_wrap_xml_load_file( |
| 432 | 432 | \mod_bigbluebuttonbn\locallib\bigbluebutton::action_url('deleteRecordings', ['recordID' => $id]) |
| 433 | - ); |
|
| 433 | + ); |
|
| 434 | 434 | if ($xml && $xml->returncode != 'SUCCESS') { |
| 435 | 435 | return false; |
| 436 | 436 | } |
@@ -449,7 +449,7 @@ discard block |
||
| 449 | 449 | foreach ($ids as $id) { |
| 450 | 450 | $xml = bigbluebuttonbn_wrap_xml_load_file( |
| 451 | 451 | \mod_bigbluebuttonbn\locallib\bigbluebutton::action_url('publishRecordings', ['recordID' => $id, 'publish' => $publish]) |
| 452 | - ); |
|
| 452 | + ); |
|
| 453 | 453 | if ($xml && $xml->returncode != 'SUCCESS') { |
| 454 | 454 | return false; |
| 455 | 455 | } |
@@ -468,7 +468,7 @@ discard block |
||
| 468 | 468 | foreach ($ids as $id) { |
| 469 | 469 | $xml = bigbluebuttonbn_wrap_xml_load_file( |
| 470 | 470 | \mod_bigbluebuttonbn\locallib\bigbluebutton::action_url('updateRecordings', ['recordID' => $id] + (array) $params) |
| 471 | - ); |
|
| 471 | + ); |
|
| 472 | 472 | if ($xml && $xml->returncode != 'SUCCESS') { |
| 473 | 473 | return false; |
| 474 | 474 | } |
@@ -485,7 +485,7 @@ discard block |
||
| 485 | 485 | function bigbluebuttonbn_end_meeting($meetingid, $modpw) { |
| 486 | 486 | $xml = bigbluebuttonbn_wrap_xml_load_file( |
| 487 | 487 | \mod_bigbluebuttonbn\locallib\bigbluebutton::action_url('end', ['meetingID' => $meetingid, 'password' => $modpw]) |
| 488 | - ); |
|
| 488 | + ); |
|
| 489 | 489 | if ($xml) { |
| 490 | 490 | // If the xml packet returned failure it displays the message to the user. |
| 491 | 491 | return array('returncode' => $xml->returncode, 'message' => $xml->message, 'messageKey' => $xml->messageKey); |
@@ -505,7 +505,7 @@ discard block |
||
| 505 | 505 | */ |
| 506 | 506 | $xml = bigbluebuttonbn_wrap_xml_load_file( |
| 507 | 507 | \mod_bigbluebuttonbn\locallib\bigbluebutton::action_url('getMeetingInfo', ['meetingID' => $meetingid]) |
| 508 | - ); |
|
| 508 | + ); |
|
| 509 | 509 | return ($xml && $xml->returncode == 'SUCCESS'); |
| 510 | 510 | } |
| 511 | 511 | |
@@ -517,7 +517,7 @@ discard block |
||
| 517 | 517 | function bigbluebuttonbn_get_server_version() { |
| 518 | 518 | $xml = bigbluebuttonbn_wrap_xml_load_file( |
| 519 | 519 | \mod_bigbluebuttonbn\locallib\bigbluebutton::action_url() |
| 520 | - ); |
|
| 520 | + ); |
|
| 521 | 521 | if ($xml && $xml->returncode == 'SUCCESS') { |
| 522 | 522 | return $xml->version; |
| 523 | 523 | } |
@@ -585,10 +585,10 @@ discard block |
||
| 585 | 585 | |
| 586 | 586 | $options = array(); |
| 587 | 587 | $options['CURLOPT_HTTPHEADER'] = array( |
| 588 | - 'Content-Type: '.$contenttype, |
|
| 589 | - 'Content-Length: '.strlen($data), |
|
| 590 | - 'Content-Language: en-US', |
|
| 591 | - ); |
|
| 588 | + 'Content-Type: '.$contenttype, |
|
| 589 | + 'Content-Length: '.strlen($data), |
|
| 590 | + 'Content-Language: en-US', |
|
| 591 | + ); |
|
| 592 | 592 | |
| 593 | 593 | return $c->post($url, $data, $options); |
| 594 | 594 | } |
@@ -731,16 +731,16 @@ discard block |
||
| 731 | 731 | 'all' => array( |
| 732 | 732 | 'name' => get_string('mod_form_field_participant_list_type_all', 'bigbluebuttonbn'), |
| 733 | 733 | 'children' => [] |
| 734 | - ) |
|
| 735 | - ); |
|
| 734 | + ) |
|
| 735 | + ); |
|
| 736 | 736 | $data['role'] = array( |
| 737 | 737 | 'name' => get_string('mod_form_field_participant_list_type_role', 'bigbluebuttonbn'), |
| 738 | 738 | 'children' => bigbluebuttonbn_get_roles_select($context) |
| 739 | - ); |
|
| 739 | + ); |
|
| 740 | 740 | $data['user'] = array( |
| 741 | 741 | 'name' => get_string('mod_form_field_participant_list_type_user', 'bigbluebuttonbn'), |
| 742 | 742 | 'children' => bigbluebuttonbn_get_users_select($context) |
| 743 | - ); |
|
| 743 | + ); |
|
| 744 | 744 | return $data; |
| 745 | 745 | } |
| 746 | 746 | |
@@ -785,9 +785,9 @@ discard block |
||
| 785 | 785 | continue; |
| 786 | 786 | } |
| 787 | 787 | $participantlistarray[] = array( |
| 788 | - 'selectiontype' => 'role', |
|
| 789 | - 'selectionid' => $moderatordefault, |
|
| 790 | - 'role' => BIGBLUEBUTTONBN_ROLE_MODERATOR); |
|
| 788 | + 'selectiontype' => 'role', |
|
| 789 | + 'selectionid' => $moderatordefault, |
|
| 790 | + 'role' => BIGBLUEBUTTONBN_ROLE_MODERATOR); |
|
| 791 | 791 | } |
| 792 | 792 | return $participantlistarray; |
| 793 | 793 | } |
@@ -830,11 +830,11 @@ discard block |
||
| 830 | 830 | 'all' => get_string('mod_form_field_participant_list_type_all', 'bigbluebuttonbn'), |
| 831 | 831 | 'role' => get_string('mod_form_field_participant_list_type_role', 'bigbluebuttonbn'), |
| 832 | 832 | 'user' => get_string('mod_form_field_participant_list_type_user', 'bigbluebuttonbn'), |
| 833 | - ], |
|
| 833 | + ], |
|
| 834 | 834 | 'type_selected' => 'all', |
| 835 | 835 | 'options' => ['all' => '---------------'], |
| 836 | 836 | 'selected' => 'all', |
| 837 | - ]; |
|
| 837 | + ]; |
|
| 838 | 838 | } |
| 839 | 839 | |
| 840 | 840 | /** |
@@ -1120,7 +1120,7 @@ discard block |
||
| 1120 | 1120 | $eventproperties['other'] = $options['other']; |
| 1121 | 1121 | } |
| 1122 | 1122 | $event = call_user_func_array('\mod_bigbluebuttonbn\event\\'.$eventtype.'::create', |
| 1123 | - array($eventproperties)); |
|
| 1123 | + array($eventproperties)); |
|
| 1124 | 1124 | $event->trigger(); |
| 1125 | 1125 | } |
| 1126 | 1126 | |
@@ -1164,7 +1164,7 @@ discard block |
||
| 1164 | 1164 | // Ping again and refresh the cache. |
| 1165 | 1165 | $meetinginfo = (array) bigbluebuttonbn_wrap_xml_load_file( |
| 1166 | 1166 | \mod_bigbluebuttonbn\locallib\bigbluebutton::action_url('getMeetingInfo', ['meetingID' => $meetingid]) |
| 1167 | - ); |
|
| 1167 | + ); |
|
| 1168 | 1168 | $cache->set($meetingid, array('creation_time' => time(), 'meeting_info' => json_encode($meetinginfo))); |
| 1169 | 1169 | return $meetinginfo; |
| 1170 | 1170 | } |
@@ -1534,8 +1534,8 @@ discard block |
||
| 1534 | 1534 | } |
| 1535 | 1535 | $id = 'playbacks-'.$recording['recordID']; |
| 1536 | 1536 | $recordingtypes = html_writer::start_tag('div', array('id' => $id, 'data-imported' => $dataimported, |
| 1537 | - 'data-meetingid' => $recording['meetingID'], 'data-recordingid' => $recording['recordID'], |
|
| 1538 | - 'title' => $title, $visibility => $visibility)); |
|
| 1537 | + 'data-meetingid' => $recording['meetingID'], 'data-recordingid' => $recording['recordID'], |
|
| 1538 | + 'title' => $title, $visibility => $visibility)); |
|
| 1539 | 1539 | foreach ($recording['playbacks'] as $playback) { |
| 1540 | 1540 | $recordingtypes .= bigbluebuttonbn_get_recording_data_row_type($recording, $bbbsession, $playback); |
| 1541 | 1541 | } |
@@ -1560,7 +1560,7 @@ discard block |
||
| 1560 | 1560 | $title = get_string('view_recording_format_'.$playback['type'], 'bigbluebuttonbn'); |
| 1561 | 1561 | $onclick = 'M.mod_bigbluebuttonbn.recordings.recordingPlay(this);'; |
| 1562 | 1562 | $href = $CFG->wwwroot . '/mod/bigbluebuttonbn/bbb_view.php?action=play&bn=' . $bbbsession['bigbluebuttonbn']->id . |
| 1563 | - '&mid='.$recording['meetingID'] . '&rid=' . $recording['recordID'] . '&rtype=' . $playback['type']; |
|
| 1563 | + '&mid='.$recording['meetingID'] . '&rid=' . $recording['recordID'] . '&rtype=' . $playback['type']; |
|
| 1564 | 1564 | if (!isset($recording['imported']) || !isset($recording['protected']) || $recording['protected'] === 'false') { |
| 1565 | 1565 | $href .= '&href='.urlencode(trim($playback['url'])); |
| 1566 | 1566 | } |
@@ -1572,7 +1572,7 @@ discard block |
||
| 1572 | 1572 | 'data-target' => $playback['type'], |
| 1573 | 1573 | 'data-href' => $href, |
| 1574 | 1574 | 'class' => 'btn btn-sm btn-default' |
| 1575 | - ); |
|
| 1575 | + ); |
|
| 1576 | 1576 | return $OUTPUT->action_link('#', $title, null, $linkattributes) . ' '; |
| 1577 | 1577 | } |
| 1578 | 1578 | |
@@ -1686,10 +1686,10 @@ discard block |
||
| 1686 | 1686 | 'id' => $id, |
| 1687 | 1687 | 'onclick' => $onclick, |
| 1688 | 1688 | 'data-action' => $data['action'] |
| 1689 | - ); |
|
| 1689 | + ); |
|
| 1690 | 1690 | if (!isset($recording['imported'])) { |
| 1691 | 1691 | $linkattributes['data-links'] = bigbluebuttonbn_count_recording_imported_instances( |
| 1692 | - $recording['recordID']); |
|
| 1692 | + $recording['recordID']); |
|
| 1693 | 1693 | } |
| 1694 | 1694 | if (isset($data['disabled'])) { |
| 1695 | 1695 | $iconattributes['class'] .= ' fa-' . $data['disabled']; |
@@ -2234,8 +2234,8 @@ discard block |
||
| 2234 | 2234 | $activitytime = ''; |
| 2235 | 2235 | if ($time) { |
| 2236 | 2236 | $activitytime = calendar_day_representation($time).' '. |
| 2237 | - get_string('mod_form_field_notification_msg_at', 'bigbluebuttonbn').' '. |
|
| 2238 | - calendar_time_representation($time); |
|
| 2237 | + get_string('mod_form_field_notification_msg_at', 'bigbluebuttonbn').' '. |
|
| 2238 | + calendar_time_representation($time); |
|
| 2239 | 2239 | } |
| 2240 | 2240 | return $activitytime; |
| 2241 | 2241 | } |
@@ -2535,7 +2535,7 @@ discard block |
||
| 2535 | 2535 | $renderer->render_group_element('participant_moderator_default', |
| 2536 | 2536 | $renderer->render_group_element_configmultiselect('participant_moderator_default', |
| 2537 | 2537 | array_keys($owner), array_merge($owner, $roles)) |
| 2538 | - ); |
|
| 2538 | + ); |
|
| 2539 | 2539 | } |
| 2540 | 2540 | } |
| 2541 | 2541 | |
@@ -2635,7 +2635,7 @@ discard block |
||
| 2635 | 2635 | return $output; |
| 2636 | 2636 | } |
| 2637 | 2637 | $output .= $OUTPUT->box_start('box boxalignleft adminerror alert alert-' . $type . ' alert-block fade in', |
| 2638 | - 'bigbluebuttonbn_view_general_warning') . "\n"; |
|
| 2638 | + 'bigbluebuttonbn_view_general_warning') . "\n"; |
|
| 2639 | 2639 | $output .= ' ' . $message . "\n"; |
| 2640 | 2640 | $output .= ' <div class="singlebutton pull-right">' . "\n"; |
| 2641 | 2641 | if (!empty($href)) { |