Completed
Push — master ( 533470...bdbad9 )
by Jesus
04:44
created
locallib.php 1 patch
Spacing   +81 added lines, -81 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();
@@ -420,7 +420,7 @@  discard block
 block discarded – undo
420 420
         if (is_object($value)) {
421 421
             $value = '';
422 422
         }
423
-        $metadataarray['meta_' . $key] = $value;
423
+        $metadataarray['meta_'.$key] = $value;
424 424
     }
425 425
     return $metadataarray;
426 426
 }
@@ -560,7 +560,7 @@  discard block
 block discarded – undo
560 560
             return $xml;
561 561
         } catch (Exception $e) {
562 562
             libxml_use_internal_errors($previous);
563
-            $error = 'Caught exception: ' . $e->getMessage();
563
+            $error = 'Caught exception: '.$e->getMessage();
564 564
             debugging($error, DEBUG_DEVELOPER);
565 565
             return null;
566 566
         }
@@ -571,7 +571,7 @@  discard block
 block discarded – undo
571 571
         $response = simplexml_load_file($url, 'SimpleXMLElement', LIBXML_NOCDATA | LIBXML_NOBLANKS);
572 572
         return $response;
573 573
     } catch (Exception $e) {
574
-        $error = 'Caught exception: ' . $e->getMessage();
574
+        $error = 'Caught exception: '.$e->getMessage();
575 575
         debugging($error, DEBUG_DEVELOPER);
576 576
         libxml_use_internal_errors($previous);
577 577
         return null;
@@ -590,7 +590,7 @@  discard block
 block discarded – undo
590 590
  */
591 591
 function bigbluebuttonbn_wrap_xml_load_file_curl_request($url, $method = 'GET', $data = null, $contenttype = 'text/xml') {
592 592
     global $CFG;
593
-    require_once($CFG->libdir . '/filelib.php');
593
+    require_once($CFG->libdir.'/filelib.php');
594 594
     $c = new curl();
595 595
     $c->setopt(array('SSL_VERIFYPEER' => true));
596 596
     if ($method == 'POST') {
@@ -599,8 +599,8 @@  discard block
 block discarded – undo
599 599
         }
600 600
         $options = array();
601 601
         $options['CURLOPT_HTTPHEADER'] = array(
602
-            'Content-Type: ' . $contenttype,
603
-            'Content-Length: ' . strlen($data),
602
+            'Content-Type: '.$contenttype,
603
+            'Content-Length: '.strlen($data),
604 604
             'Content-Language: en-US',
605 605
         );
606 606
 
@@ -621,7 +621,7 @@  discard block
 block discarded – undo
621 621
  * @return void
622 622
  */
623 623
 function bigbluebuttonbn_end_meeting_if_running($bigbluebuttonbn) {
624
-    $meetingid = $bigbluebuttonbn->meetingid . '-' . $bigbluebuttonbn->course . '-' . $bigbluebuttonbn->id;
624
+    $meetingid = $bigbluebuttonbn->meetingid.'-'.$bigbluebuttonbn->course.'-'.$bigbluebuttonbn->id;
625 625
     if (bigbluebuttonbn_is_meeting_running($meetingid)) {
626 626
         bigbluebuttonbn_end_meeting($meetingid, $bigbluebuttonbn->moderatorpass);
627 627
     }
@@ -641,9 +641,9 @@  discard block
 block discarded – undo
641 641
     if ($userroles) {
642 642
         $where = '';
643 643
         foreach ($userroles as $userrole) {
644
-            $where .= (empty($where) ? ' WHERE' : ' OR') . ' id=' . $userrole->roleid;
644
+            $where .= (empty($where) ? ' WHERE' : ' OR').' id='.$userrole->roleid;
645 645
         }
646
-        $userroles = $DB->get_records_sql('SELECT * FROM {role}' . $where);
646
+        $userroles = $DB->get_records_sql('SELECT * FROM {role}'.$where);
647 647
     }
648 648
     return $userroles;
649 649
 }
@@ -988,9 +988,9 @@  discard block
 block discarded – undo
988 988
     if ($voicebridge == 0) {
989 989
         return true;
990 990
     }
991
-    $select = 'voicebridge = ' . $voicebridge;
991
+    $select = 'voicebridge = '.$voicebridge;
992 992
     if ($instance != 0) {
993
-        $select .= ' AND id <>' . $instance;
993
+        $select .= ' AND id <>'.$instance;
994 994
     }
995 995
     if (!$DB->get_records_select('bigbluebuttonbn', $select)) {
996 996
         return true;
@@ -1126,7 +1126,7 @@  discard block
 block discarded – undo
1126 1126
 function bigbluebuttonbn_generate_nonce() {
1127 1127
     $mt = microtime();
1128 1128
     $rand = mt_rand();
1129
-    return md5($mt . $rand);
1129
+    return md5($mt.$rand);
1130 1130
 }
1131 1131
 
1132 1132
 /**
@@ -1174,7 +1174,7 @@  discard block
 block discarded – undo
1174 1174
         $params['other'] = $options['other'];
1175 1175
     }
1176 1176
     $event = call_user_func_array(
1177
-        '\mod_bigbluebuttonbn\event\\' . $type . '::create',
1177
+        '\mod_bigbluebuttonbn\event\\'.$type.'::create',
1178 1178
         array($params)
1179 1179
     );
1180 1180
     $event->add_record_snapshot('course_modules', $cm);
@@ -1332,7 +1332,7 @@  discard block
 block discarded – undo
1332 1332
  * @return object
1333 1333
  */
1334 1334
 function bigbluebuttonbn_set_config_xml($meetingid, $configxml) {
1335
-    $urldefaultconfig = \mod_bigbluebuttonbn\locallib\config::get('server_url') . 'api/setConfigXML?';
1335
+    $urldefaultconfig = \mod_bigbluebuttonbn\locallib\config::get('server_url').'api/setConfigXML?';
1336 1336
     $configxmlparams = bigbluebuttonbn_set_config_xml_params($meetingid, $configxml);
1337 1337
     $xml = bigbluebuttonbn_wrap_xml_load_file(
1338 1338
         $urldefaultconfig,
@@ -1352,9 +1352,9 @@  discard block
 block discarded – undo
1352 1352
  * @return string
1353 1353
  */
1354 1354
 function bigbluebuttonbn_set_config_xml_params($meetingid, $configxml) {
1355
-    $params = 'configXML=' . urlencode($configxml) . '&meetingID=' . urlencode($meetingid);
1355
+    $params = 'configXML='.urlencode($configxml).'&meetingID='.urlencode($meetingid);
1356 1356
     $sharedsecret = \mod_bigbluebuttonbn\locallib\config::get('shared_secret');
1357
-    $configxmlparams = $params . '&checksum=' . sha1('setConfigXML' . $params . $sharedsecret);
1357
+    $configxmlparams = $params.'&checksum='.sha1('setConfigXML'.$params.$sharedsecret);
1358 1358
     return $configxmlparams;
1359 1359
 }
1360 1360
 
@@ -1460,7 +1460,7 @@  discard block
 block discarded – undo
1460 1460
     global $USER;
1461 1461
     $starttime = $starttime - ($starttime % 1000);
1462 1462
     // Set formatted date.
1463
-    $dateformat = get_string('strftimerecentfull', 'langconfig') . ' %Z';
1463
+    $dateformat = get_string('strftimerecentfull', 'langconfig').' %Z';
1464 1464
     return userdate($starttime / 1000, $dateformat, usertimezone($USER->timezone));
1465 1465
 }
1466 1466
 
@@ -1508,11 +1508,11 @@  discard block
 block discarded – undo
1508 1508
         $actionbar .= bigbluebuttonbn_actionbar_render_button($recording, $buttonpayload);
1509 1509
     }
1510 1510
     $head = html_writer::start_tag('div', array(
1511
-        'id' => 'recording-actionbar-' . $recording['recordID'],
1511
+        'id' => 'recording-actionbar-'.$recording['recordID'],
1512 1512
         'data-recordingid' => $recording['recordID'],
1513 1513
         'data-meetingid' => $recording['meetingID']));
1514 1514
     $tail = html_writer::end_tag('div');
1515
-    return $head . $actionbar . $tail;
1515
+    return $head.$actionbar.$tail;
1516 1516
 }
1517 1517
 
1518 1518
 /**
@@ -1576,7 +1576,7 @@  discard block
 block discarded – undo
1576 1576
  * @return string
1577 1577
  */
1578 1578
 function bigbluebuttonbn_get_recording_data_row_preview($recording) {
1579
-    $options = array('id' => 'preview-' . $recording['recordID']);
1579
+    $options = array('id' => 'preview-'.$recording['recordID']);
1580 1580
     if ($recording['published'] === 'false') {
1581 1581
         $options['hidden'] = 'hidden';
1582 1582
     }
@@ -1609,7 +1609,7 @@  discard block
 block discarded – undo
1609 1609
         $recordingpreview .= html_writer::start_tag('div', array('class' => ''));
1610 1610
         $recordingpreview .= html_writer::empty_tag(
1611 1611
             'img',
1612
-            array('src' => trim($image['url']) . '?' . time(), 'class' => 'recording-thumbnail pull-left')
1612
+            array('src' => trim($image['url']).'?'.time(), 'class' => 'recording-thumbnail pull-left')
1613 1613
         );
1614 1614
         $recordingpreview .= html_writer::end_tag('div');
1615 1615
     }
@@ -1644,7 +1644,7 @@  discard block
 block discarded – undo
1644 1644
     if ($recording['published'] === 'false') {
1645 1645
         $visibility = 'hidden ';
1646 1646
     }
1647
-    $id = 'playbacks-' . $recording['recordID'];
1647
+    $id = 'playbacks-'.$recording['recordID'];
1648 1648
     $recordingtypes = html_writer::start_tag('div', array('id' => $id, 'data-imported' => $dataimported,
1649 1649
         'data-meetingid' => $recording['meetingID'], 'data-recordingid' => $recording['recordID'],
1650 1650
         'title' => $title, $visibility => $visibility));
@@ -1670,13 +1670,13 @@  discard block
 block discarded – undo
1670 1670
         return '';
1671 1671
     }
1672 1672
     $text = bigbluebuttonbn_get_recording_type_text($playback['type']);
1673
-    $href = $CFG->wwwroot . '/mod/bigbluebuttonbn/bbb_view.php?action=play&bn=' . $bbbsession['bigbluebuttonbn']->id .
1674
-        '&mid=' . $recording['meetingID'] . '&rid=' . $recording['recordID'] . '&rtype=' . $playback['type'];
1673
+    $href = $CFG->wwwroot.'/mod/bigbluebuttonbn/bbb_view.php?action=play&bn='.$bbbsession['bigbluebuttonbn']->id.
1674
+        '&mid='.$recording['meetingID'].'&rid='.$recording['recordID'].'&rtype='.$playback['type'];
1675 1675
     if (!isset($recording['imported']) || !isset($recording['protected']) || $recording['protected'] === 'false') {
1676
-        $href .= '&href=' . urlencode(trim($playback['url']));
1676
+        $href .= '&href='.urlencode(trim($playback['url']));
1677 1677
     }
1678 1678
     $linkattributes = array(
1679
-        'id' => 'recording-play-' . $playback['type'] . '-' . $recording['recordID'],
1679
+        'id' => 'recording-play-'.$playback['type'].'-'.$recording['recordID'],
1680 1680
         'class' => 'btn btn-sm btn-default',
1681 1681
         'onclick' => 'M.mod_bigbluebuttonbn.recordings.recordingPlay(this);',
1682 1682
         'data-action' => 'play',
@@ -1688,7 +1688,7 @@  discard block
 block discarded – undo
1688 1688
         $linkattributes['title'] = get_string('view_recording_format_errror_unreachable', 'bigbluebuttonbn');
1689 1689
         unset($linkattributes['data-href']);
1690 1690
     }
1691
-    return $OUTPUT->action_link('#', $text, null, $linkattributes) . '&#32;';
1691
+    return $OUTPUT->action_link('#', $text, null, $linkattributes).'&#32;';
1692 1692
 }
