Completed
Push — master ( 81b695...866161 )
by Jesus
02:11
created
locallib.php 1 patch
Spacing   +80 added lines, -80 removed lines patch added patch discarded remove patch
@@ -32,7 +32,7 @@  discard block
 block discarded – undo
32 32
 
33 33
 global $CFG;
34 34
 
35
-require_once(__DIR__ . '/lib.php');
35
+require_once(__DIR__.'/lib.php');
36 36
 
37 37
 /** @var BIGBLUEBUTTONBN_UPDATE_CACHE boolean set to true indicates that cache has to be updated */
38 38
 const BIGBLUEBUTTONBN_UPDATE_CACHE = true;
@@ -145,8 +145,8 @@  discard block
 block discarded – undo
145 145
     $data = null;
146 146
     if (!is_null($pname) && !is_null($purl)) {
147 147
         $method = 'POST';
148
-        $data = "<?xml version='1.0' encoding='UTF-8'?><modules><module name='presentation'><document url='" .
149
-            $purl . "' /></module></modules>";
148
+        $data = "<?xml version='1.0' encoding='UTF-8'?><modules><module name='presentation'><document url='".
149
+            $purl."' /></module></modules>";
150 150
     }
151 151
     $xml = bigbluebuttonbn_wrap_xml_load_file($createmeetingurl, $method, $data);
152 152
     if ($xml) {
@@ -242,8 +242,8 @@  discard block
 block discarded – undo
242 242
             || defined('BEHAT_UTIL')) {
243 243
         // Just return the fake recording.
244 244
         global $CFG;
245
-        require_once($CFG->libdir . '/testing/generator/lib.php');
246
-        require_once(__DIR__ . '/tests/generator/lib.php');
245
+        require_once($CFG->libdir.'/testing/generator/lib.php');
246
+        require_once(__DIR__.'/tests/generator/lib.php');
247 247
         return mod_bigbluebuttonbn_generator::bigbluebuttonbn_get_recordings_array_fetch($meetingidsarray);
248 248
     }
249 249
     $recordings = array();
@@ -416,7 +416,7 @@  discard block
 block discarded – undo
416 416
         if (is_object($value)) {
417 417
             $value = '';
418 418
         }
419
-        $metadataarray['meta_' . $key] = $value;
419
+        $metadataarray['meta_'.$key] = $value;
420 420
     }
421 421
     return $metadataarray;
422 422
 }
@@ -556,7 +556,7 @@  discard block
 block discarded – undo
556 556
             return $xml;
557 557
         } catch (Exception $e) {
558 558
             libxml_use_internal_errors($previous);
559
-            $error = 'Caught exception: ' . $e->getMessage();
559
+            $error = 'Caught exception: '.$e->getMessage();
560 560
             debugging($error, DEBUG_DEVELOPER);
561 561
             return null;
562 562
         }
@@ -567,7 +567,7 @@  discard block
 block discarded – undo
567 567
         $response = simplexml_load_file($url, 'SimpleXMLElement', LIBXML_NOCDATA | LIBXML_NOBLANKS);
568 568
         return $response;
569 569
     } catch (Exception $e) {
570
-        $error = 'Caught exception: ' . $e->getMessage();
570
+        $error = 'Caught exception: '.$e->getMessage();
571 571
         debugging($error, DEBUG_DEVELOPER);
572 572
         libxml_use_internal_errors($previous);
573 573
         return null;
@@ -593,8 +593,8 @@  discard block
 block discarded – undo
593 593
         }
594 594
         $options = array();
595 595
         $options['CURLOPT_HTTPHEADER'] = array(
596
-            'Content-Type: ' . $contenttype,
597
-            'Content-Length: ' . strlen($data),
596
+            'Content-Type: '.$contenttype,
597
+            'Content-Length: '.strlen($data),
598 598
             'Content-Language: en-US',
599 599
         );
600 600
 
@@ -615,7 +615,7 @@  discard block
 block discarded – undo
615 615
  * @return void
616 616
  */
