@@ -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; |
@@ -100,7 +100,7 @@ discard block |
||
100 | 100 | if (isset($meta)) { |
101 | 101 | $log->meta = $meta; |
102 | 102 | } else if ($event == BIGBLUEBUTTONBN_LOG_EVENT_CREATE) { |
103 | - $log->meta = '{"record":'.($bbbsession['record'] ? 'true' : 'false').'}'; |
|
103 | + $log->meta = '{"record":' . ($bbbsession['record'] ? 'true' : 'false') . '}'; |
|
104 | 104 | } |
105 | 105 | $DB->insert_record('bigbluebuttonbn_logs', $log); |
106 | 106 | } |
@@ -148,8 +148,8 @@ discard block |
||
148 | 148 | $data = null; |
149 | 149 | if (!is_null($pname) && !is_null($purl)) { |
150 | 150 | $method = 'POST'; |
151 | - $data = "<?xml version='1.0' encoding='UTF-8'?><modules><module name='presentation'><document url='". |
|
152 | - $purl."' /></module></modules>"; |
|
151 | + $data = "<?xml version='1.0' encoding='UTF-8'?><modules><module name='presentation'><document url='" . |
|
152 | + $purl . "' /></module></modules>"; |
|
153 | 153 | } |
154 | 154 | $xml = bigbluebuttonbn_wrap_xml_load_file($createmeetingurl, $method, $data); |
155 | 155 | if ($xml) { |
@@ -310,7 +310,7 @@ discard block |
||
310 | 310 | // Override imported flag with actual ID. |
311 | 311 | $recording['imported'] = $recordimported->id; |
312 | 312 | if (isset($recordimported->protected)) { |
313 | - $recording['protected'] = (string) $recordimported->protected; |
|
313 | + $recording['protected'] = (string)$recordimported->protected; |
|
314 | 314 | } |
315 | 315 | $recordsimportedarray[$recording['recordID']] = $recording; |
316 | 316 | } |
@@ -340,21 +340,21 @@ discard block |
||
340 | 340 | // Add formats. |
341 | 341 | $playbackarray = array(); |
342 | 342 | foreach ($recording->playback->format as $format) { |
343 | - $playbackarray[(string) $format->type] = array('type' => (string) $format->type, |
|
344 | - 'url' => trim((string) $format->url), 'length' => (string) $format->length); |
|
343 | + $playbackarray[(string)$format->type] = array('type' => (string)$format->type, |
|
344 | + 'url' => trim((string)$format->url), 'length' => (string)$format->length); |
|
345 | 345 | // Add preview per format when existing. |
346 | 346 | if ($format->preview) { |
347 | - $playbackarray[(string) $format->type]['preview'] = bigbluebuttonbn_get_recording_preview_images($format->preview); |
|
347 | + $playbackarray[(string)$format->type]['preview'] = bigbluebuttonbn_get_recording_preview_images($format->preview); |
|
348 | 348 | } |
349 | 349 | } |
350 | 350 | // Add the metadata to the recordings array. |
351 | 351 | $metadataarray = bigbluebuttonbn_get_recording_array_meta(get_object_vars($recording->metadata)); |
352 | - $recordingarray = array('recordID' => (string) $recording->recordID, |
|
353 | - 'meetingID' => (string) $recording->meetingID, 'meetingName' => (string) $recording->name, |
|
354 | - 'published' => (string) $recording->published, 'startTime' => (string) $recording->startTime, |
|
355 | - 'endTime' => (string) $recording->endTime, 'playbacks' => $playbackarray); |
|
352 | + $recordingarray = array('recordID' => (string)$recording->recordID, |
|
353 | + 'meetingID' => (string)$recording->meetingID, 'meetingName' => (string)$recording->name, |
|
354 | + 'published' => (string)$recording->published, 'startTime' => (string)$recording->startTime, |
|
355 | + 'endTime' => (string)$recording->endTime, 'playbacks' => $playbackarray); |
|
356 | 356 | if (isset($recording->protected)) { |
357 | - $recordingarray['protected'] = (string) $recording->protected; |
|
357 | + $recordingarray['protected'] = (string)$recording->protected; |
|
358 | 358 | } |
359 | 359 | return $recordingarray + $metadataarray; |
360 | 360 | } |
@@ -369,9 +369,9 @@ discard block |
||
369 | 369 | function bigbluebuttonbn_get_recording_preview_images($preview) { |
370 | 370 | $imagesarray = array(); |
371 | 371 | foreach ($preview->images->image as $image) { |
372 | - $imagearray = array('url' => trim((string) $image)); |
|
372 | + $imagearray = array('url' => trim((string)$image)); |
|
373 | 373 | foreach ($image->attributes() as $attkey => $attvalue) { |
374 | - $imagearray[$attkey] = (string) $attvalue; |
|
374 | + $imagearray[$attkey] = (string)$attvalue; |
|
375 | 375 | } |
376 | 376 | array_push($imagesarray, $imagearray); |
377 | 377 | } |
@@ -391,7 +391,7 @@ discard block |
||
391 | 391 | if (is_object($value)) { |
392 | 392 | $value = ''; |
393 | 393 | } |
394 | - $metadataarray['meta_'.$key] = $value; |
|
394 | + $metadataarray['meta_' . $key] = $value; |
|
395 | 395 | } |
396 | 396 | return $metadataarray; |
397 | 397 | } |
@@ -463,7 +463,7 @@ discard block |
||
463 | 463 | $ids = explode(',', $recordids); |
464 | 464 | foreach ($ids as $id) { |
465 | 465 | $xml = bigbluebuttonbn_wrap_xml_load_file( |
466 | - \mod_bigbluebuttonbn\locallib\bigbluebutton::action_url('updateRecordings', ['recordID' => $id] + (array) $params) |
|
466 | + \mod_bigbluebuttonbn\locallib\bigbluebutton::action_url('updateRecordings', ['recordID' => $id] + (array)$params) |
|
467 | 467 | ); |
468 | 468 | if ($xml && $xml->returncode != 'SUCCESS') { |
469 | 469 | return false; |
@@ -543,7 +543,7 @@ discard block |
||
543 | 543 | return $xml; |
544 | 544 | } catch (Exception $e) { |
545 | 545 | libxml_use_internal_errors($previous); |
546 | - $error = 'Caught exception: '.$e->getMessage(); |
|
546 | + $error = 'Caught exception: ' . $e->getMessage(); |
|
547 | 547 | debugging($error, DEBUG_DEVELOPER); |
548 | 548 | return null; |
549 | 549 | } |
@@ -554,7 +554,7 @@ discard block |
||
554 | 554 | $response = simplexml_load_file($url, 'SimpleXMLElement', LIBXML_NOCDATA | LIBXML_NOBLANKS); |
555 | 555 | return $response; |
556 | 556 | } catch (Exception $e) { |
557 | - $error = 'Caught exception: '.$e->getMessage(); |
|
557 | + $error = 'Caught exception: ' . $e->getMessage(); |
|
558 | 558 | debugging($error, DEBUG_DEVELOPER); |
559 | 559 | libxml_use_internal_errors($previous); |
560 | 560 | return null; |
@@ -581,8 +581,8 @@ discard block |
||
581 | 581 | |
582 | 582 | $options = array(); |
583 | 583 | $options['CURLOPT_HTTPHEADER'] = array( |
584 | - 'Content-Type: '.$contenttype, |
|
585 | - 'Content-Length: '.strlen($data), |
|
584 | + 'Content-Type: ' . $contenttype, |
|
585 | + 'Content-Length: ' . strlen($data), |
|
586 | 586 | 'Content-Language: en-US', |
587 | 587 | ); |
588 | 588 | |
@@ -599,7 +599,7 @@ discard block |
||
599 | 599 | * @return void |
600 | 600 | */ |
601 | 601 | function bigbluebuttonbn_end_meeting_if_running($bigbluebuttonbn) { |
602 | - $meetingid = $bigbluebuttonbn->meetingid.'-'.$bigbluebuttonbn->course.'-'.$bigbluebuttonbn->id; |
|
602 | + $meetingid = $bigbluebuttonbn->meetingid . '-' . $bigbluebuttonbn->course . '-' . $bigbluebuttonbn->id; |
|
603 | 603 | if (bigbluebuttonbn_is_meeting_running($meetingid)) { |
604 | 604 | bigbluebuttonbn_end_meeting($meetingid, $bigbluebuttonbn->moderatorpass); |
605 | 605 | } |
@@ -619,9 +619,9 @@ discard block |
||
619 | 619 | if ($userroles) { |
620 | 620 | $where = ''; |
621 | 621 | foreach ($userroles as $userrole) { |
622 | - $where .= (empty($where) ? ' WHERE' : ' OR').' id=' . $userrole->roleid; |
|
622 | + $where .= (empty($where) ? ' WHERE' : ' OR') . ' id=' . $userrole->roleid; |
|
623 | 623 | } |
624 | - $userroles = $DB->get_records_sql('SELECT * FROM {role}'.$where); |
|
624 | + $userroles = $DB->get_records_sql('SELECT * FROM {role}' . $where); |
|
625 | 625 | } |
626 | 626 | return $userroles; |
627 | 627 | } |
@@ -644,7 +644,7 @@ discard block |
||
644 | 644 | * @return array $users |
645 | 645 | */ |
646 | 646 | function bigbluebuttonbn_get_users(context $context = null) { |
647 | - $users = (array) get_enrolled_users($context, '', 0, 'u.*', null, 0, 0, true); |
|
647 | + $users = (array)get_enrolled_users($context, '', 0, 'u.*', null, 0, 0, true); |
|
648 | 648 | foreach ($users as $key => $value) { |
649 | 649 | $users[$key] = fullname($value); |
650 | 650 | } |
@@ -659,7 +659,7 @@ discard block |
||
659 | 659 | * @return array $users |
660 | 660 | */ |
661 | 661 | function bigbluebuttonbn_get_users_select(context $context = null) { |
662 | - $users = (array) get_enrolled_users($context, '', 0, 'u.*', null, 0, 0, true); |
|
662 | + $users = (array)get_enrolled_users($context, '', 0, 'u.*', null, 0, 0, true); |
|
663 | 663 | foreach ($users as $key => $value) { |
664 | 664 | $users[$key] = array('id' => $value->id, 'name' => fullname($value)); |
665 | 665 | } |
@@ -674,7 +674,7 @@ discard block |
||
674 | 674 | * @return array $roles |
675 | 675 | */ |
676 | 676 | function bigbluebuttonbn_get_roles(context $context = null) { |
677 | - $roles = (array) role_get_names($context); |
|
677 | + $roles = (array)role_get_names($context); |
|
678 | 678 | foreach ($roles as $key => $value) { |
679 | 679 | $roles[$key] = $value->localname; |
680 | 680 | } |
@@ -689,7 +689,7 @@ discard block |
||
689 | 689 | * @return array $users |
690 | 690 | */ |
691 | 691 | function bigbluebuttonbn_get_roles_select(context $context = null) { |
692 | - $roles = (array) role_get_names($context); |
|
692 | + $roles = (array)role_get_names($context); |
|
693 | 693 | foreach ($roles as $key => $value) { |
694 | 694 | $roles[$key] = array('id' => $value->id, 'name' => $value->localname); |
695 | 695 | } |
@@ -704,7 +704,7 @@ discard block |
||
704 | 704 | * @return object $role |
705 | 705 | */ |
706 | 706 | function bigbluebuttonbn_get_role($id) { |
707 | - $roles = (array) role_get_names(); |
|
707 | + $roles = (array)role_get_names(); |
|
708 | 708 | if (is_numeric($id) && isset($roles[$id])) { |
709 | 709 | return (object)$roles[$id]; |
710 | 710 | } |
@@ -859,7 +859,7 @@ discard block |
||
859 | 859 | if (!isguestuser()) { |
860 | 860 | $userroles = bigbluebuttonbn_get_user_roles($context, $userid); |
861 | 861 | } |
862 | - return bigbluebuttonbn_is_moderator_validator($participantlist, $userid , $userroles); |
|
862 | + return bigbluebuttonbn_is_moderator_validator($participantlist, $userid, $userroles); |
|
863 | 863 | } |
864 | 864 | |
865 | 865 | /** |
@@ -1015,7 +1015,7 @@ discard block |
||
1015 | 1015 | function bigbluebuttonbn_generate_nonce() { |
1016 | 1016 | $mt = microtime(); |
1017 | 1017 | $rand = mt_rand(); |
1018 | - return md5($mt.$rand); |
|
1018 | + return md5($mt . $rand); |
|
1019 | 1019 | } |
1020 | 1020 | |
1021 | 1021 | /** |
@@ -1041,21 +1041,21 @@ discard block |
||
1041 | 1041 | */ |
1042 | 1042 | function bigbluebuttonbn_events() { |
1043 | 1043 | return array( |
1044 | - (string) BIGBLUEBUTTON_EVENT_ACTIVITY_VIEWED, |
|
1045 | - (string) BIGBLUEBUTTON_EVENT_ACTIVITY_MANAGEMENT_VIEWED, |
|
1046 | - (string) BIGBLUEBUTTON_EVENT_LIVE_SESSION, |
|
1047 | - (string) BIGBLUEBUTTON_EVENT_MEETING_CREATED, |
|
1048 | - (string) BIGBLUEBUTTON_EVENT_MEETING_ENDED, |
|
1049 | - (string) BIGBLUEBUTTON_EVENT_MEETING_JOINED, |
|
1050 | - (string) BIGBLUEBUTTON_EVENT_MEETING_LEFT, |
|
1051 | - (string) BIGBLUEBUTTON_EVENT_RECORDING_DELETED, |
|
1052 | - (string) BIGBLUEBUTTON_EVENT_RECORDING_IMPORTED, |
|
1053 | - (string) BIGBLUEBUTTON_EVENT_RECORDING_PROTECTED, |
|
1054 | - (string) BIGBLUEBUTTON_EVENT_RECORDING_PUBLISHED, |
|
1055 | - (string) BIGBLUEBUTTON_EVENT_RECORDING_UNPROTECTED, |
|
1056 | - (string) BIGBLUEBUTTON_EVENT_RECORDING_UNPUBLISHED, |
|
1057 | - (string) BIGBLUEBUTTON_EVENT_RECORDING_EDITED, |
|
1058 | - (string) BIGBLUEBUTTON_EVENT_RECORDING_VIEWED |
|
1044 | + (string)BIGBLUEBUTTON_EVENT_ACTIVITY_VIEWED, |
|
1045 | + (string)BIGBLUEBUTTON_EVENT_ACTIVITY_MANAGEMENT_VIEWED, |
|
1046 | + (string)BIGBLUEBUTTON_EVENT_LIVE_SESSION, |
|
1047 | + (string)BIGBLUEBUTTON_EVENT_MEETING_CREATED, |
|
1048 | + (string)BIGBLUEBUTTON_EVENT_MEETING_ENDED, |
|
1049 | + (string)BIGBLUEBUTTON_EVENT_MEETING_JOINED, |
|
1050 | + (string)BIGBLUEBUTTON_EVENT_MEETING_LEFT, |
|
1051 | + (string)BIGBLUEBUTTON_EVENT_RECORDING_DELETED, |
|
1052 | + (string)BIGBLUEBUTTON_EVENT_RECORDING_IMPORTED, |
|
1053 | + (string)BIGBLUEBUTTON_EVENT_RECORDING_PROTECTED, |
|
1054 | + (string)BIGBLUEBUTTON_EVENT_RECORDING_PUBLISHED, |
|
1055 | + (string)BIGBLUEBUTTON_EVENT_RECORDING_UNPROTECTED, |
|
1056 | + (string)BIGBLUEBUTTON_EVENT_RECORDING_UNPUBLISHED, |
|
1057 | + (string)BIGBLUEBUTTON_EVENT_RECORDING_EDITED, |
|
1058 | + (string)BIGBLUEBUTTON_EVENT_RECORDING_VIEWED |
|
1059 | 1059 | ); |
1060 | 1060 | } |
1061 | 1061 | |
@@ -1066,21 +1066,21 @@ discard block |
||
1066 | 1066 | */ |
1067 | 1067 | function bigbluebuttonbn_events_action() { |
1068 | 1068 | return array( |
1069 | - 'view' => (string) BIGBLUEBUTTON_EVENT_ACTIVITY_VIEWED, |
|
1070 | - 'view_management' => (string) BIGBLUEBUTTON_EVENT_ACTIVITY_MANAGEMENT_VIEWED, |
|
1071 | - 'live_action' => (string) BIGBLUEBUTTON_EVENT_LIVE_SESSION, |
|
1072 | - 'meeting_create' => (string) BIGBLUEBUTTON_EVENT_MEETING_CREATED, |
|
1073 | - 'meeting_end' => (string) BIGBLUEBUTTON_EVENT_MEETING_ENDED, |
|
1074 | - 'meeting_join' => (string) BIGBLUEBUTTON_EVENT_MEETING_JOINED, |
|
1075 | - 'meeting_left' => (string) BIGBLUEBUTTON_EVENT_MEETING_LEFT, |
|
1076 | - 'recording_delete' => (string) BIGBLUEBUTTON_EVENT_RECORDING_DELETED, |
|
1077 | - 'recording_import' => (string) BIGBLUEBUTTON_EVENT_RECORDING_IMPORTED, |
|
1078 | - 'recording_protect' => (string) BIGBLUEBUTTON_EVENT_RECORDING_PROTECTED, |
|
1079 | - 'recording_publish' => (string) BIGBLUEBUTTON_EVENT_RECORDING_PUBLISHED, |
|
1080 | - 'recording_unprotect' => (string) BIGBLUEBUTTON_EVENT_RECORDING_UNPROTECTED, |
|
1081 | - 'recording_unpublish' => (string) BIGBLUEBUTTON_EVENT_RECORDING_UNPUBLISHED, |
|
1082 | - 'recording_edit' => (string) BIGBLUEBUTTON_EVENT_RECORDING_EDITED, |
|
1083 | - 'recording_play' => (string) BIGBLUEBUTTON_EVENT_RECORDING_VIEWED |
|
1069 | + 'view' => (string)BIGBLUEBUTTON_EVENT_ACTIVITY_VIEWED, |
|
1070 | + 'view_management' => (string)BIGBLUEBUTTON_EVENT_ACTIVITY_MANAGEMENT_VIEWED, |
|
1071 | + 'live_action' => (string)BIGBLUEBUTTON_EVENT_LIVE_SESSION, |
|
1072 | + 'meeting_create' => (string)BIGBLUEBUTTON_EVENT_MEETING_CREATED, |
|
1073 | + 'meeting_end' => (string)BIGBLUEBUTTON_EVENT_MEETING_ENDED, |
|
1074 | + 'meeting_join' => (string)BIGBLUEBUTTON_EVENT_MEETING_JOINED, |
|
1075 | + 'meeting_left' => (string)BIGBLUEBUTTON_EVENT_MEETING_LEFT, |
|
1076 | + 'recording_delete' => (string)BIGBLUEBUTTON_EVENT_RECORDING_DELETED, |
|
1077 | + 'recording_import' => (string)BIGBLUEBUTTON_EVENT_RECORDING_IMPORTED, |
|
1078 | + 'recording_protect' => (string)BIGBLUEBUTTON_EVENT_RECORDING_PROTECTED, |
|
1079 | + 'recording_publish' => (string)BIGBLUEBUTTON_EVENT_RECORDING_PUBLISHED, |
|
1080 | + 'recording_unprotect' => (string)BIGBLUEBUTTON_EVENT_RECORDING_UNPROTECTED, |
|
1081 | + 'recording_unpublish' => (string)BIGBLUEBUTTON_EVENT_RECORDING_UNPUBLISHED, |
|
1082 | + 'recording_edit' => (string)BIGBLUEBUTTON_EVENT_RECORDING_EDITED, |
|
1083 | + 'recording_play' => (string)BIGBLUEBUTTON_EVENT_RECORDING_VIEWED |
|
1084 | 1084 | ); |
1085 | 1085 | } |
1086 | 1086 | |
@@ -1111,7 +1111,7 @@ discard block |
||
1111 | 1111 | if (array_key_exists('other', $options)) { |
1112 | 1112 | $eventproperties['other'] = $options['other']; |
1113 | 1113 | } |
1114 | - $event = call_user_func_array('\mod_bigbluebuttonbn\event\bigbluebuttonbn_'.$eventtype.'::create', |
|
1114 | + $event = call_user_func_array('\mod_bigbluebuttonbn\event\bigbluebuttonbn_' . $eventtype . '::create', |
|
1115 | 1115 | array($eventproperties)); |
1116 | 1116 | $event->trigger(); |
1117 | 1117 | } |
@@ -1151,10 +1151,10 @@ discard block |
||
1151 | 1151 | $now = time(); |
1152 | 1152 | if (!$updatecache && isset($result) && $now < ($result['creation_time'] + $cachettl)) { |
1153 | 1153 | // Use the value in the cache. |
1154 | - return (array) json_decode($result['meeting_info']); |
|
1154 | + return (array)json_decode($result['meeting_info']); |
|
1155 | 1155 | } |
1156 | 1156 | // Ping again and refresh the cache. |
1157 | - $meetinginfo = (array) bigbluebuttonbn_wrap_xml_load_file( |
|
1157 | + $meetinginfo = (array)bigbluebuttonbn_wrap_xml_load_file( |
|
1158 | 1158 | \mod_bigbluebuttonbn\locallib\bigbluebutton::action_url('getMeetingInfo', ['meetingID' => $meetingid]) |
1159 | 1159 | ); |
1160 | 1160 | $cache->set($meetingid, array('creation_time' => time(), 'meeting_info' => json_encode($meetinginfo))); |
@@ -1249,7 +1249,7 @@ discard block |
||
1249 | 1249 | * @return object |
1250 | 1250 | */ |
1251 | 1251 | function bigbluebuttonbn_set_config_xml($meetingid, $configxml) { |
1252 | - $urldefaultconfig = \mod_bigbluebuttonbn\locallib\config::get('server_url').'api/setConfigXML?'; |
|
1252 | + $urldefaultconfig = \mod_bigbluebuttonbn\locallib\config::get('server_url') . 'api/setConfigXML?'; |
|
1253 | 1253 | $configxmlparams = bigbluebuttonbn_set_config_xml_params($meetingid, $configxml); |
1254 | 1254 | $xml = bigbluebuttonbn_wrap_xml_load_file($urldefaultconfig, 'POST', |
1255 | 1255 | $configxmlparams, 'application/x-www-form-urlencoded'); |
@@ -1265,8 +1265,8 @@ discard block |
||
1265 | 1265 | * @return string |
1266 | 1266 | */ |
1267 | 1267 | function bigbluebuttonbn_set_config_xml_params($meetingid, $configxml) { |
1268 | - $params = 'configXML='.urlencode($configxml).'&meetingID='.urlencode($meetingid); |
|
1269 | - $configxmlparams = $params.'&checksum='.sha1('setConfigXML'.$params.\mod_bigbluebuttonbn\locallib\config::get('shared_secret')); |
|
1268 | + $params = 'configXML=' . urlencode($configxml) . '&meetingID=' . urlencode($meetingid); |
|
1269 | + $configxmlparams = $params . '&checksum=' . sha1('setConfigXML' . $params . \mod_bigbluebuttonbn\locallib\config::get('shared_secret')); |
|
1270 | 1270 | return $configxmlparams; |
1271 | 1271 | } |
1272 | 1272 | |
@@ -1280,7 +1280,7 @@ discard block |
||
1280 | 1280 | */ |
1281 | 1281 | function bigbluebuttonbn_set_config_xml_array($meetingid, $configxml) { |
1282 | 1282 | $configxml = bigbluebuttonbn_setConfigXML($meetingid, $configxml); |
1283 | - $configxmlarray = (array) $configxml; |
|
1283 | + $configxmlarray = (array)$configxml; |
|
1284 | 1284 | if ($configxmlarray['returncode'] != 'SUCCESS') { |
1285 | 1285 | debugging('BigBlueButton was not able to set the custom config.xml file', DEBUG_DEVELOPER); |
1286 | 1286 | return ''; |
@@ -1372,7 +1372,7 @@ discard block |
||
1372 | 1372 | global $USER; |
1373 | 1373 | $starttime = $starttime - ($starttime % 1000); |
1374 | 1374 | // Set formatted date. |
1375 | - $dateformat = get_string('strftimerecentfull', 'langconfig').' %Z'; |
|
1375 | + $dateformat = get_string('strftimerecentfull', 'langconfig') . ' %Z'; |
|
1376 | 1376 | return userdate($starttime / 1000, $dateformat, usertimezone($USER->timezone)); |
1377 | 1377 | } |
1378 | 1378 | |
@@ -1483,7 +1483,7 @@ discard block |
||
1483 | 1483 | * @return string |
1484 | 1484 | */ |
1485 | 1485 | function bigbluebuttonbn_get_recording_data_row_preview($recording) { |
1486 | - $options = array('id' => 'preview-'.$recording['recordID'], 'class' => 'container'); |
|
1486 | + $options = array('id' => 'preview-' . $recording['recordID'], 'class' => 'container'); |
|
1487 | 1487 | if ($recording['published'] === 'false') { |
1488 | 1488 | $options['hidden'] = 'hidden'; |
1489 | 1489 | } |
@@ -1524,7 +1524,7 @@ discard block |
||
1524 | 1524 | if ($recording['published'] === 'false') { |
1525 | 1525 | $visibility = 'hidden '; |
1526 | 1526 | } |
1527 | - $id = 'playbacks-'.$recording['recordID']; |
|
1527 | + $id = 'playbacks-' . $recording['recordID']; |
|
1528 | 1528 | $recordingtypes = html_writer::start_tag('div', array('id' => $id, 'data-imported' => $dataimported, |
1529 | 1529 | 'data-meetingid' => $recording['meetingID'], 'data-recordingid' => $recording['recordID'], |
1530 | 1530 | 'title' => $title, $visibility => $visibility)); |
@@ -1549,12 +1549,12 @@ discard block |
||
1549 | 1549 | if (!bigbluebuttonbn_include_recording_data_row_type($recording, $bbbsession, $playback)) { |
1550 | 1550 | return ''; |
1551 | 1551 | } |
1552 | - $title = get_string('view_recording_format_'.$playback['type'], 'bigbluebuttonbn'); |
|
1552 | + $title = get_string('view_recording_format_' . $playback['type'], 'bigbluebuttonbn'); |
|
1553 | 1553 | $onclick = 'M.mod_bigbluebuttonbn.recordings.recordingPlay(this);'; |
1554 | 1554 | $href = $CFG->wwwroot . '/mod/bigbluebuttonbn/bbb_view.php?action=play&bn=' . $bbbsession['bigbluebuttonbn']->id . |
1555 | - '&mid='.$recording['meetingID'] . '&rid=' . $recording['recordID'] . '&rtype=' . $playback['type']; |
|
1555 | + '&mid=' . $recording['meetingID'] . '&rid=' . $recording['recordID'] . '&rtype=' . $playback['type']; |
|
1556 | 1556 | if (!isset($recording['imported']) || !isset($recording['protected']) || $recording['protected'] === 'false') { |
1557 | - $href .= '&href='.urlencode(trim($playback['url'])); |
|
1557 | + $href .= '&href=' . urlencode(trim($playback['url'])); |
|
1558 | 1558 | } |
1559 | 1559 | $id = 'recording-play-' . $playback['type'] . '-' . $recording['recordID']; |
1560 | 1560 | $linkattributes = array( |
@@ -1688,7 +1688,7 @@ discard block |
||
1688 | 1688 | $linkattributes['class'] = 'disabled'; |
1689 | 1689 | unset($linkattributes['onclick']); |
1690 | 1690 | } |
1691 | - $icon = new pix_icon('i/'.$data['tag'], |
|
1691 | + $icon = new pix_icon('i/' . $data['tag'], |
|
1692 | 1692 | get_string('view_recording_list_actionbar_' . $data['action'], 'bigbluebuttonbn'), |
1693 | 1693 | 'moodle', $iconattributes); |
1694 | 1694 | return $OUTPUT->action_icon('#', $icon, null, $linkattributes, false); |
@@ -1805,7 +1805,7 @@ discard block |
||
1805 | 1805 | */ |
1806 | 1806 | function bigbluebuttonbn_get_recording_table_row($bbbsession, $recording, $rowdata) { |
1807 | 1807 | $row = new html_table_row(); |
1808 | - $row->id = 'recording-td-'.$recording['recordID']; |
|
1808 | + $row->id = 'recording-td-' . $recording['recordID']; |
|
1809 | 1809 | $row->attributes['data-imported'] = 'false'; |
1810 | 1810 | $texthead = ''; |
1811 | 1811 | $texttail = ''; |
@@ -1865,9 +1865,9 @@ discard block |
||
1865 | 1865 | function bigbluebuttonbn_send_notification_recording_ready($bigbluebuttonbn) { |
1866 | 1866 | $sender = get_admin(); |
1867 | 1867 | // Prepare message. |
1868 | - $messagetext = '<p>'.get_string('email_body_recording_ready_for', 'bigbluebuttonbn'). |
|
1869 | - ' "' . $bigbluebuttonbn->name . '" '. |
|
1870 | - get_string('email_body_recording_ready_is_ready', 'bigbluebuttonbn').'.</p>'; |
|
1868 | + $messagetext = '<p>' . get_string('email_body_recording_ready_for', 'bigbluebuttonbn') . |
|
1869 | + ' "' . $bigbluebuttonbn->name . '" ' . |
|
1870 | + get_string('email_body_recording_ready_is_ready', 'bigbluebuttonbn') . '.</p>'; |
|
1871 | 1871 | $context = context_course::instance($bigbluebuttonbn->course); |
1872 | 1872 | \mod_bigbluebuttonbn\locallib\notifier::notification_send($context, $sender, $bigbluebuttonbn, $messagetext); |
1873 | 1873 | } |
@@ -2089,7 +2089,7 @@ discard block |
||
2089 | 2089 | } |
2090 | 2090 | // Prepare select for loading records based on existent bigbluebuttonbns. |
2091 | 2091 | $sql = 'SELECT DISTINCT meetingid, bigbluebuttonbnid FROM {bigbluebuttonbn_logs} WHERE '; |
2092 | - $sql .= '(bigbluebuttonbnid='.implode(' OR bigbluebuttonbnid=', array_keys($bigbluebuttonbns)).')'; |
|
2092 | + $sql .= '(bigbluebuttonbnid=' . implode(' OR bigbluebuttonbnid=', array_keys($bigbluebuttonbns)) . ')'; |
|
2093 | 2093 | // Include only Create events and exclude those with record not true. |
2094 | 2094 | $sql .= ' AND log = ? AND meta LIKE ? AND meta LIKE ?'; |
2095 | 2095 | // Execute select for loading records based on existent bigbluebuttonbns. |
@@ -2221,8 +2221,8 @@ discard block |
||
2221 | 2221 | function bigbluebuttonbn_format_activity_time($time) { |
2222 | 2222 | $activitytime = ''; |
2223 | 2223 | if ($time) { |
2224 | - $activitytime = calendar_day_representation($time).' '. |
|
2225 | - get_string('mod_form_field_notification_msg_at', 'bigbluebuttonbn').' '. |
|
2224 | + $activitytime = calendar_day_representation($time) . ' ' . |
|
2225 | + get_string('mod_form_field_notification_msg_at', 'bigbluebuttonbn') . ' ' . |
|
2226 | 2226 | calendar_time_representation($time); |
2227 | 2227 | } |
2228 | 2228 | return $activitytime; |
@@ -2619,7 +2619,7 @@ discard block |
||
2619 | 2619 | * |
2620 | 2620 | * @return string |
2621 | 2621 | */ |
2622 | -function bigbluebuttonbn_render_warning($message, $type='info', $href='', $text='', $class='') { |
|
2622 | +function bigbluebuttonbn_render_warning($message, $type = 'info', $href = '', $text = '', $class = '') { |
|
2623 | 2623 | global $OUTPUT; |
2624 | 2624 | $output = "\n"; |
2625 | 2625 | // Evaluates if config_warning is enabled. |
@@ -2658,10 +2658,10 @@ discard block |
||
2658 | 2658 | if ($class == '') { |
2659 | 2659 | $class = 'btn btn-secondary'; |
2660 | 2660 | } |
2661 | - $output = ' <form method="post" action="' . $href . '" class="form-inline">'."\n"; |
|
2662 | - $output .= ' <button type="submit" class="' . $class . '"'."\n"; |
|
2663 | - $output .= ' title="' . $title . '"'."\n"; |
|
2664 | - $output .= ' >' . $text . '</button>'."\n"; |
|
2665 | - $output .= ' </form>'."\n"; |
|
2661 | + $output = ' <form method="post" action="' . $href . '" class="form-inline">' . "\n"; |
|
2662 | + $output .= ' <button type="submit" class="' . $class . '"' . "\n"; |
|
2663 | + $output .= ' title="' . $title . '"' . "\n"; |
|
2664 | + $output .= ' >' . $text . '</button>' . "\n"; |
|
2665 | + $output .= ' </form>' . "\n"; |
|
2666 | 2666 | return $output; |
2667 | 2667 | } |