1693 1693
 
1694 1694
 /**
@@ -1701,7 +1701,7 @@  discard block
 block discarded – undo
1701 1701
 function bigbluebuttonbn_get_recording_type_text($playbacktype) {
1702 1702
     // Check first if string exists, and if it does'nt just default to the capitalised version of the string.
1703 1703
     $text = ucwords($playbacktype);
1704
-    $typestringid = 'view_recording_format_' . $playbacktype;
1704
+    $typestringid = 'view_recording_format_'.$playbacktype;
1705 1705
     if (get_string_manager()->string_exists($typestringid, 'bigbluebuttonbn')) {
1706 1706
         $text = get_string($typestringid, 'bigbluebuttonbn');
1707 1707
     }
@@ -1731,7 +1731,7 @@  discard block
 block discarded – undo
1731 1731
     $validatedurls[$urlhost] = true;
1732 1732
     $curlinfo = bigbluebuttonbn_wrap_xml_load_file_curl_request($url, 'HEAD');
1733 1733
     if (!isset($curlinfo['http_code']) || $curlinfo['http_code'] != 200) {
1734
-        $error = "Resources hosted by " . $urlhost . " are unreachable. Server responded with code " . $curlinfo['http_code'];
1734
+        $error = "Resources hosted by ".$urlhost." are unreachable. Server responded with code ".$curlinfo['http_code'];
1735 1735
         debugging($error, DEBUG_DEVELOPER);
1736 1736
         $validatedurls[$urlhost] = false;
1737 1737
     }
@@ -1822,12 +1822,12 @@  discard block
 block discarded – undo
1822 1822
  * @return string
1823 1823
  */