617 617
 function bigbluebuttonbn_end_meeting_if_running($bigbluebuttonbn) {
618
-    $meetingid = $bigbluebuttonbn->meetingid . '-' . $bigbluebuttonbn->course . '-' . $bigbluebuttonbn->id;
618
+    $meetingid = $bigbluebuttonbn->meetingid.'-'.$bigbluebuttonbn->course.'-'.$bigbluebuttonbn->id;
619 619
     if (bigbluebuttonbn_is_meeting_running($meetingid)) {
620 620
         bigbluebuttonbn_end_meeting($meetingid, $bigbluebuttonbn->moderatorpass);
621 621
     }
@@ -635,9 +635,9 @@  discard block
 block discarded – undo
635 635
     if ($userroles) {
636 636
         $where = '';
637 637
         foreach ($userroles as $userrole) {
638
-            $where .= (empty($where) ? ' WHERE' : ' OR') . ' id=' . $userrole->roleid;
638
+            $where .= (empty($where) ? ' WHERE' : ' OR').' id='.$userrole->roleid;
639 639
         }
640
-        $userroles = $DB->get_records_sql('SELECT * FROM {role}' . $where);
640
+        $userroles = $DB->get_records_sql('SELECT * FROM {role}'.$where);
641 641
     }
642 642
     return $userroles;
643 643
 }
@@ -962,9 +962,9 @@  discard block
 block discarded – undo
962 962
     if ($voicebridge == 0) {
963 963
         return true;
964 964
     }
965
-    $select = 'voicebridge = ' . $voicebridge;
965
+    $select = 'voicebridge = '.$voicebridge;
966 966
     if ($instance != 0) {
967
-        $select .= ' AND id <>' . $instance;
967
+        $select .= ' AND id <>'.$instance;
968 968
     }
969 969
     if (!$DB->get_records_select('bigbluebuttonbn', $select)) {
970 970
         return true;
@@ -1100,7 +1100,7 @@  discard block
 block discarded – undo
1100 1100
 function bigbluebuttonbn_generate_nonce() {
1101 1101
     $mt = microtime();
1102 1102
     $rand = mt_rand();
1103
-    return md5($mt . $rand);
1103
+    return md5($mt.$rand);
1104 1104
 }
1105 1105
 
1106 1106
 /**
@@ -1148,7 +1148,7 @@  discard block
 block discarded – undo
1148 1148
         $params['other'] = $options['other'];
1149 1149
     }
1150 1150
     $event = call_user_func_array(
1151
-        '\mod_bigbluebuttonbn\event\\' . $type . '::create',
1151
+        '\mod_bigbluebuttonbn\event\\'.$type.'::create',
1152 1152
         array($params)
1153 1153
     );
1154 1154
     $event->add_record_snapshot('course_modules', $cm);
@@ -1306,7 +1306,7 @@  discard block
 block discarded – undo
1306 1306
  * @return object
1307 1307
  */
1308 1308
 function bigbluebuttonbn_set_config_xml($meetingid, $configxml) {
1309
-    $urldefaultconfig = \mod_bigbluebuttonbn\locallib\config::get('server_url') . 'api/setConfigXML?';
1309
+    $urldefaultconfig = \mod_bigbluebuttonbn\locallib\config::get('server_url').'api/setConfigXML?';
1310 1310
     $configxmlparams = bigbluebuttonbn_set_config_xml_params($meetingid, $configxml);
1311 1311
     $xml = bigbluebuttonbn_wrap_xml_load_file(
1312 1312
         $urldefaultconfig,
@@ -1326,9 +1326,9 @@  discard block
 block discarded – undo
1326 1326
  * @return string
1327 1327
  */
1328 1328
 function bigbluebuttonbn_set_config_xml_params($meetingid, $configxml) {
1329
-    $params = 'configXML=' . urlencode($configxml) . '&meetingID=' . urlencode($meetingid);
1329
+    $params = 'configXML='.urlencode($configxml).'&meetingID='.urlencode($meetingid);
1330 1330
     $sharedsecret = \mod_bigbluebuttonbn\locallib\config::get('shared_secret');
1331
-    $configxmlparams = $params . '&checksum=' . sha1('setConfigXML' . $params . $sharedsecret);
1331
+    $configxmlparams = $params.'&checksum='.sha1('setConfigXML'.$params.$sharedsecret);
1332 1332
     return $configxmlparams;
1333 1333
 }
1334 1334
 
@@ -1436,7 +1436,7 @@  discard block
 block discarded – undo
1436 1436
     global $USER;
1437 1437
     $starttime = $starttime - ($starttime % 1000);
1438 1438
     // Set formatted date.
1439
-    $dateformat = get_string('strftimerecentfull', 'langconfig') . ' %Z';
1439
+    $dateformat = get_string('strftimerecentfull', 'langconfig').' %Z';
1440 1440
     return userdate($starttime / 1000, $dateformat, usertimezone($USER->timezone));
1441 1441
 }
1442 1442
 
@@ -1484,11 +1484,11 @@  discard block
 block discarded – undo
1484 1484
         $actionbar .= bigbluebuttonbn_actionbar_render_button($recording, $buttonpayload);
1485 1485
     }
1486 1486
     $head = html_writer::start_tag('div', array(
1487
-        'id' => 'recording-actionbar-' . $recording['recordID'],
1487
+        'id' => 'recording-actionbar-'.$recording['recordID'],
1488 1488
         'data-recordingid' => $recording['recordID'],
1489 1489
         'data-meetingid' => $recording['meetingID']));
1490 1490
     $tail = html_writer::end_tag('div');
1491
-    return $head . $actionbar . $tail;
1491
+    return $head.$actionbar.$tail;
1492 1492
 }
