@@ -85,7 +85,7 @@ discard block |
||
| 85 | 85 | return; |
| 86 | 86 | } |
| 87 | 87 | echo $OUTPUT->box_start('generalbox boxaligncenter'); |
| 88 | - echo '<br><div class="alert alert-' . $type . '">' . $message . '</div>'; |
|
| 88 | + echo '<br><div class="alert alert-'.$type.'">'.$message.'</div>'; |
|
| 89 | 89 | echo $OUTPUT->box_end(); |
| 90 | 90 | } |
| 91 | 91 | |
@@ -104,7 +104,7 @@ discard block |
||
| 104 | 104 | } |
| 105 | 105 | $typeprofiles = bigbluebuttonbn_get_instance_type_profiles(); |
| 106 | 106 | $enabledfeatures = bigbluebuttonbn_get_enabled_features($typeprofiles, $type); |
| 107 | - $pinginterval = (int)\mod_bigbluebuttonbn\locallib\config::get('waitformoderator_ping_interval') * 1000; |
|
| 107 | + $pinginterval = (int) \mod_bigbluebuttonbn\locallib\config::get('waitformoderator_ping_interval') * 1000; |
|
| 108 | 108 | // JavaScript for locales. |
| 109 | 109 | $PAGE->requires->strings_for_js(array_keys(bigbluebuttonbn_get_strings_for_js()), 'bigbluebuttonbn'); |
| 110 | 110 | // JavaScript variables. |
@@ -375,10 +375,10 @@ discard block |
||
| 375 | 375 | return ''; |
| 376 | 376 | } |
| 377 | 377 | return bigbluebuttonbn_render_warning( |
| 378 | - (string)\mod_bigbluebuttonbn\locallib\config::get('general_warning_message'), |
|
| 379 | - (string)\mod_bigbluebuttonbn\locallib\config::get('general_warning_box_type'), |
|
| 380 | - (string)\mod_bigbluebuttonbn\locallib\config::get('general_warning_button_href'), |
|
| 381 | - (string)\mod_bigbluebuttonbn\locallib\config::get('general_warning_button_text'), |
|
| 382 | - (string)\mod_bigbluebuttonbn\locallib\config::get('general_warning_button_class') |
|
| 378 | + (string) \mod_bigbluebuttonbn\locallib\config::get('general_warning_message'), |
|
| 379 | + (string) \mod_bigbluebuttonbn\locallib\config::get('general_warning_box_type'), |
|
| 380 | + (string) \mod_bigbluebuttonbn\locallib\config::get('general_warning_button_href'), |
|
| 381 | + (string) \mod_bigbluebuttonbn\locallib\config::get('general_warning_button_text'), |
|
| 382 | + (string) \mod_bigbluebuttonbn\locallib\config::get('general_warning_button_class') |
|
| 383 | 383 | ); |
| 384 | 384 | } |
@@ -27,7 +27,7 @@ discard block |
||
| 27 | 27 | |
| 28 | 28 | defined('MOODLE_INTERNAL') || die(); |
| 29 | 29 | |
| 30 | -require_once($CFG->dirroot . '/mod/bigbluebuttonbn/locallib.php'); |
|
| 30 | +require_once($CFG->dirroot.'/mod/bigbluebuttonbn/locallib.php'); |
|
| 31 | 31 | |
| 32 | 32 | /** |
| 33 | 33 | * Wrapper for executing http requests on a BigBlueButton server. |
@@ -46,18 +46,18 @@ discard block |
||
| 46 | 46 | * @return string |
| 47 | 47 | */ |
| 48 | 48 | public static function action_url($action = '', $data = array(), $metadata = array()) { |
| 49 | - $baseurl = self::sanitized_url() . $action . '?'; |
|
| 49 | + $baseurl = self::sanitized_url().$action.'?'; |
|
| 50 | 50 | $metadata = array_combine( |
| 51 | 51 | array_map( |
| 52 | 52 | function($k) { |
| 53 | - return 'meta_' . $k; |
|
| 53 | + return 'meta_'.$k; |
|
| 54 | 54 | } |
| 55 | 55 | , array_keys($metadata) |
| 56 | 56 | ), |
| 57 | 57 | $metadata |
| 58 | 58 | ); |
| 59 | 59 | $params = http_build_query($data + $metadata, '', '&'); |
| 60 | - return $baseurl . $params . '&checksum=' . sha1($action . $params . self::sanitized_secret()); |
|
| 60 | + return $baseurl.$params.'&checksum='.sha1($action.$params.self::sanitized_secret()); |
|
| 61 | 61 | } |
| 62 | 62 | |
| 63 | 63 | /** |
@@ -73,7 +73,7 @@ discard block |
||
| 73 | 73 | if (substr($serverurl, -4) == '/api') { |
| 74 | 74 | $serverurl = rtrim($serverurl, '/api'); |
| 75 | 75 | } |
| 76 | - return $serverurl . '/api/'; |
|
| 76 | + return $serverurl.'/api/'; |
|
| 77 | 77 | } |
| 78 | 78 | |
| 79 | 79 | /** |
@@ -94,8 +94,8 @@ discard block |
||
| 94 | 94 | $pserverurl = parse_url(trim(\mod_bigbluebuttonbn\locallib\config::get('server_url'))); |
| 95 | 95 | $pserverurlport = ""; |
| 96 | 96 | if (isset($pserverurl['port'])) { |
| 97 | - $pserverurlport = ":" . $pserverurl['port']; |
|
| 97 | + $pserverurlport = ":".$pserverurl['port']; |
|
| 98 | 98 | } |
| 99 | - return $pserverurl['scheme'] . "://" . $pserverurl['host'] . $pserverurlport . "/"; |
|
| 99 | + return $pserverurl['scheme']."://".$pserverurl['host'].$pserverurlport."/"; |
|
| 100 | 100 | } |
| 101 | 101 | } |
@@ -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; |
@@ -145,8 +145,8 @@ discard block |
||
| 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 |
||
| 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 |
||
| 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 |
||
| 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 |
||
| 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; |
@@ -586,7 +586,7 @@ discard block |
||
| 586 | 586 | */ |
| 587 | 587 | function bigbluebuttonbn_wrap_xml_load_file_curl_request($url, $method = 'GET', $data = null, $contenttype = 'text/xml') { |
| 588 | 588 | global $CFG; |
| 589 | - require_once($CFG->libdir . '/filelib.php'); |
|
| 589 | + require_once($CFG->libdir.'/filelib.php'); |
|
| 590 | 590 | $c = new curl(); |
| 591 | 591 | $c->setopt(array('SSL_VERIFYPEER' => true)); |
| 592 | 592 | if ($method == 'POST') { |
@@ -595,8 +595,8 @@ discard block |
||
| 595 | 595 | } |
| 596 | 596 | $options = array(); |
| 597 | 597 | $options['CURLOPT_HTTPHEADER'] = array( |
| 598 | - 'Content-Type: ' . $contenttype, |
|
| 599 | - 'Content-Length: ' . strlen($data), |
|
| 598 | + 'Content-Type: '.$contenttype, |
|
| 599 | + 'Content-Length: '.strlen($data), |
|
| 600 | 600 | 'Content-Language: en-US', |
| 601 | 601 | ); |
| 602 | 602 | |
@@ -617,7 +617,7 @@ discard block |
||
| 617 | 617 | * @return void |
| 618 | 618 | */ |
| 619 | 619 | function bigbluebuttonbn_end_meeting_if_running($bigbluebuttonbn) { |
| 620 | - $meetingid = $bigbluebuttonbn->meetingid . '-' . $bigbluebuttonbn->course . '-' . $bigbluebuttonbn->id; |
|
| 620 | + $meetingid = $bigbluebuttonbn->meetingid.'-'.$bigbluebuttonbn->course.'-'.$bigbluebuttonbn->id; |
|
| 621 | 621 | if (bigbluebuttonbn_is_meeting_running($meetingid)) { |
| 622 | 622 | bigbluebuttonbn_end_meeting($meetingid, $bigbluebuttonbn->moderatorpass); |
| 623 | 623 | } |
@@ -637,9 +637,9 @@ discard block |
||
| 637 | 637 | if ($userroles) { |
| 638 | 638 | $where = ''; |
| 639 | 639 | foreach ($userroles as $userrole) { |
| 640 | - $where .= (empty($where) ? ' WHERE' : ' OR') . ' id=' . $userrole->roleid; |
|
| 640 | + $where .= (empty($where) ? ' WHERE' : ' OR').' id='.$userrole->roleid; |
|
| 641 | 641 | } |
| 642 | - $userroles = $DB->get_records_sql('SELECT * FROM {role}' . $where); |
|
| 642 | + $userroles = $DB->get_records_sql('SELECT * FROM {role}'.$where); |
|
| 643 | 643 | } |
| 644 | 644 | return $userroles; |
| 645 | 645 | } |
@@ -984,9 +984,9 @@ discard block |
||
| 984 | 984 | if ($voicebridge == 0) { |
| 985 | 985 | return true; |
| 986 | 986 | } |
| 987 | - $select = 'voicebridge = ' . $voicebridge; |
|
| 987 | + $select = 'voicebridge = '.$voicebridge; |
|
| 988 | 988 | if ($instance != 0) { |
| 989 | - $select .= ' AND id <>' . $instance; |
|
| 989 | + $select .= ' AND id <>'.$instance; |
|
| 990 | 990 | } |
| 991 | 991 | if (!$DB->get_records_select('bigbluebuttonbn', $select)) { |
| 992 | 992 | return true; |
@@ -1122,7 +1122,7 @@ discard block |
||
| 1122 | 1122 | function bigbluebuttonbn_generate_nonce() { |
| 1123 | 1123 | $mt = microtime(); |
| 1124 | 1124 | $rand = mt_rand(); |
| 1125 | - return md5($mt . $rand); |
|
| 1125 | + return md5($mt.$rand); |
|
| 1126 | 1126 | } |
| 1127 | 1127 | |
| 1128 | 1128 | /** |
@@ -1170,7 +1170,7 @@ discard block |
||
| 1170 | 1170 | $params['other'] = $options['other']; |
| 1171 | 1171 | } |
| 1172 | 1172 | $event = call_user_func_array( |
| 1173 | - '\mod_bigbluebuttonbn\event\\' . $type . '::create', |
|
| 1173 | + '\mod_bigbluebuttonbn\event\\'.$type.'::create', |
|
| 1174 | 1174 | array($params) |
| 1175 | 1175 | ); |
| 1176 | 1176 | $event->add_record_snapshot('course_modules', $cm); |
@@ -1328,7 +1328,7 @@ discard block |
||
| 1328 | 1328 | * @return object |
| 1329 | 1329 | */ |
| 1330 | 1330 | function bigbluebuttonbn_set_config_xml($meetingid, $configxml) { |
| 1331 | - $urldefaultconfig = \mod_bigbluebuttonbn\locallib\config::get('server_url') . 'api/setConfigXML?'; |
|
| 1331 | + $urldefaultconfig = \mod_bigbluebuttonbn\locallib\config::get('server_url').'api/setConfigXML?'; |
|
| 1332 | 1332 | $configxmlparams = bigbluebuttonbn_set_config_xml_params($meetingid, $configxml); |
| 1333 | 1333 | $xml = bigbluebuttonbn_wrap_xml_load_file( |
| 1334 | 1334 | $urldefaultconfig, |
@@ -1348,9 +1348,9 @@ discard block |
||
| 1348 | 1348 | * @return string |
| 1349 | 1349 | */ |
| 1350 | 1350 | function bigbluebuttonbn_set_config_xml_params($meetingid, $configxml) { |
| 1351 | - $params = 'configXML=' . urlencode($configxml) . '&meetingID=' . urlencode($meetingid); |
|
| 1351 | + $params = 'configXML='.urlencode($configxml).'&meetingID='.urlencode($meetingid); |
|
| 1352 | 1352 | $sharedsecret = \mod_bigbluebuttonbn\locallib\config::get('shared_secret'); |
| 1353 | - $configxmlparams = $params . '&checksum=' . sha1('setConfigXML' . $params . $sharedsecret); |
|
| 1353 | + $configxmlparams = $params.'&checksum='.sha1('setConfigXML'.$params.$sharedsecret); |
|
| 1354 | 1354 | return $configxmlparams; |
| 1355 | 1355 | } |
| 1356 | 1356 | |
@@ -1456,7 +1456,7 @@ discard block |
||
| 1456 | 1456 | global $USER; |
| 1457 | 1457 | $starttime = $starttime - ($starttime % 1000); |
| 1458 | 1458 | // Set formatted date. |
| 1459 | - $dateformat = get_string('strftimerecentfull', 'langconfig') . ' %Z'; |
|
| 1459 | + $dateformat = get_string('strftimerecentfull', 'langconfig').' %Z'; |
|
| 1460 | 1460 | return userdate($starttime / 1000, $dateformat, usertimezone($USER->timezone)); |
| 1461 | 1461 | } |
| 1462 | 1462 | |
@@ -1504,11 +1504,11 @@ discard block |
||
| 1504 | 1504 | $actionbar .= bigbluebuttonbn_actionbar_render_button($recording, $buttonpayload); |
| 1505 | 1505 | } |
| 1506 | 1506 | $head = html_writer::start_tag('div', array( |
| 1507 | - 'id' => 'recording-actionbar-' . $recording['recordID'], |
|
| 1507 | + 'id' => 'recording-actionbar-'.$recording['recordID'], |
|
| 1508 | 1508 | 'data-recordingid' => $recording['recordID'], |
| 1509 | 1509 | 'data-meetingid' => $recording['meetingID'])); |
| 1510 | 1510 | $tail = html_writer::end_tag('div'); |
| 1511 | - return $head . $actionbar . $tail; |
|
| 1511 | + return $head.$actionbar.$tail; |
|
| 1512 | 1512 | } |
| 1513 | 1513 | |
| 1514 | 1514 | /** |
@@ -1572,7 +1572,7 @@ discard block |
||
| 1572 | 1572 | * @return string |
| 1573 | 1573 | */ |
| 1574 | 1574 | function bigbluebuttonbn_get_recording_data_row_preview($recording) { |
| 1575 | - $options = array('id' => 'preview-' . $recording['recordID']); |
|
| 1575 | + $options = array('id' => 'preview-'.$recording['recordID']); |
|
| 1576 | 1576 | if ($recording['published'] === 'false') { |
| 1577 | 1577 | $options['hidden'] = 'hidden'; |
| 1578 | 1578 | } |
@@ -1604,7 +1604,7 @@ discard block |
||
| 1604 | 1604 | $recordingpreview .= html_writer::start_tag('div', array('class' => '')); |
| 1605 | 1605 | $recordingpreview .= html_writer::empty_tag( |
| 1606 | 1606 | 'img', |
| 1607 | - array('src' => trim($image['url']) . '?' . time(), 'class' => 'recording-thumbnail pull-left') |
|
| 1607 | + array('src' => trim($image['url']).'?'.time(), 'class' => 'recording-thumbnail pull-left') |
|
| 1608 | 1608 | ); |
| 1609 | 1609 | $recordingpreview .= html_writer::end_tag('div'); |
| 1610 | 1610 | } |
@@ -1639,7 +1639,7 @@ discard block |
||
| 1639 | 1639 | if ($recording['published'] === 'false') { |
| 1640 | 1640 | $visibility = 'hidden '; |
| 1641 | 1641 | } |
| 1642 | - $id = 'playbacks-' . $recording['recordID']; |
|
| 1642 | + $id = 'playbacks-'.$recording['recordID']; |
|
| 1643 | 1643 | $recordingtypes = html_writer::start_tag('div', array('id' => $id, 'data-imported' => $dataimported, |
| 1644 | 1644 | 'data-meetingid' => $recording['meetingID'], 'data-recordingid' => $recording['recordID'], |
| 1645 | 1645 | 'title' => $title, $visibility => $visibility)); |
@@ -1665,13 +1665,13 @@ discard block |
||
| 1665 | 1665 | return ''; |
| 1666 | 1666 | } |
| 1667 | 1667 | $text = bigbluebuttonbn_get_recording_type_text($playback['type']); |
| 1668 | - $href = $CFG->wwwroot . '/mod/bigbluebuttonbn/bbb_view.php?action=play&bn=' . $bbbsession['bigbluebuttonbn']->id . |
|
| 1669 | - '&mid=' . $recording['meetingID'] . '&rid=' . $recording['recordID'] . '&rtype=' . $playback['type']; |
|
| 1668 | + $href = $CFG->wwwroot.'/mod/bigbluebuttonbn/bbb_view.php?action=play&bn='.$bbbsession['bigbluebuttonbn']->id. |
|
| 1669 | + '&mid='.$recording['meetingID'].'&rid='.$recording['recordID'].'&rtype='.$playback['type']; |
|
| 1670 | 1670 | if (!isset($recording['imported']) || !isset($recording['protected']) || $recording['protected'] === 'false') { |
| 1671 | - $href .= '&href=' . urlencode(trim($playback['url'])); |
|
| 1671 | + $href .= '&href='.urlencode(trim($playback['url'])); |
|
| 1672 | 1672 | } |
| 1673 | 1673 | $linkattributes = array( |
| 1674 | - 'id' => 'recording-play-' . $playback['type'] . '-' . $recording['recordID'], |
|
| 1674 | + 'id' => 'recording-play-'.$playback['type'].'-'.$recording['recordID'], |
|
| 1675 | 1675 | 'class' => 'btn btn-sm btn-default', |
| 1676 | 1676 | 'onclick' => 'M.mod_bigbluebuttonbn.recordings.recordingPlay(this);', |
| 1677 | 1677 | 'data-action' => 'play', |
@@ -1683,7 +1683,7 @@ discard block |
||
| 1683 | 1683 | $linkattributes['title'] = get_string('view_recording_format_errror_unreachable', 'bigbluebuttonbn'); |
| 1684 | 1684 | unset($linkattributes['data-href']); |
| 1685 | 1685 | } |
| 1686 | - return $OUTPUT->action_link('#', $text, null, $linkattributes) . ' '; |
|
| 1686 | + return $OUTPUT->action_link('#', $text, null, $linkattributes).' '; |
|
| 1687 | 1687 | } |
| 1688 | 1688 | |
| 1689 | 1689 | /** |
@@ -1696,7 +1696,7 @@ discard block |
||
| 1696 | 1696 | function bigbluebuttonbn_get_recording_type_text($playbacktype) { |
| 1697 | 1697 | // Check first if string exists, and if it does'nt just default to the capitalised version of the string. |
| 1698 | 1698 | $text = ucwords($playbacktype); |
| 1699 | - $typestringid = 'view_recording_format_' . $playbacktype; |
|
| 1699 | + $typestringid = 'view_recording_format_'.$playbacktype; |
|
| 1700 | 1700 | if (get_string_manager()->string_exists($typestringid, 'bigbluebuttonbn')) { |
| 1701 | 1701 | $text = get_string($typestringid, 'bigbluebuttonbn'); |
| 1702 | 1702 | } |
@@ -1726,7 +1726,7 @@ discard block |
||
| 1726 | 1726 | $validatedurls[$urlhost] = true; |
| 1727 | 1727 | $curlinfo = bigbluebuttonbn_wrap_xml_load_file_curl_request($url, 'HEAD'); |
| 1728 | 1728 | if (!isset($curlinfo['http_code']) || $curlinfo['http_code'] != 200) { |
| 1729 | - $error = "Resources hosted by " . $urlhost . " are unreachable. Server responded with code " . $curlinfo['http_code']; |
|
| 1729 | + $error = "Resources hosted by ".$urlhost." are unreachable. Server responded with code ".$curlinfo['http_code']; |
|
| 1730 | 1730 | debugging($error, DEBUG_DEVELOPER); |
| 1731 | 1731 | $validatedurls[$urlhost] = false; |
| 1732 | 1732 | } |
@@ -1817,12 +1817,12 @@ discard block |
||
| 1817 | 1817 | * @return string |
| 1818 | 1818 | */ |
| 1819 | 1819 | function bigbluebuttonbn_get_recording_data_row_text($recording, $text, $source, $data) { |
| 1820 | - $htmltext = '<span>' . htmlentities($text) . '</span>'; |
|
| 1820 | + $htmltext = '<span>'.htmlentities($text).'</span>'; |
|
| 1821 | 1821 | if (empty($data)) { |
| 1822 | 1822 | return $htmltext; |
| 1823 | 1823 | } |
| 1824 | - $target = $data['action'] . '-' . $data['target']; |
|
| 1825 | - $id = 'recording-' . $target . '-' . $data['recordingid']; |
|
| 1824 | + $target = $data['action'].'-'.$data['target']; |
|
| 1825 | + $id = 'recording-'.$target.'-'.$data['recordingid']; |
|
| 1826 | 1826 | $attributes = array('id' => $id, 'class' => 'quickeditlink col-md-20', |
| 1827 | 1827 | 'data-recordingid' => $data['recordingid'], 'data-meetingid' => $data['meetingid'], |
| 1828 | 1828 | 'data-target' => $data['target'], 'data-source' => $source); |
@@ -1830,7 +1830,7 @@ discard block |
||
| 1830 | 1830 | $tail = html_writer::end_tag('div'); |
| 1831 | 1831 | $payload = array('action' => $data['action'], 'tag' => $data['tag'], 'target' => $data['target']); |
| 1832 | 1832 | $htmllink = bigbluebuttonbn_actionbar_render_button($recording, $payload); |
| 1833 | - return $head . $htmltext . $htmllink . $tail; |
|
| 1833 | + return $head.$htmltext.$htmllink.$tail; |
|
| 1834 | 1834 | } |
| 1835 | 1835 | |
| 1836 | 1836 | /** |
@@ -1848,10 +1848,10 @@ discard block |
||
| 1848 | 1848 | } |
| 1849 | 1849 | $target = $data['action']; |
| 1850 | 1850 | if (isset($data['target'])) { |
| 1851 | - $target .= '-' . $data['target']; |
|
| 1851 | + $target .= '-'.$data['target']; |
|
| 1852 | 1852 | } |
| 1853 | - $id = 'recording-' . $target . '-' . $recording['recordID']; |
|
| 1854 | - $onclick = 'M.mod_bigbluebuttonbn.recordings.recording' . ucfirst($data['action']) . '(this); return false;'; |
|
| 1853 | + $id = 'recording-'.$target.'-'.$recording['recordID']; |
|
| 1854 | + $onclick = 'M.mod_bigbluebuttonbn.recordings.recording'.ucfirst($data['action']).'(this); return false;'; |
|
| 1855 | 1855 | if ((boolean) \mod_bigbluebuttonbn\locallib\config::get('recording_icons_enabled')) { |
| 1856 | 1856 | // With icon for $manageaction. |
| 1857 | 1857 | $iconattributes = array('id' => $id, 'class' => 'iconsmall'); |
@@ -1866,13 +1866,13 @@ discard block |
||
| 1866 | 1866 | ); |
| 1867 | 1867 | } |
| 1868 | 1868 | if (isset($data['disabled'])) { |
| 1869 | - $iconattributes['class'] .= ' fa-' . $data['disabled']; |
|
| 1869 | + $iconattributes['class'] .= ' fa-'.$data['disabled']; |
|
| 1870 | 1870 | $linkattributes['class'] = 'disabled'; |
| 1871 | 1871 | unset($linkattributes['onclick']); |
| 1872 | 1872 | } |
| 1873 | 1873 | $icon = new pix_icon( |
| 1874 | - 'i/' . $data['tag'], |
|
| 1875 | - get_string('view_recording_list_actionbar_' . $data['action'], 'bigbluebuttonbn'), |
|
| 1874 | + 'i/'.$data['tag'], |
|
| 1875 | + get_string('view_recording_list_actionbar_'.$data['action'], 'bigbluebuttonbn'), |
|
| 1876 | 1876 | 'moodle', |
| 1877 | 1877 | $iconattributes |
| 1878 | 1878 | ); |
@@ -1912,7 +1912,7 @@ discard block |
||
| 1912 | 1912 | if ($bbbsession['managerecordings']) { |
| 1913 | 1913 | $table->head[] = get_string('view_recording_actionbar', 'bigbluebuttonbn'); |
| 1914 | 1914 | $table->align[] = 'left'; |
| 1915 | - $table->size[] = (count($tools) * 40) . 'px'; |
|
| 1915 | + $table->size[] = (count($tools) * 40).'px'; |
|
| 1916 | 1916 | } |
| 1917 | 1917 | // Get the groups of the user. |
| 1918 | 1918 | $usergroups = groups_get_all_groups($bbbsession['course']->id, $bbbsession['userID']); |
@@ -1967,7 +1967,7 @@ discard block |
||
| 1967 | 1967 | */ |
| 1968 | 1968 | function bigbluebuttonbn_get_recording_table_row($bbbsession, $recording, $rowdata) { |
| 1969 | 1969 | $row = new html_table_row(); |
| 1970 | - $row->id = 'recording-tr-' . $recording['recordID']; |
|
| 1970 | + $row->id = 'recording-tr-'.$recording['recordID']; |
|
| 1971 | 1971 | $row->attributes['data-imported'] = 'false'; |
| 1972 | 1972 | $texthead = ''; |
| 1973 | 1973 | $texttail = ''; |
@@ -1979,13 +1979,13 @@ discard block |
||
| 1979 | 1979 | } |
| 1980 | 1980 | $rowdata->date_formatted = str_replace(' ', ' ', $rowdata->date_formatted); |
| 1981 | 1981 | $row->cells = array(); |
| 1982 | - $row->cells[] = $texthead . $rowdata->playback . $texttail; |
|
| 1983 | - $row->cells[] = $texthead . $rowdata->recording . $texttail; |
|
| 1984 | - $row->cells[] = $texthead . $rowdata->description . $texttail; |
|
| 1982 | + $row->cells[] = $texthead.$rowdata->playback.$texttail; |
|
| 1983 | + $row->cells[] = $texthead.$rowdata->recording.$texttail; |
|
| 1984 | + $row->cells[] = $texthead.$rowdata->description.$texttail; |
|
| 1985 | 1985 | if (bigbluebuttonbn_get_recording_data_preview_enabled($bbbsession)) { |
| 1986 | 1986 | $row->cells[] = $rowdata->preview; |
| 1987 | 1987 | } |
| 1988 | - $row->cells[] = $texthead . $rowdata->date_formatted . $texttail; |
|
| 1988 | + $row->cells[] = $texthead.$rowdata->date_formatted.$texttail; |
|
| 1989 | 1989 | $row->cells[] = $rowdata->duration_formatted; |
| 1990 | 1990 | if ($bbbsession['managerecordings']) { |
| 1991 | 1991 | $row->cells[] = $rowdata->actionbar; |
@@ -2111,7 +2111,7 @@ discard block |
||
| 2111 | 2111 | // Enqueue it. |
| 2112 | 2112 | \core\task\manager::queue_adhoc_task($task); |
| 2113 | 2113 | } catch (Exception $e) { |
| 2114 | - mtrace("Error while enqueuing completion_update_state task. " . (string) $e); |
|
| 2114 | + mtrace("Error while enqueuing completion_update_state task. ".(string) $e); |
|
| 2115 | 2115 | } |
| 2116 | 2116 | } |
| 2117 | 2117 | |
@@ -2279,17 +2279,17 @@ discard block |
||
| 2279 | 2279 | * @return string containing the sql used for getting the target bigbluebuttonbn instances |
| 2280 | 2280 | */ |
| 2281 | 2281 | function bigbluebuttonbn_get_recordings_deleted_sql_select($courseid = 0, $bigbluebuttonbnid = null, $subset = true) { |
| 2282 | - $sql = "log = '" . BIGBLUEBUTTONBN_LOG_EVENT_DELETE . "' AND meta like '%has_recordings%' AND meta like '%true%'"; |
|
| 2282 | + $sql = "log = '".BIGBLUEBUTTONBN_LOG_EVENT_DELETE."' AND meta like '%has_recordings%' AND meta like '%true%'"; |
|
| 2283 | 2283 | if (empty($courseid)) { |
| 2284 | 2284 | $courseid = 0; |
| 2285 | 2285 | } |
| 2286 | 2286 | if (empty($bigbluebuttonbnid)) { |
| 2287 | - return $sql . " AND courseid = {$courseid}"; |
|
| 2287 | + return $sql." AND courseid = {$courseid}"; |
|
| 2288 | 2288 | } |
| 2289 | 2289 | if ($subset) { |
| 2290 | - return $sql . " AND bigbluebuttonbnid = '{$bigbluebuttonbnid}'"; |
|
| 2290 | + return $sql." AND bigbluebuttonbnid = '{$bigbluebuttonbnid}'"; |
|
| 2291 | 2291 | } |
| 2292 | - return $sql . " AND courseid = {$courseid} AND bigbluebuttonbnid <> '{$bigbluebuttonbnid}'"; |
|
| 2292 | + return $sql." AND courseid = {$courseid} AND bigbluebuttonbnid <> '{$bigbluebuttonbnid}'"; |
|
| 2293 | 2293 | } |
| 2294 | 2294 | |
| 2295 | 2295 | /** |
@@ -2303,17 +2303,17 @@ discard block |
||
| 2303 | 2303 | * @return string containing the sql used for getting the target bigbluebuttonbn instances |
| 2304 | 2304 | */ |
| 2305 | 2305 | function bigbluebuttonbn_get_recordings_imported_sql_select($courseid = 0, $bigbluebuttonbnid = null, $subset = true) { |
| 2306 | - $sql = "log = '" . BIGBLUEBUTTONBN_LOG_EVENT_IMPORT . "'"; |
|
| 2306 | + $sql = "log = '".BIGBLUEBUTTONBN_LOG_EVENT_IMPORT."'"; |
|
| 2307 | 2307 | if (empty($courseid)) { |
| 2308 | 2308 | $courseid = 0; |
| 2309 | 2309 | } |
| 2310 | 2310 | if (empty($bigbluebuttonbnid)) { |
| 2311 | - return $sql . " AND courseid = '{$courseid}'"; |
|
| 2311 | + return $sql." AND courseid = '{$courseid}'"; |
|
| 2312 | 2312 | } |
| 2313 | 2313 | if ($subset) { |
| 2314 | - return $sql . " AND bigbluebuttonbnid = '{$bigbluebuttonbnid}'"; |
|
| 2314 | + return $sql." AND bigbluebuttonbnid = '{$bigbluebuttonbnid}'"; |
|
| 2315 | 2315 | } |
| 2316 | - return $sql . " AND courseid = '{$courseid}' AND bigbluebuttonbnid <> '{$bigbluebuttonbnid}'"; |
|
| 2316 | + return $sql." AND courseid = '{$courseid}' AND bigbluebuttonbnid <> '{$bigbluebuttonbnid}'"; |
|
| 2317 | 2317 | } |
| 2318 | 2318 | |
| 2319 | 2319 | /** |
@@ -2372,7 +2372,7 @@ discard block |
||
| 2372 | 2372 | } |
| 2373 | 2373 | // Prepare select for loading records based on existent bigbluebuttonbns. |
| 2374 | 2374 | $sql = 'SELECT DISTINCT meetingid, bigbluebuttonbnid FROM {bigbluebuttonbn_logs} WHERE '; |
| 2375 | - $sql .= '(bigbluebuttonbnid=' . implode(' OR bigbluebuttonbnid=', array_keys($bigbluebuttonbns)) . ')'; |
|
| 2375 | + $sql .= '(bigbluebuttonbnid='.implode(' OR bigbluebuttonbnid=', array_keys($bigbluebuttonbns)).')'; |
|
| 2376 | 2376 | // Include only Create events and exclude those with record not true. |
| 2377 | 2377 | $sql .= ' AND log = ? AND meta LIKE ? AND meta LIKE ?'; |
| 2378 | 2378 | // Execute select for loading records based on existent bigbluebuttonbns. |
@@ -2557,8 +2557,8 @@ discard block |
||
| 2557 | 2557 | require_once($CFG->dirroot.'/calendar/lib.php'); |
| 2558 | 2558 | $activitytime = ''; |
| 2559 | 2559 | if ($time) { |
| 2560 | - $activitytime = calendar_day_representation($time) . ' ' . |
|
| 2561 | - get_string('mod_form_field_notification_msg_at', 'bigbluebuttonbn') . ' ' . |
|
| 2560 | + $activitytime = calendar_day_representation($time).' '. |
|
| 2561 | + get_string('mod_form_field_notification_msg_at', 'bigbluebuttonbn').' '. |
|
| 2562 | 2562 | calendar_time_representation($time); |
| 2563 | 2563 | } |
| 2564 | 2564 | return $activitytime; |
@@ -3107,16 +3107,16 @@ discard block |
||
| 3107 | 3107 | return $output; |
| 3108 | 3108 | } |
| 3109 | 3109 | $output .= $OUTPUT->box_start( |
| 3110 | - 'box boxalignleft adminerror alert alert-' . $type . ' alert-block fade in', |
|
| 3110 | + 'box boxalignleft adminerror alert alert-'.$type.' alert-block fade in', |
|
| 3111 | 3111 | 'bigbluebuttonbn_view_general_warning' |
| 3112 | - ) . "\n"; |
|
| 3113 | - $output .= ' ' . $message . "\n"; |
|
| 3114 | - $output .= ' <div class="singlebutton pull-right">' . "\n"; |
|
| 3112 | + )."\n"; |
|
| 3113 | + $output .= ' '.$message."\n"; |
|
| 3114 | + $output .= ' <div class="singlebutton pull-right">'."\n"; |
|
| 3115 | 3115 | if (!empty($href)) { |
| 3116 | 3116 | $output .= bigbluebuttonbn_render_warning_button($href, $text, $class); |
| 3117 | 3117 | } |
| 3118 | - $output .= ' </div>' . "\n"; |
|
| 3119 | - $output .= $OUTPUT->box_end() . "\n"; |
|
| 3118 | + $output .= ' </div>'."\n"; |
|
| 3119 | + $output .= $OUTPUT->box_end()."\n"; |
|
| 3120 | 3120 | return $output; |
| 3121 | 3121 | } |
| 3122 | 3122 | |
@@ -3140,11 +3140,11 @@ discard block |
||
| 3140 | 3140 | if ($class == '') { |
| 3141 | 3141 | $class = 'btn btn-secondary'; |
| 3142 | 3142 | } |
| 3143 | - $output = ' <form method="post" action="' . $href . '" class="form-inline">' . "\n"; |
|
| 3144 | - $output .= ' <button type="submit" class="' . $class . '"' . "\n"; |
|
| 3145 | - $output .= ' title="' . $title . '"' . "\n"; |
|
| 3146 | - $output .= ' >' . $text . '</button>' . "\n"; |
|
| 3147 | - $output .= ' </form>' . "\n"; |
|
| 3143 | + $output = ' <form method="post" action="'.$href.'" class="form-inline">'."\n"; |
|
| 3144 | + $output .= ' <button type="submit" class="'.$class.'"'."\n"; |
|
| 3145 | + $output .= ' title="'.$title.'"'."\n"; |
|
| 3146 | + $output .= ' >'.$text.'</button>'."\n"; |
|
| 3147 | + $output .= ' </form>'."\n"; |
|
| 3148 | 3148 | return $output; |
| 3149 | 3149 | } |
| 3150 | 3150 | |
@@ -3208,7 +3208,7 @@ discard block |
||
| 3208 | 3208 | function bigbluebuttonbn_user_can_join_meeting($bigbluebuttonbn, $mid = null, $userid = null) { |
| 3209 | 3209 | // By default, use a meetingid without groups. |
| 3210 | 3210 | if (empty($mid)) { |
| 3211 | - $mid = $bigbluebuttonbn->meetingid . '-' . $bigbluebuttonbn->course . '-' . $bigbluebuttonbn->id; |
|
| 3211 | + $mid = $bigbluebuttonbn->meetingid.'-'.$bigbluebuttonbn->course.'-'.$bigbluebuttonbn->id; |
|
| 3212 | 3212 | } |
| 3213 | 3213 | // When meeting is running, all authorized users can join right in. |
| 3214 | 3214 | if (bigbluebuttonbn_is_meeting_running($mid)) { |
@@ -3277,7 +3277,7 @@ discard block |
||
| 3277 | 3277 | * @return boolean |
| 3278 | 3278 | */ |
| 3279 | 3279 | function bigbluebuttonbn_has_html5_client() { |
| 3280 | - $checkurl = \mod_bigbluebuttonbn\locallib\bigbluebutton::root() . "html5client/check"; |
|
| 3280 | + $checkurl = \mod_bigbluebuttonbn\locallib\bigbluebutton::root()."html5client/check"; |
|
| 3281 | 3281 | $curlinfo = bigbluebuttonbn_wrap_xml_load_file_curl_request($checkurl, 'HEAD'); |
| 3282 | 3282 | return (isset($curlinfo['http_code']) && $curlinfo['http_code'] == 200); |
| 3283 | 3283 | } |
@@ -3305,7 +3305,7 @@ discard block |
||
| 3305 | 3305 | $bbbsession['modPW'] = $bbbsession['bigbluebuttonbn']->moderatorpass; |
| 3306 | 3306 | $bbbsession['viewerPW'] = $bbbsession['bigbluebuttonbn']->viewerpass; |
| 3307 | 3307 | // Database info related to the activity. |
| 3308 | - $bbbsession['meetingid'] = $bbbsession['bigbluebuttonbn']->meetingid . '-' . $bbbsession['course']->id . '-' . |
|
| 3308 | + $bbbsession['meetingid'] = $bbbsession['bigbluebuttonbn']->meetingid.'-'.$bbbsession['course']->id.'-'. |
|
| 3309 | 3309 | $bbbsession['bigbluebuttonbn']->id; |
| 3310 | 3310 | $bbbsession['meetingname'] = $bbbsession['bigbluebuttonbn']->name; |
| 3311 | 3311 | $bbbsession['meetingdescription'] = $bbbsession['bigbluebuttonbn']->intro; |
@@ -3337,12 +3337,12 @@ discard block |
||
| 3337 | 3337 | if ($bbbsession['bigbluebuttonbn']->record) { |
| 3338 | 3338 | // Check if is enable record all from start. |
| 3339 | 3339 | if ($bbbsession['recordallfromstart']) { |
| 3340 | - $bbbsession['welcome'] .= '<br><br>' . get_string( |
|
| 3340 | + $bbbsession['welcome'] .= '<br><br>'.get_string( |
|
| 3341 | 3341 | 'bbbrecordallfromstartwarning', |
| 3342 | 3342 | 'bigbluebuttonbn' |
| 3343 | 3343 | ); |
| 3344 | 3344 | } else { |
| 3345 | - $bbbsession['welcome'] .= '<br><br>' . get_string('bbbrecordwarning', 'bigbluebuttonbn'); |
|
| 3345 | + $bbbsession['welcome'] .= '<br><br>'.get_string('bbbrecordwarning', 'bigbluebuttonbn'); |
|
| 3346 | 3346 | } |
| 3347 | 3347 | } |
| 3348 | 3348 | $bbbsession['openingtime'] = $bbbsession['bigbluebuttonbn']->openingtime; |
@@ -3357,7 +3357,7 @@ discard block |
||
| 3357 | 3357 | $bbbsession['originServerName'] = $parsedurl['host']; |
| 3358 | 3358 | $bbbsession['originServerUrl'] = $CFG->wwwroot; |
| 3359 | 3359 | $bbbsession['originServerCommonName'] = ''; |
| 3360 | - $bbbsession['originTag'] = 'moodle-mod_bigbluebuttonbn (' . get_config('mod_bigbluebuttonbn', 'version') . ')'; |
|
| 3360 | + $bbbsession['originTag'] = 'moodle-mod_bigbluebuttonbn ('.get_config('mod_bigbluebuttonbn', 'version').')'; |
|
| 3361 | 3361 | $bbbsession['bnserver'] = bigbluebuttonbn_is_bn_server(); |
| 3362 | 3362 | // Setting for clienttype, assign flash if not enabled, or default if not editable. |
| 3363 | 3363 | $bbbsession['clienttype'] = BIGBLUEBUTTON_CLIENTTYPE_FLASH; |
@@ -3464,7 +3464,7 @@ discard block |
||
| 3464 | 3464 | if ((boolean) \mod_bigbluebuttonbn\locallib\config::get('recordingstatus_enabled')) { |
| 3465 | 3465 | $metadata["bn-recording-status"] = json_encode( |
| 3466 | 3466 | array( |
| 3467 | - 'email' => array('"' . fullname($USER) . '" <' . $USER->email . '>'), |
|
| 3467 | + 'email' => array('"'.fullname($USER).'" <'.$USER->email.'>'), |
|
| 3468 | 3468 | 'context' => $bbbsession['bigbluebuttonbnURL'], |
| 3469 | 3469 | ) |
| 3470 | 3470 | ); |