1824 1824
 function bigbluebuttonbn_get_recording_data_row_text($recording, $text, $source, $data) {
1825
-    $htmltext = '<span>' . htmlentities($text) . '</span>';
1825
+    $htmltext = '<span>'.htmlentities($text).'</span>';
1826 1826
     if (empty($data)) {
1827 1827
         return $htmltext;
1828 1828
     }
1829
-    $target = $data['action'] . '-' . $data['target'];
1830
-    $id = 'recording-' . $target . '-' . $data['recordingid'];
1829
+    $target = $data['action'].'-'.$data['target'];
1830
+    $id = 'recording-'.$target.'-'.$data['recordingid'];
1831 1831
     $attributes = array('id' => $id, 'class' => 'quickeditlink col-md-20',
1832 1832
         'data-recordingid' => $data['recordingid'], 'data-meetingid' => $data['meetingid'],
1833 1833
         'data-target' => $data['target'], 'data-source' => $source);
@@ -1835,7 +1835,7 @@  discard block
 block discarded – undo
1835 1835
     $tail = html_writer::end_tag('div');
1836 1836
     $payload = array('action' => $data['action'], 'tag' => $data['tag'], 'target' => $data['target']);
1837 1837
     $htmllink = bigbluebuttonbn_actionbar_render_button($recording, $payload);
1838
-    return $head . $htmltext . $htmllink . $tail;
1838
+    return $head.$htmltext.$htmllink.$tail;
1839 1839
 }