1493 1493
 
1494 1494
 /**
@@ -1552,7 +1552,7 @@  discard block
 block discarded – undo
1552 1552
  * @return string
1553 1553
  */
1554 1554
 function bigbluebuttonbn_get_recording_data_row_preview($recording) {
1555
-    $options = array('id' => 'preview-' . $recording['recordID']);
1555
+    $options = array('id' => 'preview-'.$recording['recordID']);
1556 1556
     if ($recording['published'] === 'false') {
1557 1557
         $options['hidden'] = 'hidden';
1558 1558
     }
@@ -1584,7 +1584,7 @@  discard block
 block discarded – undo
1584 1584
         $recordingpreview .= html_writer::start_tag('div', array('class' => ''));
1585 1585
         $recordingpreview .= html_writer::empty_tag(
1586 1586
             'img',
1587
-            array('src' => trim($image['url']) . '?' . time(), 'class' => 'recording-thumbnail pull-left')
1587
+            array('src' => trim($image['url']).'?'.time(), 'class' => 'recording-thumbnail pull-left')
1588 1588
         );
1589 1589
         $recordingpreview .= html_writer::end_tag('div');
1590 1590
     }
@@ -1619,7 +1619,7 @@  discard block
 block discarded – undo
1619 1619
     if ($recording['published'] === 'false') {
1620 1620
         $visibility = 'hidden ';
1621 1621
     }
1622
-    $id = 'playbacks-' . $recording['recordID'];
1622
+    $id = 'playbacks-'.$recording['recordID'];
1623 1623
     $recordingtypes = html_writer::start_tag('div', array('id' => $id, 'data-imported' => $dataimported,
1624 1624
         'data-meetingid' => $recording['meetingID'], 'data-recordingid' => $recording['recordID'],
1625 1625
         'title' => $title, $visibility => $visibility));
@@ -1645,13 +1645,13 @@  discard block
 block discarded – undo
1645 1645
         return '';
1646 1646
     }
1647 1647
     $text = bigbluebuttonbn_get_recording_type_text($playback['type']);
1648
-    $href = $CFG->wwwroot . '/mod/bigbluebuttonbn/bbb_view.php?action=play&bn=' . $bbbsession['bigbluebuttonbn']->id .
1649
-        '&mid=' . $recording['meetingID'] . '&rid=' . $recording['recordID'] . '&rtype=' . $playback['type'];
1648
+    $href = $CFG->wwwroot.'/mod/bigbluebuttonbn/bbb_view.php?action=play&bn='.$bbbsession['bigbluebuttonbn']->id.
1649
+        '&mid='.$recording['meetingID'].'&rid='.$recording['recordID'].'&rtype='.$playback['type'];
1650 1650
     if (!isset($recording['imported']) || !isset($recording['protected']) || $recording['protected'] === 'false') {
1651
-        $href .= '&href=' . urlencode(trim($playback['url']));
1651
+        $href .= '&href='.urlencode(trim($playback['url']));
1652 1652
     }
