@@ -32,7 +32,7 @@ discard block |
||
| 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; |
@@ -242,8 +242,8 @@ discard block |
||
| 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 |
||
| 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 |
||
| 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 |
||
| 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 |
||
| 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 |
||
| 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 |
||
| 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 |
||
| 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 | } |
@@ -1010,9 +1010,9 @@ discard block |
||
| 1010 | 1010 | if ($voicebridge == 0) { |
| 1011 | 1011 | return true; |
| 1012 | 1012 | } |
| 1013 | - $select = 'voicebridge = ' . $voicebridge; |
|
| 1013 | + $select = 'voicebridge = '.$voicebridge; |
|
| 1014 | 1014 | if ($instance != 0) { |
| 1015 | - $select .= ' AND id <>' . $instance; |
|
| 1015 | + $select .= ' AND id <>'.$instance; |
|
| 1016 | 1016 | } |
| 1017 | 1017 | if (!$DB->get_records_select('bigbluebuttonbn', $select)) { |
| 1018 | 1018 | return true; |
@@ -1148,7 +1148,7 @@ discard block |
||
| 1148 | 1148 | function bigbluebuttonbn_generate_nonce() { |
| 1149 | 1149 | $mt = microtime(); |
| 1150 | 1150 | $rand = mt_rand(); |
| 1151 | - return md5($mt . $rand); |
|
| 1151 | + return md5($mt.$rand); |
|
| 1152 | 1152 | } |
| 1153 | 1153 | |
| 1154 | 1154 | /** |
@@ -1196,7 +1196,7 @@ discard block |
||
| 1196 | 1196 | $params['other'] = $options['other']; |
| 1197 | 1197 | } |
| 1198 | 1198 | $event = call_user_func_array( |
| 1199 | - '\mod_bigbluebuttonbn\event\\' . $type . '::create', |
|
| 1199 | + '\mod_bigbluebuttonbn\event\\'.$type.'::create', |
|
| 1200 | 1200 | array($params) |
| 1201 | 1201 | ); |
| 1202 | 1202 | $event->add_record_snapshot('course_modules', $cm); |
@@ -1354,7 +1354,7 @@ discard block |
||
| 1354 | 1354 | * @return object |
| 1355 | 1355 | */ |
| 1356 | 1356 | function bigbluebuttonbn_set_config_xml($meetingid, $configxml) { |
| 1357 | - $urldefaultconfig = \mod_bigbluebuttonbn\locallib\config::get('server_url') . 'api/setConfigXML?'; |
|
| 1357 | + $urldefaultconfig = \mod_bigbluebuttonbn\locallib\config::get('server_url').'api/setConfigXML?'; |
|
| 1358 | 1358 | $configxmlparams = bigbluebuttonbn_set_config_xml_params($meetingid, $configxml); |
| 1359 | 1359 | $xml = bigbluebuttonbn_wrap_xml_load_file( |
| 1360 | 1360 | $urldefaultconfig, |
@@ -1374,9 +1374,9 @@ discard block |
||
| 1374 | 1374 | * @return string |
| 1375 | 1375 | */ |
| 1376 | 1376 | function bigbluebuttonbn_set_config_xml_params($meetingid, $configxml) { |
| 1377 | - $params = 'configXML=' . urlencode($configxml) . '&meetingID=' . urlencode($meetingid); |
|
| 1377 | + $params = 'configXML='.urlencode($configxml).'&meetingID='.urlencode($meetingid); |
|
| 1378 | 1378 | $sharedsecret = \mod_bigbluebuttonbn\locallib\config::get('shared_secret'); |
| 1379 | - $configxmlparams = $params . '&checksum=' . sha1('setConfigXML' . $params . $sharedsecret); |
|
| 1379 | + $configxmlparams = $params.'&checksum='.sha1('setConfigXML'.$params.$sharedsecret); |
|
| 1380 | 1380 | return $configxmlparams; |
| 1381 | 1381 | } |
| 1382 | 1382 | |
@@ -1482,7 +1482,7 @@ discard block |
||
| 1482 | 1482 | global $USER; |
| 1483 | 1483 | $starttime = $starttime - ($starttime % 1000); |
| 1484 | 1484 | // Set formatted date. |
| 1485 | - $dateformat = get_string('strftimerecentfull', 'langconfig') . ' %Z'; |
|
| 1485 | + $dateformat = get_string('strftimerecentfull', 'langconfig').' %Z'; |
|
| 1486 | 1486 | return userdate($starttime / 1000, $dateformat, usertimezone($USER->timezone)); |
| 1487 | 1487 | } |
| 1488 | 1488 | |
@@ -1530,11 +1530,11 @@ discard block |
||
| 1530 | 1530 | $actionbar .= bigbluebuttonbn_actionbar_render_button($recording, $buttonpayload); |
| 1531 | 1531 | } |
| 1532 | 1532 | $head = html_writer::start_tag('div', array( |
| 1533 | - 'id' => 'recording-actionbar-' . $recording['recordID'], |
|
| 1533 | + 'id' => 'recording-actionbar-'.$recording['recordID'], |
|
| 1534 | 1534 | 'data-recordingid' => $recording['recordID'], |
| 1535 | 1535 | 'data-meetingid' => $recording['meetingID'])); |
| 1536 | 1536 | $tail = html_writer::end_tag('div'); |
| 1537 | - return $head . $actionbar . $tail; |
|
| 1537 | + return $head.$actionbar.$tail; |
|
| 1538 | 1538 | } |
| 1539 | 1539 | |
| 1540 | 1540 | /** |
@@ -1598,7 +1598,7 @@ discard block |
||
| 1598 | 1598 | * @return string |
| 1599 | 1599 | */ |
| 1600 | 1600 | function bigbluebuttonbn_get_recording_data_row_preview($recording) { |
| 1601 | - $options = array('id' => 'preview-' . $recording['recordID']); |
|
| 1601 | + $options = array('id' => 'preview-'.$recording['recordID']); |
|
| 1602 | 1602 | if ($recording['published'] === 'false') { |
| 1603 | 1603 | $options['hidden'] = 'hidden'; |
| 1604 | 1604 | } |
@@ -1631,7 +1631,7 @@ discard block |
||
| 1631 | 1631 | $recordingpreview .= html_writer::start_tag('div', array('class' => '')); |
| 1632 | 1632 | $recordingpreview .= html_writer::empty_tag( |
| 1633 | 1633 | 'img', |
| 1634 | - array('src' => trim($image['url']) . '?' . time(), 'class' => 'recording-thumbnail pull-left') |
|
| 1634 | + array('src' => trim($image['url']).'?'.time(), 'class' => 'recording-thumbnail pull-left') |
|
| 1635 | 1635 | ); |
| 1636 | 1636 | $recordingpreview .= html_writer::end_tag('div'); |
| 1637 | 1637 | } |
@@ -1666,7 +1666,7 @@ discard block |
||
| 1666 | 1666 | if ($recording['published'] === 'false') { |
| 1667 | 1667 | $visibility = 'hidden '; |
| 1668 | 1668 | } |
| 1669 | - $id = 'playbacks-' . $recording['recordID']; |
|
| 1669 | + $id = 'playbacks-'.$recording['recordID']; |
|
| 1670 | 1670 | $recordingtypes = html_writer::start_tag('div', array('id' => $id, 'data-imported' => $dataimported, |
| 1671 | 1671 | 'data-meetingid' => $recording['meetingID'], 'data-recordingid' => $recording['recordID'], |
| 1672 | 1672 | 'title' => $title, $visibility => $visibility)); |
@@ -1692,13 +1692,13 @@ discard block |
||
| 1692 | 1692 | return ''; |
| 1693 | 1693 | } |
| 1694 | 1694 | $text = bigbluebuttonbn_get_recording_type_text($playback['type']); |
| 1695 | - $href = $CFG->wwwroot . '/mod/bigbluebuttonbn/bbb_view.php?action=play&bn=' . $bbbsession['bigbluebuttonbn']->id . |
|
| 1696 | - '&mid=' . $recording['meetingID'] . '&rid=' . $recording['recordID'] . '&rtype=' . $playback['type']; |
|
| 1695 | + $href = $CFG->wwwroot.'/mod/bigbluebuttonbn/bbb_view.php?action=play&bn='.$bbbsession['bigbluebuttonbn']->id. |
|
| 1696 | + '&mid='.$recording['meetingID'].'&rid='.$recording['recordID'].'&rtype='.$playback['type']; |
|
| 1697 | 1697 | if (!isset($recording['imported']) || !isset($recording['protected']) || $recording['protected'] === 'false') { |
| 1698 | - $href .= '&href=' . urlencode(trim($playback['url'])); |
|
| 1698 | + $href .= '&href='.urlencode(trim($playback['url'])); |
|
| 1699 | 1699 | } |
| 1700 | 1700 | $linkattributes = array( |
| 1701 | - 'id' => 'recording-play-' . $playback['type'] . '-' . $recording['recordID'], |
|
| 1701 | + 'id' => 'recording-play-'.$playback['type'].'-'.$recording['recordID'], |
|
| 1702 | 1702 | 'class' => 'btn btn-sm btn-default', |
| 1703 | 1703 | 'onclick' => 'M.mod_bigbluebuttonbn.recordings.recordingPlay(this);', |
| 1704 | 1704 | 'data-action' => 'play', |
@@ -1711,7 +1711,7 @@ discard block |
||
| 1711 | 1711 | $linkattributes['title'] = get_string('view_recording_format_errror_unreachable', 'bigbluebuttonbn'); |
| 1712 | 1712 | unset($linkattributes['data-href']); |
| 1713 | 1713 | } |
| 1714 | - return $OUTPUT->action_link('#', $text, null, $linkattributes) . ' '; |
|
| 1714 | + return $OUTPUT->action_link('#', $text, null, $linkattributes).' '; |
|
| 1715 | 1715 | } |
| 1716 | 1716 | |
| 1717 | 1717 | /** |
@@ -1724,7 +1724,7 @@ discard block |
||
| 1724 | 1724 | function bigbluebuttonbn_get_recording_type_text($playbacktype) { |
| 1725 | 1725 | // Check first if string exists, and if it does'nt just default to the capitalised version of the string. |
| 1726 | 1726 | $text = ucwords($playbacktype); |
| 1727 | - $typestringid = 'view_recording_format_' . $playbacktype; |
|
| 1727 | + $typestringid = 'view_recording_format_'.$playbacktype; |
|
| 1728 | 1728 | if (get_string_manager()->string_exists($typestringid, 'bigbluebuttonbn')) { |
| 1729 | 1729 | $text = get_string($typestringid, 'bigbluebuttonbn'); |
| 1730 | 1730 | } |
@@ -1754,7 +1754,7 @@ discard block |
||
| 1754 | 1754 | $validatedurls[$urlhost] = true; |
| 1755 | 1755 | $curlinfo = bigbluebuttonbn_wrap_xml_load_file_curl_request($url, 'HEAD'); |
| 1756 | 1756 | if (!isset($curlinfo['http_code']) || $curlinfo['http_code'] != 200) { |
| 1757 | - $error = "Resources hosted by " . $urlhost . " are unreachable. Server responded with code " . $curlinfo['http_code']; |
|
| 1757 | + $error = "Resources hosted by ".$urlhost." are unreachable. Server responded with code ".$curlinfo['http_code']; |
|
| 1758 | 1758 | debugging($error, DEBUG_DEVELOPER); |
| 1759 | 1759 | $validatedurls[$urlhost] = false; |
| 1760 | 1760 | } |
@@ -1845,12 +1845,12 @@ discard block |
||
| 1845 | 1845 | * @return string |
| 1846 | 1846 | */ |
| 1847 | 1847 | function bigbluebuttonbn_get_recording_data_row_text($recording, $text, $source, $data) { |
| 1848 | - $htmltext = '<span>' . htmlentities($text) . '</span>'; |
|
| 1848 | + $htmltext = '<span>'.htmlentities($text).'</span>'; |
|
| 1849 | 1849 | if (empty($data)) { |
| 1850 | 1850 | return $htmltext; |
| 1851 | 1851 | } |
| 1852 | - $target = $data['action'] . '-' . $data['target']; |
|
| 1853 | - $id = 'recording-' . $target . '-' . $data['recordingid']; |
|
| 1852 | + $target = $data['action'].'-'.$data['target']; |
|
| 1853 | + $id = 'recording-'.$target.'-'.$data['recordingid']; |
|
| 1854 | 1854 | $attributes = array('id' => $id, 'class' => 'quickeditlink col-md-20', |
| 1855 | 1855 | 'data-recordingid' => $data['recordingid'], 'data-meetingid' => $data['meetingid'], |
| 1856 | 1856 | 'data-target' => $data['target'], 'data-source' => $source); |
@@ -1858,7 +1858,7 @@ discard block |
||
| 1858 | 1858 | $tail = html_writer::end_tag('div'); |
| 1859 | 1859 | $payload = array('action' => $data['action'], 'tag' => $data['tag'], 'target' => $data['target']); |
| 1860 | 1860 | $htmllink = bigbluebuttonbn_actionbar_render_button($recording, $payload); |
| 1861 | - return $head . $htmltext . $htmllink . $tail; |
|
| 1861 | + return $head.$htmltext.$htmllink.$tail; |
|
| 1862 | 1862 | } |
| 1863 | 1863 | |
| 1864 | 1864 | /** |
@@ -1876,10 +1876,10 @@ discard block |
||
| 1876 | 1876 | } |
| 1877 | 1877 | $target = $data['action']; |
| 1878 | 1878 | if (isset($data['target'])) { |
| 1879 | - $target .= '-' . $data['target']; |
|
| 1879 | + $target .= '-'.$data['target']; |
|
| 1880 | 1880 | } |
| 1881 | - $id = 'recording-' . $target . '-' . $recording['recordID']; |
|
| 1882 | - $onclick = 'M.mod_bigbluebuttonbn.recordings.recording' . ucfirst($data['action']) . '(this); return false;'; |
|
| 1881 | + $id = 'recording-'.$target.'-'.$recording['recordID']; |
|
| 1882 | + $onclick = 'M.mod_bigbluebuttonbn.recordings.recording'.ucfirst($data['action']).'(this); return false;'; |
|
| 1883 | 1883 | if ((boolean) \mod_bigbluebuttonbn\locallib\config::get('recording_icons_enabled')) { |
| 1884 | 1884 | // With icon for $manageaction. |
| 1885 | 1885 | $iconattributes = array('id' => $id, 'class' => 'iconsmall'); |
@@ -1894,13 +1894,13 @@ discard block |
||
| 1894 | 1894 | ); |
| 1895 | 1895 | } |
| 1896 | 1896 | if (isset($data['disabled'])) { |
| 1897 | - $iconattributes['class'] .= ' fa-' . $data['disabled']; |
|
| 1897 | + $iconattributes['class'] .= ' fa-'.$data['disabled']; |
|
| 1898 | 1898 | $linkattributes['class'] = 'disabled'; |
| 1899 | 1899 | unset($linkattributes['onclick']); |
| 1900 | 1900 | } |
| 1901 | 1901 | $icon = new pix_icon( |
| 1902 | - 'i/' . $data['tag'], |
|
| 1903 | - get_string('view_recording_list_actionbar_' . $data['action'], 'bigbluebuttonbn'), |
|
| 1902 | + 'i/'.$data['tag'], |
|
| 1903 | + get_string('view_recording_list_actionbar_'.$data['action'], 'bigbluebuttonbn'), |
|
| 1904 | 1904 | 'moodle', |
| 1905 | 1905 | $iconattributes |
| 1906 | 1906 | ); |
@@ -1940,7 +1940,7 @@ discard block |
||
| 1940 | 1940 | if ($bbbsession['managerecordings']) { |
| 1941 | 1941 | $table->head[] = get_string('view_recording_actionbar', 'bigbluebuttonbn'); |
| 1942 | 1942 | $table->align[] = 'left'; |
| 1943 | - $table->size[] = (count($tools) * 40) . 'px'; |
|
| 1943 | + $table->size[] = (count($tools) * 40).'px'; |
|
| 1944 | 1944 | } |
| 1945 | 1945 | // Get the groups of the user. |
| 1946 | 1946 | $usergroups = groups_get_all_groups($bbbsession['course']->id, $bbbsession['userID']); |
@@ -1995,7 +1995,7 @@ discard block |
||
| 1995 | 1995 | */ |
| 1996 | 1996 | function bigbluebuttonbn_get_recording_table_row($bbbsession, $recording, $rowdata) { |
| 1997 | 1997 | $row = new html_table_row(); |
| 1998 | - $row->id = 'recording-tr-' . $recording['recordID']; |
|
| 1998 | + $row->id = 'recording-tr-'.$recording['recordID']; |
|
| 1999 | 1999 | $row->attributes['data-imported'] = 'false'; |
| 2000 | 2000 | $texthead = ''; |
| 2001 | 2001 | $texttail = ''; |
@@ -2007,13 +2007,13 @@ discard block |
||
| 2007 | 2007 | } |
| 2008 | 2008 | $rowdata->date_formatted = str_replace(' ', ' ', $rowdata->date_formatted); |
| 2009 | 2009 | $row->cells = array(); |
| 2010 | - $row->cells[] = $texthead . $rowdata->playback . $texttail; |
|
| 2011 | - $row->cells[] = $texthead . $rowdata->recording . $texttail; |
|
| 2012 | - $row->cells[] = $texthead . $rowdata->description . $texttail; |
|
| 2010 | + $row->cells[] = $texthead.$rowdata->playback.$texttail; |
|
| 2011 | + $row->cells[] = $texthead.$rowdata->recording.$texttail; |
|
| 2012 | + $row->cells[] = $texthead.$rowdata->description.$texttail; |
|
| 2013 | 2013 | if (bigbluebuttonbn_get_recording_data_preview_enabled($bbbsession)) { |
| 2014 | 2014 | $row->cells[] = $rowdata->preview; |
| 2015 | 2015 | } |
| 2016 | - $row->cells[] = $texthead . $rowdata->date_formatted . $texttail; |
|
| 2016 | + $row->cells[] = $texthead.$rowdata->date_formatted.$texttail; |
|
| 2017 | 2017 | $row->cells[] = $rowdata->duration_formatted; |
| 2018 | 2018 | if ($bbbsession['managerecordings']) { |
| 2019 | 2019 | $row->cells[] = $rowdata->actionbar; |
@@ -2143,7 +2143,7 @@ discard block |
||
| 2143 | 2143 | // Enqueue it. |
| 2144 | 2144 | \core\task\manager::queue_adhoc_task($task); |
| 2145 | 2145 | } catch (Exception $e) { |
| 2146 | - mtrace("Error while enqueuing completion_update_state task. " . (string) $e); |
|
| 2146 | + mtrace("Error while enqueuing completion_update_state task. ".(string) $e); |
|
| 2147 | 2147 | } |
| 2148 | 2148 | } |
| 2149 | 2149 | |
@@ -2213,7 +2213,7 @@ discard block |
||
| 2213 | 2213 | } |
| 2214 | 2214 | $coursesforselect = []; |
| 2215 | 2215 | foreach ($courses as $course) { |
| 2216 | - $coursesforselect[$course->id] = $course->fullname . " (" . $course->shortname . ")"; |
|
| 2216 | + $coursesforselect[$course->id] = $course->fullname." (".$course->shortname.")"; |
|
| 2217 | 2217 | } |
| 2218 | 2218 | return $coursesforselect; |
| 2219 | 2219 | } |
@@ -2311,17 +2311,17 @@ discard block |
||
| 2311 | 2311 | * @return string containing the sql used for getting the target bigbluebuttonbn instances |
| 2312 | 2312 | */ |
| 2313 | 2313 | function bigbluebuttonbn_get_recordings_deleted_sql_select($courseid = 0, $bigbluebuttonbnid = null, $subset = true) { |
| 2314 | - $sql = "log = '" . BIGBLUEBUTTONBN_LOG_EVENT_DELETE . "' AND meta like '%has_recordings%' AND meta like '%true%'"; |
|
| 2314 | + $sql = "log = '".BIGBLUEBUTTONBN_LOG_EVENT_DELETE."' AND meta like '%has_recordings%' AND meta like '%true%'"; |
|
| 2315 | 2315 | if (empty($courseid)) { |
| 2316 | 2316 | $courseid = 0; |
| 2317 | 2317 | } |
| 2318 | 2318 | if (empty($bigbluebuttonbnid)) { |
| 2319 | - return $sql . " AND courseid = {$courseid}"; |
|
| 2319 | + return $sql." AND courseid = {$courseid}"; |
|
| 2320 | 2320 | } |
| 2321 | 2321 | if ($subset) { |
| 2322 | - return $sql . " AND bigbluebuttonbnid = '{$bigbluebuttonbnid}'"; |
|
| 2322 | + return $sql." AND bigbluebuttonbnid = '{$bigbluebuttonbnid}'"; |
|
| 2323 | 2323 | } |
| 2324 | - return $sql . " AND courseid = {$courseid} AND bigbluebuttonbnid <> '{$bigbluebuttonbnid}'"; |
|
| 2324 | + return $sql." AND courseid = {$courseid} AND bigbluebuttonbnid <> '{$bigbluebuttonbnid}'"; |
|
| 2325 | 2325 | } |
| 2326 | 2326 | |
| 2327 | 2327 | /** |
@@ -2335,17 +2335,17 @@ discard block |
||
| 2335 | 2335 | * @return string containing the sql used for getting the target bigbluebuttonbn instances |
| 2336 | 2336 | */ |
| 2337 | 2337 | function bigbluebuttonbn_get_recordings_imported_sql_select($courseid = 0, $bigbluebuttonbnid = null, $subset = true) { |
| 2338 | - $sql = "log = '" . BIGBLUEBUTTONBN_LOG_EVENT_IMPORT . "'"; |
|
| 2338 | + $sql = "log = '".BIGBLUEBUTTONBN_LOG_EVENT_IMPORT."'"; |
|
| 2339 | 2339 | if (empty($courseid)) { |
| 2340 | 2340 | $courseid = 0; |
| 2341 | 2341 | } |
| 2342 | 2342 | if (empty($bigbluebuttonbnid)) { |
| 2343 | - return $sql . " AND courseid = '{$courseid}'"; |
|
| 2343 | + return $sql." AND courseid = '{$courseid}'"; |
|
| 2344 | 2344 | } |
| 2345 | 2345 | if ($subset) { |
| 2346 | - return $sql . " AND bigbluebuttonbnid = '{$bigbluebuttonbnid}'"; |
|
| 2346 | + return $sql." AND bigbluebuttonbnid = '{$bigbluebuttonbnid}'"; |
|
| 2347 | 2347 | } |
| 2348 | - return $sql . " AND courseid = '{$courseid}' AND bigbluebuttonbnid <> '{$bigbluebuttonbnid}'"; |
|
| 2348 | + return $sql." AND courseid = '{$courseid}' AND bigbluebuttonbnid <> '{$bigbluebuttonbnid}'"; |
|
| 2349 | 2349 | } |
| 2350 | 2350 | |
| 2351 | 2351 | /** |
@@ -2404,7 +2404,7 @@ discard block |
||
| 2404 | 2404 | } |
| 2405 | 2405 | // Prepare select for loading records based on existent bigbluebuttonbns. |
| 2406 | 2406 | $sql = 'SELECT DISTINCT meetingid, bigbluebuttonbnid FROM {bigbluebuttonbn_logs} WHERE '; |
| 2407 | - $sql .= '(bigbluebuttonbnid=' . implode(' OR bigbluebuttonbnid=', array_keys($bigbluebuttonbns)) . ')'; |
|
| 2407 | + $sql .= '(bigbluebuttonbnid='.implode(' OR bigbluebuttonbnid=', array_keys($bigbluebuttonbns)).')'; |
|
| 2408 | 2408 | // Include only Create events and exclude those with record not true. |
| 2409 | 2409 | $sql .= ' AND log = ? AND meta LIKE ? AND meta LIKE ?'; |
| 2410 | 2410 | // Execute select for loading records based on existent bigbluebuttonbns. |
@@ -2589,8 +2589,8 @@ discard block |
||
| 2589 | 2589 | require_once($CFG->dirroot.'/calendar/lib.php'); |
| 2590 | 2590 | $activitytime = ''; |
| 2591 | 2591 | if ($time) { |
| 2592 | - $activitytime = calendar_day_representation($time) . ' ' . |
|
| 2593 | - get_string('mod_form_field_notification_msg_at', 'bigbluebuttonbn') . ' ' . |
|
| 2592 | + $activitytime = calendar_day_representation($time).' '. |
|
| 2593 | + get_string('mod_form_field_notification_msg_at', 'bigbluebuttonbn').' '. |
|
| 2594 | 2594 | calendar_time_representation($time); |
| 2595 | 2595 | } |
| 2596 | 2596 | return $activitytime; |
@@ -3141,16 +3141,16 @@ discard block |
||
| 3141 | 3141 | return $output; |
| 3142 | 3142 | } |
| 3143 | 3143 | $output .= $OUTPUT->box_start( |
| 3144 | - 'box boxalignleft adminerror alert alert-' . $type . ' alert-block fade in', |
|
| 3144 | + 'box boxalignleft adminerror alert alert-'.$type.' alert-block fade in', |
|
| 3145 | 3145 | 'bigbluebuttonbn_view_general_warning' |
| 3146 | - ) . "\n"; |
|
| 3147 | - $output .= ' ' . $message . "\n"; |
|
| 3148 | - $output .= ' <div class="singlebutton pull-right">' . "\n"; |
|
| 3146 | + )."\n"; |
|
| 3147 | + $output .= ' '.$message."\n"; |
|
| 3148 | + $output .= ' <div class="singlebutton pull-right">'."\n"; |
|
| 3149 | 3149 | if (!empty($href)) { |
| 3150 | 3150 | $output .= bigbluebuttonbn_render_warning_button($href, $text, $class); |
| 3151 | 3151 | } |
| 3152 | - $output .= ' </div>' . "\n"; |
|
| 3153 | - $output .= $OUTPUT->box_end() . "\n"; |
|
| 3152 | + $output .= ' </div>'."\n"; |
|
| 3153 | + $output .= $OUTPUT->box_end()."\n"; |
|
| 3154 | 3154 | return $output; |
| 3155 | 3155 | } |
| 3156 | 3156 | |
@@ -3174,11 +3174,11 @@ discard block |
||
| 3174 | 3174 | if ($class == '') { |
| 3175 | 3175 | $class = 'btn btn-secondary'; |
| 3176 | 3176 | } |
| 3177 | - $output = ' <form method="post" action="' . $href . '" class="form-inline">' . "\n"; |
|
| 3178 | - $output .= ' <button type="submit" class="' . $class . '"' . "\n"; |
|
| 3179 | - $output .= ' title="' . $title . '"' . "\n"; |
|
| 3180 | - $output .= ' >' . $text . '</button>' . "\n"; |
|
| 3181 | - $output .= ' </form>' . "\n"; |
|
| 3177 | + $output = ' <form method="post" action="'.$href.'" class="form-inline">'."\n"; |
|
| 3178 | + $output .= ' <button type="submit" class="'.$class.'"'."\n"; |
|
| 3179 | + $output .= ' title="'.$title.'"'."\n"; |
|
| 3180 | + $output .= ' >'.$text.'</button>'."\n"; |
|
| 3181 | + $output .= ' </form>'."\n"; |
|
| 3182 | 3182 | return $output; |
| 3183 | 3183 | } |
| 3184 | 3184 | |
@@ -3242,7 +3242,7 @@ discard block |
||
| 3242 | 3242 | function bigbluebuttonbn_user_can_join_meeting($bigbluebuttonbn, $mid = null, $userid = null) { |
| 3243 | 3243 | // By default, use a meetingid without groups. |
| 3244 | 3244 | if (empty($mid)) { |
| 3245 | - $mid = $bigbluebuttonbn->meetingid . '-' . $bigbluebuttonbn->course . '-' . $bigbluebuttonbn->id; |
|
| 3245 | + $mid = $bigbluebuttonbn->meetingid.'-'.$bigbluebuttonbn->course.'-'.$bigbluebuttonbn->id; |
|
| 3246 | 3246 | } |
| 3247 | 3247 | // When meeting is running, all authorized users can join right in. |
| 3248 | 3248 | if (bigbluebuttonbn_is_meeting_running($mid)) { |
@@ -3311,7 +3311,7 @@ discard block |
||
| 3311 | 3311 | * @return boolean |
| 3312 | 3312 | */ |
| 3313 | 3313 | function bigbluebuttonbn_has_html5_client() { |
| 3314 | - $checkurl = \mod_bigbluebuttonbn\locallib\bigbluebutton::root() . "html5client/check"; |
|
| 3314 | + $checkurl = \mod_bigbluebuttonbn\locallib\bigbluebutton::root()."html5client/check"; |
|
| 3315 | 3315 | $curlinfo = bigbluebuttonbn_wrap_xml_load_file_curl_request($checkurl, 'HEAD'); |
| 3316 | 3316 | return (isset($curlinfo['http_code']) && $curlinfo['http_code'] == 200); |
| 3317 | 3317 | } |
@@ -3339,7 +3339,7 @@ discard block |
||
| 3339 | 3339 | $bbbsession['modPW'] = $bbbsession['bigbluebuttonbn']->moderatorpass; |
| 3340 | 3340 | $bbbsession['viewerPW'] = $bbbsession['bigbluebuttonbn']->viewerpass; |
| 3341 | 3341 | // Database info related to the activity. |
| 3342 | - $bbbsession['meetingid'] = $bbbsession['bigbluebuttonbn']->meetingid . '-' . $bbbsession['course']->id . '-' . |
|
| 3342 | + $bbbsession['meetingid'] = $bbbsession['bigbluebuttonbn']->meetingid.'-'.$bbbsession['course']->id.'-'. |
|
| 3343 | 3343 | $bbbsession['bigbluebuttonbn']->id; |
| 3344 | 3344 | $bbbsession['meetingname'] = $bbbsession['bigbluebuttonbn']->name; |
| 3345 | 3345 | $bbbsession['meetingdescription'] = $bbbsession['bigbluebuttonbn']->intro; |
@@ -3369,12 +3369,12 @@ discard block |
||
| 3369 | 3369 | if ($bbbsession['bigbluebuttonbn']->record) { |
| 3370 | 3370 | // Check if is enable record all from start. |
| 3371 | 3371 | if ($bbbsession['recordallfromstart']) { |
| 3372 | - $bbbsession['welcome'] .= '<br><br>' . get_string( |
|
| 3372 | + $bbbsession['welcome'] .= '<br><br>'.get_string( |
|
| 3373 | 3373 | 'bbbrecordallfromstartwarning', |
| 3374 | 3374 | 'bigbluebuttonbn' |
| 3375 | 3375 | ); |
| 3376 | 3376 | } else { |
| 3377 | - $bbbsession['welcome'] .= '<br><br>' . get_string('bbbrecordwarning', 'bigbluebuttonbn'); |
|
| 3377 | + $bbbsession['welcome'] .= '<br><br>'.get_string('bbbrecordwarning', 'bigbluebuttonbn'); |
|
| 3378 | 3378 | } |
| 3379 | 3379 | } |
| 3380 | 3380 | $bbbsession['openingtime'] = $bbbsession['bigbluebuttonbn']->openingtime; |
@@ -3389,7 +3389,7 @@ discard block |
||
| 3389 | 3389 | $bbbsession['originServerName'] = $parsedurl['host']; |
| 3390 | 3390 | $bbbsession['originServerUrl'] = $CFG->wwwroot; |
| 3391 | 3391 | $bbbsession['originServerCommonName'] = ''; |
| 3392 | - $bbbsession['originTag'] = 'moodle-mod_bigbluebuttonbn (' . get_config('mod_bigbluebuttonbn', 'version') . ')'; |
|
| 3392 | + $bbbsession['originTag'] = 'moodle-mod_bigbluebuttonbn ('.get_config('mod_bigbluebuttonbn', 'version').')'; |
|
| 3393 | 3393 | $bbbsession['bnserver'] = bigbluebuttonbn_is_bn_server(); |
| 3394 | 3394 | // Setting for clienttype, assign flash if not enabled, or default if not editable. |
| 3395 | 3395 | $bbbsession['clienttype'] = BIGBLUEBUTTON_CLIENTTYPE_FLASH; |
@@ -3496,7 +3496,7 @@ discard block |
||
| 3496 | 3496 | if ((boolean) \mod_bigbluebuttonbn\locallib\config::get('recordingstatus_enabled')) { |
| 3497 | 3497 | $metadata["bn-recording-status"] = json_encode( |
| 3498 | 3498 | array( |
| 3499 | - 'email' => array('"' . fullname($USER) . '" <' . $USER->email . '>'), |
|
| 3499 | + 'email' => array('"'.fullname($USER).'" <'.$USER->email.'>'), |
|
| 3500 | 3500 | 'context' => $bbbsession['bigbluebuttonbnURL'], |
| 3501 | 3501 | ) |
| 3502 | 3502 | ); |