1840 1840
 
1841 1841
 /**
@@ -1853,10 +1853,10 @@  discard block
 block discarded – undo
1853 1853
     }
1854 1854
     $target = $data['action'];
1855 1855
     if (isset($data['target'])) {
1856
-        $target .= '-' . $data['target'];
1856
+        $target .= '-'.$data['target'];
1857 1857
     }
1858
-    $id = 'recording-' . $target . '-' . $recording['recordID'];
1859
-    $onclick = 'M.mod_bigbluebuttonbn.recordings.recording' . ucfirst($data['action']) . '(this); return false;';
1858
+    $id = 'recording-'.$target.'-'.$recording['recordID'];
1859
+    $onclick = 'M.mod_bigbluebuttonbn.recordings.recording'.ucfirst($data['action']).'(this); return false;';
1860 1860
     if ((boolean) \mod_bigbluebuttonbn\locallib\config::get('recording_icons_enabled')) {
1861 1861
         // With icon for $manageaction.
1862 1862
         $iconattributes = array('id' => $id, 'class' => 'iconsmall');
@@ -1871,13 +1871,13 @@  discard block
 block discarded – undo
1871 1871
             );
1872 1872
         }
1873 1873
         if (isset($data['disabled'])) {
1874
-            $iconattributes['class'] .= ' fa-' . $data['disabled'];
1874
+            $iconattributes['class'] .= ' fa-'.$data['disabled'];
1875 1875
             $linkattributes['class'] = 'disabled';
1876 1876
             unset($linkattributes['onclick']);
1877 1877
         }
1878 1878
         $icon = new pix_icon(
1879
-            'i/' . $data['tag'],
1880
-            get_string('view_recording_list_actionbar_' . $data['action'], 'bigbluebuttonbn'),
1879
+            'i/'.$data['tag'],
1880
+            get_string('view_recording_list_actionbar_'.$data['action'], 'bigbluebuttonbn'),
1881 1881
             'moodle',
1882 1882
             $iconattributes
1883 1883
         );
@@ -1917,7 +1917,7 @@  discard block
 block discarded – undo
1917 1917
     if ($bbbsession['managerecordings']) {
1918 1918
         $table->head[] = get_string('view_recording_actionbar', 'bigbluebuttonbn');
1919 1919
         $table->align[] = 'left';
1920
-        $table->size[] = (count($tools) * 40) . 'px';
1920
+        $table->size[] = (count($tools) * 40).'px';
1921 1921
     }
1922 1922
     // Get the groups of the user.
1923 1923
     $usergroups = groups_get_all_groups($bbbsession['course']->id, $bbbsession['userID']);
@@ -1972,7 +1972,7 @@  discard block
 block discarded – undo
1972 1972
  */