1653 1653
     $linkattributes = array(
1654
-        'id' => 'recording-play-' . $playback['type'] . '-' . $recording['recordID'],
1654
+        'id' => 'recording-play-'.$playback['type'].'-'.$recording['recordID'],
1655 1655
         'class' => 'btn btn-sm btn-default',
1656 1656
         'onclick' => 'M.mod_bigbluebuttonbn.recordings.recordingPlay(this);',
1657 1657
         'data-action' => 'play',
@@ -1663,7 +1663,7 @@  discard block
 block discarded – undo
1663 1663
         $linkattributes['title'] = get_string('view_recording_format_errror_unreachable', 'bigbluebuttonbn');
1664 1664
         unset($linkattributes['data-href']);
1665 1665
     }
1666
-    return $OUTPUT->action_link('#', $text, null, $linkattributes) . '&#32;';
1666
+    return $OUTPUT->action_link('#', $text, null, $linkattributes).'&#32;';
1667 1667
 }
1668 1668
 
1669 1669
 /**
@@ -1676,7 +1676,7 @@  discard block
 block discarded – undo
1676 1676
 function bigbluebuttonbn_get_recording_type_text($playbacktype) {
1677 1677
     // Check first if string exists, and if it does'nt just default to the capitalised version of the string.
1678 1678
     $text = ucwords($playbacktype);
1679
-    $typestringid = 'view_recording_format_' . $playbacktype;
1679
+    $typestringid = 'view_recording_format_'.$playbacktype;
1680 1680
     if (get_string_manager()->string_exists($typestringid, 'bigbluebuttonbn')) {
1681 1681
         $text = get_string($typestringid, 'bigbluebuttonbn');
1682 1682
     }
@@ -1706,7 +1706,7 @@  discard block
 block discarded – undo
1706 1706
     $validatedurls[$urlhost] = true;
1707 1707
     $curlinfo = bigbluebuttonbn_wrap_xml_load_file_curl_request($url, 'HEAD');
1708 1708
     if (!isset($curlinfo['http_code']) || $curlinfo['http_code'] != 200) {
1709
-        $error = "Resources hosted by " . $urlhost . " are unreachable. Server responded with code " . $curlinfo['http_code'];
1709
+        $error = "Resources hosted by ".$urlhost." are unreachable. Server responded with code ".$curlinfo['http_code'];
1710 1710
         debugging($error, DEBUG_DEVELOPER);
1711 1711
         $validatedurls[$urlhost] = false;
1712 1712
     }
@@ -1797,12 +1797,12 @@  discard block
 block discarded – undo
1797 1797
  * @return string
1798 1798
  */
1799 1799
 function bigbluebuttonbn_get_recording_data_row_text($recording, $text, $source, $data) {
1800
-    $htmltext = '<span>' . htmlentities($text) . '</span>';
1800
+    $htmltext = '<span>'.htmlentities($text).'</span>';
1801 1801
     if (empty($data)) {
1802 1802
         return $htmltext;
1803 1803
     }
1804
-    $target = $data['action'] . '-' . $data['target'];
1805
-    $id = 'recording-' . $target . '-' . $data['recordingid'];
1804
+    $target = $data['action'].'-'.$data['target'];
1805
+    $id = 'recording-'.$target.'-'.$data['recordingid'];
1806 1806
     $attributes = array('id' => $id, 'class' => 'quickeditlink col-md-20',
1807 1807
         'data-recordingid' => $data['recordingid'], 'data-meetingid' => $data['meetingid'],
1808 1808
         'data-target' => $data['target'], 'data-source' => $source);
@@ -1810,7 +1810,7 @@  discard block
 block discarded – undo
1810 1810
     $tail = html_writer::end_tag('div');
1811 1811
     $payload = array('action' => $data['action'], 'tag' => $data['tag'], 'target' => $data['target']);
1812 1812
     $htmllink = bigbluebuttonbn_actionbar_render_button($recording, $payload);
1813
-    return $head . $htmltext . $htmllink . $tail;
1813
+    return $head.$htmltext.$htmllink.$tail;
1814 1814
 }
1815 1815
 
