| @@ -104,9 +104,9 @@ discard block | ||
| 104 | 104 | function bigbluebuttonbn_get_join_url($meetingid, $username, $pw, $logouturl, $configtoken = null, | 
| 105 | 105 |          $userid = null, $clienttype = BIGBLUEBUTTON_CLIENTTYPE_FLASH) { | 
| 106 | 106 | $data = ['meetingID' => $meetingid, | 
| 107 | - 'fullName' => $username, | |
| 108 | - 'password' => $pw, | |
| 109 | - 'logoutURL' => $logouturl, | |
| 107 | + 'fullName' => $username, | |
| 108 | + 'password' => $pw, | |
| 109 | + 'logoutURL' => $logouturl, | |
| 110 | 110 | ]; | 
| 111 | 111 | // Choose between Adobe Flash or HTML5 Client. | 
| 112 | 112 |      if ( $clienttype == BIGBLUEBUTTON_CLIENTTYPE_HTML5 ) { | 
| @@ -162,23 +162,23 @@ discard block | ||
| 162 | 162 |  function bigbluebuttonbn_get_meeting_info_array($meetingid) { | 
| 163 | 163 | $xml = bigbluebuttonbn_wrap_xml_load_file( | 
| 164 | 164 |          \mod_bigbluebuttonbn\locallib\bigbluebutton::action_url('getMeetingInfo', ['meetingID' => $meetingid]) | 
| 165 | - ); | |
| 165 | + ); | |
| 166 | 166 |      if ($xml && $xml->returncode == 'SUCCESS' && empty($xml->messageKey)) { | 
| 167 | 167 | // Meeting info was returned. | 
| 168 | 168 |          return array('returncode' => $xml->returncode, | 
| 169 | - 'meetingID' => $xml->meetingID, | |
| 170 | - 'moderatorPW' => $xml->moderatorPW, | |
| 171 | - 'attendeePW' => $xml->attendeePW, | |
| 172 | - 'hasBeenForciblyEnded' => $xml->hasBeenForciblyEnded, | |
| 173 | - 'running' => $xml->running, | |
| 174 | - 'recording' => $xml->recording, | |
| 175 | - 'startTime' => $xml->startTime, | |
| 176 | - 'endTime' => $xml->endTime, | |
| 177 | - 'participantCount' => $xml->participantCount, | |
| 178 | - 'moderatorCount' => $xml->moderatorCount, | |
| 179 | - 'attendees' => $xml->attendees, | |
| 180 | - 'metadata' => $xml->metadata, | |
| 181 | - ); | |
| 169 | + 'meetingID' => $xml->meetingID, | |
| 170 | + 'moderatorPW' => $xml->moderatorPW, | |
| 171 | + 'attendeePW' => $xml->attendeePW, | |
| 172 | + 'hasBeenForciblyEnded' => $xml->hasBeenForciblyEnded, | |
| 173 | + 'running' => $xml->running, | |
| 174 | + 'recording' => $xml->recording, | |
| 175 | + 'startTime' => $xml->startTime, | |
| 176 | + 'endTime' => $xml->endTime, | |
| 177 | + 'participantCount' => $xml->participantCount, | |
| 178 | + 'moderatorCount' => $xml->moderatorCount, | |
| 179 | + 'attendees' => $xml->attendees, | |
| 180 | + 'metadata' => $xml->metadata, | |
| 181 | + ); | |
| 182 | 182 | } | 
| 183 | 183 |      if ($xml) { | 
| 184 | 184 | // Either failure or success without meeting info. | 
| @@ -330,7 +330,7 @@ discard block | ||
| 330 | 330 |  function bigbluebuttonbn_get_default_config_xml() { | 
| 331 | 331 | $xml = bigbluebuttonbn_wrap_xml_load_file( | 
| 332 | 332 |          \mod_bigbluebuttonbn\locallib\bigbluebutton::action_url('getDefaultConfigXML') | 
| 333 | - ); | |
| 333 | + ); | |
| 334 | 334 | return $xml; | 
| 335 | 335 | } | 
| 336 | 336 | |
| @@ -434,7 +434,7 @@ discard block | ||
| 434 | 434 |      foreach ($ids as $id) { | 
| 435 | 435 | $xml = bigbluebuttonbn_wrap_xml_load_file( | 
| 436 | 436 |              \mod_bigbluebuttonbn\locallib\bigbluebutton::action_url('deleteRecordings', ['recordID' => $id]) | 
| 437 | - ); | |
| 437 | + ); | |
| 438 | 438 |          if ($xml && $xml->returncode != 'SUCCESS') { | 
| 439 | 439 | return false; | 
| 440 | 440 | } | 
| @@ -453,7 +453,7 @@ discard block | ||
| 453 | 453 |      foreach ($ids as $id) { | 
| 454 | 454 | $xml = bigbluebuttonbn_wrap_xml_load_file( | 
| 455 | 455 |              \mod_bigbluebuttonbn\locallib\bigbluebutton::action_url('publishRecordings', ['recordID' => $id, 'publish' => $publish]) | 
| 456 | - ); | |
| 456 | + ); | |
| 457 | 457 |          if ($xml && $xml->returncode != 'SUCCESS') { | 
| 458 | 458 | return false; | 
| 459 | 459 | } | 
| @@ -472,7 +472,7 @@ discard block | ||
| 472 | 472 |      foreach ($ids as $id) { | 
| 473 | 473 | $xml = bigbluebuttonbn_wrap_xml_load_file( | 
| 474 | 474 |              \mod_bigbluebuttonbn\locallib\bigbluebutton::action_url('updateRecordings', ['recordID' => $id] + (array) $params) | 
| 475 | - ); | |
| 475 | + ); | |
| 476 | 476 |          if ($xml && $xml->returncode != 'SUCCESS') { | 
| 477 | 477 | return false; | 
| 478 | 478 | } | 
| @@ -489,7 +489,7 @@ discard block | ||
| 489 | 489 |  function bigbluebuttonbn_end_meeting($meetingid, $modpw) { | 
| 490 | 490 | $xml = bigbluebuttonbn_wrap_xml_load_file( | 
| 491 | 491 |          \mod_bigbluebuttonbn\locallib\bigbluebutton::action_url('end', ['meetingID' => $meetingid, 'password' => $modpw]) | 
| 492 | - ); | |
| 492 | + ); | |
| 493 | 493 |      if ($xml) { | 
| 494 | 494 | // If the xml packet returned failure it displays the message to the user. | 
| 495 | 495 |          return array('returncode' => $xml->returncode, 'message' => $xml->message, 'messageKey' => $xml->messageKey); | 
| @@ -506,7 +506,7 @@ discard block | ||
| 506 | 506 |  function bigbluebuttonbn_get_server_version() { | 
| 507 | 507 | $xml = bigbluebuttonbn_wrap_xml_load_file( | 
| 508 | 508 | \mod_bigbluebuttonbn\locallib\bigbluebutton::action_url() | 
| 509 | - ); | |
| 509 | + ); | |
| 510 | 510 |      if ($xml && $xml->returncode == 'SUCCESS') { | 
| 511 | 511 | return $xml->version; | 
| 512 | 512 | } | 
| @@ -573,10 +573,10 @@ discard block | ||
| 573 | 573 | } | 
| 574 | 574 | $options = array(); | 
| 575 | 575 | $options['CURLOPT_HTTPHEADER'] = array( | 
| 576 | - 'Content-Type: '.$contenttype, | |
| 577 | - 'Content-Length: '.strlen($data), | |
| 578 | - 'Content-Language: en-US', | |
| 579 | - ); | |
| 576 | + 'Content-Type: '.$contenttype, | |
| 577 | + 'Content-Length: '.strlen($data), | |
| 578 | + 'Content-Language: en-US', | |
| 579 | + ); | |
| 580 | 580 | |
| 581 | 581 | return $c->post($url, $data, $options); | 
| 582 | 582 | } | 
| @@ -723,16 +723,16 @@ discard block | ||
| 723 | 723 | 'all' => array( | 
| 724 | 724 |              'name' => get_string('mod_form_field_participant_list_type_all', 'bigbluebuttonbn'), | 
| 725 | 725 | 'children' => [] | 
| 726 | - ) | |
| 727 | - ); | |
| 726 | + ) | |
| 727 | + ); | |
| 728 | 728 | $data['role'] = array( | 
| 729 | 729 |          'name' => get_string('mod_form_field_participant_list_type_role', 'bigbluebuttonbn'), | 
| 730 | 730 | 'children' => bigbluebuttonbn_get_roles_select($context) | 
| 731 | - ); | |
| 731 | + ); | |
| 732 | 732 | $data['user'] = array( | 
| 733 | 733 |          'name' => get_string('mod_form_field_participant_list_type_user', 'bigbluebuttonbn'), | 
| 734 | 734 | 'children' => bigbluebuttonbn_get_users_select($context) | 
| 735 | - ); | |
| 735 | + ); | |
| 736 | 736 | return $data; | 
| 737 | 737 | } | 
| 738 | 738 | |
| @@ -775,7 +775,7 @@ discard block | ||
| 775 | 775 | 'selectiontype' => 'all', | 
| 776 | 776 | 'selectionid' => 'all', | 
| 777 | 777 | 'role' => BIGBLUEBUTTONBN_ROLE_VIEWER | 
| 778 | - ); | |
| 778 | + ); | |
| 779 | 779 |      $defaultrules = explode(',', \mod_bigbluebuttonbn\locallib\config::get('participant_moderator_default')); | 
| 780 | 780 |      foreach ($defaultrules as $defaultrule) { | 
| 781 | 781 |          if ($defaultrule == '0') { | 
| @@ -788,9 +788,9 @@ discard block | ||
| 788 | 788 | continue; | 
| 789 | 789 | } | 
| 790 | 790 | $participantlist[] = array( | 
| 791 | - 'selectiontype' => 'role', | |
| 792 | - 'selectionid' => $defaultrule, | |
| 793 | - 'role' => BIGBLUEBUTTONBN_ROLE_MODERATOR); | |
| 791 | + 'selectiontype' => 'role', | |
| 792 | + 'selectionid' => $defaultrule, | |
| 793 | + 'role' => BIGBLUEBUTTONBN_ROLE_MODERATOR); | |
| 794 | 794 | } | 
| 795 | 795 | return $participantlist; | 
| 796 | 796 | } | 
| @@ -829,11 +829,11 @@ discard block | ||
| 829 | 829 |              'all' => get_string('mod_form_field_participant_list_type_all', 'bigbluebuttonbn'), | 
| 830 | 830 |              'role' => get_string('mod_form_field_participant_list_type_role', 'bigbluebuttonbn'), | 
| 831 | 831 |              'user' => get_string('mod_form_field_participant_list_type_user', 'bigbluebuttonbn'), | 
| 832 | - ], | |
| 832 | + ], | |
| 833 | 833 | 'type_selected' => 'all', | 
| 834 | 834 | 'options' => ['all' => '---------------'], | 
| 835 | 835 | 'selected' => 'all', | 
| 836 | - ]; | |
| 836 | + ]; | |
| 837 | 837 | } | 
| 838 | 838 | |
| 839 | 839 | /** | 
| @@ -1152,7 +1152,7 @@ discard block | ||
| 1152 | 1152 | // Ping again and refresh the cache. | 
| 1153 | 1153 | $meetinginfo = (array) bigbluebuttonbn_wrap_xml_load_file( | 
| 1154 | 1154 |          \mod_bigbluebuttonbn\locallib\bigbluebutton::action_url('getMeetingInfo', ['meetingID' => $meetingid]) | 
| 1155 | - ); | |
| 1155 | + ); | |
| 1156 | 1156 |      $cache->set($meetingid, array('creation_time' => time(), 'meeting_info' => json_encode($meetinginfo))); | 
| 1157 | 1157 | return $meetinginfo; | 
| 1158 | 1158 | } | 
| @@ -1566,8 +1566,8 @@ discard block | ||
| 1566 | 1566 | } | 
| 1567 | 1567 | $id = 'playbacks-'.$recording['recordID']; | 
| 1568 | 1568 |      $recordingtypes = html_writer::start_tag('div', array('id' => $id, 'data-imported' => $dataimported, | 
| 1569 | - 'data-meetingid' => $recording['meetingID'], 'data-recordingid' => $recording['recordID'], | |
| 1570 | - 'title' => $title, $visibility => $visibility)); | |
| 1569 | + 'data-meetingid' => $recording['meetingID'], 'data-recordingid' => $recording['recordID'], | |
| 1570 | + 'title' => $title, $visibility => $visibility)); | |
| 1571 | 1571 |      foreach ($recording['playbacks'] as $playback) { | 
| 1572 | 1572 | $recordingtypes .= bigbluebuttonbn_get_recording_data_row_type($recording, $bbbsession, $playback); | 
| 1573 | 1573 | } | 
| @@ -1591,7 +1591,7 @@ discard block | ||
| 1591 | 1591 | } | 
| 1592 | 1592 |      $text = get_string('view_recording_format_'.$playback['type'], 'bigbluebuttonbn'); | 
| 1593 | 1593 | $href = $CFG->wwwroot . '/mod/bigbluebuttonbn/bbb_view.php?action=play&bn=' . $bbbsession['bigbluebuttonbn']->id . | 
| 1594 | - '&mid='.$recording['meetingID'] . '&rid=' . $recording['recordID'] . '&rtype=' . $playback['type']; | |
| 1594 | + '&mid='.$recording['meetingID'] . '&rid=' . $recording['recordID'] . '&rtype=' . $playback['type']; | |
| 1595 | 1595 |      if (!isset($recording['imported']) || !isset($recording['protected']) || $recording['protected'] === 'false') { | 
| 1596 | 1596 | $href .= '&href='.urlencode(trim($playback['url'])); | 
| 1597 | 1597 | } | 
| @@ -1602,7 +1602,7 @@ discard block | ||
| 1602 | 1602 | 'data-action' => 'play', | 
| 1603 | 1603 | 'data-target' => $playback['type'], | 
| 1604 | 1604 | 'data-href' => $href, | 
| 1605 | - ); | |
| 1605 | + ); | |
| 1606 | 1606 |      if (!bigbluebuttonbn_is_bn_server() && !bigbluebuttonbn_is_valid_resource(trim($playback['url']))) { | 
| 1607 | 1607 | $linkattributes['class'] = 'btn btn-sm btn-warning'; | 
| 1608 | 1608 |          $linkattributes['title'] = get_string('view_recording_format_errror_unreachable', 'bigbluebuttonbn'); | 
| @@ -1767,10 +1767,10 @@ discard block | ||
| 1767 | 1767 | 'id' => $id, | 
| 1768 | 1768 | 'onclick' => $onclick, | 
| 1769 | 1769 | 'data-action' => $data['action'] | 
| 1770 | - ); | |
| 1770 | + ); | |
| 1771 | 1771 |          if (!isset($recording['imported'])) { | 
| 1772 | 1772 | $linkattributes['data-links'] = bigbluebuttonbn_count_recording_imported_instances( | 
| 1773 | - $recording['recordID']); | |
| 1773 | + $recording['recordID']); | |
| 1774 | 1774 | } | 
| 1775 | 1775 |          if (isset($data['disabled'])) { | 
| 1776 | 1776 | $iconattributes['class'] .= ' fa-' . $data['disabled']; | 
| @@ -2394,17 +2394,17 @@ discard block | ||
| 2394 | 2394 |  function bigbluebuttonbn_get_instance_type_profiles() { | 
| 2395 | 2395 | $instanceprofiles = array( | 
| 2396 | 2396 |          BIGBLUEBUTTONBN_TYPE_ALL => array('id' => BIGBLUEBUTTONBN_TYPE_ALL, | 
| 2397 | -                  'name' => get_string('instance_type_default', 'bigbluebuttonbn'), | |
| 2398 | -                  'features' => array('all')), | |
| 2397 | +                    'name' => get_string('instance_type_default', 'bigbluebuttonbn'), | |
| 2398 | +                    'features' => array('all')), | |
| 2399 | 2399 |          BIGBLUEBUTTONBN_TYPE_ROOM_ONLY => array('id' => BIGBLUEBUTTONBN_TYPE_ROOM_ONLY, | 
| 2400 | -                  'name' => get_string('instance_type_room_only', 'bigbluebuttonbn'), | |
| 2401 | -                  'features' => array('showroom', 'welcomemessage', 'voicebridge', 'waitformoderator', 'userlimit', | |
| 2402 | - 'recording', 'sendnotifications', 'preuploadpresentation', 'permissions', 'schedule', 'groups', | |
| 2403 | - 'modstandardelshdr', 'availabilityconditionsheader', 'tagshdr', 'competenciessection', | |
| 2404 | - 'clienttype', 'completionattendance', 'completionengagement')), | |
| 2400 | +                    'name' => get_string('instance_type_room_only', 'bigbluebuttonbn'), | |
| 2401 | +                    'features' => array('showroom', 'welcomemessage', 'voicebridge', 'waitformoderator', 'userlimit', | |
| 2402 | + 'recording', 'sendnotifications', 'preuploadpresentation', 'permissions', 'schedule', 'groups', | |
| 2403 | + 'modstandardelshdr', 'availabilityconditionsheader', 'tagshdr', 'competenciessection', | |
| 2404 | + 'clienttype', 'completionattendance', 'completionengagement')), | |
| 2405 | 2405 |          BIGBLUEBUTTONBN_TYPE_RECORDING_ONLY => array('id' => BIGBLUEBUTTONBN_TYPE_RECORDING_ONLY, | 
| 2406 | -                  'name' => get_string('instance_type_recording_only', 'bigbluebuttonbn'), | |
| 2407 | -                  'features' => array('showrecordings', 'importrecordings')) | |
| 2406 | +                    'name' => get_string('instance_type_recording_only', 'bigbluebuttonbn'), | |
| 2407 | +                    'features' => array('showrecordings', 'importrecordings')) | |
| 2408 | 2408 | ); | 
| 2409 | 2409 | return $instanceprofiles; | 
| 2410 | 2410 | } | 
| @@ -2491,8 +2491,8 @@ discard block | ||
| 2491 | 2491 | $activitytime = ''; | 
| 2492 | 2492 |      if ($time) { | 
| 2493 | 2493 | $activitytime = calendar_day_representation($time).' '. | 
| 2494 | -          get_string('mod_form_field_notification_msg_at', 'bigbluebuttonbn').' '. | |
| 2495 | - calendar_time_representation($time); | |
| 2494 | +            get_string('mod_form_field_notification_msg_at', 'bigbluebuttonbn').' '. | |
| 2495 | + calendar_time_representation($time); | |
| 2496 | 2496 | } | 
| 2497 | 2497 | return $activitytime; | 
| 2498 | 2498 | } | 
| @@ -2811,7 +2811,7 @@ discard block | ||
| 2811 | 2811 |          $renderer->render_group_element('participant_moderator_default', | 
| 2812 | 2812 |              $renderer->render_group_element_configmultiselect('participant_moderator_default', | 
| 2813 | 2813 | array_keys($owner), array_merge($owner, $roles)) | 
| 2814 | - ); | |
| 2814 | + ); | |
| 2815 | 2815 | } | 
| 2816 | 2816 | } | 
| 2817 | 2817 | |
| @@ -2847,7 +2847,7 @@ discard block | ||
| 2847 | 2847 | // Web Client default. | 
| 2848 | 2848 |          $default = intval((int)\mod_bigbluebuttonbn\locallib\config::get('clienttype_default')); | 
| 2849 | 2849 |          $choices = array(BIGBLUEBUTTON_CLIENTTYPE_FLASH => get_string('mod_form_block_clienttype_flash', 'bigbluebuttonbn'), | 
| 2850 | -                         BIGBLUEBUTTON_CLIENTTYPE_HTML5 => get_string('mod_form_block_clienttype_html5', 'bigbluebuttonbn')); | |
| 2850 | +                            BIGBLUEBUTTON_CLIENTTYPE_HTML5 => get_string('mod_form_block_clienttype_html5', 'bigbluebuttonbn')); | |
| 2851 | 2851 |          $renderer->render_group_element('clienttype_default', | 
| 2852 | 2852 |              $renderer->render_group_element_configselect('clienttype_default', | 
| 2853 | 2853 | $default, $choices)); | 
| @@ -2958,7 +2958,7 @@ discard block | ||
| 2958 | 2958 | return $output; | 
| 2959 | 2959 | } | 
| 2960 | 2960 |      $output .= $OUTPUT->box_start('box boxalignleft adminerror alert alert-' . $type . ' alert-block fade in', | 
| 2961 | - 'bigbluebuttonbn_view_general_warning') . "\n"; | |
| 2961 | + 'bigbluebuttonbn_view_general_warning') . "\n"; | |
| 2962 | 2962 | $output .= ' ' . $message . "\n"; | 
| 2963 | 2963 | $output .= ' <div class="singlebutton pull-right">' . "\n"; | 
| 2964 | 2964 |      if (!empty($href)) { | 
| @@ -3311,8 +3311,8 @@ discard block | ||
| 3311 | 3311 | array( | 
| 3312 | 3312 |                  'email' => array('"' . fullname($USER) . '" <' . $USER->email . '>'), | 
| 3313 | 3313 | 'context' => $bbbsession['bigbluebuttonbnURL'] | 
| 3314 | - ) | |
| 3315 | - ); | |
| 3314 | + ) | |
| 3315 | + ); | |
| 3316 | 3316 | } | 
| 3317 | 3317 |      if ((boolean)\mod_bigbluebuttonbn\locallib\config::get('recordingready_enabled')) { | 
| 3318 | 3318 | $metadata['bn-recording-ready-url'] = $bbbsession['recordingReadyURL']; | 
| @@ -109,7 +109,7 @@ discard block | ||
| 109 | 109 | 'logoutURL' => $logouturl, | 
| 110 | 110 | ]; | 
| 111 | 111 | // Choose between Adobe Flash or HTML5 Client. | 
| 112 | -    if ( $clienttype == BIGBLUEBUTTON_CLIENTTYPE_HTML5 ) { | |
| 112 | +    if ($clienttype == BIGBLUEBUTTON_CLIENTTYPE_HTML5) { | |
| 113 | 113 | $data['joinViaHtml5'] = 'true'; | 
| 114 | 114 | } | 
| 115 | 115 |      if (!is_null($configtoken)) { | 
| @@ -182,7 +182,7 @@ discard block | ||
| 182 | 182 | } | 
| 183 | 183 |      if ($xml) { | 
| 184 | 184 | // Either failure or success without meeting info. | 
| 185 | - return (array)$xml; | |
| 185 | + return (array) $xml; | |
| 186 | 186 | } | 
| 187 | 187 | // If the server is unreachable, then prompts the user of the necessary action. | 
| 188 | 188 |      return array('returncode' => 'FAILED', 'message' => 'unreachable', 'messageKey' => 'Server is unreachable'); | 
| @@ -615,7 +615,7 @@ discard block | ||
| 615 | 615 |      if ($userroles) { | 
| 616 | 616 | $where = ''; | 
| 617 | 617 |          foreach ($userroles as $userrole) { | 
| 618 | - $where .= (empty($where) ? ' WHERE' : ' OR').' id=' . $userrole->roleid; | |
| 618 | + $where .= (empty($where) ? ' WHERE' : ' OR').' id='.$userrole->roleid; | |
| 619 | 619 | } | 
| 620 | 620 |          $userroles = $DB->get_records_sql('SELECT * FROM {role}'.$where); | 
| 621 | 621 | } | 
| @@ -702,7 +702,7 @@ discard block | ||
| 702 | 702 |  function bigbluebuttonbn_get_role($id) { | 
| 703 | 703 | $roles = (array) role_get_names(); | 
| 704 | 704 |      if (is_numeric($id) && isset($roles[$id])) { | 
| 705 | - return (object)$roles[$id]; | |
| 705 | + return (object) $roles[$id]; | |
| 706 | 706 | } | 
| 707 | 707 |      foreach ($roles as $role) { | 
| 708 | 708 |          if ($role->shortname == $id) { | 
| @@ -782,7 +782,7 @@ discard block | ||
| 782 | 782 |              if (!empty($ownerid) && is_enrolled($context, $ownerid)) { | 
| 783 | 783 | $participantlist[] = array( | 
| 784 | 784 | 'selectiontype' => 'user', | 
| 785 | - 'selectionid' => (string)$ownerid, | |
| 785 | + 'selectionid' => (string) $ownerid, | |
| 786 | 786 | 'role' => BIGBLUEBUTTONBN_ROLE_MODERATOR); | 
| 787 | 787 | } | 
| 788 | 788 | continue; | 
| @@ -857,7 +857,7 @@ discard block | ||
| 857 | 857 |      if (!isguestuser()) { | 
| 858 | 858 | $userroles = bigbluebuttonbn_get_user_roles($context, $userid); | 
| 859 | 859 | } | 
| 860 | - return bigbluebuttonbn_is_moderator_validator($participantlist, $userid , $userroles); | |
| 860 | + return bigbluebuttonbn_is_moderator_validator($participantlist, $userid, $userroles); | |
| 861 | 861 | } | 
| 862 | 862 | |
| 863 | 863 | /** | 
| @@ -942,9 +942,9 @@ discard block | ||
| 942 | 942 |      if ($voicebridge == 0) { | 
| 943 | 943 | return true; | 
| 944 | 944 | } | 
| 945 | - $select = 'voicebridge = ' . $voicebridge; | |
| 945 | + $select = 'voicebridge = '.$voicebridge; | |
| 946 | 946 |      if ($instance != 0) { | 
| 947 | - $select .= ' AND id <>' . $instance; | |
| 947 | + $select .= ' AND id <>'.$instance; | |
| 948 | 948 | } | 
| 949 | 949 |      if (!$DB->get_records_select('bigbluebuttonbn', $select)) { | 
| 950 | 950 | return true; | 
| @@ -964,7 +964,7 @@ discard block | ||
| 964 | 964 | $now = time(); | 
| 965 | 965 |      if ($closingtime > 0 && $now < $closingtime) { | 
| 966 | 966 | $duration = ceil(($closingtime - $now) / 60); | 
| 967 | -        $compensationtime = intval((int)\mod_bigbluebuttonbn\locallib\config::get('scheduled_duration_compensation')); | |
| 967 | +        $compensationtime = intval((int) \mod_bigbluebuttonbn\locallib\config::get('scheduled_duration_compensation')); | |
| 968 | 968 | $duration = intval($duration) + $compensationtime; | 
| 969 | 969 | } | 
| 970 | 970 | return $duration; | 
| @@ -1104,7 +1104,7 @@ discard block | ||
| 1104 | 1104 |      if (array_key_exists('other', $options)) { | 
| 1105 | 1105 | $params['other'] = $options['other']; | 
| 1106 | 1106 | } | 
| 1107 | -    $event = call_user_func_array('\mod_bigbluebuttonbn\event\\' . $type . '::create', | |
| 1107 | +    $event = call_user_func_array('\mod_bigbluebuttonbn\event\\'.$type.'::create', | |
| 1108 | 1108 | array($params)); | 
| 1109 | 1109 |      $event->add_record_snapshot('course_modules', $cm); | 
| 1110 | 1110 |      $event->add_record_snapshot('course', $course); | 
| @@ -1141,7 +1141,7 @@ discard block | ||
| 1141 | 1141 | * @return array | 
| 1142 | 1142 | */ | 
| 1143 | 1143 |  function bigbluebuttonbn_get_meeting_info($meetingid, $updatecache = false) { | 
| 1144 | -    $cachettl = (int)\mod_bigbluebuttonbn\locallib\config::get('waitformoderator_cache_ttl'); | |
| 1144 | +    $cachettl = (int) \mod_bigbluebuttonbn\locallib\config::get('waitformoderator_cache_ttl'); | |
| 1145 | 1145 | $cache = cache::make_from_params(cache_store::MODE_APPLICATION, 'mod_bigbluebuttonbn', 'meetings_cache'); | 
| 1146 | 1146 | $result = $cache->get($meetingid); | 
| 1147 | 1147 | $now = time(); | 
| @@ -1347,7 +1347,7 @@ discard block | ||
| 1347 | 1347 | * @return boolean | 
| 1348 | 1348 | */ | 
| 1349 | 1349 |  function bigbluebuttonbn_get_recording_data_row_editable($bbbsession) { | 
| 1350 | - return ($bbbsession['managerecordings'] && ((double)$bbbsession['serverversion'] >= 1.0 || $bbbsession['bnserver'])); | |
| 1350 | + return ($bbbsession['managerecordings'] && ((double) $bbbsession['serverversion'] >= 1.0 || $bbbsession['bnserver'])); | |
| 1351 | 1351 | } | 
| 1352 | 1352 | |
| 1353 | 1353 | /** | 
| @@ -1358,7 +1358,7 @@ discard block | ||
| 1358 | 1358 | * @return boolean | 
| 1359 | 1359 | */ | 
| 1360 | 1360 |  function bigbluebuttonbn_get_recording_data_preview_enabled($bbbsession) { | 
| 1361 | - return ((double)$bbbsession['serverversion'] >= 1.0 && $bbbsession['bigbluebuttonbn']->recordings_preview == '1'); | |
| 1361 | + return ((double) $bbbsession['serverversion'] >= 1.0 && $bbbsession['bigbluebuttonbn']->recordings_preview == '1'); | |
| 1362 | 1362 | } | 
| 1363 | 1363 | |
| 1364 | 1364 | /** | 
| @@ -1434,11 +1434,11 @@ discard block | ||
| 1434 | 1434 | $actionbar .= bigbluebuttonbn_actionbar_render_button($recording, $buttonpayload); | 
| 1435 | 1435 | } | 
| 1436 | 1436 |      $head = html_writer::start_tag('div', array( | 
| 1437 | - 'id' => 'recording-actionbar-' . $recording['recordID'], | |
| 1437 | + 'id' => 'recording-actionbar-'.$recording['recordID'], | |
| 1438 | 1438 | 'data-recordingid' => $recording['recordID'], | 
| 1439 | 1439 | 'data-meetingid' => $recording['meetingID'])); | 
| 1440 | 1440 |      $tail = html_writer::end_tag('div'); | 
| 1441 | - return $head . $actionbar . $tail; | |
| 1441 | + return $head.$actionbar.$tail; | |
| 1442 | 1442 | } | 
| 1443 | 1443 | |
| 1444 | 1444 | /** | 
| @@ -1533,7 +1533,7 @@ discard block | ||
| 1533 | 1533 | } | 
| 1534 | 1534 |          $recordingpreview .= html_writer::start_tag('div', array('class' => '')); | 
| 1535 | 1535 |          $recordingpreview .= html_writer::empty_tag('img', | 
| 1536 | -            array('src' => trim($image['url']) . '?' . time(), 'class' => 'recording-thumbnail pull-left')); | |
| 1536 | +            array('src' => trim($image['url']).'?'.time(), 'class' => 'recording-thumbnail pull-left')); | |
| 1537 | 1537 |          $recordingpreview .= html_writer::end_tag('div'); | 
| 1538 | 1538 | } | 
| 1539 | 1539 |      $recordingpreview .= html_writer::end_tag('div'); | 
| @@ -1590,13 +1590,13 @@ discard block | ||
| 1590 | 1590 | return ''; | 
| 1591 | 1591 | } | 
| 1592 | 1592 |      $text = get_string('view_recording_format_'.$playback['type'], 'bigbluebuttonbn'); | 
| 1593 | - $href = $CFG->wwwroot . '/mod/bigbluebuttonbn/bbb_view.php?action=play&bn=' . $bbbsession['bigbluebuttonbn']->id . | |
| 1594 | - '&mid='.$recording['meetingID'] . '&rid=' . $recording['recordID'] . '&rtype=' . $playback['type']; | |
| 1593 | + $href = $CFG->wwwroot.'/mod/bigbluebuttonbn/bbb_view.php?action=play&bn='.$bbbsession['bigbluebuttonbn']->id. | |
| 1594 | + '&mid='.$recording['meetingID'].'&rid='.$recording['recordID'].'&rtype='.$playback['type']; | |
| 1595 | 1595 |      if (!isset($recording['imported']) || !isset($recording['protected']) || $recording['protected'] === 'false') { | 
| 1596 | 1596 | $href .= '&href='.urlencode(trim($playback['url'])); | 
| 1597 | 1597 | } | 
| 1598 | 1598 | $linkattributes = array( | 
| 1599 | - 'id' => 'recording-play-' . $playback['type'] . '-' . $recording['recordID'], | |
| 1599 | + 'id' => 'recording-play-'.$playback['type'].'-'.$recording['recordID'], | |
| 1600 | 1600 | 'class' => 'btn btn-sm btn-default', | 
| 1601 | 1601 | 'onclick' => 'M.mod_bigbluebuttonbn.recordings.recordingPlay(this);', | 
| 1602 | 1602 | 'data-action' => 'play', | 
| @@ -1608,7 +1608,7 @@ discard block | ||
| 1608 | 1608 |          $linkattributes['title'] = get_string('view_recording_format_errror_unreachable', 'bigbluebuttonbn'); | 
| 1609 | 1609 | unset($linkattributes['data-href']); | 
| 1610 | 1610 | } | 
| 1611 | -    return $OUTPUT->action_link('#', $text, null, $linkattributes) . ' '; | |
| 1611 | +    return $OUTPUT->action_link('#', $text, null, $linkattributes).' '; | |
| 1612 | 1612 | } | 
| 1613 | 1613 | |
| 1614 | 1614 | /** | 
| @@ -1634,7 +1634,7 @@ discard block | ||
| 1634 | 1634 | $validatedurls[$urlhost] = true; | 
| 1635 | 1635 | $curlinfo = bigbluebuttonbn_wrap_xml_load_file_curl_request($url, 'HEAD'); | 
| 1636 | 1636 |      if (!isset($curlinfo['http_code']) || $curlinfo['http_code'] != 200) { | 
| 1637 | - $error = "Resources hosted by " . $urlhost . " are unreachable. Server responded with code " . $curlinfo['http_code']; | |
| 1637 | + $error = "Resources hosted by ".$urlhost." are unreachable. Server responded with code ".$curlinfo['http_code']; | |
| 1638 | 1638 | debugging($error, DEBUG_DEVELOPER); | 
| 1639 | 1639 | $validatedurls[$urlhost] = false; | 
| 1640 | 1640 | } | 
| @@ -1725,12 +1725,12 @@ discard block | ||
| 1725 | 1725 | * @return string | 
| 1726 | 1726 | */ | 
| 1727 | 1727 |  function bigbluebuttonbn_get_recording_data_row_text($recording, $text, $source, $data) { | 
| 1728 | - $htmltext = '<span>' . htmlentities($text) . '</span>'; | |
| 1728 | + $htmltext = '<span>'.htmlentities($text).'</span>'; | |
| 1729 | 1729 |      if (empty($data)) { | 
| 1730 | 1730 | return $htmltext; | 
| 1731 | 1731 | } | 
| 1732 | - $target = $data['action'] . '-' . $data['target']; | |
| 1733 | - $id = 'recording-' . $target . '-' . $data['recordingid']; | |
| 1732 | + $target = $data['action'].'-'.$data['target']; | |
| 1733 | + $id = 'recording-'.$target.'-'.$data['recordingid']; | |
| 1734 | 1734 |      $attributes = array('id' => $id, 'class' => 'quickeditlink col-md-20', | 
| 1735 | 1735 | 'data-recordingid' => $data['recordingid'], 'data-meetingid' => $data['meetingid'], | 
| 1736 | 1736 | 'data-target' => $data['target'], 'data-source' => $source); | 
| @@ -1738,7 +1738,7 @@ discard block | ||
| 1738 | 1738 |      $tail = html_writer::end_tag('div'); | 
| 1739 | 1739 |      $payload = array('action' => $data['action'], 'tag' => $data['tag'], 'target' => $data['target']); | 
| 1740 | 1740 | $htmllink = bigbluebuttonbn_actionbar_render_button($recording, $payload); | 
| 1741 | - return $head . $htmltext . $htmllink . $tail; | |
| 1741 | + return $head.$htmltext.$htmllink.$tail; | |
| 1742 | 1742 | } | 
| 1743 | 1743 | |
| 1744 | 1744 | /** | 
| @@ -1756,11 +1756,11 @@ discard block | ||
| 1756 | 1756 | } | 
| 1757 | 1757 | $target = $data['action']; | 
| 1758 | 1758 |      if (isset($data['target'])) { | 
| 1759 | - $target .= '-' . $data['target']; | |
| 1759 | + $target .= '-'.$data['target']; | |
| 1760 | 1760 | } | 
| 1761 | - $id = 'recording-' . $target . '-' . $recording['recordID']; | |
| 1762 | - $onclick = 'M.mod_bigbluebuttonbn.recordings.recording' . ucfirst($data['action']) . '(this);'; | |
| 1763 | -    if ((boolean)\mod_bigbluebuttonbn\locallib\config::get('recording_icons_enabled')) { | |
| 1761 | + $id = 'recording-'.$target.'-'.$recording['recordID']; | |
| 1762 | + $onclick = 'M.mod_bigbluebuttonbn.recordings.recording'.ucfirst($data['action']).'(this);'; | |
| 1763 | +    if ((boolean) \mod_bigbluebuttonbn\locallib\config::get('recording_icons_enabled')) { | |
| 1764 | 1764 | // With icon for $manageaction. | 
| 1765 | 1765 |          $iconattributes = array('id' => $id, 'class' => 'iconsmall'); | 
| 1766 | 1766 | $linkattributes = array( | 
| @@ -1773,12 +1773,12 @@ discard block | ||
| 1773 | 1773 | $recording['recordID']); | 
| 1774 | 1774 | } | 
| 1775 | 1775 |          if (isset($data['disabled'])) { | 
| 1776 | - $iconattributes['class'] .= ' fa-' . $data['disabled']; | |
| 1776 | + $iconattributes['class'] .= ' fa-'.$data['disabled']; | |
| 1777 | 1777 | $linkattributes['class'] = 'disabled'; | 
| 1778 | 1778 | unset($linkattributes['onclick']); | 
| 1779 | 1779 | } | 
| 1780 | 1780 |          $icon = new pix_icon('i/'.$data['tag'], | 
| 1781 | -            get_string('view_recording_list_actionbar_' . $data['action'], 'bigbluebuttonbn'), | |
| 1781 | +            get_string('view_recording_list_actionbar_'.$data['action'], 'bigbluebuttonbn'), | |
| 1782 | 1782 | 'moodle', $iconattributes); | 
| 1783 | 1783 |          return $OUTPUT->action_icon('#', $icon, null, $linkattributes, false); | 
| 1784 | 1784 | } | 
| @@ -1874,7 +1874,7 @@ discard block | ||
| 1874 | 1874 |      if ($bbbsession['managerecordings']) { | 
| 1875 | 1875 |          $table->head[] = get_string('view_recording_actionbar', 'bigbluebuttonbn'); | 
| 1876 | 1876 | $table->align[] = 'left'; | 
| 1877 | - $table->size[] = (count($tools) * 40) . 'px'; | |
| 1877 | + $table->size[] = (count($tools) * 40).'px'; | |
| 1878 | 1878 | } | 
| 1879 | 1879 | // Get the groups of the user. | 
| 1880 | 1880 | $usergroups = groups_get_all_groups($bbbsession['course']->id, $bbbsession['userID']); | 
| @@ -1901,7 +1901,7 @@ discard block | ||
| 1901 | 1901 | $groupmode = $DB->get_record_sql($sql, $params, IGNORE_MULTIPLE); | 
| 1902 | 1902 | |
| 1903 | 1903 | $displayrow = true; | 
| 1904 | - if ((isset($groupmode->groupmode) && (int)$groupmode->groupmode != VISIBLEGROUPS) | |
| 1904 | + if ((isset($groupmode->groupmode) && (int) $groupmode->groupmode != VISIBLEGROUPS) | |
| 1905 | 1905 |              && !$bbbsession['administrator'] && !$bbbsession['moderator']) { | 
| 1906 | 1906 |              $groupid = explode('[', $recording['meetingID']); | 
| 1907 | 1907 |              if (isset($groupid[1])) { | 
| @@ -1952,14 +1952,14 @@ discard block | ||
| 1952 | 1952 | } | 
| 1953 | 1953 |      $rowdata->date_formatted = str_replace(' ', ' ', $rowdata->date_formatted); | 
| 1954 | 1954 | $row->cells = array(); | 
| 1955 | - $row->cells[] = $texthead . $rowdata->recording . $texttail; | |
| 1956 | - $row->cells[] = $texthead . $rowdata->meeting . $texttail;; | |
| 1957 | - $row->cells[] = $texthead . $rowdata->activity . $texttail; | |
| 1958 | - $row->cells[] = $texthead . $rowdata->description . $texttail; | |
| 1955 | + $row->cells[] = $texthead.$rowdata->recording.$texttail; | |
| 1956 | + $row->cells[] = $texthead.$rowdata->meeting.$texttail; ; | |
| 1957 | + $row->cells[] = $texthead.$rowdata->activity.$texttail; | |
| 1958 | + $row->cells[] = $texthead.$rowdata->description.$texttail; | |
| 1959 | 1959 |      if (bigbluebuttonbn_get_recording_data_preview_enabled($bbbsession)) { | 
| 1960 | 1960 | $row->cells[] = $rowdata->preview; | 
| 1961 | 1961 | } | 
| 1962 | - $row->cells[] = $texthead . $rowdata->date_formatted . $texttail; | |
| 1962 | + $row->cells[] = $texthead.$rowdata->date_formatted.$texttail; | |
| 1963 | 1963 | $row->cells[] = $rowdata->duration_formatted; | 
| 1964 | 1964 |      if ($bbbsession['managerecordings']) { | 
| 1965 | 1965 | $row->cells[] = $rowdata->actionbar; | 
| @@ -2002,7 +2002,7 @@ discard block | ||
| 2002 | 2002 | $sender = get_admin(); | 
| 2003 | 2003 | // Prepare message. | 
| 2004 | 2004 |      $messagetext = '<p>'.get_string('email_body_recording_ready_for', 'bigbluebuttonbn'). | 
| 2005 | - ' "' . $bigbluebuttonbn->name . '" '. | |
| 2005 | + ' "'.$bigbluebuttonbn->name.'" '. | |
| 2006 | 2006 |          get_string('email_body_recording_ready_is_ready', 'bigbluebuttonbn').'.</p>'; | 
| 2007 | 2007 | \mod_bigbluebuttonbn\locallib\notifier::notification_send($sender, $bigbluebuttonbn, $messagetext); | 
| 2008 | 2008 | } | 
| @@ -2055,7 +2055,7 @@ discard block | ||
| 2055 | 2055 | // Enqueue it. | 
| 2056 | 2056 | \core\task\manager::queue_adhoc_task($task); | 
| 2057 | 2057 |      } catch (Exception $e) { | 
| 2058 | -        mtrace("Error while enqueuing completion_update_state task. " . (string)$e); | |
| 2058 | +        mtrace("Error while enqueuing completion_update_state task. ".(string) $e); | |
| 2059 | 2059 | } | 
| 2060 | 2060 | } | 
| 2061 | 2061 | |
| @@ -2218,17 +2218,17 @@ discard block | ||
| 2218 | 2218 | * @return string containing the sql used for getting the target bigbluebuttonbn instances | 
| 2219 | 2219 | */ | 
| 2220 | 2220 |  function bigbluebuttonbn_get_recordings_deleted_sql_select($courseid = 0, $bigbluebuttonbnid = null, $subset = true) { | 
| 2221 | - $sql = "log = '" . BIGBLUEBUTTONBN_LOG_EVENT_DELETE . "' AND meta like '%has_recordings%' AND meta like '%true%'"; | |
| 2221 | + $sql = "log = '".BIGBLUEBUTTONBN_LOG_EVENT_DELETE."' AND meta like '%has_recordings%' AND meta like '%true%'"; | |
| 2222 | 2222 |      if (empty($courseid)) { | 
| 2223 | 2223 | $courseid = 0; | 
| 2224 | 2224 | } | 
| 2225 | 2225 |      if (empty($bigbluebuttonbnid)) { | 
| 2226 | -        return $sql . " AND courseid = {$courseid}"; | |
| 2226 | +        return $sql." AND courseid = {$courseid}"; | |
| 2227 | 2227 | } | 
| 2228 | 2228 |      if ($subset) { | 
| 2229 | -        return $sql . " AND bigbluebuttonbnid = '{$bigbluebuttonbnid}'"; | |
| 2229 | +        return $sql." AND bigbluebuttonbnid = '{$bigbluebuttonbnid}'"; | |
| 2230 | 2230 | } | 
| 2231 | -    return $sql . " AND courseid = {$courseid} AND bigbluebuttonbnid <> '{$bigbluebuttonbnid}'"; | |
| 2231 | +    return $sql." AND courseid = {$courseid} AND bigbluebuttonbnid <> '{$bigbluebuttonbnid}'"; | |
| 2232 | 2232 | } | 
| 2233 | 2233 | |
| 2234 | 2234 | /** | 
| @@ -2242,17 +2242,17 @@ discard block | ||
| 2242 | 2242 | * @return string containing the sql used for getting the target bigbluebuttonbn instances | 
| 2243 | 2243 | */ | 
| 2244 | 2244 |  function bigbluebuttonbn_get_recordings_imported_sql_select($courseid = 0, $bigbluebuttonbnid = null, $subset = true) { | 
| 2245 | - $sql = "log = '" . BIGBLUEBUTTONBN_LOG_EVENT_IMPORT . "'"; | |
| 2245 | + $sql = "log = '".BIGBLUEBUTTONBN_LOG_EVENT_IMPORT."'"; | |
| 2246 | 2246 |      if (empty($courseid)) { | 
| 2247 | 2247 | $courseid = 0; | 
| 2248 | 2248 | } | 
| 2249 | 2249 |      if (empty($bigbluebuttonbnid)) { | 
| 2250 | -        return $sql . " AND courseid = '{$courseid}'"; | |
| 2250 | +        return $sql." AND courseid = '{$courseid}'"; | |
| 2251 | 2251 | } | 
| 2252 | 2252 |      if ($subset) { | 
| 2253 | -        return $sql . " AND bigbluebuttonbnid = '{$bigbluebuttonbnid}'"; | |
| 2253 | +        return $sql." AND bigbluebuttonbnid = '{$bigbluebuttonbnid}'"; | |
| 2254 | 2254 | } | 
| 2255 | -    return $sql . " AND courseid = '{$courseid}' AND bigbluebuttonbnid <> '{$bigbluebuttonbnid}'"; | |
| 2255 | +    return $sql." AND courseid = '{$courseid}' AND bigbluebuttonbnid <> '{$bigbluebuttonbnid}'"; | |
| 2256 | 2256 | } | 
| 2257 | 2257 | |
| 2258 | 2258 | /** | 
| @@ -2586,7 +2586,7 @@ discard block | ||
| 2586 | 2586 | */ | 
| 2587 | 2587 |  function bigbluebuttonbn_settings_general(&$renderer) { | 
| 2588 | 2588 | // Configuration for BigBlueButton. | 
| 2589 | -    if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_general_shown()) { | |
| 2589 | +    if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_general_shown()) { | |
| 2590 | 2590 |          $renderer->render_group_header('general'); | 
| 2591 | 2591 |          $renderer->render_group_element('server_url', | 
| 2592 | 2592 |              $renderer->render_group_element_text('server_url', BIGBLUEBUTTONBN_DEFAULT_SERVER_URL)); | 
| @@ -2604,7 +2604,7 @@ discard block | ||
| 2604 | 2604 | */ | 
| 2605 | 2605 |  function bigbluebuttonbn_settings_record(&$renderer) { | 
| 2606 | 2606 | // Configuration for 'recording' feature. | 
| 2607 | -    if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_record_meeting_shown()) { | |
| 2607 | +    if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_record_meeting_shown()) { | |
| 2608 | 2608 |          $renderer->render_group_header('recording'); | 
| 2609 | 2609 |          $renderer->render_group_element('recording_default', | 
| 2610 | 2610 |              $renderer->render_group_element_checkbox('recording_default', 1)); | 
| @@ -2634,7 +2634,7 @@ discard block | ||
| 2634 | 2634 | */ | 
| 2635 | 2635 |  function bigbluebuttonbn_settings_importrecordings(&$renderer) { | 
| 2636 | 2636 | // Configuration for 'import recordings' feature. | 
| 2637 | -    if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_import_recordings_shown()) { | |
| 2637 | +    if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_import_recordings_shown()) { | |
| 2638 | 2638 |          $renderer->render_group_header('importrecordings'); | 
| 2639 | 2639 |          $renderer->render_group_element('importrecordings_enabled', | 
| 2640 | 2640 |              $renderer->render_group_element_checkbox('importrecordings_enabled', 0)); | 
| @@ -2652,7 +2652,7 @@ discard block | ||
| 2652 | 2652 | */ | 
| 2653 | 2653 |  function bigbluebuttonbn_settings_showrecordings(&$renderer) { | 
| 2654 | 2654 | // Configuration for 'show recordings' feature. | 
| 2655 | -    if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_show_recordings_shown()) { | |
| 2655 | +    if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_show_recordings_shown()) { | |
| 2656 | 2656 |          $renderer->render_group_header('recordings'); | 
| 2657 | 2657 |          $renderer->render_group_element('recordings_html_default', | 
| 2658 | 2658 |              $renderer->render_group_element_checkbox('recordings_html_default', 1)); | 
| @@ -2684,7 +2684,7 @@ discard block | ||
| 2684 | 2684 | */ | 
| 2685 | 2685 |  function bigbluebuttonbn_settings_waitmoderator(&$renderer) { | 
| 2686 | 2686 | // Configuration for wait for moderator feature. | 
| 2687 | -    if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_wait_moderator_shown()) { | |
| 2687 | +    if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_wait_moderator_shown()) { | |
| 2688 | 2688 |          $renderer->render_group_header('waitformoderator'); | 
| 2689 | 2689 |          $renderer->render_group_element('waitformoderator_default', | 
| 2690 | 2690 |              $renderer->render_group_element_checkbox('waitformoderator_default', 0)); | 
| @@ -2706,7 +2706,7 @@ discard block | ||
| 2706 | 2706 | */ | 
| 2707 | 2707 |  function bigbluebuttonbn_settings_voicebridge(&$renderer) { | 
| 2708 | 2708 | // Configuration for "static voice bridge" feature. | 
| 2709 | -    if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_static_voice_bridge_shown()) { | |
| 2709 | +    if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_static_voice_bridge_shown()) { | |
| 2710 | 2710 |          $renderer->render_group_header('voicebridge'); | 
| 2711 | 2711 |          $renderer->render_group_element('voicebridge_editable', | 
| 2712 | 2712 |              $renderer->render_group_element_checkbox('voicebridge_editable', 0)); | 
| @@ -2722,7 +2722,7 @@ discard block | ||
| 2722 | 2722 | */ | 
| 2723 | 2723 |  function bigbluebuttonbn_settings_preupload(&$renderer) { | 
| 2724 | 2724 | // Configuration for "preupload presentation" feature. | 
| 2725 | -    if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_preupload_presentation_shown()) { | |
| 2725 | +    if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_preupload_presentation_shown()) { | |
| 2726 | 2726 | // This feature only works if curl is installed. | 
| 2727 | 2727 |          $preuploaddescripion = get_string('config_preuploadpresentation_description', 'bigbluebuttonbn'); | 
| 2728 | 2728 |          if (!extension_loaded('curl')) { | 
| @@ -2748,7 +2748,7 @@ discard block | ||
| 2748 | 2748 | */ | 
| 2749 | 2749 |  function bigbluebuttonbn_settings_preupload_manage_default_file(&$renderer) { | 
| 2750 | 2750 | // Configuration for "preupload presentation" feature. | 
| 2751 | -    if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_preupload_presentation_shown()) { | |
| 2751 | +    if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_preupload_presentation_shown()) { | |
| 2752 | 2752 |          if (extension_loaded('curl')) { | 
| 2753 | 2753 | // This feature only works if curl is installed. | 
| 2754 | 2754 |              $renderer->render_filemanager_default_file_presentation("presentation_default"); | 
| @@ -2765,7 +2765,7 @@ discard block | ||
| 2765 | 2765 | */ | 
| 2766 | 2766 |  function bigbluebuttonbn_settings_userlimit(&$renderer) { | 
| 2767 | 2767 | // Configuration for "user limit" feature. | 
| 2768 | -    if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_user_limit_shown()) { | |
| 2768 | +    if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_user_limit_shown()) { | |
| 2769 | 2769 |          $renderer->render_group_header('userlimit'); | 
| 2770 | 2770 |          $renderer->render_group_element('userlimit_default', | 
| 2771 | 2771 |              $renderer->render_group_element_text('userlimit_default', 0, PARAM_INT)); | 
| @@ -2783,7 +2783,7 @@ discard block | ||
| 2783 | 2783 | */ | 
| 2784 | 2784 |  function bigbluebuttonbn_settings_duration(&$renderer) { | 
| 2785 | 2785 | // Configuration for "scheduled duration" feature. | 
| 2786 | -    if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_scheduled_duration_shown()) { | |
| 2786 | +    if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_scheduled_duration_shown()) { | |
| 2787 | 2787 |          $renderer->render_group_header('scheduled'); | 
| 2788 | 2788 |          $renderer->render_group_element('scheduled_duration_enabled', | 
| 2789 | 2789 |              $renderer->render_group_element_checkbox('scheduled_duration_enabled', 1)); | 
| @@ -2803,7 +2803,7 @@ discard block | ||
| 2803 | 2803 | */ | 
| 2804 | 2804 |  function bigbluebuttonbn_settings_participants(&$renderer) { | 
| 2805 | 2805 | // Configuration for defining the default role/user that will be moderator on new activities. | 
| 2806 | -    if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_moderator_default_shown()) { | |
| 2806 | +    if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_moderator_default_shown()) { | |
| 2807 | 2807 |          $renderer->render_group_header('participant'); | 
| 2808 | 2808 | // UI for 'participants' feature. | 
| 2809 | 2809 | $roles = bigbluebuttonbn_get_roles(); | 
| @@ -2824,7 +2824,7 @@ discard block | ||
| 2824 | 2824 | */ | 
| 2825 | 2825 |  function bigbluebuttonbn_settings_notifications(&$renderer) { | 
| 2826 | 2826 | // Configuration for "send notifications" feature. | 
| 2827 | -    if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_send_notifications_shown()) { | |
| 2827 | +    if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_send_notifications_shown()) { | |
| 2828 | 2828 |          $renderer->render_group_header('sendnotifications'); | 
| 2829 | 2829 |          $renderer->render_group_element('sendnotifications_enabled', | 
| 2830 | 2830 |              $renderer->render_group_element_checkbox('sendnotifications_enabled', 1)); | 
| @@ -2840,12 +2840,12 @@ discard block | ||
| 2840 | 2840 | */ | 
| 2841 | 2841 |  function bigbluebuttonbn_settings_clienttype(&$renderer) { | 
| 2842 | 2842 | // Configuration for "clienttype" feature. | 
| 2843 | -    if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_clienttype_shown()) { | |
| 2843 | +    if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_clienttype_shown()) { | |
| 2844 | 2844 |          $renderer->render_group_header('clienttype'); | 
| 2845 | 2845 |          $renderer->render_group_element('clienttype_editable', | 
| 2846 | 2846 |              $renderer->render_group_element_checkbox('clienttype_editable', 0)); | 
| 2847 | 2847 | // Web Client default. | 
| 2848 | -        $default = intval((int)\mod_bigbluebuttonbn\locallib\config::get('clienttype_default')); | |
| 2848 | +        $default = intval((int) \mod_bigbluebuttonbn\locallib\config::get('clienttype_default')); | |
| 2849 | 2849 |          $choices = array(BIGBLUEBUTTON_CLIENTTYPE_FLASH => get_string('mod_form_block_clienttype_flash', 'bigbluebuttonbn'), | 
| 2850 | 2850 |                           BIGBLUEBUTTON_CLIENTTYPE_HTML5 => get_string('mod_form_block_clienttype_html5', 'bigbluebuttonbn')); | 
| 2851 | 2851 |          $renderer->render_group_element('clienttype_default', | 
| @@ -2863,7 +2863,7 @@ discard block | ||
| 2863 | 2863 | */ | 
| 2864 | 2864 |  function bigbluebuttonbn_settings_muteonstart(&$renderer) { | 
| 2865 | 2865 | // Configuration for BigBlueButton. | 
| 2866 | -    if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_muteonstart_shown()) { | |
| 2866 | +    if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_muteonstart_shown()) { | |
| 2867 | 2867 |          $renderer->render_group_header('muteonstart'); | 
| 2868 | 2868 |          $renderer->render_group_element('muteonstart_default', | 
| 2869 | 2869 |              $renderer->render_group_element_checkbox('muteonstart_default', 0)); | 
| @@ -2881,7 +2881,7 @@ discard block | ||
| 2881 | 2881 | */ | 
| 2882 | 2882 |  function bigbluebuttonbn_settings_extended(&$renderer) { | 
| 2883 | 2883 | // Configuration for 'notify users when recording ready' feature. | 
| 2884 | -    if (!(boolean)\mod_bigbluebuttonbn\settings\validator::section_settings_extended_shown()) { | |
| 2884 | +    if (!(boolean) \mod_bigbluebuttonbn\settings\validator::section_settings_extended_shown()) { | |
| 2885 | 2885 | return; | 
| 2886 | 2886 | } | 
| 2887 | 2887 |      $renderer->render_group_header('extended_capabilities'); | 
| @@ -2905,7 +2905,7 @@ discard block | ||
| 2905 | 2905 | global $DB; | 
| 2906 | 2906 |      do { | 
| 2907 | 2907 | $encodedseed = sha1(bigbluebuttonbn_random_password(12)); | 
| 2908 | -        $meetingid = (string)$DB->get_field('bigbluebuttonbn', 'meetingid', array('meetingid' => $encodedseed)); | |
| 2908 | +        $meetingid = (string) $DB->get_field('bigbluebuttonbn', 'meetingid', array('meetingid' => $encodedseed)); | |
| 2909 | 2909 | } while ($meetingid == $encodedseed); | 
| 2910 | 2910 | return $encodedseed; | 
| 2911 | 2911 | } | 
| @@ -2950,22 +2950,22 @@ discard block | ||
| 2950 | 2950 | * | 
| 2951 | 2951 | * @return string | 
| 2952 | 2952 | */ | 
| 2953 | -function bigbluebuttonbn_render_warning($message, $type='info', $href='', $text='', $class='') { | |
| 2953 | +function bigbluebuttonbn_render_warning($message, $type = 'info', $href = '', $text = '', $class = '') { | |
| 2954 | 2954 | global $OUTPUT; | 
| 2955 | 2955 | $output = "\n"; | 
| 2956 | 2956 | // Evaluates if config_warning is enabled. | 
| 2957 | 2957 |      if (empty($message)) { | 
| 2958 | 2958 | return $output; | 
| 2959 | 2959 | } | 
| 2960 | -    $output .= $OUTPUT->box_start('box boxalignleft adminerror alert alert-' . $type . ' alert-block fade in', | |
| 2961 | - 'bigbluebuttonbn_view_general_warning') . "\n"; | |
| 2962 | - $output .= ' ' . $message . "\n"; | |
| 2963 | - $output .= ' <div class="singlebutton pull-right">' . "\n"; | |
| 2960 | +    $output .= $OUTPUT->box_start('box boxalignleft adminerror alert alert-'.$type.' alert-block fade in', | |
| 2961 | + 'bigbluebuttonbn_view_general_warning')."\n"; | |
| 2962 | + $output .= ' '.$message."\n"; | |
| 2963 | + $output .= ' <div class="singlebutton pull-right">'."\n"; | |
| 2964 | 2964 |      if (!empty($href)) { | 
| 2965 | 2965 | $output .= bigbluebuttonbn_render_warning_button($href, $text, $class); | 
| 2966 | 2966 | } | 
| 2967 | - $output .= ' </div>' . "\n"; | |
| 2968 | - $output .= $OUTPUT->box_end() . "\n"; | |
| 2967 | + $output .= ' </div>'."\n"; | |
| 2968 | + $output .= $OUTPUT->box_end()."\n"; | |
| 2969 | 2969 | return $output; | 
| 2970 | 2970 | } | 
| 2971 | 2971 | |
| @@ -2989,10 +2989,10 @@ discard block | ||
| 2989 | 2989 |      if ($class == '') { | 
| 2990 | 2990 | $class = 'btn btn-secondary'; | 
| 2991 | 2991 | } | 
| 2992 | - $output = ' <form method="post" action="' . $href . '" class="form-inline">'."\n"; | |
| 2993 | - $output .= ' <button type="submit" class="' . $class . '"'."\n"; | |
| 2994 | - $output .= ' title="' . $title . '"'."\n"; | |
| 2995 | - $output .= ' >' . $text . '</button>'."\n"; | |
| 2992 | + $output = ' <form method="post" action="'.$href.'" class="form-inline">'."\n"; | |
| 2993 | + $output .= ' <button type="submit" class="'.$class.'"'."\n"; | |
| 2994 | + $output .= ' title="'.$title.'"'."\n"; | |
| 2995 | + $output .= ' >'.$text.'</button>'."\n"; | |
| 2996 | 2996 | $output .= ' </form>'."\n"; | 
| 2997 | 2997 | return $output; | 
| 2998 | 2998 | } | 
| @@ -3059,7 +3059,7 @@ discard block | ||
| 3059 | 3059 | |
| 3060 | 3060 | // By default, use a meetingid without groups. | 
| 3061 | 3061 |      if (empty($mid)) { | 
| 3062 | - $mid = $bigbluebuttonbn->meetingid . '-' . $bigbluebuttonbn->course . '-' . $bigbluebuttonbn->id; | |
| 3062 | + $mid = $bigbluebuttonbn->meetingid.'-'.$bigbluebuttonbn->course.'-'.$bigbluebuttonbn->id; | |
| 3063 | 3063 | } | 
| 3064 | 3064 | |
| 3065 | 3065 | // When meeting is running, all authorized users can join right in. | 
| @@ -3120,7 +3120,7 @@ discard block | ||
| 3120 | 3120 |  function bigbluebuttonbn_instance_ownerid($bigbluebuttonbn) { | 
| 3121 | 3121 | global $DB; | 
| 3122 | 3122 |      $filters = array('bigbluebuttonbnid' => $bigbluebuttonbn->id, 'log' => 'Add'); | 
| 3123 | -    $ownerid = (integer)$DB->get_field('bigbluebuttonbn_logs', 'userid', $filters); | |
| 3123 | +    $ownerid = (integer) $DB->get_field('bigbluebuttonbn_logs', 'userid', $filters); | |
| 3124 | 3124 | return $ownerid; | 
| 3125 | 3125 | } | 
| 3126 | 3126 | |
| @@ -3130,7 +3130,7 @@ discard block | ||
| 3130 | 3130 | * @return boolean | 
| 3131 | 3131 | */ | 
| 3132 | 3132 |  function bigbluebuttonbn_has_html5_client() { | 
| 3133 | - $checkurl = \mod_bigbluebuttonbn\locallib\bigbluebutton::root() . "html5client/check"; | |
| 3133 | + $checkurl = \mod_bigbluebuttonbn\locallib\bigbluebutton::root()."html5client/check"; | |
| 3134 | 3134 | $curlinfo = bigbluebuttonbn_wrap_xml_load_file_curl_request($checkurl, 'HEAD'); | 
| 3135 | 3135 | return (isset($curlinfo['http_code']) && $curlinfo['http_code'] == 200); | 
| 3136 | 3136 | } | 
| @@ -3163,8 +3163,8 @@ discard block | ||
| 3163 | 3163 | $bbbsession['meetingname'] = $bbbsession['bigbluebuttonbn']->name; | 
| 3164 | 3164 | $bbbsession['meetingdescription'] = $bbbsession['bigbluebuttonbn']->intro; | 
| 3165 | 3165 | // Extra data for setting up the Meeting. | 
| 3166 | -    $bbbsession['userlimit'] = intval((int)\mod_bigbluebuttonbn\locallib\config::get('userlimit_default')); | |
| 3167 | -    if ((boolean)\mod_bigbluebuttonbn\locallib\config::get('userlimit_editable')) { | |
| 3166 | +    $bbbsession['userlimit'] = intval((int) \mod_bigbluebuttonbn\locallib\config::get('userlimit_default')); | |
| 3167 | +    if ((boolean) \mod_bigbluebuttonbn\locallib\config::get('userlimit_editable')) { | |
| 3168 | 3168 | $bbbsession['userlimit'] = intval($bbbsession['bigbluebuttonbn']->userlimit); | 
| 3169 | 3169 | } | 
| 3170 | 3170 | $bbbsession['voicebridge'] = $bbbsession['bigbluebuttonbn']->voicebridge; | 
| @@ -3270,7 +3270,7 @@ discard block | ||
| 3270 | 3270 | ); | 
| 3271 | 3271 | |
| 3272 | 3272 | // Check status and set extra values. | 
| 3273 | - $activitystatus = bigbluebuttonbn_view_get_activity_status($bbbsession); // In locallib. | |
| 3273 | + $activitystatus = bigbluebuttonbn_view_get_activity_status($bbbsession); // In locallib. | |
| 3274 | 3274 |      if ($activitystatus == 'ended') { | 
| 3275 | 3275 | $bbbsession['presentation'] = bigbluebuttonbn_get_presentation_array( | 
| 3276 | 3276 | $bbbsession['context'], $bbbsession['bigbluebuttonbn']->presentation); | 
| @@ -3306,18 +3306,18 @@ discard block | ||
| 3306 | 3306 | 'bbb-recording-tags' => bigbluebuttonbn_get_tags($bbbsession['cm']->id), // Same as $id. | 
| 3307 | 3307 | ]; | 
| 3308 | 3308 | // Special metadata for recording processing. | 
| 3309 | -    if ((boolean)\mod_bigbluebuttonbn\locallib\config::get('recordingstatus_enabled')) { | |
| 3309 | +    if ((boolean) \mod_bigbluebuttonbn\locallib\config::get('recordingstatus_enabled')) { | |
| 3310 | 3310 | $metadata["bn-recording-status"] = json_encode( | 
| 3311 | 3311 | array( | 
| 3312 | -                'email' => array('"' . fullname($USER) . '" <' . $USER->email . '>'), | |
| 3312 | +                'email' => array('"'.fullname($USER).'" <'.$USER->email.'>'), | |
| 3313 | 3313 | 'context' => $bbbsession['bigbluebuttonbnURL'] | 
| 3314 | 3314 | ) | 
| 3315 | 3315 | ); | 
| 3316 | 3316 | } | 
| 3317 | -    if ((boolean)\mod_bigbluebuttonbn\locallib\config::get('recordingready_enabled')) { | |
| 3317 | +    if ((boolean) \mod_bigbluebuttonbn\locallib\config::get('recordingready_enabled')) { | |
| 3318 | 3318 | $metadata['bn-recording-ready-url'] = $bbbsession['recordingReadyURL']; | 
| 3319 | 3319 | } | 
| 3320 | -    if ((boolean)\mod_bigbluebuttonbn\locallib\config::get('meetingevents_enabled')) { | |
| 3320 | +    if ((boolean) \mod_bigbluebuttonbn\locallib\config::get('meetingevents_enabled')) { | |
| 3321 | 3321 | $metadata['analytics-callback-url'] = $bbbsession['meetingEventsURL']; | 
| 3322 | 3322 | } | 
| 3323 | 3323 | return $metadata; | 
| @@ -59,7 +59,7 @@ | ||
| 59 | 59 |          $logs = new backup_nested_element('logs'); | 
| 60 | 60 | |
| 61 | 61 |          $log = new backup_nested_element('log', array('id'), array( | 
| 62 | - 'courseid', 'bigbluebuttonbnid', 'userid', 'timecreated', 'meetingid', 'log', 'meta', )); | |
| 62 | + 'courseid', 'bigbluebuttonbnid', 'userid', 'timecreated', 'meetingid', 'log', 'meta',)); | |
| 63 | 63 | |
| 64 | 64 | // Build the tree. | 
| 65 | 65 | $bigbluebuttonbn->add_child($logs); | 
| @@ -126,7 +126,7 @@ | ||
| 126 | 126 | echo $completionvalidate; | 
| 127 | 127 | return; | 
| 128 | 128 | } | 
| 129 | -    header('HTTP/1.0 400 Bad request. The action '. $a . ' doesn\'t exist'); | |
| 129 | +    header('HTTP/1.0 400 Bad request. The action '.$a.' doesn\'t exist'); | |
| 130 | 130 |  } catch (Exception $e) { | 
| 131 | 131 |      header('HTTP/1.0 500 Internal Server Error. '.$e->getMessage()); | 
| 132 | 132 | } | 
| @@ -64,7 +64,7 @@ discard block | ||
| 64 | 64 | * Remove this block when restored | 
| 65 | 65 | */ | 
| 66 | 66 | |
| 67 | - /** @var BIGBLUEBUTTONBN_DEFAULT_SERVER_URL string of default bigbluebutton server url */ | |
| 67 | + /** @var BIGBLUEBUTTONBN_DEFAULT_SERVER_URL string of default bigbluebutton server url */ | |
| 68 | 68 | const BIGBLUEBUTTONBN_DEFAULT_SERVER_URL = 'http://test-install.blindsidenetworks.com/bigbluebutton/'; | 
| 69 | 69 | /** @var BIGBLUEBUTTONBN_DEFAULT_SHARED_SECRET string of default bigbluebutton server shared secret */ | 
| 70 | 70 | const BIGBLUEBUTTONBN_DEFAULT_SHARED_SECRET = '8cd8ef52e8e101574e400365b55e11a6'; | 
| @@ -367,7 +367,7 @@ discard block | ||
| 367 | 367 |      $sql = "SELECT COUNT(*) FROM {bigbluebuttonbn_logs} "; | 
| 368 | 368 | $sql .= "WHERE courseid = ? AND bigbluebuttonbnid = ? AND userid = ? AND (log = ? OR log = ?)"; | 
| 369 | 369 | $result = $DB->count_records_sql($sql, array($course->id, $bigbluebuttonbn->id, $user->id, | 
| 370 | - BIGBLUEBUTTONBN_LOG_EVENT_JOIN, BIGBLUEBUTTONBN_LOG_EVENT_PLAYED)); | |
| 370 | + BIGBLUEBUTTONBN_LOG_EVENT_JOIN, BIGBLUEBUTTONBN_LOG_EVENT_PLAYED)); | |
| 371 | 371 | return $result; | 
| 372 | 372 | } | 
| 373 | 373 | |
| @@ -596,12 +596,12 @@ discard block | ||
| 596 | 596 | $str = '<div class="bigbluebuttonbn overview">'."\n"; | 
| 597 | 597 |      $str .= '  <div class="name">'.get_string('modulename', 'bigbluebuttonbn').': '."\n"; | 
| 598 | 598 | $str .= ' <a '.$classes.'href="'.$CFG->wwwroot.'/mod/bigbluebuttonbn/view.php?id='.$bigbluebuttonbn->coursemodule. | 
| 599 | - '">'.$bigbluebuttonbn->name.'</a>'."\n"; | |
| 599 | + '">'.$bigbluebuttonbn->name.'</a>'."\n"; | |
| 600 | 600 | $str .= ' </div>'."\n"; | 
| 601 | 601 | $str .= ' <div class="info">'.get_string($start, 'bigbluebuttonbn').': '.userdate($bigbluebuttonbn->openingtime). | 
| 602 | 602 | '</div>'."\n"; | 
| 603 | 603 |      $str .= '  <div class="info">'.get_string('ends_at', 'bigbluebuttonbn').': '.userdate($bigbluebuttonbn->closingtime) | 
| 604 | - .'</div>'."\n"; | |
| 604 | + .'</div>'."\n"; | |
| 605 | 605 | $str .= '</div>'."\n"; | 
| 606 | 606 | return $str; | 
| 607 | 607 | } | 
| @@ -842,7 +842,7 @@ discard block | ||
| 842 | 842 | $bigbluebuttonbn->coursemodule, | 
| 843 | 843 | 'bigbluebuttonbn', | 
| 844 | 844 | $bigbluebuttonbn->id, $bigbluebuttonbn->completionexpected | 
| 845 | - ); | |
| 845 | + ); | |
| 846 | 846 | } | 
| 847 | 847 | } | 
| 848 | 848 | |
| @@ -261,7 +261,7 @@ discard block | ||
| 261 | 261 | // Update a record. | 
| 262 | 262 |      $DB->update_record('bigbluebuttonbn', $bigbluebuttonbn); | 
| 263 | 263 | // Get the meetingid column in the bigbluebuttonbn table. | 
| 264 | -    $bigbluebuttonbn->meetingid = (string)$DB->get_field('bigbluebuttonbn', 'meetingid', array('id' => $bigbluebuttonbn->id)); | |
| 264 | +    $bigbluebuttonbn->meetingid = (string) $DB->get_field('bigbluebuttonbn', 'meetingid', array('id' => $bigbluebuttonbn->id)); | |
| 265 | 265 | // Log update action. | 
| 266 | 266 | bigbluebuttonbn_log($bigbluebuttonbn, BIGBLUEBUTTONBN_LOG_EVENT_EDIT); | 
| 267 | 267 | // Complete the process. | 
| @@ -315,9 +315,9 @@ discard block | ||
| 315 | 315 |  function bigbluebuttonbn_delete_instance_log($bigbluebuttonbn) { | 
| 316 | 316 | global $DB; | 
| 317 | 317 |      $sql  = "SELECT * FROM {bigbluebuttonbn_logs} "; | 
| 318 | -    $sql .= "WHERE bigbluebuttonbnid = ? AND log = ? AND ". $DB->sql_compare_text('meta') . " = ?"; | |
| 318 | +    $sql .= "WHERE bigbluebuttonbnid = ? AND log = ? AND ".$DB->sql_compare_text('meta')." = ?"; | |
| 319 | 319 |      $logs = $DB->get_records_sql($sql, array($bigbluebuttonbn->id, BIGBLUEBUTTONBN_LOG_EVENT_CREATE, "{\"record\":true}")); | 
| 320 | -    $meta = "{\"has_recordings\":" . empty($logs) ? "true" : "false" . "}"; | |
| 320 | +    $meta = "{\"has_recordings\":".empty($logs) ? "true" : "false"."}"; | |
| 321 | 321 | bigbluebuttonbn_log($bigbluebuttonbn, BIGBLUEBUTTONBN_LOG_EVENT_DELETE, [], $meta); | 
| 322 | 322 | } | 
| 323 | 323 | |
| @@ -335,8 +335,8 @@ discard block | ||
| 335 | 335 | */ | 
| 336 | 336 |  function bigbluebuttonbn_user_outline($course, $user, $mod, $bigbluebuttonbn) { | 
| 337 | 337 |      if ($completed = bigbluebuttonbn_user_complete($course, $user, $bigbluebuttonbn)) { | 
| 338 | -        return fullname($user) . ' ' . get_string('view_message_has_joined', 'bigbluebuttonbn') . ' ' . | |
| 339 | -            get_string('view_message_session_for', 'bigbluebuttonbn') . ' ' . (string) $completed . ' ' . | |
| 338 | +        return fullname($user).' '.get_string('view_message_has_joined', 'bigbluebuttonbn').' '. | |
| 339 | +            get_string('view_message_session_for', 'bigbluebuttonbn').' '.(string) $completed.' '. | |
| 340 | 340 |              get_string('view_message_times', 'bigbluebuttonbn'); | 
| 341 | 341 | } | 
| 342 | 342 | return ''; | 
| @@ -357,12 +357,12 @@ discard block | ||
| 357 | 357 |      if (is_object($courseorid)) { | 
| 358 | 358 | $course = $courseorid; | 
| 359 | 359 |      } else { | 
| 360 | -        $course = (object)array('id' => $courseorid); | |
| 360 | +        $course = (object) array('id' => $courseorid); | |
| 361 | 361 | } | 
| 362 | 362 |      if (is_object($userorid)) { | 
| 363 | 363 | $user = $userorid; | 
| 364 | 364 |      } else { | 
| 365 | -        $user = (object)array('id' => $userorid); | |
| 365 | +        $user = (object) array('id' => $userorid); | |
| 366 | 366 | } | 
| 367 | 367 |      $sql = "SELECT COUNT(*) FROM {bigbluebuttonbn_logs} "; | 
| 368 | 368 | $sql .= "WHERE courseid = ? AND bigbluebuttonbnid = ? AND userid = ? AND (log = ? OR log = ?)"; | 
| @@ -388,7 +388,7 @@ discard block | ||
| 388 | 388 |  function bigbluebuttonbn_reset_course_items() { | 
| 389 | 389 |      $items = array("events" => 0, "tags" => 0, "logs" => 0); | 
| 390 | 390 | // Include recordings only if enabled. | 
| 391 | -    if ((boolean)\mod_bigbluebuttonbn\locallib\config::recordings_enabled()) { | |
| 391 | +    if ((boolean) \mod_bigbluebuttonbn\locallib\config::recordings_enabled()) { | |
| 392 | 392 | $items["recordings"] = 0; | 
| 393 | 393 | } | 
| 394 | 394 | return $items; | 
| @@ -692,7 +692,7 @@ discard block | ||
| 692 | 692 |  function bigbluebuttonbn_process_pre_save_instance(&$bigbluebuttonbn) { | 
| 693 | 693 | require_once(__DIR__.'/locallib.php'); | 
| 694 | 694 | $bigbluebuttonbn->timemodified = time(); | 
| 695 | -    if ((integer)$bigbluebuttonbn->instance == 0) { | |
| 695 | +    if ((integer) $bigbluebuttonbn->instance == 0) { | |
| 696 | 696 | $bigbluebuttonbn->meetingid = 0; | 
| 697 | 697 | $bigbluebuttonbn->timecreated = time(); | 
| 698 | 698 | $bigbluebuttonbn->timemodified = 0; | 
| @@ -1117,7 +1117,7 @@ discard block | ||
| 1117 | 1117 |          \core_calendar\action_factory $factory) { | 
| 1118 | 1118 | global $CFG, $DB; | 
| 1119 | 1119 | |
| 1120 | - require_once($CFG->dirroot . '/mod/bigbluebuttonbn/locallib.php'); | |
| 1120 | + require_once($CFG->dirroot.'/mod/bigbluebuttonbn/locallib.php'); | |
| 1121 | 1121 | |
| 1122 | 1122 | // Get mod info. | 
| 1123 | 1123 | $cm = get_fast_modinfo($event->courseid)->instances['bigbluebuttonbn'][$event->instance]; | 
| @@ -1195,7 +1195,7 @@ discard block | ||
| 1195 | 1195 |  function bigbluebuttonbn_extend_settings_navigation(settings_navigation $settingsnav, navigation_node $nodenav) { | 
| 1196 | 1196 | global $PAGE, $USER; | 
| 1197 | 1197 | // Don't add validate completion if the callback for meetingevents is NOT enabled. | 
| 1198 | -    if (!(boolean)\mod_bigbluebuttonbn\locallib\config::get('meetingevents_enabled')) { | |
| 1198 | +    if (!(boolean) \mod_bigbluebuttonbn\locallib\config::get('meetingevents_enabled')) { | |
| 1199 | 1199 | return; | 
| 1200 | 1200 | } | 
| 1201 | 1201 | // Don't add validate completion if user is not allowed to edit the activity. | 
| @@ -1203,7 +1203,7 @@ discard block | ||
| 1203 | 1203 |      if (!has_capability('moodle/course:manageactivities', $context, $USER->id)) { | 
| 1204 | 1204 | return; | 
| 1205 | 1205 | } | 
| 1206 | - $completionvalidate = '#action=completion_validate&bigbluebuttonbn=' . $PAGE->cm->instance; | |
| 1206 | + $completionvalidate = '#action=completion_validate&bigbluebuttonbn='.$PAGE->cm->instance; | |
| 1207 | 1207 |      $nodenav->add(get_string('completionvalidatestate', 'bigbluebuttonbn'), | 
| 1208 | 1208 | $completionvalidate, navigation_node::TYPE_CONTAINER); | 
| 1209 | 1209 | } | 
| @@ -103,7 +103,7 @@ discard block | ||
| 103 | 103 | * recordings from a different activity even from a different course. | 
| 104 | 104 | **/ | 
| 105 | 105 | |
| 106 | - /* | |
| 106 | + /* | |
| 107 | 107 | * When the value is set to 1 (checked) the bigbluebuttonbn rooms or | 
| 108 | 108 | * activities will have the 'import recordings' capability enabled. | 
| 109 | 109 | * $CFG->bigbluebuttonbn['importrecordings_enabled'] = 0; | 
| @@ -124,7 +124,7 @@ discard block | ||
| 124 | 124 | * 'Join session' button enabled | 
| 125 | 125 | **/ | 
| 126 | 126 | |
| 127 | - /* | |
| 127 | + /* | |
| 128 | 128 | * When the value is set to 1 (checked) the bigbluebuttonbn rooms or | 
| 129 | 129 | * activities will have the 'wait for moderator' capability enabled by | 
| 130 | 130 | * default. | 
| @@ -361,27 +361,27 @@ discard block | ||
| 361 | 361 | * $CFG->bigbluebuttonbn['general_warning_message'] = "Would you like to record your BigBlueButton sessions for later viewing? "; | 
| 362 | 362 | */ | 
| 363 | 363 | |
| 364 | - /* | |
| 364 | + /* | |
| 365 | 365 | * The warning box is always shown to administrators, but it is also possible to define other roles | 
| 366 | 366 | * to whom the it will be shown. The roles are based on the shortnames defined by Moodle: | 
| 367 | 367 | * 'manager,coursecreator,editingteacher,teacher,student,guest,user,frontpage' | 
| 368 | 368 | * $CFG->bigbluebuttonbn['general_warning_roles'] = 'editingteacher,teacher'; | 
| 369 | 369 | */ | 
| 370 | 370 | |
| 371 | - /* | |
| 371 | + /* | |
| 372 | 372 | * As the general_warning_message is shown in a box, its type can be defined with general_warning_type | 
| 373 | 373 | * The default type is 'info' which is normaly rendered in blue when using a bootstrap theme. | 
| 374 | 374 | * All the modifiers for boxed in bootstrap can be used [info|success|warning|danger]. | 
| 375 | 375 | * $CFG->bigbluebuttonbn['general_warning_box_type'] = 'info'; | 
| 376 | 376 | */ | 
| 377 | 377 | |
| 378 | - /* | |
| 378 | + /* | |
| 379 | 379 | * Additionally, when general_warning_button_href value is different than "", a button | 
| 380 | 380 | * can also be shown right after the message. | 
| 381 | 381 | * $CFG->bigbluebuttonbn['general_warning_button_href'] = "http://blindsidenetworks.com/"; | 
| 382 | 382 | */ | 
| 383 | 383 | |
| 384 | - /* | |
| 384 | + /* | |
| 385 | 385 | * Finally, the text and class for the button can be modified | 
| 386 | 386 | * $CFG->bigbluebuttonbn['general_warning_button_text'] = "Upgrade your site"; | 
| 387 | 387 | * $CFG->bigbluebuttonbn['general_warning_button_class'] = "btn btn-primary"; | 
| @@ -626,7 +626,7 @@ discard block | ||
| 626 | 626 | // Pull the Bearer from the headers. | 
| 627 | 627 |          if (!array_key_exists('Authorization', $headers)) { | 
| 628 | 628 | $msg = 'Authorization failed'; | 
| 629 | -            header('HTTP/1.0 400 Bad Request. ' . $msg); | |
| 629 | +            header('HTTP/1.0 400 Bad Request. '.$msg); | |
| 630 | 630 | return; | 
| 631 | 631 | } | 
| 632 | 632 |          $authorization = explode(" ", $headers['Authorization']); | 
| @@ -641,8 +641,8 @@ discard block | ||
| 641 | 641 | // Convert JSON string to a JSON object. | 
| 642 | 642 | $jsonobj = json_decode($jsonstr); | 
| 643 | 643 |      } catch (Exception $e) { | 
| 644 | - $msg = 'Caught exception: ' . $e->getMessage(); | |
| 645 | -        header('HTTP/1.0 400 Bad Request. ' . $msg); | |
| 644 | + $msg = 'Caught exception: '.$e->getMessage(); | |
| 645 | +        header('HTTP/1.0 400 Bad Request. '.$msg); | |
| 646 | 646 | return; | 
| 647 | 647 | } | 
| 648 | 648 | |
| @@ -651,7 +651,7 @@ discard block | ||
| 651 | 651 |      $meetingidelements = explode('-', $meetingidelements[0]); | 
| 652 | 652 |      if (!isset($bigbluebuttonbn) || $bigbluebuttonbn->meetingid != $meetingidelements[0]) { | 
| 653 | 653 | $msg = 'The activity may have been deleted'; | 
| 654 | -        header('HTTP/1.0 410 Gone. ' . $msg); | |
| 654 | +        header('HTTP/1.0 410 Gone. '.$msg); | |
| 655 | 655 | return; | 
| 656 | 656 | } | 
| 657 | 657 | |
| @@ -664,11 +664,11 @@ discard block | ||
| 664 | 664 | // Process the events. | 
| 665 | 665 | bigbluebuttonbn_process_meeting_events($bigbluebuttonbn, $jsonobj); | 
| 666 | 666 | $msg = 'Enqueued.'; | 
| 667 | -        header('HTTP/1.0 202 Accepted. ' . $msg); | |
| 667 | +        header('HTTP/1.0 202 Accepted. '.$msg); | |
| 668 | 668 | return; | 
| 669 | 669 | } | 
| 670 | 670 | $msg = 'Already processed.'; | 
| 671 | -    header('HTTP/1.0 202 Accepted. ' . $msg); | |
| 671 | +    header('HTTP/1.0 202 Accepted. '.$msg); | |
| 672 | 672 | } | 
| 673 | 673 | |
| 674 | 674 | /** | 
| @@ -47,7 +47,7 @@ | ||
| 47 | 47 |      print_error('view_error_invalid_session', plugin::COMPONENT); | 
| 48 | 48 | } | 
| 49 | 49 | |
| 50 | -if (!(boolean)\mod_bigbluebuttonbn\locallib\config::importrecordings_enabled()) { | |
| 50 | +if (!(boolean) \mod_bigbluebuttonbn\locallib\config::importrecordings_enabled()) { | |
| 51 | 51 |      print_error('view_message_importrecordings_disabled', plugin::COMPONENT); | 
| 52 | 52 | } | 
| 53 | 53 | |
| @@ -309,8 +309,8 @@ discard block | ||
| 309 | 309 | $this->bigbluebuttonbn_mform_add_element($mform, $field['type'], $field['name'], $field['data_type'], | 
| 310 | 310 | $field['description_key'], 0, ['maxlength' => 4, 'size' => 6], | 
| 311 | 311 |                  ['message' => get_string('mod_form_field_voicebridge_format_error', 'bigbluebuttonbn'), | 
| 312 | - 'type' => 'numeric', 'rule' => '####', 'validator' => 'server'] | |
| 313 | - ); | |
| 312 | + 'type' => 'numeric', 'rule' => '####', 'validator' => 'server'] | |
| 313 | + ); | |
| 314 | 314 |          } else { | 
| 315 | 315 | $this->bigbluebuttonbn_mform_add_element($mform, $field['type'], $field['name'], $field['data_type'], | 
| 316 | 316 | $field['description_key'], 0, ['maxlength' => 4, 'size' => 6]); | 
| @@ -380,7 +380,7 @@ discard block | ||
| 380 | 380 |      private function bigbluebuttonbn_mform_add_block_room_recordings(&$mform, $cfg) { | 
| 381 | 381 | $recordingsettings = false; | 
| 382 | 382 | $field = ['type' => 'hidden', 'name' => 'recordings_html', 'data_type' => PARAM_INT, | 
| 383 | - 'description_key' => null]; | |
| 383 | + 'description_key' => null]; | |
| 384 | 384 |          if ($cfg['recordings_html_editable']) { | 
| 385 | 385 | $field['type'] = 'checkbox'; | 
| 386 | 386 | $field['description_key'] = 'mod_form_field_recordings_html'; | 
| @@ -389,7 +389,7 @@ discard block | ||
| 389 | 389 | $this->bigbluebuttonbn_mform_add_element($mform, $field['type'], $field['name'], $field['data_type'], | 
| 390 | 390 | $field['description_key'], $cfg['recordings_html_default']); | 
| 391 | 391 | $field = ['type' => 'hidden', 'name' => 'recordings_deleted', 'data_type' => PARAM_INT, | 
| 392 | - 'description_key' => null]; | |
| 392 | + 'description_key' => null]; | |
| 393 | 393 |          if ($cfg['recordings_deleted_editable']) { | 
| 394 | 394 | $field['type'] = 'checkbox'; | 
| 395 | 395 | $field['description_key'] = 'mod_form_field_recordings_deleted'; | 
| @@ -398,7 +398,7 @@ discard block | ||
| 398 | 398 | $this->bigbluebuttonbn_mform_add_element($mform, $field['type'], $field['name'], $field['data_type'], | 
| 399 | 399 | $field['description_key'], $cfg['recordings_deleted_default']); | 
| 400 | 400 | $field = ['type' => 'hidden', 'name' => 'recordings_imported', 'data_type' => PARAM_INT, | 
| 401 | - 'description_key' => null]; | |
| 401 | + 'description_key' => null]; | |
| 402 | 402 |          if ($cfg['importrecordings_enabled'] && $cfg['recordings_imported_editable']) { | 
| 403 | 403 | $field['type'] = 'checkbox'; | 
| 404 | 404 | $field['description_key'] = 'mod_form_field_recordings_imported'; | 
| @@ -407,7 +407,7 @@ discard block | ||
| 407 | 407 | $this->bigbluebuttonbn_mform_add_element($mform, $field['type'], $field['name'], $field['data_type'], | 
| 408 | 408 | $field['description_key'], $cfg['recordings_imported_default']); | 
| 409 | 409 | $field = ['type' => 'hidden', 'name' => 'recordings_preview', 'data_type' => PARAM_INT, | 
| 410 | - 'description_key' => null]; | |
| 410 | + 'description_key' => null]; | |
| 411 | 411 |          if ($cfg['recordings_preview_editable']) { | 
| 412 | 412 | $field['type'] = 'checkbox'; | 
| 413 | 413 | $field['description_key'] = 'mod_form_field_recordings_preview'; | 
| @@ -484,7 +484,7 @@ discard block | ||
| 484 | 484 | $htmlselectiontype = html_writer::select($participantselection['type_options'], | 
| 485 | 485 | 'bigbluebuttonbn_participant_selection_type', $participantselection['type_selected'], array(), | 
| 486 | 486 |              array('id' => 'bigbluebuttonbn_participant_selection_type', | 
| 487 | - 'onchange' => 'M.mod_bigbluebuttonbn.modform.participantSelectionSet(); return 0;')); | |
| 487 | + 'onchange' => 'M.mod_bigbluebuttonbn.modform.participantSelectionSet(); return 0;')); | |
| 488 | 488 | $htmlselectionoptions = html_writer::select($participantselection['options'], 'bigbluebuttonbn_participant_selection', | 
| 489 | 489 | $participantselection['selected'], array(), | 
| 490 | 490 |              array('id' => 'bigbluebuttonbn_participant_selection', 'disabled' => 'disabled')); | 
| @@ -492,7 +492,7 @@ discard block | ||
| 492 | 492 | 'type' => 'button', 'class' => 'btn btn-secondary', | 
| 493 | 493 |              'value' => get_string('mod_form_field_participant_list_action_add', 'bigbluebuttonbn'), | 
| 494 | 494 | 'onclick' => 'M.mod_bigbluebuttonbn.modform.participantAdd(); return 0;' | 
| 495 | - )); | |
| 495 | + )); | |
| 496 | 496 |          $htmladdparticipant = html_writer::tag('div', | 
| 497 | 497 | $htmlselectiontype . '  ' . $htmlselectionoptions . '  ' . $htmlselectioninput, null); | 
| 498 | 498 |          $mform->addElement('html', "\n\n"); | 
| @@ -534,9 +534,9 @@ discard block | ||
| 534 | 534 | $field['type'] = 'select'; | 
| 535 | 535 | $field['data_type'] = PARAM_TEXT; | 
| 536 | 536 | $field['description_key'] = 'mod_form_field_block_clienttype'; | 
| 537 | -             $choices = array(BIGBLUEBUTTON_CLIENTTYPE_FLASH => get_string('mod_form_block_clienttype_flash', 'bigbluebuttonbn'), | |
| 538 | -                             BIGBLUEBUTTON_CLIENTTYPE_HTML5 => get_string('mod_form_block_clienttype_html5', 'bigbluebuttonbn')); | |
| 539 | -             $mform->addElement('header', 'clienttypeselection', get_string('mod_form_block_clienttype', 'bigbluebuttonbn')); | |
| 537 | +                $choices = array(BIGBLUEBUTTON_CLIENTTYPE_FLASH => get_string('mod_form_block_clienttype_flash', 'bigbluebuttonbn'), | |
| 538 | +                                BIGBLUEBUTTON_CLIENTTYPE_HTML5 => get_string('mod_form_block_clienttype_html5', 'bigbluebuttonbn')); | |
| 539 | +                $mform->addElement('header', 'clienttypeselection', get_string('mod_form_block_clienttype', 'bigbluebuttonbn')); | |
| 540 | 540 | $this->bigbluebuttonbn_mform_add_element($mform, $field['type'], $field['name'], $field['data_type'], | 
| 541 | 541 | $field['description_key'], $cfg['clienttype_default'], $choices); | 
| 542 | 542 | return; | 
| @@ -106,8 +106,8 @@ discard block | ||
| 106 | 106 | $PAGE->requires->strings_for_js(array_keys(bigbluebuttonbn_get_strings_for_js()), 'bigbluebuttonbn'); | 
| 107 | 107 | $jsvars['participantData'] = bigbluebuttonbn_get_participant_data($context); | 
| 108 | 108 | $jsvars['participantList'] = $participantlist; | 
| 109 | - $jsvars['iconsEnabled'] = (boolean)$cfg['recording_icons_enabled']; | |
| 110 | -        $jsvars['pixIconDelete'] = (string)$OUTPUT->pix_icon('t/delete', get_string('delete'), 'moodle'); | |
| 109 | + $jsvars['iconsEnabled'] = (boolean) $cfg['recording_icons_enabled']; | |
| 110 | +        $jsvars['pixIconDelete'] = (string) $OUTPUT->pix_icon('t/delete', get_string('delete'), 'moodle'); | |
| 111 | 111 |          $PAGE->requires->yui_module('moodle-mod_bigbluebuttonbn-modform', | 
| 112 | 112 | 'M.mod_bigbluebuttonbn.modform.init', array($jsvars)); | 
| 113 | 113 | } | 
| @@ -178,7 +178,7 @@ discard block | ||
| 178 | 178 | */ | 
| 179 | 179 |      public function add_completion_rules() { | 
| 180 | 180 | $mform = $this->_form; | 
| 181 | -        if (!bigbluebuttonbn_is_bn_server() || !(boolean)\mod_bigbluebuttonbn\locallib\config::get('meetingevents_enabled')) { | |
| 181 | +        if (!bigbluebuttonbn_is_bn_server() || !(boolean) \mod_bigbluebuttonbn\locallib\config::get('meetingevents_enabled')) { | |
| 182 | 182 | return []; | 
| 183 | 183 | } | 
| 184 | 184 | |
| @@ -186,7 +186,7 @@ discard block | ||
| 186 | 186 |          $attendance['grouplabel'] = get_string('completionattendancegroup', 'bigbluebuttonbn'); | 
| 187 | 187 |          $attendance['rulelabel'] = get_string('completionattendance', 'bigbluebuttonbn'); | 
| 188 | 188 | $attendance['group'] = [ | 
| 189 | -            $mform->createElement('checkbox', 'completionattendanceenabled', '', $attendance['rulelabel'] . ' '), | |
| 189 | +            $mform->createElement('checkbox', 'completionattendanceenabled', '', $attendance['rulelabel'].' '), | |
| 190 | 190 |              $mform->createElement('text', 'completionattendance', '', ['size' => 3]), | 
| 191 | 191 |              $mform->createElement('static', 'completionattendanceunit', ' ', get_string('minutes', 'bigbluebuttonbn')) | 
| 192 | 192 | ]; | 
| @@ -204,11 +204,11 @@ discard block | ||
| 204 | 204 |          $engagement['pollvotes'] = get_string('completionengagementpollvotes', 'bigbluebuttonbn'); | 
| 205 | 205 |          $engagement['emojis'] = get_string('completionengagementemojis', 'bigbluebuttonbn'); | 
| 206 | 206 | $engagement['group'] = [ | 
| 207 | -            $mform->createElement('checkbox', 'completionengagementchats', '', $engagement['chatlabel'] . '  '), | |
| 208 | -            $mform->createElement('checkbox', 'completionengagementtalks', '', $engagement['talklabel'] . '  '), | |
| 209 | -            $mform->createElement('checkbox', 'completionengagementraisehand', '', $engagement['raisehand'] . '  '), | |
| 210 | -            $mform->createElement('checkbox', 'completionengagementpollvotes', '', $engagement['pollvotes'] . '  '), | |
| 211 | -            $mform->createElement('checkbox', 'completionengagementemojis', '', $engagement['emojis'] . '  '), | |
| 207 | +            $mform->createElement('checkbox', 'completionengagementchats', '', $engagement['chatlabel'].'  '), | |
| 208 | +            $mform->createElement('checkbox', 'completionengagementtalks', '', $engagement['talklabel'].'  '), | |
| 209 | +            $mform->createElement('checkbox', 'completionengagementraisehand', '', $engagement['raisehand'].'  '), | |
| 210 | +            $mform->createElement('checkbox', 'completionengagementpollvotes', '', $engagement['pollvotes'].'  '), | |
| 211 | +            $mform->createElement('checkbox', 'completionengagementemojis', '', $engagement['emojis'].'  '), | |
| 212 | 212 | ]; | 
| 213 | 213 | $mform->addGroup($engagement['group'], 'completionengagementgroup', $engagement['grouplabel'], [' '], false); | 
| 214 | 214 |          $mform->addHelpButton('completionengagementgroup', 'completionengagementgroup', 'bigbluebuttonbn'); | 
| @@ -255,7 +255,7 @@ discard block | ||
| 255 | 255 | * @return void | 
| 256 | 256 | */ | 
| 257 | 257 |      private function bigbluebuttonbn_mform_add_block_profiles(&$mform, $profiles) { | 
| 258 | -        if ((boolean)\mod_bigbluebuttonbn\locallib\config::recordings_enabled()) { | |
| 258 | +        if ((boolean) \mod_bigbluebuttonbn\locallib\config::recordings_enabled()) { | |
| 259 | 259 |              $mform->addElement('select', 'type', get_string('mod_form_field_instanceprofiles', 'bigbluebuttonbn'), | 
| 260 | 260 | bigbluebuttonbn_get_instance_profiles_array($profiles), | 
| 261 | 261 |                  array('onchange' => 'M.mod_bigbluebuttonbn.modform.updateInstanceTypeProfile(this);')); | 
| @@ -494,7 +494,7 @@ discard block | ||
| 494 | 494 | 'onclick' => 'M.mod_bigbluebuttonbn.modform.participantAdd(); return 0;' | 
| 495 | 495 | )); | 
| 496 | 496 |          $htmladdparticipant = html_writer::tag('div', | 
| 497 | - $htmlselectiontype . '  ' . $htmlselectionoptions . '  ' . $htmlselectioninput, null); | |
| 497 | + $htmlselectiontype.'  '.$htmlselectionoptions.'  '.$htmlselectioninput, null); | |
| 498 | 498 |          $mform->addElement('html', "\n\n"); | 
| 499 | 499 |          $mform->addElement('static', 'static_add_participant', | 
| 500 | 500 |              get_string('mod_form_field_participant_add', 'bigbluebuttonbn'), $htmladdparticipant); | 
| @@ -58,7 +58,7 @@ | ||
| 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'; |