1973 1973
 function bigbluebuttonbn_get_recording_table_row($bbbsession, $recording, $rowdata) {
1974 1974
     $row = new html_table_row();
1975
-    $row->id = 'recording-tr-' . $recording['recordID'];
1975
+    $row->id = 'recording-tr-'.$recording['recordID'];
1976 1976
     $row->attributes['data-imported'] = 'false';
1977 1977
     $texthead = '';
1978 1978
     $texttail = '';
@@ -1984,13 +1984,13 @@  discard block
 block discarded – undo
1984 1984
     }
1985 1985
     $rowdata->date_formatted = str_replace(' ', '&nbsp;', $rowdata->date_formatted);
1986 1986
     $row->cells = array();
1987
-    $row->cells[] = $texthead . $rowdata->playback . $texttail;
1988
-    $row->cells[] = $texthead . $rowdata->recording . $texttail;
1989
-    $row->cells[] = $texthead . $rowdata->description . $texttail;
1987
+    $row->cells[] = $texthead.$rowdata->playback.$texttail;
1988
+    $row->cells[] = $texthead.$rowdata->recording.$texttail;
1989
+    $row->cells[] = $texthead.$rowdata->description.$texttail;
1990 1990
     if (bigbluebuttonbn_get_recording_data_preview_enabled($bbbsession)) {
1991 1991
         $row->cells[] = $rowdata->preview;
1992 1992
     }
1993
-    $row->cells[] = $texthead . $rowdata->date_formatted . $texttail;
1993
+    $row->cells[] = $texthead.$rowdata->date_formatted.$texttail;
1994 1994
     $row->cells[] = $rowdata->duration_formatted;
1995 1995
     if ($bbbsession['managerecordings']) {
1996 1996
         $row->cells[] = $rowdata->actionbar;
@@ -2116,7 +2116,7 @@  discard block
 block discarded – undo
2116 2116
         // Enqueue it.
2117 2117
         \core\task\manager::queue_adhoc_task($task);
2118 2118
     } catch (Exception $e) {
2119
-        mtrace("Error while enqueuing completion_update_state task. " . (string) $e);
2119
+        mtrace("Error while enqueuing completion_update_state task. ".(string) $e);
2120 2120
     }
2121 2121
 }
2122 2122
 
@@ -2186,7 +2186,7 @@  discard block
 block discarded – undo
2186 2186
     }
2187 2187
     $coursesforselect = [];
2188 2188
     foreach ($courses as $course) {
2189
-        $coursesforselect[$course->id] = $course->fullname . " (" . $course->shortname . ")";
2189
+        $coursesforselect[$course->id] = $course->fullname." (".$course->shortname.")";
2190 2190
     }