1816 1816
 /**
@@ -1828,10 +1828,10 @@  discard block
 block discarded – undo
1828 1828
     }
1829 1829
     $target = $data['action'];
1830 1830
     if (isset($data['target'])) {
1831
-        $target .= '-' . $data['target'];
1831
+        $target .= '-'.$data['target'];
1832 1832
     }
1833
-    $id = 'recording-' . $target . '-' . $recording['recordID'];
1834
-    $onclick = 'M.mod_bigbluebuttonbn.recordings.recording' . ucfirst($data['action']) . '(this);';
1833
+    $id = 'recording-'.$target.'-'.$recording['recordID'];
1834
+    $onclick = 'M.mod_bigbluebuttonbn.recordings.recording'.ucfirst($data['action']).'(this);';
1835 1835
     if ((boolean) \mod_bigbluebuttonbn\locallib\config::get('recording_icons_enabled')) {
1836 1836
         // With icon for $manageaction.
1837 1837
         $iconattributes = array('id' => $id, 'class' => 'iconsmall');
@@ -1846,13 +1846,13 @@  discard block
 block discarded – undo
1846 1846
             );
1847 1847
         }
1848 1848
         if (isset($data['disabled'])) {
1849
-            $iconattributes['class'] .= ' fa-' . $data['disabled'];
1849
+            $iconattributes['class'] .= ' fa-'.$data['disabled'];
1850 1850
             $linkattributes['class'] = 'disabled';
1851 1851
             unset($linkattributes['onclick']);
1852 1852
         }
1853 1853
         $icon = new pix_icon(
1854
-            'i/' . $data['tag'],
1855
-            get_string('view_recording_list_actionbar_' . $data['action'], 'bigbluebuttonbn'),
1854
+            'i/'.$data['tag'],
1855
+            get_string('view_recording_list_actionbar_'.$data['action'], 'bigbluebuttonbn'),
1856 1856
             'moodle',
1857 1857
             $iconattributes
1858 1858
         );
@@ -1950,7 +1950,7 @@  discard block
 block discarded – undo
1950 1950
     if ($bbbsession['managerecordings']) {
1951 1951
         $table->head[] = get_string('view_recording_actionbar', 'bigbluebuttonbn');
1952 1952
         $table->align[] = 'left';
1953
-        $table->size[] = (count($tools) * 40) . 'px';
1953
+        $table->size[] = (count($tools) * 40).'px';
1954 1954
     }
1955 1955
     // Get the groups of the user.
1956 1956
     $usergroups = groups_get_all_groups($bbbsession['course']->id, $bbbsession['userID']);
@@ -2015,7 +2015,7 @@  discard block
 block discarded – undo
2015 2015
  */
2016 2016
 function bigbluebuttonbn_get_recording_table_row($bbbsession, $recording, $rowdata) {
2017 2017
     $row = new html_table_row();
2018
-    $row->id = 'recording-tr-' . $recording['recordID'];
2018
+    $row->id = 'recording-tr-'.$recording['recordID'];
2019 2019
     $row->attributes['data-imported'] = 'false';
2020 2020
     $texthead = '';
2021 2021
     $texttail = '';
@@ -2027,15 +2027,15 @@  discard block
 block discarded – undo
2027 2027
     }
2028 2028
     $rowdata->date_formatted = str_replace(' ', '&nbsp;', $rowdata->date_formatted);
2029 2029
     $row->cells = array();
2030
-    $row->cells[] = $texthead . $rowdata->recording . $texttail;
2031
-    $row->cells[] = $texthead . $rowdata->meeting . $texttail;
2030
+    $row->cells[] = $texthead.$rowdata->recording.$texttail;
2031
+    $row->cells[] = $texthead.$rowdata->meeting.$texttail;
2032 2032
 
2033
-    $row->cells[] = $texthead . $rowdata->activity . $texttail;
2034
-    $row->cells[] = $texthead . $rowdata->description . $texttail;
2033
+    $row->cells[] = $texthead.$rowdata->activity.$texttail;
2034
+    $row->cells[] = $texthead.$rowdata->description.$texttail;
2035 2035
     if (bigbluebuttonbn_get_recording_data_preview_enabled($bbbsession)) {
2036 2036
         $row->cells[] = $rowdata->preview;
2037 2037
     }
2038
-    $row->cells[] = $texthead . $rowdata->date_formatted . $texttail;
2038
+    $row->cells[] = $texthead.$rowdata->date_formatted.$texttail;
2039 2039
     $row->cells[] = $rowdata->duration_formatted;
