@@ -28,7 +28,7 @@ discard block |
||
28 | 28 | |
29 | 29 | global $CFG; |
30 | 30 | |
31 | -require_once(dirname(__FILE__).'/lib.php'); |
|
31 | +require_once(dirname(__FILE__) . '/lib.php'); |
|
32 | 32 | |
33 | 33 | /** @var BIGBLUEBUTTONBN_UPDATE_CACHE boolean set to true indicates that cache has to be updated */ |
34 | 34 | const BIGBLUEBUTTONBN_UPDATE_CACHE = true; |
@@ -106,7 +106,7 @@ discard block |
||
106 | 106 | 'logoutURL' => $logouturl, |
107 | 107 | ]; |
108 | 108 | // Choose between Adobe Flash or HTML5 Client. |
109 | - if ( $clienttype == BIGBLUEBUTTON_CLIENTTYPE_HTML5 ) { |
|
109 | + if ($clienttype == BIGBLUEBUTTON_CLIENTTYPE_HTML5) { |
|
110 | 110 | $data['joinViaHtml5'] = 'true'; |
111 | 111 | } |
112 | 112 | if (!is_null($configtoken)) { |
@@ -134,8 +134,8 @@ discard block |
||
134 | 134 | $data = null; |
135 | 135 | if (!is_null($pname) && !is_null($purl)) { |
136 | 136 | $method = 'POST'; |
137 | - $data = "<?xml version='1.0' encoding='UTF-8'?><modules><module name='presentation'><document url='". |
|
138 | - $purl."' /></module></modules>"; |
|
137 | + $data = "<?xml version='1.0' encoding='UTF-8'?><modules><module name='presentation'><document url='" . |
|
138 | + $purl . "' /></module></modules>"; |
|
139 | 139 | } |
140 | 140 | $xml = bigbluebuttonbn_wrap_xml_load_file($createmeetingurl, $method, $data); |
141 | 141 | if ($xml) { |
@@ -257,7 +257,7 @@ discard block |
||
257 | 257 | if (isset($recordingxml->breakoutRooms->breakoutRoom)) { |
258 | 258 | foreach ($recordingxml->breakoutRooms->breakoutRoom as $breakoutroom) { |
259 | 259 | $url = \mod_bigbluebuttonbn\locallib\bigbluebutton::action_url('getRecordings', |
260 | - ['recordID' => implode(',', (array) $breakoutroom)]); |
|
260 | + ['recordID' => implode(',', (array)$breakoutroom)]); |
|
261 | 261 | $xml = bigbluebuttonbn_wrap_xml_load_file($url); |
262 | 262 | if ($xml && $xml->returncode == 'SUCCESS' && isset($xml->recordings)) { |
263 | 263 | // If there were meetings already created. |
@@ -312,7 +312,7 @@ discard block |
||
312 | 312 | // Override imported flag with actual ID. |
313 | 313 | $recording['imported'] = $recordimported->id; |
314 | 314 | if (isset($recordimported->protected)) { |
315 | - $recording['protected'] = (string) $recordimported->protected; |
|
315 | + $recording['protected'] = (string)$recordimported->protected; |
|
316 | 316 | } |
317 | 317 | $recordsimportedarray[$recording['recordID']] = $recording; |
318 | 318 | } |
@@ -342,21 +342,21 @@ discard block |
||
342 | 342 | // Add formats. |
343 | 343 | $playbackarray = array(); |
344 | 344 | foreach ($recording->playback->format as $format) { |
345 | - $playbackarray[(string) $format->type] = array('type' => (string) $format->type, |
|
346 | - 'url' => trim((string) $format->url), 'length' => (string) $format->length); |
|
345 | + $playbackarray[(string)$format->type] = array('type' => (string)$format->type, |
|
346 | + 'url' => trim((string)$format->url), 'length' => (string)$format->length); |
|
347 | 347 | // Add preview per format when existing. |
348 | 348 | if ($format->preview) { |
349 | - $playbackarray[(string) $format->type]['preview'] = bigbluebuttonbn_get_recording_preview_images($format->preview); |
|
349 | + $playbackarray[(string)$format->type]['preview'] = bigbluebuttonbn_get_recording_preview_images($format->preview); |
|
350 | 350 | } |
351 | 351 | } |
352 | 352 | // Add the metadata to the recordings array. |
353 | 353 | $metadataarray = bigbluebuttonbn_get_recording_array_meta(get_object_vars($recording->metadata)); |
354 | - $recordingarray = array('recordID' => (string) $recording->recordID, |
|
355 | - 'meetingID' => (string) $recording->meetingID, 'meetingName' => (string) $recording->name, |
|
356 | - 'published' => (string) $recording->published, 'startTime' => (string) $recording->startTime, |
|
357 | - 'endTime' => (string) $recording->endTime, 'playbacks' => $playbackarray); |
|
354 | + $recordingarray = array('recordID' => (string)$recording->recordID, |
|
355 | + 'meetingID' => (string)$recording->meetingID, 'meetingName' => (string)$recording->name, |
|
356 | + 'published' => (string)$recording->published, 'startTime' => (string)$recording->startTime, |
|
357 | + 'endTime' => (string)$recording->endTime, 'playbacks' => $playbackarray); |
|
358 | 358 | if (isset($recording->protected)) { |
359 | - $recordingarray['protected'] = (string) $recording->protected; |
|
359 | + $recordingarray['protected'] = (string)$recording->protected; |
|
360 | 360 | } |
361 | 361 | return $recordingarray + $metadataarray; |
362 | 362 | } |
@@ -371,9 +371,9 @@ discard block |
||
371 | 371 | function bigbluebuttonbn_get_recording_preview_images($preview) { |
372 | 372 | $imagesarray = array(); |
373 | 373 | foreach ($preview->images->image as $image) { |
374 | - $imagearray = array('url' => trim((string) $image)); |
|
374 | + $imagearray = array('url' => trim((string)$image)); |
|
375 | 375 | foreach ($image->attributes() as $attkey => $attvalue) { |
376 | - $imagearray[$attkey] = (string) $attvalue; |
|
376 | + $imagearray[$attkey] = (string)$attvalue; |
|
377 | 377 | } |
378 | 378 | array_push($imagesarray, $imagearray); |
379 | 379 | } |
@@ -393,7 +393,7 @@ discard block |
||
393 | 393 | if (is_object($value)) { |
394 | 394 | $value = ''; |
395 | 395 | } |
396 | - $metadataarray['meta_'.$key] = $value; |
|
396 | + $metadataarray['meta_' . $key] = $value; |
|
397 | 397 | } |
398 | 398 | return $metadataarray; |
399 | 399 | } |
@@ -465,7 +465,7 @@ discard block |
||
465 | 465 | $ids = explode(',', $recordids); |
466 | 466 | foreach ($ids as $id) { |
467 | 467 | $xml = bigbluebuttonbn_wrap_xml_load_file( |
468 | - \mod_bigbluebuttonbn\locallib\bigbluebutton::action_url('updateRecordings', ['recordID' => $id] + (array) $params) |
|
468 | + \mod_bigbluebuttonbn\locallib\bigbluebutton::action_url('updateRecordings', ['recordID' => $id] + (array)$params) |
|
469 | 469 | ); |
470 | 470 | if ($xml && $xml->returncode != 'SUCCESS') { |
471 | 471 | return false; |
@@ -530,7 +530,7 @@ discard block |
||
530 | 530 | return $xml; |
531 | 531 | } catch (Exception $e) { |
532 | 532 | libxml_use_internal_errors($previous); |
533 | - $error = 'Caught exception: '.$e->getMessage(); |
|
533 | + $error = 'Caught exception: ' . $e->getMessage(); |
|
534 | 534 | debugging($error, DEBUG_DEVELOPER); |
535 | 535 | return null; |
536 | 536 | } |
@@ -541,7 +541,7 @@ discard block |
||
541 | 541 | $response = simplexml_load_file($url, 'SimpleXMLElement', LIBXML_NOCDATA | LIBXML_NOBLANKS); |
542 | 542 | return $response; |
543 | 543 | } catch (Exception $e) { |
544 | - $error = 'Caught exception: '.$e->getMessage(); |
|
544 | + $error = 'Caught exception: ' . $e->getMessage(); |
|
545 | 545 | debugging($error, DEBUG_DEVELOPER); |
546 | 546 | libxml_use_internal_errors($previous); |
547 | 547 | return null; |
@@ -567,8 +567,8 @@ discard block |
||
567 | 567 | } |
568 | 568 | $options = array(); |
569 | 569 | $options['CURLOPT_HTTPHEADER'] = array( |
570 | - 'Content-Type: '.$contenttype, |
|
571 | - 'Content-Length: '.strlen($data), |
|
570 | + 'Content-Type: ' . $contenttype, |
|
571 | + 'Content-Length: ' . strlen($data), |
|
572 | 572 | 'Content-Language: en-US', |
573 | 573 | ); |
574 | 574 | |
@@ -589,7 +589,7 @@ discard block |
||
589 | 589 | * @return void |
590 | 590 | */ |
591 | 591 | function bigbluebuttonbn_end_meeting_if_running($bigbluebuttonbn) { |
592 | - $meetingid = $bigbluebuttonbn->meetingid.'-'.$bigbluebuttonbn->course.'-'.$bigbluebuttonbn->id; |
|
592 | + $meetingid = $bigbluebuttonbn->meetingid . '-' . $bigbluebuttonbn->course . '-' . $bigbluebuttonbn->id; |
|
593 | 593 | if (bigbluebuttonbn_is_meeting_running($meetingid)) { |
594 | 594 | bigbluebuttonbn_end_meeting($meetingid, $bigbluebuttonbn->moderatorpass); |
595 | 595 | } |
@@ -609,9 +609,9 @@ discard block |
||
609 | 609 | if ($userroles) { |
610 | 610 | $where = ''; |
611 | 611 | foreach ($userroles as $userrole) { |
612 | - $where .= (empty($where) ? ' WHERE' : ' OR').' id=' . $userrole->roleid; |
|
612 | + $where .= (empty($where) ? ' WHERE' : ' OR') . ' id=' . $userrole->roleid; |
|
613 | 613 | } |
614 | - $userroles = $DB->get_records_sql('SELECT * FROM {role}'.$where); |
|
614 | + $userroles = $DB->get_records_sql('SELECT * FROM {role}' . $where); |
|
615 | 615 | } |
616 | 616 | return $userroles; |
617 | 617 | } |
@@ -634,7 +634,7 @@ discard block |
||
634 | 634 | * @return array $users |
635 | 635 | */ |
636 | 636 | function bigbluebuttonbn_get_users(context $context = null) { |
637 | - $users = (array) get_enrolled_users($context, '', 0, 'u.*', null, 0, 0, true); |
|
637 | + $users = (array)get_enrolled_users($context, '', 0, 'u.*', null, 0, 0, true); |
|
638 | 638 | foreach ($users as $key => $value) { |
639 | 639 | $users[$key] = fullname($value); |
640 | 640 | } |
@@ -649,7 +649,7 @@ discard block |
||
649 | 649 | * @return array $users |
650 | 650 | */ |
651 | 651 | function bigbluebuttonbn_get_users_select(context $context = null) { |
652 | - $users = (array) get_enrolled_users($context, '', 0, 'u.*', null, 0, 0, true); |
|
652 | + $users = (array)get_enrolled_users($context, '', 0, 'u.*', null, 0, 0, true); |
|
653 | 653 | foreach ($users as $key => $value) { |
654 | 654 | $users[$key] = array('id' => $value->id, 'name' => fullname($value)); |
655 | 655 | } |
@@ -664,7 +664,7 @@ discard block |
||
664 | 664 | * @return array $roles |
665 | 665 | */ |
666 | 666 | function bigbluebuttonbn_get_roles(context $context = null) { |
667 | - $roles = (array) role_get_names($context); |
|
667 | + $roles = (array)role_get_names($context); |
|
668 | 668 | foreach ($roles as $key => $value) { |
669 | 669 | $roles[$key] = $value->localname; |
670 | 670 | } |
@@ -679,7 +679,7 @@ discard block |
||
679 | 679 | * @return array $users |
680 | 680 | */ |
681 | 681 | function bigbluebuttonbn_get_roles_select(context $context = null) { |
682 | - $roles = (array) role_get_names($context); |
|
682 | + $roles = (array)role_get_names($context); |
|
683 | 683 | foreach ($roles as $key => $value) { |
684 | 684 | $roles[$key] = array('id' => $value->id, 'name' => $value->localname); |
685 | 685 | } |
@@ -694,7 +694,7 @@ discard block |
||
694 | 694 | * @return object $role |
695 | 695 | */ |
696 | 696 | function bigbluebuttonbn_get_role($id) { |
697 | - $roles = (array) role_get_names(); |
|
697 | + $roles = (array)role_get_names(); |
|
698 | 698 | if (is_numeric($id) && isset($roles[$id])) { |
699 | 699 | return (object)$roles[$id]; |
700 | 700 | } |
@@ -851,7 +851,7 @@ discard block |
||
851 | 851 | if (!isguestuser()) { |
852 | 852 | $userroles = bigbluebuttonbn_get_user_roles($context, $userid); |
853 | 853 | } |
854 | - return bigbluebuttonbn_is_moderator_validator($participantlist, $userid , $userroles); |
|
854 | + return bigbluebuttonbn_is_moderator_validator($participantlist, $userid, $userroles); |
|
855 | 855 | } |
856 | 856 | |
857 | 857 | /** |
@@ -1051,7 +1051,7 @@ discard block |
||
1051 | 1051 | function bigbluebuttonbn_generate_nonce() { |
1052 | 1052 | $mt = microtime(); |
1053 | 1053 | $rand = mt_rand(); |
1054 | - return md5($mt.$rand); |
|
1054 | + return md5($mt . $rand); |
|
1055 | 1055 | } |
1056 | 1056 | |
1057 | 1057 | /** |
@@ -1141,10 +1141,10 @@ discard block |
||
1141 | 1141 | $now = time(); |
1142 | 1142 | if (!$updatecache && isset($result) && $now < ($result['creation_time'] + $cachettl)) { |
1143 | 1143 | // Use the value in the cache. |
1144 | - return (array) json_decode($result['meeting_info']); |
|
1144 | + return (array)json_decode($result['meeting_info']); |
|
1145 | 1145 | } |
1146 | 1146 | // Ping again and refresh the cache. |
1147 | - $meetinginfo = (array) bigbluebuttonbn_wrap_xml_load_file( |
|
1147 | + $meetinginfo = (array)bigbluebuttonbn_wrap_xml_load_file( |
|
1148 | 1148 | \mod_bigbluebuttonbn\locallib\bigbluebutton::action_url('getMeetingInfo', ['meetingID' => $meetingid]) |
1149 | 1149 | ); |
1150 | 1150 | $cache->set($meetingid, array('creation_time' => time(), 'meeting_info' => json_encode($meetinginfo))); |
@@ -1255,7 +1255,7 @@ discard block |
||
1255 | 1255 | * @return object |
1256 | 1256 | */ |
1257 | 1257 | function bigbluebuttonbn_set_config_xml($meetingid, $configxml) { |
1258 | - $urldefaultconfig = \mod_bigbluebuttonbn\locallib\config::get('server_url').'api/setConfigXML?'; |
|
1258 | + $urldefaultconfig = \mod_bigbluebuttonbn\locallib\config::get('server_url') . 'api/setConfigXML?'; |
|
1259 | 1259 | $configxmlparams = bigbluebuttonbn_set_config_xml_params($meetingid, $configxml); |
1260 | 1260 | $xml = bigbluebuttonbn_wrap_xml_load_file($urldefaultconfig, 'POST', |
1261 | 1261 | $configxmlparams, 'application/x-www-form-urlencoded'); |
@@ -1271,8 +1271,8 @@ discard block |
||
1271 | 1271 | * @return string |
1272 | 1272 | */ |
1273 | 1273 | function bigbluebuttonbn_set_config_xml_params($meetingid, $configxml) { |
1274 | - $params = 'configXML='.urlencode($configxml).'&meetingID='.urlencode($meetingid); |
|
1275 | - $configxmlparams = $params.'&checksum='.sha1('setConfigXML'.$params.\mod_bigbluebuttonbn\locallib\config::get('shared_secret')); |
|
1274 | + $params = 'configXML=' . urlencode($configxml) . '&meetingID=' . urlencode($meetingid); |
|
1275 | + $configxmlparams = $params . '&checksum=' . sha1('setConfigXML' . $params . \mod_bigbluebuttonbn\locallib\config::get('shared_secret')); |
|
1276 | 1276 | return $configxmlparams; |
1277 | 1277 | } |
1278 | 1278 | |
@@ -1286,7 +1286,7 @@ discard block |
||
1286 | 1286 | */ |
1287 | 1287 | function bigbluebuttonbn_set_config_xml_array($meetingid, $configxml) { |
1288 | 1288 | $configxml = bigbluebuttonbn_setConfigXML($meetingid, $configxml); |
1289 | - $configxmlarray = (array) $configxml; |
|
1289 | + $configxmlarray = (array)$configxml; |
|
1290 | 1290 | if ($configxmlarray['returncode'] != 'SUCCESS') { |
1291 | 1291 | debugging('BigBlueButton was not able to set the custom config.xml file', DEBUG_DEVELOPER); |
1292 | 1292 | return ''; |
@@ -1380,7 +1380,7 @@ discard block |
||
1380 | 1380 | global $USER; |
1381 | 1381 | $starttime = $starttime - ($starttime % 1000); |
1382 | 1382 | // Set formatted date. |
1383 | - $dateformat = get_string('strftimerecentfull', 'langconfig').' %Z'; |
|
1383 | + $dateformat = get_string('strftimerecentfull', 'langconfig') . ' %Z'; |
|
1384 | 1384 | return userdate($starttime / 1000, $dateformat, usertimezone($USER->timezone)); |
1385 | 1385 | } |
1386 | 1386 | |
@@ -1496,7 +1496,7 @@ discard block |
||
1496 | 1496 | * @return string |
1497 | 1497 | */ |
1498 | 1498 | function bigbluebuttonbn_get_recording_data_row_preview($recording) { |
1499 | - $options = array('id' => 'preview-'.$recording['recordID']); |
|
1499 | + $options = array('id' => 'preview-' . $recording['recordID']); |
|
1500 | 1500 | if ($recording['published'] === 'false') { |
1501 | 1501 | $options['hidden'] = 'hidden'; |
1502 | 1502 | } |
@@ -1558,7 +1558,7 @@ discard block |
||
1558 | 1558 | if ($recording['published'] === 'false') { |
1559 | 1559 | $visibility = 'hidden '; |
1560 | 1560 | } |
1561 | - $id = 'playbacks-'.$recording['recordID']; |
|
1561 | + $id = 'playbacks-' . $recording['recordID']; |
|
1562 | 1562 | $recordingtypes = html_writer::start_tag('div', array('id' => $id, 'data-imported' => $dataimported, |
1563 | 1563 | 'data-meetingid' => $recording['meetingID'], 'data-recordingid' => $recording['recordID'], |
1564 | 1564 | 'title' => $title, $visibility => $visibility)); |
@@ -1583,11 +1583,11 @@ discard block |
||
1583 | 1583 | if (!bigbluebuttonbn_include_recording_data_row_type($recording, $bbbsession, $playback)) { |
1584 | 1584 | return ''; |
1585 | 1585 | } |
1586 | - $text = get_string('view_recording_format_'.$playback['type'], 'bigbluebuttonbn'); |
|
1586 | + $text = get_string('view_recording_format_' . $playback['type'], 'bigbluebuttonbn'); |
|
1587 | 1587 | $href = $CFG->wwwroot . '/mod/bigbluebuttonbn/bbb_view.php?action=play&bn=' . $bbbsession['bigbluebuttonbn']->id . |
1588 | - '&mid='.$recording['meetingID'] . '&rid=' . $recording['recordID'] . '&rtype=' . $playback['type']; |
|
1588 | + '&mid=' . $recording['meetingID'] . '&rid=' . $recording['recordID'] . '&rtype=' . $playback['type']; |
|
1589 | 1589 | if (!isset($recording['imported']) || !isset($recording['protected']) || $recording['protected'] === 'false') { |
1590 | - $href .= '&href='.urlencode(trim($playback['url'])); |
|
1590 | + $href .= '&href=' . urlencode(trim($playback['url'])); |
|
1591 | 1591 | } |
1592 | 1592 | $linkattributes = array( |
1593 | 1593 | 'id' => 'recording-play-' . $playback['type'] . '-' . $recording['recordID'], |
@@ -1771,7 +1771,7 @@ discard block |
||
1771 | 1771 | $linkattributes['class'] = 'disabled'; |
1772 | 1772 | unset($linkattributes['onclick']); |
1773 | 1773 | } |
1774 | - $icon = new pix_icon('i/'.$data['tag'], |
|
1774 | + $icon = new pix_icon('i/' . $data['tag'], |
|
1775 | 1775 | get_string('view_recording_list_actionbar_' . $data['action'], 'bigbluebuttonbn'), |
1776 | 1776 | 'moodle', $iconattributes); |
1777 | 1777 | return $OUTPUT->action_icon('#', $icon, null, $linkattributes, false); |
@@ -1883,7 +1883,7 @@ discard block |
||
1883 | 1883 | $groupid = explode(']', $groupid[1]); |
1884 | 1884 | if (isset($groupid[0])) { |
1885 | 1885 | foreach ($usergroups as $usergroup) { |
1886 | - if($usergroup->id == $groupid[0]) { |
|
1886 | + if ($usergroup->id == $groupid[0]) { |
|
1887 | 1887 | // Include recording if the user is in the same group. |
1888 | 1888 | $displayrow = true; |
1889 | 1889 | } |
@@ -1913,7 +1913,7 @@ discard block |
||
1913 | 1913 | */ |
1914 | 1914 | function bigbluebuttonbn_get_recording_table_row($bbbsession, $recording, $rowdata) { |
1915 | 1915 | $row = new html_table_row(); |
1916 | - $row->id = 'recording-tr-'.$recording['recordID']; |
|
1916 | + $row->id = 'recording-tr-' . $recording['recordID']; |
|
1917 | 1917 | $row->attributes['data-imported'] = 'false'; |
1918 | 1918 | $texthead = ''; |
1919 | 1919 | $texttail = ''; |
@@ -1926,7 +1926,7 @@ discard block |
||
1926 | 1926 | $rowdata->date_formatted = str_replace(' ', ' ', $rowdata->date_formatted); |
1927 | 1927 | $row->cells = array(); |
1928 | 1928 | $row->cells[] = $texthead . $rowdata->recording . $texttail; |
1929 | - $row->cells[] = $texthead . $rowdata->meeting . $texttail;; |
|
1929 | + $row->cells[] = $texthead . $rowdata->meeting . $texttail; ; |
|
1930 | 1930 | $row->cells[] = $texthead . $rowdata->activity . $texttail; |
1931 | 1931 | $row->cells[] = $texthead . $rowdata->description . $texttail; |
1932 | 1932 | if (bigbluebuttonbn_get_recording_data_preview_enabled($bbbsession)) { |
@@ -1974,9 +1974,9 @@ discard block |
||
1974 | 1974 | function bigbluebuttonbn_send_notification_recording_ready($bigbluebuttonbn) { |
1975 | 1975 | $sender = get_admin(); |
1976 | 1976 | // Prepare message. |
1977 | - $messagetext = '<p>'.get_string('email_body_recording_ready_for', 'bigbluebuttonbn'). |
|
1978 | - ' "' . $bigbluebuttonbn->name . '" '. |
|
1979 | - get_string('email_body_recording_ready_is_ready', 'bigbluebuttonbn').'.</p>'; |
|
1977 | + $messagetext = '<p>' . get_string('email_body_recording_ready_for', 'bigbluebuttonbn') . |
|
1978 | + ' "' . $bigbluebuttonbn->name . '" ' . |
|
1979 | + get_string('email_body_recording_ready_is_ready', 'bigbluebuttonbn') . '.</p>'; |
|
1980 | 1980 | $context = context_course::instance($bigbluebuttonbn->course); |
1981 | 1981 | \mod_bigbluebuttonbn\locallib\notifier::notification_send($context, $sender, $bigbluebuttonbn, $messagetext); |
1982 | 1982 | } |
@@ -2198,7 +2198,7 @@ discard block |
||
2198 | 2198 | } |
2199 | 2199 | // Prepare select for loading records based on existent bigbluebuttonbns. |
2200 | 2200 | $sql = 'SELECT DISTINCT meetingid, bigbluebuttonbnid FROM {bigbluebuttonbn_logs} WHERE '; |
2201 | - $sql .= '(bigbluebuttonbnid='.implode(' OR bigbluebuttonbnid=', array_keys($bigbluebuttonbns)).')'; |
|
2201 | + $sql .= '(bigbluebuttonbnid=' . implode(' OR bigbluebuttonbnid=', array_keys($bigbluebuttonbns)) . ')'; |
|
2202 | 2202 | // Include only Create events and exclude those with record not true. |
2203 | 2203 | $sql .= ' AND log = ? AND meta LIKE ? AND meta LIKE ?'; |
2204 | 2204 | // Execute select for loading records based on existent bigbluebuttonbns. |
@@ -2372,8 +2372,8 @@ discard block |
||
2372 | 2372 | function bigbluebuttonbn_format_activity_time($time) { |
2373 | 2373 | $activitytime = ''; |
2374 | 2374 | if ($time) { |
2375 | - $activitytime = calendar_day_representation($time).' '. |
|
2376 | - get_string('mod_form_field_notification_msg_at', 'bigbluebuttonbn').' '. |
|
2375 | + $activitytime = calendar_day_representation($time) . ' ' . |
|
2376 | + get_string('mod_form_field_notification_msg_at', 'bigbluebuttonbn') . ' ' . |
|
2377 | 2377 | calendar_time_representation($time); |
2378 | 2378 | } |
2379 | 2379 | return $activitytime; |
@@ -2841,7 +2841,7 @@ discard block |
||
2841 | 2841 | * |
2842 | 2842 | * @return string |
2843 | 2843 | */ |
2844 | -function bigbluebuttonbn_render_warning($message, $type='info', $href='', $text='', $class='') { |
|
2844 | +function bigbluebuttonbn_render_warning($message, $type = 'info', $href = '', $text = '', $class = '') { |
|
2845 | 2845 | global $OUTPUT; |
2846 | 2846 | $output = "\n"; |
2847 | 2847 | // Evaluates if config_warning is enabled. |
@@ -2880,11 +2880,11 @@ discard block |
||
2880 | 2880 | if ($class == '') { |
2881 | 2881 | $class = 'btn btn-secondary'; |
2882 | 2882 | } |
2883 | - $output = ' <form method="post" action="' . $href . '" class="form-inline">'."\n"; |
|
2884 | - $output .= ' <button type="submit" class="' . $class . '"'."\n"; |
|
2885 | - $output .= ' title="' . $title . '"'."\n"; |
|
2886 | - $output .= ' >' . $text . '</button>'."\n"; |
|
2887 | - $output .= ' </form>'."\n"; |
|
2883 | + $output = ' <form method="post" action="' . $href . '" class="form-inline">' . "\n"; |
|
2884 | + $output .= ' <button type="submit" class="' . $class . '"' . "\n"; |
|
2885 | + $output .= ' title="' . $title . '"' . "\n"; |
|
2886 | + $output .= ' >' . $text . '</button>' . "\n"; |
|
2887 | + $output .= ' </form>' . "\n"; |
|
2888 | 2888 | return $output; |
2889 | 2889 | } |
2890 | 2890 | |
@@ -3049,7 +3049,7 @@ discard block |
||
3049 | 3049 | $bbbsession['modPW'] = $bbbsession['bigbluebuttonbn']->moderatorpass; |
3050 | 3050 | $bbbsession['viewerPW'] = $bbbsession['bigbluebuttonbn']->viewerpass; |
3051 | 3051 | // Database info related to the activity. |
3052 | - $bbbsession['meetingid'] = $bbbsession['bigbluebuttonbn']->meetingid.'-'.$bbbsession['course']->id.'-'. |
|
3052 | + $bbbsession['meetingid'] = $bbbsession['bigbluebuttonbn']->meetingid . '-' . $bbbsession['course']->id . '-' . |
|
3053 | 3053 | $bbbsession['bigbluebuttonbn']->id; |
3054 | 3054 | $bbbsession['meetingname'] = $bbbsession['bigbluebuttonbn']->name; |
3055 | 3055 | $bbbsession['meetingdescription'] = $bbbsession['bigbluebuttonbn']->intro; |
@@ -3081,10 +3081,10 @@ discard block |
||
3081 | 3081 | if ($bbbsession['bigbluebuttonbn']->record) { |
3082 | 3082 | // Check if is enable record all from start. |
3083 | 3083 | if ($bbbsession['recordallfromstart']) { |
3084 | - $bbbsession['welcome'] .= '<br><br>'.get_string('bbbrecordallfromstartwarning', |
|
3084 | + $bbbsession['welcome'] .= '<br><br>' . get_string('bbbrecordallfromstartwarning', |
|
3085 | 3085 | 'bigbluebuttonbn'); |
3086 | 3086 | } else { |
3087 | - $bbbsession['welcome'] .= '<br><br>'.get_string('bbbrecordwarning', 'bigbluebuttonbn'); |
|
3087 | + $bbbsession['welcome'] .= '<br><br>' . get_string('bbbrecordwarning', 'bigbluebuttonbn'); |
|
3088 | 3088 | } |
3089 | 3089 | } |
3090 | 3090 | $bbbsession['openingtime'] = $bbbsession['bigbluebuttonbn']->openingtime; |
@@ -3099,7 +3099,7 @@ discard block |
||
3099 | 3099 | $bbbsession['originServerName'] = $parsedurl['host']; |
3100 | 3100 | $bbbsession['originServerUrl'] = $CFG->wwwroot; |
3101 | 3101 | $bbbsession['originServerCommonName'] = ''; |
3102 | - $bbbsession['originTag'] = 'moodle-mod_bigbluebuttonbn ('.get_config('mod_bigbluebuttonbn', 'version').')'; |
|
3102 | + $bbbsession['originTag'] = 'moodle-mod_bigbluebuttonbn (' . get_config('mod_bigbluebuttonbn', 'version') . ')'; |
|
3103 | 3103 | $bbbsession['bnserver'] = bigbluebuttonbn_is_bn_server(); |
3104 | 3104 | // Setting for clienttype, assign flash if not enabled, or default if not editable. |
3105 | 3105 | $bbbsession['clienttype'] = \mod_bigbluebuttonbn\locallib\config::get('clienttype_default'); |