2191 2191
     return $coursesforselect;
2192 2192
 }
@@ -2284,17 +2284,17 @@  discard block
 block discarded – undo
2284 2284
  * @return string containing the sql used for getting the target bigbluebuttonbn instances
2285 2285
  */
2286 2286
 function bigbluebuttonbn_get_recordings_deleted_sql_select($courseid = 0, $bigbluebuttonbnid = null, $subset = true) {
2287
-    $sql = "log = '" . BIGBLUEBUTTONBN_LOG_EVENT_DELETE . "' AND meta like '%has_recordings%' AND meta like '%true%'";
2287
+    $sql = "log = '".BIGBLUEBUTTONBN_LOG_EVENT_DELETE."' AND meta like '%has_recordings%' AND meta like '%true%'";
2288 2288
     if (empty($courseid)) {
2289 2289
         $courseid = 0;
2290 2290
     }
2291 2291
     if (empty($bigbluebuttonbnid)) {
2292
-        return $sql . " AND courseid = {$courseid}";
2292
+        return $sql." AND courseid = {$courseid}";
2293 2293
     }
2294 2294
     if ($subset) {
2295
-        return $sql . " AND bigbluebuttonbnid = '{$bigbluebuttonbnid}'";
2295
+        return $sql." AND bigbluebuttonbnid = '{$bigbluebuttonbnid}'";
2296 2296
     }
2297
-    return $sql . " AND courseid = {$courseid} AND bigbluebuttonbnid <> '{$bigbluebuttonbnid}'";
2297
+    return $sql." AND courseid = {$courseid} AND bigbluebuttonbnid <> '{$bigbluebuttonbnid}'";
2298 2298
 }
2299 2299
 
2300 2300
 /**
@@ -2308,17 +2308,17 @@  discard block
 block discarded – undo
2308 2308
  * @return string containing the sql used for getting the target bigbluebuttonbn instances
2309 2309
  */
2310 2310
 function bigbluebuttonbn_get_recordings_imported_sql_select($courseid = 0, $bigbluebuttonbnid = null, $subset = true) {
2311
-    $sql = "log = '" . BIGBLUEBUTTONBN_LOG_EVENT_IMPORT . "'";
2311
+    $sql = "log = '".BIGBLUEBUTTONBN_LOG_EVENT_IMPORT."'";
2312 2312
     if (empty($courseid)) {
2313 2313
         $courseid = 0;
2314 2314
     }
2315 2315
     if (empty($bigbluebuttonbnid)) {
2316
-        return $sql . " AND courseid = '{$courseid}'";
2316
+        return $sql." AND courseid = '{$courseid}'";
2317 2317
     }
2318 2318
     if ($subset) {
2319
-        return $sql . " AND bigbluebuttonbnid = '{$bigbluebuttonbnid}'";
2319
+        return $sql." AND bigbluebuttonbnid = '{$bigbluebuttonbnid}'";
2320 2320
     }
2321
-    return $sql . " AND courseid = '{$courseid}' AND bigbluebuttonbnid <> '{$bigbluebuttonbnid}'";
2321
+    return $sql." AND courseid = '{$courseid}' AND bigbluebuttonbnid <> '{$bigbluebuttonbnid}'";
2322 2322
 }
2323 2323
 
