Completed
Push — v2.3-stable ( 59783c...c4848d )
by Jesus
02:56
created
mod_form.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -106,8 +106,8 @@  discard block
 block discarded – undo
106 106
         $PAGE->requires->strings_for_js(array_keys(bigbluebuttonbn_get_strings_for_js()), 'bigbluebuttonbn');
107 107
         $jsvars['participantData'] = bigbluebuttonbn_get_participant_data($context, $bigbluebuttonbn);
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
     }
@@ -165,7 +165,7 @@  discard block
 block discarded – undo
165 165
      * @return void
166 166
      */
167 167
     private function bigbluebuttonbn_mform_add_block_profiles(&$mform, $profiles) {
168
-        if ((boolean)\mod_bigbluebuttonbn\locallib\config::recordings_enabled()) {
168
+        if ((boolean) \mod_bigbluebuttonbn\locallib\config::recordings_enabled()) {
169 169
             $mform->addElement('select', 'type', get_string('mod_form_field_instanceprofiles', 'bigbluebuttonbn'),
170 170
                 bigbluebuttonbn_get_instance_profiles_array($profiles),
171 171
                 array('onchange' => 'M.mod_bigbluebuttonbn.modform.updateInstanceTypeProfile(this);'));
@@ -404,7 +404,7 @@  discard block
 block discarded – undo
404 404
             'onclick' => 'M.mod_bigbluebuttonbn.modform.participantAdd(); return 0;'
405 405
           ));
406 406
         $htmladdparticipant = html_writer::tag('div',
407
-            $htmlselectiontype . '  ' . $htmlselectionoptions . '  ' . $htmlselectioninput, null);
407
+            $htmlselectiontype.'  '.$htmlselectionoptions.'  '.$htmlselectioninput, null);
408 408
         $mform->addElement('html', "\n\n");
409 409
         $mform->addElement('static', 'static_add_participant',
410 410
             get_string('mod_form_field_participant_add', 'bigbluebuttonbn'), $htmladdparticipant);
Please login to merge, or discard this patch.
locallib.php 1 patch
Spacing   +82 added lines, -82 removed lines patch added patch discarded remove patch
@@ -108,7 +108,7 @@  discard block
 block discarded – undo
108 108
               'logoutURL' => $logouturl,
109 109
             ];
110 110
     // Choose between Adobe Flash or HTML5 Client.
