| @@ -103,9 +103,9 @@ discard block | ||
| 103 | 103 | function bigbluebuttonbn_get_join_url($meetingid, $username, $pw, $logouturl, $configtoken = null, | 
| 104 | 104 |          $userid = null, $clienttype = BIGBLUEBUTTON_CLIENTTYPE_FLASH) { | 
| 105 | 105 | $data = ['meetingID' => $meetingid, | 
| 106 | - 'fullName' => $username, | |
| 107 | - 'password' => $pw, | |
| 108 | - 'logoutURL' => $logouturl, | |
| 106 | + 'fullName' => $username, | |
| 107 | + 'password' => $pw, | |
| 108 | + 'logoutURL' => $logouturl, | |
| 109 | 109 | ]; | 
| 110 | 110 | // Choose between Adobe Flash or HTML5 Client. | 
| 111 | 111 |      if ( $clienttype == BIGBLUEBUTTON_CLIENTTYPE_HTML5 ) { | 
| @@ -161,23 +161,23 @@ discard block | ||
| 161 | 161 |  function bigbluebuttonbn_get_meeting_info_array($meetingid) { | 
| 162 | 162 | $xml = bigbluebuttonbn_wrap_xml_load_file( | 
| 163 | 163 |          \mod_bigbluebuttonbn\locallib\bigbluebutton::action_url('getMeetingInfo', ['meetingID' => $meetingid]) | 
| 164 | - ); | |
| 164 | + ); | |
| 165 | 165 |      if ($xml && $xml->returncode == 'SUCCESS' && empty($xml->messageKey)) { | 
| 166 | 166 | // Meeting info was returned. | 
| 167 | 167 |          return array('returncode' => $xml->returncode, | 
| 168 | - 'meetingID' => $xml->meetingID, | |
| 169 | - 'moderatorPW' => $xml->moderatorPW, | |
| 170 | - 'attendeePW' => $xml->attendeePW, | |
| 171 | - 'hasBeenForciblyEnded' => $xml->hasBeenForciblyEnded, | |
| 172 | - 'running' => $xml->running, | |
| 173 | - 'recording' => $xml->recording, | |
| 174 | - 'startTime' => $xml->startTime, | |
| 175 | - 'endTime' => $xml->endTime, | |
| 176 | - 'participantCount' => $xml->participantCount, | |
| 177 | - 'moderatorCount' => $xml->moderatorCount, | |
| 178 | - 'attendees' => $xml->attendees, | |
| 179 | - 'metadata' => $xml->metadata, | |
| 180 | - ); | |
| 168 | + 'meetingID' => $xml->meetingID, | |
| 169 | + 'moderatorPW' => $xml->moderatorPW, | |
| 170 | + 'attendeePW' => $xml->attendeePW, | |
| 171 | + 'hasBeenForciblyEnded' => $xml->hasBeenForciblyEnded, | |
| 172 | + 'running' => $xml->running, | |
| 173 | + 'recording' => $xml->recording, | |
| 174 | + 'startTime' => $xml->startTime, | |
| 175 | + 'endTime' => $xml->endTime, | |
| 176 | + 'participantCount' => $xml->participantCount, | |
| 177 | + 'moderatorCount' => $xml->moderatorCount, | |
| 178 | + 'attendees' => $xml->attendees, | |
| 179 | + 'metadata' => $xml->metadata, | |
| 180 | + ); | |
| 181 | 181 | } | 
| 182 | 182 |      if ($xml) { | 
| 183 | 183 | // Either failure or success without meeting info. | 
| @@ -333,7 +333,7 @@ discard block | ||
| 333 | 333 |  function bigbluebuttonbn_get_default_config_xml() { | 
| 334 | 334 | $xml = bigbluebuttonbn_wrap_xml_load_file( | 
| 335 | 335 |          \mod_bigbluebuttonbn\locallib\bigbluebutton::action_url('getDefaultConfigXML') | 
| 336 | - ); | |
| 336 | + ); | |
| 337 | 337 | return $xml; | 
| 338 | 338 | } | 
| 339 | 339 | |
| @@ -437,7 +437,7 @@ discard block | ||
| 437 | 437 |      foreach ($ids as $id) { | 
| 438 | 438 | $xml = bigbluebuttonbn_wrap_xml_load_file( | 
| 439 | 439 |              \mod_bigbluebuttonbn\locallib\bigbluebutton::action_url('deleteRecordings', ['recordID' => $id]) | 
| 440 | - ); | |
| 440 | + ); | |
| 441 | 441 |          if ($xml && $xml->returncode != 'SUCCESS') { | 
| 442 | 442 | return false; | 
| 443 | 443 | } | 
| @@ -456,7 +456,7 @@ discard block | ||
| 456 | 456 |      foreach ($ids as $id) { | 
| 457 | 457 | $xml = bigbluebuttonbn_wrap_xml_load_file( | 
| 458 | 458 |              \mod_bigbluebuttonbn\locallib\bigbluebutton::action_url('publishRecordings', ['recordID' => $id, 'publish' => $publish]) | 
| 459 | - ); | |
| 459 | + ); | |
| 460 | 460 |          if ($xml && $xml->returncode != 'SUCCESS') { | 
| 461 | 461 | return false; | 
| 462 | 462 | } | 
| @@ -475,7 +475,7 @@ discard block | ||
| 475 | 475 |      foreach ($ids as $id) { | 
| 476 | 476 | $xml = bigbluebuttonbn_wrap_xml_load_file( | 
| 477 | 477 |              \mod_bigbluebuttonbn\locallib\bigbluebutton::action_url('updateRecordings', ['recordID' => $id] + (array) $params) | 
| 478 | - ); | |
| 478 | + ); | |
| 479 | 479 |          if ($xml && $xml->returncode != 'SUCCESS') { | 
| 480 | 480 | return false; | 
| 481 | 481 | } | 
| @@ -492,7 +492,7 @@ discard block | ||
| 492 | 492 |  function bigbluebuttonbn_end_meeting($meetingid, $modpw) { | 
| 493 | 493 | $xml = bigbluebuttonbn_wrap_xml_load_file( | 
| 494 | 494 |          \mod_bigbluebuttonbn\locallib\bigbluebutton::action_url('end', ['meetingID' => $meetingid, 'password' => $modpw]) | 
| 495 | - ); | |
| 495 | + ); | |
| 496 | 496 |      if ($xml) { | 
| 497 | 497 | // If the xml packet returned failure it displays the message to the user. | 
| 498 | 498 |          return array('returncode' => $xml->returncode, 'message' => $xml->message, 'messageKey' => $xml->messageKey); | 
| @@ -509,7 +509,7 @@ discard block | ||
| 509 | 509 |  function bigbluebuttonbn_get_server_version() { | 
| 510 | 510 | $xml = bigbluebuttonbn_wrap_xml_load_file( | 
| 511 | 511 | \mod_bigbluebuttonbn\locallib\bigbluebutton::action_url() | 
| 512 | - ); | |
| 512 | + ); | |
| 513 | 513 |      if ($xml && $xml->returncode == 'SUCCESS') { | 
| 514 | 514 | return $xml->version; | 
| 515 | 515 | } | 
| @@ -578,10 +578,10 @@ discard block | ||
| 578 | 578 | } | 
| 579 | 579 | $options = array(); | 
| 580 | 580 | $options['CURLOPT_HTTPHEADER'] = array( | 
| 581 | - 'Content-Type: '.$contenttype, | |
| 582 | - 'Content-Length: '.strlen($data), | |
| 583 | - 'Content-Language: en-US', | |
| 584 | - ); | |
| 581 | + 'Content-Type: '.$contenttype, | |
| 582 | + 'Content-Length: '.strlen($data), | |
| 583 | + 'Content-Language: en-US', | |
| 584 | + ); | |
| 585 | 585 | |
| 586 | 586 | return $c->post($url, $data, $options); | 
| 587 | 587 | } | 
| @@ -770,12 +770,12 @@ discard block | ||
| 770 | 770 | 'all' => array( | 
| 771 | 771 |              'name' => get_string('mod_form_field_participant_list_type_all', 'bigbluebuttonbn'), | 
| 772 | 772 | 'children' => [] | 
| 773 | - ) | |
| 774 | - ); | |
| 773 | + ) | |
| 774 | + ); | |
| 775 | 775 | $data['role'] = array( | 
| 776 | 776 |          'name' => get_string('mod_form_field_participant_list_type_role', 'bigbluebuttonbn'), | 
| 777 | 777 | 'children' => bigbluebuttonbn_get_roles_select($context, true) | 
| 778 | - ); | |
| 778 | + ); | |
| 779 | 779 | $data['user'] = array( | 
| 780 | 780 |          'name' => get_string('mod_form_field_participant_list_type_user', 'bigbluebuttonbn'), | 
| 781 | 781 | 'children' => bigbluebuttonbn_get_users_select($context, $bbactivity), | 
| @@ -822,7 +822,7 @@ discard block | ||
| 822 | 822 | 'selectiontype' => 'all', | 
| 823 | 823 | 'selectionid' => 'all', | 
| 824 | 824 | 'role' => BIGBLUEBUTTONBN_ROLE_VIEWER | 
| 825 | - ); | |
| 825 | + ); | |
| 826 | 826 |      $defaultrules = explode(',', \mod_bigbluebuttonbn\locallib\config::get('participant_moderator_default')); | 
| 827 | 827 |      foreach ($defaultrules as $defaultrule) { | 
| 828 | 828 |          if ($defaultrule == '0') { | 
| @@ -835,9 +835,9 @@ discard block | ||
| 835 | 835 | continue; | 
| 836 | 836 | } | 
| 837 | 837 | $participantlist[] = array( | 
| 838 | - 'selectiontype' => 'role', | |
| 839 | - 'selectionid' => $defaultrule, | |
| 840 | - 'role' => BIGBLUEBUTTONBN_ROLE_MODERATOR); | |
| 838 | + 'selectiontype' => 'role', | |
| 839 | + 'selectionid' => $defaultrule, | |
| 840 | + 'role' => BIGBLUEBUTTONBN_ROLE_MODERATOR); | |
| 841 | 841 | } | 
| 842 | 842 | return $participantlist; | 
| 843 | 843 | } | 
| @@ -876,11 +876,11 @@ discard block | ||
| 876 | 876 |              'all' => get_string('mod_form_field_participant_list_type_all', 'bigbluebuttonbn'), | 
| 877 | 877 |              'role' => get_string('mod_form_field_participant_list_type_role', 'bigbluebuttonbn'), | 
| 878 | 878 |              'user' => get_string('mod_form_field_participant_list_type_user', 'bigbluebuttonbn'), | 
| 879 | - ], | |
| 879 | + ], | |
| 880 | 880 | 'type_selected' => 'all', | 
| 881 | 881 | 'options' => ['all' => '---------------'], | 
| 882 | 882 | 'selected' => 'all', | 
| 883 | - ]; | |
| 883 | + ]; | |
| 884 | 884 | } | 
| 885 | 885 | |
| 886 | 886 | /** | 
| @@ -1199,7 +1199,7 @@ discard block | ||
| 1199 | 1199 | // Ping again and refresh the cache. | 
| 1200 | 1200 | $meetinginfo = (array) bigbluebuttonbn_wrap_xml_load_file( | 
| 1201 | 1201 |          \mod_bigbluebuttonbn\locallib\bigbluebutton::action_url('getMeetingInfo', ['meetingID' => $meetingid]) | 
| 1202 | - ); | |
| 1202 | + ); | |
| 1203 | 1203 |      $cache->set($meetingid, array('creation_time' => time(), 'meeting_info' => json_encode($meetinginfo))); | 
| 1204 | 1204 | return $meetinginfo; | 
| 1205 | 1205 | } | 
| @@ -1614,8 +1614,8 @@ discard block | ||
| 1614 | 1614 | } | 
| 1615 | 1615 | $id = 'playbacks-'.$recording['recordID']; | 
| 1616 | 1616 |      $recordingtypes = html_writer::start_tag('div', array('id' => $id, 'data-imported' => $dataimported, | 
| 1617 | - 'data-meetingid' => $recording['meetingID'], 'data-recordingid' => $recording['recordID'], | |
| 1618 | - 'title' => $title, $visibility => $visibility)); | |
| 1617 | + 'data-meetingid' => $recording['meetingID'], 'data-recordingid' => $recording['recordID'], | |
| 1618 | + 'title' => $title, $visibility => $visibility)); | |
| 1619 | 1619 |      foreach ($recording['playbacks'] as $playback) { | 
| 1620 | 1620 | $recordingtypes .= bigbluebuttonbn_get_recording_data_row_type($recording, $bbbsession, $playback); | 
| 1621 | 1621 | } | 
| @@ -1650,7 +1650,7 @@ discard block | ||
| 1650 | 1650 | 'data-action' => 'play', | 
| 1651 | 1651 | 'data-target' => $playback['type'], | 
| 1652 | 1652 | 'data-href' => $href, | 
| 1653 | - ); | |
| 1653 | + ); | |
| 1654 | 1654 |      if ($CFG->bigbluebuttonbn_recordings_validate_url && !bigbluebuttonbn_is_bn_server() && !bigbluebuttonbn_is_valid_resource(trim($playback['url']))) { | 
| 1655 | 1655 | $linkattributes['class'] = 'btn btn-sm btn-warning'; | 
| 1656 | 1656 |          $linkattributes['title'] = get_string('view_recording_format_errror_unreachable', 'bigbluebuttonbn'); | 
| @@ -1832,10 +1832,10 @@ discard block | ||
| 1832 | 1832 | 'id' => $id, | 
| 1833 | 1833 | 'onclick' => $onclick, | 
| 1834 | 1834 | 'data-action' => $data['action'] | 
| 1835 | - ); | |
| 1835 | + ); | |
| 1836 | 1836 |          if (!isset($recording['imported'])) { | 
| 1837 | 1837 | $linkattributes['data-links'] = bigbluebuttonbn_count_recording_imported_instances( | 
| 1838 | - $recording['recordID']); | |
| 1838 | + $recording['recordID']); | |
| 1839 | 1839 | } | 
| 1840 | 1840 |          if (isset($data['disabled'])) { | 
| 1841 | 1841 | $iconattributes['class'] .= ' fa-' . $data['disabled']; | 
| @@ -2358,17 +2358,17 @@ discard block | ||
| 2358 | 2358 |  function bigbluebuttonbn_get_instance_type_profiles() { | 
| 2359 | 2359 | $instanceprofiles = array( | 
| 2360 | 2360 |          BIGBLUEBUTTONBN_TYPE_ALL => array('id' => BIGBLUEBUTTONBN_TYPE_ALL, | 
| 2361 | -                  'name' => get_string('instance_type_default', 'bigbluebuttonbn'), | |
| 2362 | -                  'features' => array('all')), | |
| 2361 | +                    'name' => get_string('instance_type_default', 'bigbluebuttonbn'), | |
| 2362 | +                    'features' => array('all')), | |
| 2363 | 2363 |          BIGBLUEBUTTONBN_TYPE_ROOM_ONLY => array('id' => BIGBLUEBUTTONBN_TYPE_ROOM_ONLY, | 
| 2364 | -                  'name' => get_string('instance_type_room_only', 'bigbluebuttonbn'), | |
| 2365 | -                  'features' => array('showroom', 'welcomemessage', 'voicebridge', 'waitformoderator', 'userlimit', | |
| 2366 | - 'recording', 'sendnotifications', 'preuploadpresentation', 'permissions', 'schedule', 'groups', | |
| 2367 | - 'modstandardelshdr', 'availabilityconditionsheader', 'tagshdr', 'competenciessection', | |
| 2368 | - 'clienttype', 'availabilityconditionsheader')), | |
| 2364 | +                    'name' => get_string('instance_type_room_only', 'bigbluebuttonbn'), | |
| 2365 | +                    'features' => array('showroom', 'welcomemessage', 'voicebridge', 'waitformoderator', 'userlimit', | |
| 2366 | + 'recording', 'sendnotifications', 'preuploadpresentation', 'permissions', 'schedule', 'groups', | |
| 2367 | + 'modstandardelshdr', 'availabilityconditionsheader', 'tagshdr', 'competenciessection', | |
| 2368 | + 'clienttype', 'availabilityconditionsheader')), | |
| 2369 | 2369 |          BIGBLUEBUTTONBN_TYPE_RECORDING_ONLY => array('id' => BIGBLUEBUTTONBN_TYPE_RECORDING_ONLY, | 
| 2370 | -                  'name' => get_string('instance_type_recording_only', 'bigbluebuttonbn'), | |
| 2371 | -                  'features' => array('showrecordings', 'importrecordings', 'availabilityconditionsheader')) | |
| 2370 | +                    'name' => get_string('instance_type_recording_only', 'bigbluebuttonbn'), | |
| 2371 | +                    'features' => array('showrecordings', 'importrecordings', 'availabilityconditionsheader')) | |
| 2372 | 2372 | ); | 
| 2373 | 2373 | return $instanceprofiles; | 
| 2374 | 2374 | } | 
| @@ -2457,8 +2457,8 @@ discard block | ||
| 2457 | 2457 | $activitytime = ''; | 
| 2458 | 2458 |      if ($time) { | 
| 2459 | 2459 | $activitytime = calendar_day_representation($time).' '. | 
| 2460 | -          get_string('mod_form_field_notification_msg_at', 'bigbluebuttonbn').' '. | |
| 2461 | - calendar_time_representation($time); | |
| 2460 | +            get_string('mod_form_field_notification_msg_at', 'bigbluebuttonbn').' '. | |
| 2461 | + calendar_time_representation($time); | |
| 2462 | 2462 | } | 
| 2463 | 2463 | return $activitytime; | 
| 2464 | 2464 | } | 
| @@ -2781,7 +2781,7 @@ discard block | ||
| 2781 | 2781 | 'participant_moderator_default', | 
| 2782 | 2782 | array_keys($owner), | 
| 2783 | 2783 | $owner + $roles) // CONTRIB-7966: don't use array_merge here so it does not reindex the array. | 
| 2784 | - ); | |
| 2784 | + ); | |
| 2785 | 2785 | } | 
| 2786 | 2786 | } | 
| 2787 | 2787 | |
| @@ -2817,7 +2817,7 @@ discard block | ||
| 2817 | 2817 | // Web Client default. | 
| 2818 | 2818 |          $default = intval((int)\mod_bigbluebuttonbn\locallib\config::get('clienttype_default')); | 
| 2819 | 2819 |          $choices = array(BIGBLUEBUTTON_CLIENTTYPE_FLASH => get_string('mod_form_block_clienttype_flash', 'bigbluebuttonbn'), | 
| 2820 | -                         BIGBLUEBUTTON_CLIENTTYPE_HTML5 => get_string('mod_form_block_clienttype_html5', 'bigbluebuttonbn')); | |
| 2820 | +                            BIGBLUEBUTTON_CLIENTTYPE_HTML5 => get_string('mod_form_block_clienttype_html5', 'bigbluebuttonbn')); | |
| 2821 | 2821 |          $renderer->render_group_element('clienttype_default', | 
| 2822 | 2822 |              $renderer->render_group_element_configselect('clienttype_default', | 
| 2823 | 2823 | $default, $choices)); | 
| @@ -2928,7 +2928,7 @@ discard block | ||
| 2928 | 2928 | return $output; | 
| 2929 | 2929 | } | 
| 2930 | 2930 |      $output .= $OUTPUT->box_start('box boxalignleft adminerror alert alert-' . $type . ' alert-block fade in', | 
| 2931 | - 'bigbluebuttonbn_view_general_warning') . "\n"; | |
| 2931 | + 'bigbluebuttonbn_view_general_warning') . "\n"; | |
| 2932 | 2932 | $output .= ' ' . $message . "\n"; | 
| 2933 | 2933 | $output .= ' <div class="singlebutton pull-right">' . "\n"; | 
| 2934 | 2934 |      if (!empty($href)) { |