2324 2324
 /**
@@ -2377,7 +2377,7 @@  discard block
 block discarded – undo
2377 2377
     }
2378 2378
     // Prepare select for loading records based on existent bigbluebuttonbns.
2379 2379
     $sql = 'SELECT DISTINCT meetingid, bigbluebuttonbnid FROM {bigbluebuttonbn_logs} WHERE ';
2380
-    $sql .= '(bigbluebuttonbnid=' . implode(' OR bigbluebuttonbnid=', array_keys($bigbluebuttonbns)) . ')';
2380
+    $sql .= '(bigbluebuttonbnid='.implode(' OR bigbluebuttonbnid=', array_keys($bigbluebuttonbns)).')';
2381 2381
     // Include only Create events and exclude those with record not true.
2382 2382
     $sql .= ' AND log = ? AND meta LIKE ? AND meta LIKE ?';
2383 2383
     // Execute select for loading records based on existent bigbluebuttonbns.
@@ -2562,8 +2562,8 @@  discard block
 block discarded – undo
2562 2562
     require_once($CFG->dirroot.'/calendar/lib.php');
2563 2563
     $activitytime = '';
2564 2564
     if ($time) {
2565
-        $activitytime = calendar_day_representation($time) . ' ' .
2566
-        get_string('mod_form_field_notification_msg_at', 'bigbluebuttonbn') . ' ' .
2565
+        $activitytime = calendar_day_representation($time).' '.
2566
+        get_string('mod_form_field_notification_msg_at', 'bigbluebuttonbn').' '.
2567 2567
         calendar_time_representation($time);
2568 2568
     }
2569 2569
     return $activitytime;
@@ -3116,16 +3116,16 @@  discard block
 block discarded – undo
3116 3116
         return $output;
3117 3117
     }
3118 3118
     $output .= $OUTPUT->box_start(
3119
-        'box boxalignleft adminerror alert alert-' . $type . ' alert-block fade in',
3119
+        'box boxalignleft adminerror alert alert-'.$type.' alert-block fade in',
3120 3120
         'bigbluebuttonbn_view_general_warning'
3121
-    ) . "\n";
3122
-    $output .= '    ' . $message . "\n";
3123
-    $output .= '  <div class="singlebutton pull-right">' . "\n";
3121
+    )."\n";
3122
+    $output .= '    '.$message."\n";
3123
+    $output .= '  <div class="singlebutton pull-right">'."\n";
3124 3124
     if (!empty($href)) {
3125 3125
         $output .= bigbluebuttonbn_render_warning_button($href, $text, $class);
3126 3126
     }
3127
-    $output .= '  </div>' . "\n";
3128
-    $output .= $OUTPUT->box_end() . "\n";
3127
+    $output .= '  </div>'."\n";
3128
+    $output .= $OUTPUT->box_end()."\n";
3129 3129
     return $output;
3130 3130
 }
3131 3131
 
@@ -3149,11 +3149,11 @@  discard block
 block discarded – undo
3149 3149
     if ($class == '') {
3150 3150
         $class = 'btn btn-secondary';
3151 3151
     }
3152
-    $output = '  <form method="post" action="' . $href . '" class="form-inline">' . "\n";
3153
-    $output .= '      <button type="submit" class="' . $class . '"' . "\n";
3154
-    $output .= '          title="' . $title . '"' . "\n";
3155
-    $output .= '          >' . $text . '</button>' . "\n";
3156
-    $output .= '  </form>' . "\n";
3152
+    $output = '  <form method="post" action="'.$href.'" class="form-inline">'."\n";
3153
+    $output .= '      <button type="submit" class="'.$class.'"'."\n";
3154
+    $output .= '          title="'.$title.'"'."\n";
3155
+    $output .= '          >'.$text.'</button>'."\n";
3156
+    $output .= '  </form>'."\n";
3157 3157
     return $output;
3158 3158
 }
3159 3159
 
@@ -3217,7 +3217,7 @@  discard block
 block discarded – undo
3217 3217
 function bigbluebuttonbn_user_can_join_meeting($bigbluebuttonbn, $mid = null, $userid = null) {
3218 3218
     // By default, use a meetingid without groups.
3219 3219
     if (empty($mid)) {
3220
-        $mid = $bigbluebuttonbn->meetingid . '-' . $bigbluebuttonbn->course . '-' . $bigbluebuttonbn->id;
3220
+        $mid = $bigbluebuttonbn->meetingid.'-'.$bigbluebuttonbn->course.'-'.$bigbluebuttonbn->id;
3221 3221
     }
3222 3222
     // When meeting is running, all authorized users can join right in.
3223 3223
     if (bigbluebuttonbn_is_meeting_running($mid)) {
@@ -3286,7 +3286,7 @@  discard block
 block discarded – undo
3286 3286
  * @return boolean
3287 3287
  */