2040 2040
     if ($bbbsession['managerecordings']) {
2041 2041
         $row->cells[] = $rowdata->actionbar;
@@ -2126,7 +2126,7 @@  discard block
 block discarded – undo
2126 2126
         // Enqueue it.
2127 2127
         \core\task\manager::queue_adhoc_task($task);
2128 2128
     } catch (Exception $e) {
2129
-        mtrace("Error while enqueuing completion_update_state task. " . (string) $e);
2129
+        mtrace("Error while enqueuing completion_update_state task. ".(string) $e);
2130 2130
     }
2131 2131
 }
2132 2132
 
@@ -2292,17 +2292,17 @@  discard block
 block discarded – undo
2292 2292
  * @return string containing the sql used for getting the target bigbluebuttonbn instances
2293 2293
  */
2294 2294
 function bigbluebuttonbn_get_recordings_deleted_sql_select($courseid = 0, $bigbluebuttonbnid = null, $subset = true) {
2295
-    $sql = "log = '" . BIGBLUEBUTTONBN_LOG_EVENT_DELETE . "' AND meta like '%has_recordings%' AND meta like '%true%'";
2295
+    $sql = "log = '".BIGBLUEBUTTONBN_LOG_EVENT_DELETE."' AND meta like '%has_recordings%' AND meta like '%true%'";
2296 2296
     if (empty($courseid)) {
2297 2297
         $courseid = 0;
2298 2298
     }
2299 2299
     if (empty($bigbluebuttonbnid)) {
2300
-        return $sql . " AND courseid = {$courseid}";
2300
+        return $sql." AND courseid = {$courseid}";
2301 2301
     }
2302 2302
     if ($subset) {
2303
-        return $sql . " AND bigbluebuttonbnid = '{$bigbluebuttonbnid}'";
2303
+        return $sql." AND bigbluebuttonbnid = '{$bigbluebuttonbnid}'";
2304 2304
     }
2305
-    return $sql . " AND courseid = {$courseid} AND bigbluebuttonbnid <> '{$bigbluebuttonbnid}'";
2305
+    return $sql." AND courseid = {$courseid} AND bigbluebuttonbnid <> '{$bigbluebuttonbnid}'";
2306 2306
 }
2307 2307
 
2308 2308
 /**
@@ -2316,17 +2316,17 @@  discard block
 block discarded – undo
2316 2316
  * @return string containing the sql used for getting the target bigbluebuttonbn instances
2317 2317
  */
2318 2318
 function bigbluebuttonbn_get_recordings_imported_sql_select($courseid = 0, $bigbluebuttonbnid = null, $subset = true) {
2319
-    $sql = "log = '" . BIGBLUEBUTTONBN_LOG_EVENT_IMPORT . "'";
2319
+    $sql = "log = '".BIGBLUEBUTTONBN_LOG_EVENT_IMPORT."'";
2320 2320
     if (empty($courseid)) {
2321 2321
         $courseid = 0;
2322 2322
     }
2323 2323
     if (empty($bigbluebuttonbnid)) {
2324
-        return $sql . " AND courseid = '{$courseid}'";
2324
+        return $sql." AND courseid = '{$courseid}'";
2325 2325
     }
2326 2326
     if ($subset) {
2327
-        return $sql . " AND bigbluebuttonbnid = '{$bigbluebuttonbnid}'";
2327
+        return $sql." AND bigbluebuttonbnid = '{$bigbluebuttonbnid}'";
2328 2328
     }
2329
-    return $sql . " AND courseid = '{$courseid}' AND bigbluebuttonbnid <> '{$bigbluebuttonbnid}'";
2329
+    return $sql." AND courseid = '{$courseid}' AND bigbluebuttonbnid <> '{$bigbluebuttonbnid}'";
2330 2330
 }
2331 2331
 