111
-    if ( $clienttype == BIGBLUEBUTTON_CLIENTTYPE_HTML5 ) {
111
+    if ($clienttype == BIGBLUEBUTTON_CLIENTTYPE_HTML5) {
112 112
         $data['joinViaHtml5'] = 'true';
113 113
     }
114 114
     if (!is_null($configtoken)) {
@@ -181,7 +181,7 @@  discard block
 block discarded – undo
181 181
     }
182 182
     if ($xml) {
183 183
         // Either failure or success without meeting info.
184
-        return (array)$xml;
184
+        return (array) $xml;
185 185
     }
186 186
     // If the server is unreachable, then prompts the user of the necessary action.
187 187
     return array('returncode' => 'FAILED', 'message' => 'unreachable', 'messageKey' => 'Server is unreachable');
@@ -614,7 +614,7 @@  discard block
 block discarded – undo
614 614
     if ($userroles) {
615 615
         $where = '';
616 616
         foreach ($userroles as $userrole) {
617
-            $where .= (empty($where) ? ' WHERE' : ' OR').' id=' . $userrole->roleid;
617
+            $where .= (empty($where) ? ' WHERE' : ' OR').' id='.$userrole->roleid;
618 618
         }
619 619
         $userroles = $DB->get_records_sql('SELECT * FROM {role}'.$where);
620 620
     }
@@ -718,7 +718,7 @@  discard block
 block discarded – undo
718 718
 function bigbluebuttonbn_get_role($id) {
719 719
     $roles = (array) role_get_names();
720 720
     if (is_numeric($id) && isset($roles[$id])) {
721
-        return (object)$roles[$id];
721
+        return (object) $roles[$id];
722 722
     }
723 723
     foreach ($roles as $role) {
724 724
         if ($role->shortname == $id) {
@@ -798,7 +798,7 @@  discard block
 block discarded – undo
798 798
             if (!empty($ownerid) && is_enrolled($context, $ownerid)) {
799 799
                 $participantlist[] = array(
800 800
                     'selectiontype' => 'user',
801
-                    'selectionid' => (string)$ownerid,
801
+                    'selectionid' => (string) $ownerid,
802 802
                     'role' => BIGBLUEBUTTONBN_ROLE_MODERATOR);
803 803
             }
804 804
             continue;
@@ -873,7 +873,7 @@  discard block
 block discarded – undo
873 873
     if (!isguestuser()) {
874 874
         $userroles = bigbluebuttonbn_get_user_roles($context, $userid);
875 875
     }
876
-    return bigbluebuttonbn_is_moderator_validator($participantlist, $userid , $userroles);
876
+    return bigbluebuttonbn_is_moderator_validator($participantlist, $userid, $userroles);
877 877
 }
878 878
 
879 879
 /**
@@ -958,9 +958,9 @@  discard block
 block discarded – undo
958 958
     if ($voicebridge == 0) {
959 959
         return true;
960 960
     }
961
-    $select = 'voicebridge = ' . $voicebridge;
961
+    $select = 'voicebridge = '.$voicebridge;
962 962
     if ($instance != 0) {
963
-        $select .= ' AND id <>' . $instance;
963
+        $select .= ' AND id <>'.$instance;
964 964
     }
965 965
     if (!$DB->get_records_select('bigbluebuttonbn', $select)) {
966 966
         return true;
@@ -980,7 +980,7 @@  discard block
 block discarded – undo
980 980
     $now = time();
981 981
     if ($closingtime > 0 && $now < $closingtime) {
982 982
         $duration = ceil(($closingtime - $now) / 60);
983
-        $compensationtime = intval((int)\mod_bigbluebuttonbn\locallib\config::get('scheduled_duration_compensation'));
983
+        $compensationtime = intval((int) \mod_bigbluebuttonbn\locallib\config::get('scheduled_duration_compensation'));
984 984
         $duration = intval($duration) + $compensationtime;
985 985
     }
986 986
     return $duration;
@@ -1120,7 +1120,7 @@  discard block
 block discarded – undo
1120 1120
     if (array_key_exists('other', $options)) {
1121 1121
         $params['other'] = $options['other'];
1122 1122
     }
1123
-    $event = call_user_func_array('\mod_bigbluebuttonbn\event\\' . $type . '::create',
1123
+    $event = call_user_func_array('\mod_bigbluebuttonbn\event\\'.$type.'::create',
1124 1124
         array($params));
1125 1125
     $event->add_record_snapshot('course_modules', $cm);
1126 1126
     $event->add_record_snapshot('course', $course);
@@ -1157,7 +1157,7 @@  discard block
 block discarded – undo
1157 1157
  * @return array
1158 1158
  */
1159 1159
 function bigbluebuttonbn_get_meeting_info($meetingid, $updatecache = false) {
1160
-    $cachettl = (int)\mod_bigbluebuttonbn\locallib\config::get('waitformoderator_cache_ttl');
1160
+    $cachettl = (int) \mod_bigbluebuttonbn\locallib\config::get('waitformoderator_cache_ttl');
1161 1161
     $cache = cache::make_from_params(cache_store::MODE_APPLICATION, 'mod_bigbluebuttonbn', 'meetings_cache');
1162 1162
     $result = $cache->get($meetingid);
1163 1163
     $now = time();
@@ -1363,7 +1363,7 @@  discard block
 block discarded – undo
1363 1363
  * @return boolean
1364 1364
  */
1365 1365
 function bigbluebuttonbn_get_recording_data_row_editable($bbbsession) {
1366
-    return ($bbbsession['managerecordings'] && ((double)$bbbsession['serverversion'] >= 1.0 || $bbbsession['bnserver']));
1366
+    return ($bbbsession['managerecordings'] && ((double) $bbbsession['serverversion'] >= 1.0 || $bbbsession['bnserver']));
1367 1367
 }
1368 1368
 
1369 1369
 /**
@@ -1374,7 +1374,7 @@  discard block
 block discarded – undo
1374 1374
  * @return boolean
1375 1375
  */
1376 1376
 function bigbluebuttonbn_get_recording_data_preview_enabled($bbbsession) {
1377
-    return ((double)$bbbsession['serverversion'] >= 1.0 && $bbbsession['bigbluebuttonbn']->recordings_preview == '1');
1377
+    return ((double) $bbbsession['serverversion'] >= 1.0 && $bbbsession['bigbluebuttonbn']->recordings_preview == '1');
1378 1378
 }
1379 1379
 
1380 1380
 /**
@@ -1450,11 +1450,11 @@  discard block
 block discarded – undo
1450 1450
         $actionbar .= bigbluebuttonbn_actionbar_render_button($recording, $buttonpayload);
1451 1451
     }
1452 1452
     $head = html_writer::start_tag('div', array(
1453
-        'id' => 'recording-actionbar-' . $recording['recordID'],
1453
+        'id' => 'recording-actionbar-'.$recording['recordID'],
1454 1454
         'data-recordingid' => $recording['recordID'],
1455 1455
         'data-meetingid' => $recording['meetingID']));
1456 1456
     $tail = html_writer::end_tag('div');
1457
-    return $head . $actionbar . $tail;
1457
+    return $head.$actionbar.$tail;
1458 1458
 }
1459 1459
 
1460 1460
 /**
@@ -1549,7 +1549,7 @@  discard block
 block discarded – undo
1549 1549
         }
1550 1550
         $recordingpreview .= html_writer::start_tag('div', array('class' => ''));
1551 1551
         $recordingpreview .= html_writer::empty_tag('img',
1552
-            array('src' => trim($image['url']) . '?' . time(), 'class' => 'recording-thumbnail pull-left'));
1552
+            array('src' => trim($image['url']).'?'.time(), 'class' => 'recording-thumbnail pull-left'));
1553 1553
         $recordingpreview .= html_writer::end_tag('div');
1554 1554
     }
1555 1555
     $recordingpreview .= html_writer::end_tag('div');
@@ -1606,13 +1606,13 @@  discard block
 block discarded – undo
1606 1606
         return '';
1607 1607
     }
1608 1608
     $text = bigbluebuttonbn_get_recording_type_text($playback['type']);
1609
-    $href = $CFG->wwwroot . '/mod/bigbluebuttonbn/bbb_view.php?action=play&bn=' . $bbbsession['bigbluebuttonbn']->id .
1610
-        '&mid=' . $recording['meetingID'] . '&rid=' . $recording['recordID'] . '&rtype=' . $playback['type'];
1609
+    $href = $CFG->wwwroot.'/mod/bigbluebuttonbn/bbb_view.php?action=play&bn='.$bbbsession['bigbluebuttonbn']->id.
1610
+        '&mid='.$recording['meetingID'].'&rid='.$recording['recordID'].'&rtype='.$playback['type'];
1611 1611
     if (!isset($recording['imported']) || !isset($recording['protected']) || $recording['protected'] === 'false') {
1612
-        $href .= '&href=' . urlencode(trim($playback['url']));
1612
+        $href .= '&href='.urlencode(trim($playback['url']));
1613 1613
     }
1614 1614
     $linkattributes = array(
1615
-        'id' => 'recording-play-' . $playback['type'] . '-' . $recording['recordID'],
1615
+        'id' => 'recording-play-'.$playback['type'].'-'.$recording['recordID'],
1616 1616
         'class' => 'btn btn-sm btn-default',
1617 1617
         'onclick' => 'M.mod_bigbluebuttonbn.recordings.recordingPlay(this);',
1618 1618
         'data-action' => 'play',
@@ -1624,7 +1624,7 @@  discard block
 block discarded – undo
1624 1624
         $linkattributes['title'] = get_string('view_recording_format_errror_unreachable', 'bigbluebuttonbn');
1625 1625
         unset($linkattributes['data-href']);
1626 1626
     }
1627
-    return $OUTPUT->action_link('#', $text, null, $linkattributes) . '&#32;';
1627
+    return $OUTPUT->action_link('#', $text, null, $linkattributes).'&#32;';
1628 1628
 }
1629 1629
 
1630 1630
 /**
@@ -1637,7 +1637,7 @@  discard block
 block discarded – undo
1637 1637
 function bigbluebuttonbn_get_recording_type_text($playbacktype) {
1638 1638
     // Check first if string exists, and if it does'nt just default to the capitalised version of the string.
1639 1639
     $text = ucwords($playbacktype);
1640
-    $typestringid = 'view_recording_format_' . $playbacktype;
1640
+    $typestringid = 'view_recording_format_'.$playbacktype;
1641 1641
     if (get_string_manager()->string_exists($typestringid, 'bigbluebuttonbn')) {
1642 1642
         $text = get_string($typestringid, 'bigbluebuttonbn');
1643 1643
     }
@@ -1667,7 +1667,7 @@  discard block
 block discarded – undo
1667 1667
     $validatedurls[$urlhost] = true;
1668 1668
     $curlinfo = bigbluebuttonbn_wrap_xml_load_file_curl_request($url, 'HEAD');
1669 1669
     if (!isset($curlinfo['http_code']) || $curlinfo['http_code'] != 200) {
1670
-        $error = "Resources hosted by " . $urlhost . " are unreachable. Server responded with code " . $curlinfo['http_code'];
1670
+        $error = "Resources hosted by ".$urlhost." are unreachable. Server responded with code ".$curlinfo['http_code'];
1671 1671
         debugging($error, DEBUG_DEVELOPER);
1672 1672
         $validatedurls[$urlhost] = false;
1673 1673
     }
@@ -1758,12 +1758,12 @@  discard block
 block discarded – undo
1758 1758
  * @return string
1759 1759
  */
1760 1760
 function bigbluebuttonbn_get_recording_data_row_text($recording, $text, $source, $data) {
1761
-    $htmltext = '<span>' . htmlentities($text) . '</span>';
1761
+    $htmltext = '<span>'.htmlentities($text).'</span>';
1762 1762
     if (empty($data)) {
1763 1763
         return $htmltext;
1764 1764
     }
1765
-    $target = $data['action'] . '-' . $data['target'];
1766
-    $id = 'recording-' . $target . '-' . $data['recordingid'];
1765
+    $target = $data['action'].'-'.$data['target'];
1766
+    $id = 'recording-'.$target.'-'.$data['recordingid'];
1767 1767
     $attributes = array('id' => $id, 'class' => 'quickeditlink col-md-20',
1768 1768
         'data-recordingid' => $data['recordingid'], 'data-meetingid' => $data['meetingid'],
1769 1769
         'data-target' => $data['target'], 'data-source' => $source);
@@ -1771,7 +1771,7 @@  discard block
 block discarded – undo
1771 1771
     $tail = html_writer::end_tag('div');
1772 1772
     $payload = array('action' => $data['action'], 'tag' => $data['tag'], 'target' => $data['target']);
1773 1773
     $htmllink = bigbluebuttonbn_actionbar_render_button($recording, $payload);
1774
-    return $head . $htmltext . $htmllink . $tail;
1774
+    return $head.$htmltext.$htmllink.$tail;
1775 1775
 }
1776 1776
 
1777 1777
 /**
@@ -1789,11 +1789,11 @@  discard block
 block discarded – undo
1789 1789
     }
1790 1790
     $target = $data['action'];
1791 1791
     if (isset($data['target'])) {
1792
-        $target .= '-' . $data['target'];
1792
+        $target .= '-'.$data['target'];
1793 1793
     }
1794
-    $id = 'recording-' . $target . '-' . $recording['recordID'];
1795
-    $onclick = 'M.mod_bigbluebuttonbn.recordings.recording' . ucfirst($data['action']) . '(this);';
1796
-    if ((boolean)\mod_bigbluebuttonbn\locallib\config::get('recording_icons_enabled')) {
1794
+    $id = 'recording-'.$target.'-'.$recording['recordID'];
1795
+    $onclick = 'M.mod_bigbluebuttonbn.recordings.recording'.ucfirst($data['action']).'(this);';
1796
+    if ((boolean) \mod_bigbluebuttonbn\locallib\config::get('recording_icons_enabled')) {
1797 1797
         // With icon for $manageaction.
1798 1798
         $iconattributes = array('id' => $id, 'class' => 'iconsmall');
1799 1799
         $linkattributes = array(
@@ -1806,12 +1806,12 @@  discard block
 block discarded – undo
1806 1806
               $recording['recordID']);
1807 1807
         }
1808 1808
         if (isset($data['disabled'])) {
1809
-            $iconattributes['class'] .= ' fa-' . $data['disabled'];
1809
+            $iconattributes['class'] .= ' fa-'.$data['disabled'];
1810 1810
             $linkattributes['class'] = 'disabled';
1811 1811
             unset($linkattributes['onclick']);
1812 1812
         }
1813 1813
         $icon = new pix_icon('i/'.$data['tag'],
1814
-            get_string('view_recording_list_actionbar_' . $data['action'], 'bigbluebuttonbn'),
1814
+            get_string('view_recording_list_actionbar_'.$data['action'], 'bigbluebuttonbn'),
1815 1815
             'moodle', $iconattributes);
1816 1816
         return $OUTPUT->action_icon('#', $icon, null, $linkattributes, false);
1817 1817
     }
@@ -1907,7 +1907,7 @@  discard block
 block discarded – undo
1907 1907
     if ($bbbsession['managerecordings']) {
1908 1908
         $table->head[] = get_string('view_recording_actionbar', 'bigbluebuttonbn');
1909 1909
         $table->align[] = 'left';
1910
-        $table->size[] = (count($tools) * 40) . 'px';
1910
+        $table->size[] = (count($tools) * 40).'px';
1911 1911
     }
1912 1912
     // Get the groups of the user.
1913 1913
     $usergroups = groups_get_all_groups($bbbsession['course']->id, $bbbsession['userID']);
@@ -1975,14 +1975,14 @@  discard block
 block discarded – undo
1975 1975
     }
1976 1976
     $rowdata->date_formatted = str_replace(' ', '&nbsp;', $rowdata->date_formatted);
1977 1977
     $row->cells = array();
1978
-    $row->cells[] = $texthead . $rowdata->recording . $texttail;
1979
-    $row->cells[] = $texthead . $rowdata->meeting . $texttail;;
1980
-    $row->cells[] = $texthead . $rowdata->activity . $texttail;
1981
-    $row->cells[] = $texthead . $rowdata->description . $texttail;
1978
+    $row->cells[] = $texthead.$rowdata->recording.$texttail;
1979
+    $row->cells[] = $texthead.$rowdata->meeting.$texttail; ;
1980
+    $row->cells[] = $texthead.$rowdata->activity.$texttail;
1981
+    $row->cells[] = $texthead.$rowdata->description.$texttail;
1982 1982
     if (bigbluebuttonbn_get_recording_data_preview_enabled($bbbsession)) {
1983 1983
         $row->cells[] = $rowdata->preview;
1984 1984
     }
1985
-    $row->cells[] = $texthead . $rowdata->date_formatted . $texttail;
1985
+    $row->cells[] = $texthead.$rowdata->date_formatted.$texttail;
1986 1986
     $row->cells[] = $rowdata->duration_formatted;
1987 1987
     if ($bbbsession['managerecordings']) {
1988 1988
         $row->cells[] = $rowdata->actionbar;
@@ -2025,7 +2025,7 @@  discard block
 block discarded – undo
2025 2025
     $sender = get_admin();
2026 2026
     // Prepare message.
2027 2027
     $messagetext = '<p>'.get_string('email_body_recording_ready_for', 'bigbluebuttonbn').
2028
-        ' &quot;' . $bigbluebuttonbn->name . '&quot; '.
2028
+        ' &quot;'.$bigbluebuttonbn->name.'&quot; '.
2029 2029
         get_string('email_body_recording_ready_is_ready', 'bigbluebuttonbn').'.</p>';
2030 2030
     $context = context_course::instance($bigbluebuttonbn->course);
2031 2031
     \mod_bigbluebuttonbn\locallib\notifier::notification_send($sender, $bigbluebuttonbn, $messagetext);
@@ -2160,17 +2160,17 @@  discard block
 block discarded – undo
2160 2160
  * @return string containing the sql used for getting the target bigbluebuttonbn instances
2161 2161
  */
2162 2162
 function bigbluebuttonbn_get_recordings_deleted_sql_select($courseid = 0, $bigbluebuttonbnid = null, $subset = true) {
2163
-    $sql = "log = '" . BIGBLUEBUTTONBN_LOG_EVENT_DELETE . "' AND meta like '%has_recordings%' AND meta like '%true%'";
2163
+    $sql = "log = '".BIGBLUEBUTTONBN_LOG_EVENT_DELETE."' AND meta like '%has_recordings%' AND meta like '%true%'";
2164 2164
     if (empty($courseid)) {
2165 2165
         $courseid = 0;
2166 2166
     }
2167 2167
     if (empty($bigbluebuttonbnid)) {
2168
-        return $sql . " AND courseid = {$courseid}";
2168
+        return $sql." AND courseid = {$courseid}";
2169 2169
     }
2170 2170
     if ($subset) {
2171
-        return $sql . " AND bigbluebuttonbnid = '{$bigbluebuttonbnid}'";
2171
+        return $sql." AND bigbluebuttonbnid = '{$bigbluebuttonbnid}'";
2172 2172
     }
2173
-    return $sql . " AND courseid = {$courseid} AND bigbluebuttonbnid <> '{$bigbluebuttonbnid}'";
2173
+    return $sql." AND courseid = {$courseid} AND bigbluebuttonbnid <> '{$bigbluebuttonbnid}'";
2174 2174
 }
2175 2175
 
2176 2176
 /**
@@ -2184,17 +2184,17 @@  discard block
 block discarded – undo
2184 2184
  * @return string containing the sql used for getting the target bigbluebuttonbn instances
2185 2185
  */
2186 2186
 function bigbluebuttonbn_get_recordings_imported_sql_select($courseid = 0, $bigbluebuttonbnid = null, $subset = true) {
2187
-    $sql = "log = '" . BIGBLUEBUTTONBN_LOG_EVENT_IMPORT . "'";
2187
+    $sql = "log = '".BIGBLUEBUTTONBN_LOG_EVENT_IMPORT."'";
2188 2188
     if (empty($courseid)) {
2189 2189
         $courseid = 0;
2190 2190
     }
2191 2191
     if (empty($bigbluebuttonbnid)) {
2192
-        return $sql . " AND courseid = '{$courseid}'";
2192
+        return $sql." AND courseid = '{$courseid}'";
2193 2193
     }
2194 2194
     if ($subset) {
2195
-        return $sql . " AND bigbluebuttonbnid = '{$bigbluebuttonbnid}'";
2195
+        return $sql." AND bigbluebuttonbnid = '{$bigbluebuttonbnid}'";
2196 2196
     }
2197
-    return $sql . " AND courseid = '{$courseid}' AND bigbluebuttonbnid <> '{$bigbluebuttonbnid}'";
2197
+    return $sql." AND courseid = '{$courseid}' AND bigbluebuttonbnid <> '{$bigbluebuttonbnid}'";
2198 2198
 }
2199 2199
 
2200 2200
 /**
@@ -2518,7 +2518,7 @@  discard block
 block discarded – undo
2518 2518
  */
2519 2519
 function bigbluebuttonbn_settings_general(&$renderer) {
2520 2520
     // Configuration for BigBlueButton.
2521
-    if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_general_shown()) {
2521
+    if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_general_shown()) {
2522 2522
         $renderer->render_group_header('general');
2523 2523
         $renderer->render_group_element('server_url',
2524 2524
             $renderer->render_group_element_text('server_url', BIGBLUEBUTTONBN_DEFAULT_SERVER_URL));
@@ -2536,7 +2536,7 @@  discard block
 block discarded – undo
2536 2536
  */
2537 2537
 function bigbluebuttonbn_settings_record(&$renderer) {
2538 2538
     // Configuration for 'recording' feature.
2539
-    if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_record_meeting_shown()) {
2539
+    if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_record_meeting_shown()) {
2540 2540
         $renderer->render_group_header('recording');
2541 2541
         $renderer->render_group_element('recording_default',
2542 2542
             $renderer->render_group_element_checkbox('recording_default', 1));
@@ -2566,7 +2566,7 @@  discard block
 block discarded – undo
2566 2566
  */
2567 2567
 function bigbluebuttonbn_settings_importrecordings(&$renderer) {
2568 2568
     // Configuration for 'import recordings' feature.
2569
-    if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_import_recordings_shown()) {
2569
+    if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_import_recordings_shown()) {
2570 2570
         $renderer->render_group_header('importrecordings');
2571 2571
         $renderer->render_group_element('importrecordings_enabled',
2572 2572
             $renderer->render_group_element_checkbox('importrecordings_enabled', 0));
@@ -2584,7 +2584,7 @@  discard block
 block discarded – undo
2584 2584
  */
2585 2585
 function bigbluebuttonbn_settings_showrecordings(&$renderer) {
2586 2586
     // Configuration for 'show recordings' feature.
2587
-    if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_show_recordings_shown()) {
2587
+    if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_show_recordings_shown()) {
2588 2588
         $renderer->render_group_header('recordings');
2589 2589
         $renderer->render_group_element('recordings_html_default',
2590 2590
             $renderer->render_group_element_checkbox('recordings_html_default', 1));
@@ -2616,7 +2616,7 @@  discard block
 block discarded – undo
2616 2616
  */
2617 2617
 function bigbluebuttonbn_settings_waitmoderator(&$renderer) {
2618 2618
     // Configuration for wait for moderator feature.
2619
-    if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_wait_moderator_shown()) {
2619
+    if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_wait_moderator_shown()) {
2620 2620
         $renderer->render_group_header('waitformoderator');
2621 2621
         $renderer->render_group_element('waitformoderator_default',
2622 2622
             $renderer->render_group_element_checkbox('waitformoderator_default', 0));
@@ -2638,7 +2638,7 @@  discard block
 block discarded – undo
2638 2638
  */
2639 2639
 function bigbluebuttonbn_settings_voicebridge(&$renderer) {
2640 2640
     // Configuration for "static voice bridge" feature.
2641
-    if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_static_voice_bridge_shown()) {
2641
+    if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_static_voice_bridge_shown()) {
2642 2642
         $renderer->render_group_header('voicebridge');
2643 2643
         $renderer->render_group_element('voicebridge_editable',
2644 2644
             $renderer->render_group_element_checkbox('voicebridge_editable', 0));
@@ -2654,7 +2654,7 @@  discard block
 block discarded – undo
2654 2654
  */
2655 2655
 function bigbluebuttonbn_settings_preupload(&$renderer) {
2656 2656
     // Configuration for "preupload presentation" feature.
2657
-    if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_preupload_presentation_shown()) {
2657
+    if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_preupload_presentation_shown()) {
2658 2658
         // This feature only works if curl is installed.
2659 2659
         $preuploaddescripion = get_string('config_preuploadpresentation_description', 'bigbluebuttonbn');
2660 2660
         if (!extension_loaded('curl')) {
@@ -2680,7 +2680,7 @@  discard block
 block discarded – undo
2680 2680
  */
2681 2681
 function bigbluebuttonbn_settings_preupload_manage_default_file(&$renderer) {
2682 2682
     // Configuration for "preupload presentation" feature.
2683
-    if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_preupload_presentation_shown()) {
2683
+    if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_preupload_presentation_shown()) {
2684 2684
         if (extension_loaded('curl')) {
2685 2685
             // This feature only works if curl is installed.
2686 2686
             $renderer->render_filemanager_default_file_presentation("presentation_default");
@@ -2697,7 +2697,7 @@  discard block
 block discarded – undo
2697 2697
  */
2698 2698
 function bigbluebuttonbn_settings_userlimit(&$renderer) {
2699 2699
     // Configuration for "user limit" feature.
2700
-    if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_user_limit_shown()) {
2700
+    if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_user_limit_shown()) {
2701 2701
         $renderer->render_group_header('userlimit');
2702 2702
         $renderer->render_group_element('userlimit_default',
2703 2703
             $renderer->render_group_element_text('userlimit_default', 0, PARAM_INT));
@@ -2715,7 +2715,7 @@  discard block
 block discarded – undo
2715 2715
  */
2716 2716
 function bigbluebuttonbn_settings_duration(&$renderer) {
2717 2717
     // Configuration for "scheduled duration" feature.
2718
-    if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_scheduled_duration_shown()) {
2718
+    if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_scheduled_duration_shown()) {
2719 2719
         $renderer->render_group_header('scheduled');
2720 2720
         $renderer->render_group_element('scheduled_duration_enabled',
2721 2721
             $renderer->render_group_element_checkbox('scheduled_duration_enabled', 1));
@@ -2735,7 +2735,7 @@  discard block
 block discarded – undo
2735 2735
  */
2736 2736
 function bigbluebuttonbn_settings_participants(&$renderer) {
2737 2737
     // Configuration for defining the default role/user that will be moderator on new activities.
2738
-    if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_moderator_default_shown()) {
2738
+    if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_moderator_default_shown()) {
2739 2739
         $renderer->render_group_header('participant');
2740 2740
         // UI for 'participants' feature.
2741 2741
         $roles = bigbluebuttonbn_get_roles();
@@ -2756,7 +2756,7 @@  discard block
 block discarded – undo
2756 2756
  */
2757 2757
 function bigbluebuttonbn_settings_notifications(&$renderer) {
2758 2758
     // Configuration for "send notifications" feature.
2759
-    if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_send_notifications_shown()) {
2759
+    if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_send_notifications_shown()) {
2760 2760
         $renderer->render_group_header('sendnotifications');
2761 2761
         $renderer->render_group_element('sendnotifications_enabled',
2762 2762
             $renderer->render_group_element_checkbox('sendnotifications_enabled', 1));
@@ -2772,12 +2772,12 @@  discard block
 block discarded – undo
2772 2772
  */
2773 2773
 function bigbluebuttonbn_settings_clienttype(&$renderer) {
2774 2774
     // Configuration for "clienttype" feature.
2775
-    if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_clienttype_shown()) {
2775
+    if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_clienttype_shown()) {
2776 2776
         $renderer->render_group_header('clienttype');
2777 2777
         $renderer->render_group_element('clienttype_editable',
2778 2778
             $renderer->render_group_element_checkbox('clienttype_editable', 0));
2779 2779
         // Web Client default.
2780
-        $default = intval((int)\mod_bigbluebuttonbn\locallib\config::get('clienttype_default'));
2780
+        $default = intval((int) \mod_bigbluebuttonbn\locallib\config::get('clienttype_default'));
2781 2781
         $choices = array(BIGBLUEBUTTON_CLIENTTYPE_FLASH => get_string('mod_form_block_clienttype_flash', 'bigbluebuttonbn'),
2782 2782
                          BIGBLUEBUTTON_CLIENTTYPE_HTML5 => get_string('mod_form_block_clienttype_html5', 'bigbluebuttonbn'));
2783 2783
         $renderer->render_group_element('clienttype_default',
@@ -2795,7 +2795,7 @@  discard block
 block discarded – undo
2795 2795
  */
2796 2796
 function bigbluebuttonbn_settings_muteonstart(&$renderer) {
2797 2797
     // Configuration for BigBlueButton.
2798
-    if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_muteonstart_shown()) {
2798
+    if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_muteonstart_shown()) {
2799 2799
         $renderer->render_group_header('muteonstart');
2800 2800
         $renderer->render_group_element('muteonstart_default',
2801 2801
             $renderer->render_group_element_checkbox('muteonstart_default', 0));
@@ -2817,7 +2817,7 @@  discard block
 block discarded – undo
2817 2817
         return;
2818 2818
     }
2819 2819
     // Configuration for 'notify users when recording ready' feature.
2820
-    if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_settings_extended_shown()) {
2820
+    if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_settings_extended_shown()) {
2821 2821
         $renderer->render_group_header('extended_capabilities');
2822 2822
         // UI for 'notify users when recording ready' feature.
2823 2823
         $renderer->render_group_element('recordingready_enabled',
@@ -2837,7 +2837,7 @@  discard block
 block discarded – undo
2837 2837
     global $DB;
2838 2838
     do {
2839 2839
         $encodedseed = sha1(bigbluebuttonbn_random_password(12));
2840
-        $meetingid = (string)$DB->get_field('bigbluebuttonbn', 'meetingid', array('meetingid' => $encodedseed));
2840
+        $meetingid = (string) $DB->get_field('bigbluebuttonbn', 'meetingid', array('meetingid' => $encodedseed));
2841 2841
     } while ($meetingid == $encodedseed);
2842 2842
     return $encodedseed;
2843 2843
 }
@@ -2882,22 +2882,22 @@  discard block
 block discarded – undo
2882 2882
  *
2883 2883
  * @return string
2884 2884
  */
2885
-function bigbluebuttonbn_render_warning($message, $type='info', $href='', $text='', $class='') {
2885
+function bigbluebuttonbn_render_warning($message, $type = 'info', $href = '', $text = '', $class = '') {
2886 2886
     global $OUTPUT;
2887 2887
     $output = "\n";
2888 2888
     // Evaluates if config_warning is enabled.
2889 2889
     if (empty($message)) {
2890 2890
         return $output;
2891 2891
     }
2892
-    $output .= $OUTPUT->box_start('box boxalignleft adminerror alert alert-' . $type . ' alert-block fade in',
2893
-      'bigbluebuttonbn_view_general_warning') . "\n";
2894
-    $output .= '    ' . $message . "\n";
2895
-    $output .= '  <div class="singlebutton pull-right">' . "\n";
2892
+    $output .= $OUTPUT->box_start('box boxalignleft adminerror alert alert-'.$type.' alert-block fade in',
2893
+      'bigbluebuttonbn_view_general_warning')."\n";
2894
+    $output .= '    '.$message."\n";
2895
+    $output .= '  <div class="singlebutton pull-right">'."\n";
2896 2896
     if (!empty($href)) {
2897 2897
         $output .= bigbluebuttonbn_render_warning_button($href, $text, $class);
2898 2898
     }
2899
-    $output .= '  </div>' . "\n";
2900
-    $output .= $OUTPUT->box_end() . "\n";
2899
+    $output .= '  </div>'."\n";
2900
+    $output .= $OUTPUT->box_end()."\n";
2901 2901
     return $output;
2902 2902
 }
2903 2903
 
@@ -2921,10 +2921,10 @@  discard block
 block discarded – undo
2921 2921
     if ($class == '') {
2922 2922
         $class = 'btn btn-secondary';
2923 2923
     }
2924
-    $output  = '  <form method="post" action="' . $href . '" class="form-inline">'."\n";
2925
-    $output .= '      <button type="submit" class="' . $class . '"'."\n";
2926
-    $output .= '          title="' . $title . '"'."\n";
2927
-    $output .= '          >' . $text . '</button>'."\n";
2924
+    $output  = '  <form method="post" action="'.$href.'" class="form-inline">'."\n";
2925
+    $output .= '      <button type="submit" class="'.$class.'"'."\n";
2926
+    $output .= '          title="'.$title.'"'."\n";
2927
+    $output .= '          >'.$text.'</button>'."\n";
2928 2928
     $output .= '  </form>'."\n";
2929 2929
     return $output;
2930 2930
 }
@@ -2991,7 +2991,7 @@  discard block
 block discarded – undo
2991 2991
 
2992 2992
     // By default, use a meetingid without groups.
2993 2993
     if (empty($mid)) {
2994
-        $mid = $bigbluebuttonbn->meetingid . '-' . $bigbluebuttonbn->course . '-' . $bigbluebuttonbn->id;
2994
+        $mid = $bigbluebuttonbn->meetingid.'-'.$bigbluebuttonbn->course.'-'.$bigbluebuttonbn->id;
2995 2995
     }
2996 2996
 
2997 2997
     // When meeting is running, all authorized users can join right in.
@@ -3052,7 +3052,7 @@  discard block
 block discarded – undo
3052 3052
 function bigbluebuttonbn_instance_ownerid($bigbluebuttonbn) {
3053 3053
     global $DB;
3054 3054
     $filters = array('bigbluebuttonbnid' => $bigbluebuttonbn->id, 'log' => 'Add');
3055
-    $ownerid = (integer)$DB->get_field('bigbluebuttonbn_logs', 'userid', $filters);
3055
+    $ownerid = (integer) $DB->get_field('bigbluebuttonbn_logs', 'userid', $filters);
3056 3056
     return $ownerid;
3057 3057
 }
3058 3058
 
@@ -3062,7 +3062,7 @@  discard block
 block discarded – undo
3062 3062
  * @return boolean
3063 3063
  */
3064 3064
 function bigbluebuttonbn_has_html5_client() {
3065
-    $checkurl = \mod_bigbluebuttonbn\locallib\bigbluebutton::root() . "html5client/check";
3065
+    $checkurl = \mod_bigbluebuttonbn\locallib\bigbluebutton::root()."html5client/check";
3066 3066
     $curlinfo = bigbluebuttonbn_wrap_xml_load_file_curl_request($checkurl, 'HEAD');
3067 3067
     return (isset($curlinfo['http_code']) && $curlinfo['http_code'] == 200);
3068 3068
 }
@@ -3095,8 +3095,8 @@  discard block
 block discarded – undo
3095 3095
     $bbbsession['meetingname'] = $bbbsession['bigbluebuttonbn']->name;
3096 3096
     $bbbsession['meetingdescription'] = $bbbsession['bigbluebuttonbn']->intro;
3097 3097
     // Extra data for setting up the Meeting.
3098
-    $bbbsession['userlimit'] = intval((int)\mod_bigbluebuttonbn\locallib\config::get('userlimit_default'));
3099
-    if ((boolean)\mod_bigbluebuttonbn\locallib\config::get('userlimit_editable')) {
3098
+    $bbbsession['userlimit'] = intval((int) \mod_bigbluebuttonbn\locallib\config::get('userlimit_default'));
3099
+    if ((boolean) \mod_bigbluebuttonbn\locallib\config::get('userlimit_editable')) {
3100 3100
         $bbbsession['userlimit'] = intval($bbbsession['bigbluebuttonbn']->userlimit);
3101 3101
     }
3102 3102
     $bbbsession['voicebridge'] = $bbbsession['bigbluebuttonbn']->voicebridge;
@@ -3202,7 +3202,7 @@  discard block
 block discarded – undo
3202 3202
     );
3203 3203
 
3204 3204
     // Check status and set extra values.
3205
-    $activitystatus = bigbluebuttonbn_view_get_activity_status($bbbsession);  // In locallib.
3205
+    $activitystatus = bigbluebuttonbn_view_get_activity_status($bbbsession); // In locallib.
3206 3206
     if ($activitystatus == 'ended') {
3207 3207
         $bbbsession['presentation'] = bigbluebuttonbn_get_presentation_array(
3208 3208
             $bbbsession['context'], $bbbsession['bigbluebuttonbn']->presentation);
Please login to merge, or discard this patch.