3288 3288
 function bigbluebuttonbn_has_html5_client() {
3289
-    $checkurl = \mod_bigbluebuttonbn\locallib\bigbluebutton::root() . "html5client/check";
3289
+    $checkurl = \mod_bigbluebuttonbn\locallib\bigbluebutton::root()."html5client/check";
3290 3290
     $curlinfo = bigbluebuttonbn_wrap_xml_load_file_curl_request($checkurl, 'HEAD');
3291 3291
     return (isset($curlinfo['http_code']) && $curlinfo['http_code'] == 200);
3292 3292
 }
@@ -3314,7 +3314,7 @@  discard block
 block discarded – undo
3314 3314
     $bbbsession['modPW'] = $bbbsession['bigbluebuttonbn']->moderatorpass;
3315 3315
     $bbbsession['viewerPW'] = $bbbsession['bigbluebuttonbn']->viewerpass;
3316 3316
     // Database info related to the activity.
3317
-    $bbbsession['meetingid'] = $bbbsession['bigbluebuttonbn']->meetingid . '-' . $bbbsession['course']->id . '-' .
3317
+    $bbbsession['meetingid'] = $bbbsession['bigbluebuttonbn']->meetingid.'-'.$bbbsession['course']->id.'-'.
3318 3318
     $bbbsession['bigbluebuttonbn']->id;
3319 3319
     $bbbsession['meetingname'] = $bbbsession['bigbluebuttonbn']->name;
3320 3320
     $bbbsession['meetingdescription'] = $bbbsession['bigbluebuttonbn']->intro;
@@ -3346,12 +3346,12 @@  discard block
 block discarded – undo
3346 3346
     if ($bbbsession['bigbluebuttonbn']->record) {
3347 3347
         // Check if is enable record all from start.
3348 3348
         if ($bbbsession['recordallfromstart']) {
3349
-            $bbbsession['welcome'] .= '<br><br>' . get_string(
3349
+            $bbbsession['welcome'] .= '<br><br>'.get_string(
3350 3350
                 'bbbrecordallfromstartwarning',
3351 3351
                 'bigbluebuttonbn'
3352 3352
             );
3353 3353
         } else {
3354
-            $bbbsession['welcome'] .= '<br><br>' . get_string('bbbrecordwarning', 'bigbluebuttonbn');
3354
+            $bbbsession['welcome'] .= '<br><br>'.get_string('bbbrecordwarning', 'bigbluebuttonbn');
3355 3355
         }
3356 3356
     }
3357 3357
     $bbbsession['openingtime'] = $bbbsession['bigbluebuttonbn']->openingtime;
@@ -3366,7 +3366,7 @@  discard block
 block discarded – undo
3366 3366
     $bbbsession['originServerName'] = $parsedurl['host'];
3367 3367
     $bbbsession['originServerUrl'] = $CFG->wwwroot;
3368 3368
     $bbbsession['originServerCommonName'] = '';
3369
-    $bbbsession['originTag'] = 'moodle-mod_bigbluebuttonbn (' . get_config('mod_bigbluebuttonbn', 'version') . ')';
3369
+    $bbbsession['originTag'] = 'moodle-mod_bigbluebuttonbn ('.get_config('mod_bigbluebuttonbn', 'version').')';
3370 3370
     $bbbsession['bnserver'] = bigbluebuttonbn_is_bn_server();
3371 3371
     // Setting for clienttype, assign flash if not enabled, or default if not editable.
3372 3372
     $bbbsession['clienttype'] = BIGBLUEBUTTON_CLIENTTYPE_FLASH;
@@ -3473,7 +3473,7 @@  discard block
 block discarded – undo
3473 3473
     if ((boolean) \mod_bigbluebuttonbn\locallib\config::get('recordingstatus_enabled')) {
3474 3474
         $metadata["bn-recording-status"] = json_encode(
3475 3475
             array(
3476
-                'email' => array('"' . fullname($USER) . '" <' . $USER->email . '>'),
3476
+                'email' => array('"'.fullname($USER).'" <'.$USER->email.'>'),
3477 3477
                 'context' => $bbbsession['bigbluebuttonbnURL'],
3478 3478
             )
3479 3479
         );
Please login to merge, or discard this patch.