2332 2332
 /**
@@ -2385,7 +2385,7 @@  discard block
 block discarded – undo
2385 2385
     }
2386 2386
     // Prepare select for loading records based on existent bigbluebuttonbns.
2387 2387
     $sql = 'SELECT DISTINCT meetingid, bigbluebuttonbnid FROM {bigbluebuttonbn_logs} WHERE ';
2388
-    $sql .= '(bigbluebuttonbnid=' . implode(' OR bigbluebuttonbnid=', array_keys($bigbluebuttonbns)) . ')';
2388
+    $sql .= '(bigbluebuttonbnid='.implode(' OR bigbluebuttonbnid=', array_keys($bigbluebuttonbns)).')';
2389 2389
     // Include only Create events and exclude those with record not true.
2390 2390
     $sql .= ' AND log = ? AND meta LIKE ? AND meta LIKE ?';
2391 2391
     // Execute select for loading records based on existent bigbluebuttonbns.
@@ -2568,8 +2568,8 @@  discard block
 block discarded – undo
2568 2568
 function bigbluebuttonbn_format_activity_time($time) {
2569 2569
     $activitytime = '';
2570 2570
     if ($time) {
2571
-        $activitytime = calendar_day_representation($time) . ' ' .
2572
-        get_string('mod_form_field_notification_msg_at', 'bigbluebuttonbn') . ' ' .
2571
+        $activitytime = calendar_day_representation($time).' '.
2572
+        get_string('mod_form_field_notification_msg_at', 'bigbluebuttonbn').' '.
2573 2573
         calendar_time_representation($time);
2574 2574
     }
2575 2575
     return $activitytime;
@@ -3118,16 +3118,16 @@  discard block
 block discarded – undo
3118 3118
         return $output;
3119 3119
     }
3120 3120
     $output .= $OUTPUT->box_start(
3121
-        'box boxalignleft adminerror alert alert-' . $type . ' alert-block fade in',
3121
+        'box boxalignleft adminerror alert alert-'.$type.' alert-block fade in',
3122 3122
         'bigbluebuttonbn_view_general_warning'
3123
-    ) . "\n";
3124
-    $output .= '    ' . $message . "\n";
3125
-    $output .= '  <div class="singlebutton pull-right">' . "\n";
3123
+    )."\n";
3124
+    $output .= '    '.$message."\n";
3125
+    $output .= '  <div class="singlebutton pull-right">'."\n";
3126 3126
     if (!empty($href)) {
3127 3127
         $output .= bigbluebuttonbn_render_warning_button($href, $text, $class);
3128 3128
     }
3129
-    $output .= '  </div>' . "\n";
3130
-    $output .= $OUTPUT->box_end() . "\n";
3129
+    $output .= '  </div>'."\n";
3130
+    $output .= $OUTPUT->box_end()."\n";
3131 3131
     return $output;
3132 3132
 }
3133 3133
 
@@ -3151,11 +3151,11 @@  discard block
 block discarded – undo
3151 3151
     if ($class == '') {
3152 3152
         $class = 'btn btn-secondary';
3153 3153
     }
3154
-    $output = '  <form method="post" action="' . $href . '" class="form-inline">' . "\n";
3155
-    $output .= '      <button type="submit" class="' . $class . '"' . "\n";
3156
-    $output .= '          title="' . $title . '"' . "\n";
3157
-    $output .= '          >' . $text . '</button>' . "\n";
3158
-    $output .= '  </form>' . "\n";
3154
+    $output = '  <form method="post" action="'.$href.'" class="form-inline">'."\n";
3155
+    $output .= '      <button type="submit" class="'.$class.'"'."\n";
3156
+    $output .= '          title="'.$title.'"'."\n";
3157
+    $output .= '          >'.$text.'</button>'."\n";
3158
+    $output .= '  </form>'."\n";
3159 3159
     return $output;
3160 3160
 }
3161 3161
 
@@ -3219,7 +3219,7 @@  discard block
 block discarded – undo
3219 3219
 function bigbluebuttonbn_user_can_join_meeting($bigbluebuttonbn, $mid = null, $userid = null) {
3220 3220
     // By default, use a meetingid without groups.
3221 3221
     if (empty($mid)) {
3222
-        $mid = $bigbluebuttonbn->meetingid . '-' . $bigbluebuttonbn->course . '-' . $bigbluebuttonbn->id;
3222
+        $mid = $bigbluebuttonbn->meetingid.'-'.$bigbluebuttonbn->course.'-'.$bigbluebuttonbn->id;
3223 3223
     }
3224 3224
     // When meeting is running, all authorized users can join right in.
3225 3225
     if (bigbluebuttonbn_is_meeting_running($mid)) {
@@ -3288,7 +3288,7 @@  discard block
 block discarded – undo
3288 3288
  * @return boolean
3289 3289
  */
3290 3290
 function bigbluebuttonbn_has_html5_client() {
3291
-    $checkurl = \mod_bigbluebuttonbn\locallib\bigbluebutton::root() . "html5client/check";
3291
+    $checkurl = \mod_bigbluebuttonbn\locallib\bigbluebutton::root()."html5client/check";
3292 3292
     $curlinfo = bigbluebuttonbn_wrap_xml_load_file_curl_request($checkurl, 'HEAD');
3293 3293
     return (isset($curlinfo['http_code']) && $curlinfo['http_code'] == 200);
3294 3294
 }
@@ -3316,7 +3316,7 @@  discard block
 block discarded – undo
3316 3316
     $bbbsession['modPW'] = $bbbsession['bigbluebuttonbn']->moderatorpass;
3317 3317
     $bbbsession['viewerPW'] = $bbbsession['bigbluebuttonbn']->viewerpass;
3318 3318
     // Database info related to the activity.
3319
-    $bbbsession['meetingid'] = $bbbsession['bigbluebuttonbn']->meetingid . '-' . $bbbsession['course']->id . '-' .
3319
+    $bbbsession['meetingid'] = $bbbsession['bigbluebuttonbn']->meetingid.'-'.$bbbsession['course']->id.'-'.
3320 3320
     $bbbsession['bigbluebuttonbn']->id;
3321 3321
     $bbbsession['meetingname'] = $bbbsession['bigbluebuttonbn']->name;
3322 3322
     $bbbsession['meetingdescription'] = $bbbsession['bigbluebuttonbn']->intro;
@@ -3348,12 +3348,12 @@  discard block
 block discarded – undo
3348 3348
     if ($bbbsession['bigbluebuttonbn']->record) {
3349 3349
         // Check if is enable record all from start.
3350 3350
         if ($bbbsession['recordallfromstart']) {
3351
-            $bbbsession['welcome'] .= '<br><br>' . get_string(
3351
+            $bbbsession['welcome'] .= '<br><br>'.get_string(
3352 3352
                 'bbbrecordallfromstartwarning',
3353 3353
                 'bigbluebuttonbn'
3354 3354
             );
3355 3355
         } else {
3356
-            $bbbsession['welcome'] .= '<br><br>' . get_string('bbbrecordwarning', 'bigbluebuttonbn');
3356
+            $bbbsession['welcome'] .= '<br><br>'.get_string('bbbrecordwarning', 'bigbluebuttonbn');
3357 3357
         }
3358 3358
     }
3359 3359
     $bbbsession['openingtime'] = $bbbsession['bigbluebuttonbn']->openingtime;
@@ -3368,7 +3368,7 @@  discard block
 block discarded – undo
3368 3368
     $bbbsession['originServerName'] = $parsedurl['host'];
3369 3369
     $bbbsession['originServerUrl'] = $CFG->wwwroot;
3370 3370
     $bbbsession['originServerCommonName'] = '';
3371
-    $bbbsession['originTag'] = 'moodle-mod_bigbluebuttonbn (' . get_config('mod_bigbluebuttonbn', 'version') . ')';
3371
+    $bbbsession['originTag'] = 'moodle-mod_bigbluebuttonbn ('.get_config('mod_bigbluebuttonbn', 'version').')';
3372 3372
     $bbbsession['bnserver'] = bigbluebuttonbn_is_bn_server();
3373 3373
     // Setting for clienttype, assign flash if not enabled, or default if not editable.
3374 3374
     $bbbsession['clienttype'] = BIGBLUEBUTTON_CLIENTTYPE_FLASH;
@@ -3475,7 +3475,7 @@  discard block
 block discarded – undo
3475 3475
     if ((boolean) \mod_bigbluebuttonbn\locallib\config::get('recordingstatus_enabled')) {
3476 3476
         $metadata["bn-recording-status"] = json_encode(
3477 3477
             array(
3478
-                'email' => array('"' . fullname($USER) . '" <' . $USER->email . '>'),
3478
+                'email' => array('"'.fullname($USER).'" <'.$USER->email.'>'),
3479 3479
                 'context' => $bbbsession['bigbluebuttonbnURL'],
3480 3480
             )
3481 3481
         );
Please login to merge, or discard this patch.