@@ -98,9 +98,9 @@ discard block |
||
| 98 | 98 | */ |
| 99 | 99 | function bigbluebuttonbn_get_join_url($meetingid, $username, $pw, $logouturl, $configtoken = null, $userid = null) { |
| 100 | 100 | $data = ['meetingID' => $meetingid, |
| 101 | - 'fullName' => $username, |
|
| 102 | - 'password' => $pw, |
|
| 103 | - 'logoutURL' => $logouturl, |
|
| 101 | + 'fullName' => $username, |
|
| 102 | + 'password' => $pw, |
|
| 103 | + 'logoutURL' => $logouturl, |
|
| 104 | 104 | ]; |
| 105 | 105 | |
| 106 | 106 | if (!is_null($configtoken)) { |
@@ -201,24 +201,24 @@ discard block |
||
| 201 | 201 | function bigbluebuttonbn_get_meeting_info_array($meetingid) { |
| 202 | 202 | $xml = bigbluebuttonbn_wrap_xml_load_file( |
| 203 | 203 | \mod_bigbluebuttonbn\locallib\bigbluebutton::action_url('getMeetingInfo', ['meetingID' => $meetingid]) |
| 204 | - ); |
|
| 204 | + ); |
|
| 205 | 205 | |
| 206 | 206 | if ($xml && $xml->returncode == 'SUCCESS' && empty($xml->messageKey)) { |
| 207 | 207 | // Meeting info was returned. |
| 208 | 208 | return array('returncode' => $xml->returncode, |
| 209 | - 'meetingID' => $xml->meetingID, |
|
| 210 | - 'moderatorPW' => $xml->moderatorPW, |
|
| 211 | - 'attendeePW' => $xml->attendeePW, |
|
| 212 | - 'hasBeenForciblyEnded' => $xml->hasBeenForciblyEnded, |
|
| 213 | - 'running' => $xml->running, |
|
| 214 | - 'recording' => $xml->recording, |
|
| 215 | - 'startTime' => $xml->startTime, |
|
| 216 | - 'endTime' => $xml->endTime, |
|
| 217 | - 'participantCount' => $xml->participantCount, |
|
| 218 | - 'moderatorCount' => $xml->moderatorCount, |
|
| 219 | - 'attendees' => $xml->attendees, |
|
| 220 | - 'metadata' => $xml->metadata, |
|
| 221 | - ); |
|
| 209 | + 'meetingID' => $xml->meetingID, |
|
| 210 | + 'moderatorPW' => $xml->moderatorPW, |
|
| 211 | + 'attendeePW' => $xml->attendeePW, |
|
| 212 | + 'hasBeenForciblyEnded' => $xml->hasBeenForciblyEnded, |
|
| 213 | + 'running' => $xml->running, |
|
| 214 | + 'recording' => $xml->recording, |
|
| 215 | + 'startTime' => $xml->startTime, |
|
| 216 | + 'endTime' => $xml->endTime, |
|
| 217 | + 'participantCount' => $xml->participantCount, |
|
| 218 | + 'moderatorCount' => $xml->moderatorCount, |
|
| 219 | + 'attendees' => $xml->attendees, |
|
| 220 | + 'metadata' => $xml->metadata, |
|
| 221 | + ); |
|
| 222 | 222 | } |
| 223 | 223 | |
| 224 | 224 | if ($xml) { |
@@ -282,7 +282,7 @@ discard block |
||
| 282 | 282 | // Do getRecordings is executed using a method GET (supported by all versions of BBB). |
| 283 | 283 | $xml = bigbluebuttonbn_wrap_xml_load_file( |
| 284 | 284 | \mod_bigbluebuttonbn\locallib\bigbluebutton::action_url('getRecordings', ['meetingID' => implode(',', $mids)]) |
| 285 | - ); |
|
| 285 | + ); |
|
| 286 | 286 | if ($xml && $xml->returncode == 'SUCCESS' && isset($xml->recordings)) { |
| 287 | 287 | // If there were meetings already created. |
| 288 | 288 | foreach ($xml->recordings->recording as $recording) { |
@@ -348,7 +348,7 @@ discard block |
||
| 348 | 348 | function bigbluebuttonbn_get_default_config_xml() { |
| 349 | 349 | $xml = bigbluebuttonbn_wrap_xml_load_file( |
| 350 | 350 | \mod_bigbluebuttonbn\locallib\bigbluebutton::action_url('getDefaultConfigXML') |
| 351 | - ); |
|
| 351 | + ); |
|
| 352 | 352 | |
| 353 | 353 | return $xml; |
| 354 | 354 | } |
@@ -420,7 +420,7 @@ discard block |
||
| 420 | 420 | foreach ($ids as $id) { |
| 421 | 421 | $xml = bigbluebuttonbn_wrap_xml_load_file( |
| 422 | 422 | \mod_bigbluebuttonbn\locallib\bigbluebutton::action_url('deleteRecordings', ['recordID' => $id]) |
| 423 | - ); |
|
| 423 | + ); |
|
| 424 | 424 | if ($xml && $xml->returncode != 'SUCCESS') { |
| 425 | 425 | return false; |
| 426 | 426 | } |
@@ -438,7 +438,7 @@ discard block |
||
| 438 | 438 | foreach ($ids as $id) { |
| 439 | 439 | $xml = bigbluebuttonbn_wrap_xml_load_file( |
| 440 | 440 | \mod_bigbluebuttonbn\locallib\bigbluebutton::action_url('publishRecordings', ['recordID' => $id, 'publish' => $publish]) |
| 441 | - ); |
|
| 441 | + ); |
|
| 442 | 442 | if ($xml && $xml->returncode != 'SUCCESS') { |
| 443 | 443 | return false; |
| 444 | 444 | } |
@@ -456,7 +456,7 @@ discard block |
||
| 456 | 456 | foreach ($ids as $id) { |
| 457 | 457 | $xml = bigbluebuttonbn_wrap_xml_load_file( |
| 458 | 458 | \mod_bigbluebuttonbn\locallib\bigbluebutton::action_url('updateRecordings', ['recordID' => $id] + (array) $params) |
| 459 | - ); |
|
| 459 | + ); |
|
| 460 | 460 | if ($xml && $xml->returncode != 'SUCCESS') { |
| 461 | 461 | return false; |
| 462 | 462 | } |
@@ -472,7 +472,7 @@ discard block |
||
| 472 | 472 | function bigbluebuttonbn_end_meeting($meetingid, $modpw) { |
| 473 | 473 | $xml = bigbluebuttonbn_wrap_xml_load_file( |
| 474 | 474 | \mod_bigbluebuttonbn\locallib\bigbluebutton::action_url('end', ['meetingID' => $meetingid, 'password' => $modpw]) |
| 475 | - ); |
|
| 475 | + ); |
|
| 476 | 476 | |
| 477 | 477 | if ($xml) { |
| 478 | 478 | // If the xml packet returned failure it displays the message to the user. |
@@ -489,7 +489,7 @@ discard block |
||
| 489 | 489 | function bigbluebuttonbn_is_meeting_running($meetingid) { |
| 490 | 490 | $xml = bigbluebuttonbn_wrap_xml_load_file( |
| 491 | 491 | \mod_bigbluebuttonbn\locallib\bigbluebutton::action_url('isMeetingRunning', ['meetingID' => $meetingid]) |
| 492 | - ); |
|
| 492 | + ); |
|
| 493 | 493 | |
| 494 | 494 | if ($xml && $xml->returncode == 'SUCCESS') { |
| 495 | 495 | return ($xml->running == 'true'); |
@@ -501,7 +501,7 @@ discard block |
||
| 501 | 501 | function bigbluebuttonbn_get_server_version() { |
| 502 | 502 | $xml = bigbluebuttonbn_wrap_xml_load_file( |
| 503 | 503 | \mod_bigbluebuttonbn\locallib\bigbluebutton::action_url() |
| 504 | - ); |
|
| 504 | + ); |
|
| 505 | 505 | |
| 506 | 506 | if ($xml && $xml->returncode == 'SUCCESS') { |
| 507 | 507 | return $xml->version; |
@@ -562,10 +562,10 @@ discard block |
||
| 562 | 562 | |
| 563 | 563 | $options = array(); |
| 564 | 564 | $options['CURLOPT_HTTPHEADER'] = array( |
| 565 | - 'Content-Type: '.$contenttype, |
|
| 566 | - 'Content-Length: '.strlen($data), |
|
| 567 | - 'Content-Language: en-US', |
|
| 568 | - ); |
|
| 565 | + 'Content-Type: '.$contenttype, |
|
| 566 | + 'Content-Length: '.strlen($data), |
|
| 567 | + 'Content-Language: en-US', |
|
| 568 | + ); |
|
| 569 | 569 | |
| 570 | 570 | return $c->post($url, $data, $options); |
| 571 | 571 | } |
@@ -640,13 +640,13 @@ discard block |
||
| 640 | 640 | |
| 641 | 641 | function bigbluebuttonbn_role_unknown() { |
| 642 | 642 | return array( |
| 643 | - "id" => "0", |
|
| 644 | - "name" => "", |
|
| 645 | - "shortname" => "unknown", |
|
| 646 | - "description" => "", |
|
| 647 | - "sortorder" => "0", |
|
| 648 | - "archetype" => "guest", |
|
| 649 | - "localname" => "Unknown" |
|
| 643 | + "id" => "0", |
|
| 644 | + "name" => "", |
|
| 645 | + "shortname" => "unknown", |
|
| 646 | + "description" => "", |
|
| 647 | + "sortorder" => "0", |
|
| 648 | + "archetype" => "guest", |
|
| 649 | + "localname" => "Unknown" |
|
| 650 | 650 | ); |
| 651 | 651 | } |
| 652 | 652 | |
@@ -655,16 +655,16 @@ discard block |
||
| 655 | 655 | 'all' => array( |
| 656 | 656 | 'name' => get_string('mod_form_field_participant_list_type_all', 'bigbluebuttonbn'), |
| 657 | 657 | 'children' => [] |
| 658 | - ) |
|
| 659 | - ); |
|
| 658 | + ) |
|
| 659 | + ); |
|
| 660 | 660 | $data['role'] = array( |
| 661 | 661 | 'name' => get_string('mod_form_field_participant_list_type_role', 'bigbluebuttonbn'), |
| 662 | 662 | 'children' => bigbluebuttonbn_get_roles_select($context) |
| 663 | - ); |
|
| 663 | + ); |
|
| 664 | 664 | $data['user'] = array( |
| 665 | 665 | 'name' => get_string('mod_form_field_participant_list_type_user', 'bigbluebuttonbn'), |
| 666 | 666 | 'children' => bigbluebuttonbn_get_users_select($context) |
| 667 | - ); |
|
| 667 | + ); |
|
| 668 | 668 | return $data; |
| 669 | 669 | } |
| 670 | 670 | |
@@ -714,9 +714,9 @@ discard block |
||
| 714 | 714 | continue; |
| 715 | 715 | } |
| 716 | 716 | $participantlistarray[] = array( |
| 717 | - 'selectiontype' => 'role', |
|
| 718 | - 'selectionid' => $moderatordefault, |
|
| 719 | - 'role' => BIGBLUEBUTTONBN_ROLE_MODERATOR); |
|
| 717 | + 'selectiontype' => 'role', |
|
| 718 | + 'selectionid' => $moderatordefault, |
|
| 719 | + 'role' => BIGBLUEBUTTONBN_ROLE_MODERATOR); |
|
| 720 | 720 | } |
| 721 | 721 | return $participantlistarray; |
| 722 | 722 | } |
@@ -727,11 +727,11 @@ discard block |
||
| 727 | 727 | 'all' => get_string('mod_form_field_participant_list_type_all', 'bigbluebuttonbn'), |
| 728 | 728 | 'role' => get_string('mod_form_field_participant_list_type_role', 'bigbluebuttonbn'), |
| 729 | 729 | 'user' => get_string('mod_form_field_participant_list_type_user', 'bigbluebuttonbn'), |
| 730 | - ], |
|
| 730 | + ], |
|
| 731 | 731 | 'type_selected' => 'all', |
| 732 | 732 | 'options' => ['all' => '---------------'], |
| 733 | 733 | 'selected' => 'all', |
| 734 | - ]; |
|
| 734 | + ]; |
|
| 735 | 735 | } |
| 736 | 736 | |
| 737 | 737 | function bigbluebuttonbn_is_moderator($context, $participants, $userid = null, $userroles = null) { |
@@ -853,8 +853,8 @@ discard block |
||
| 853 | 853 | } |
| 854 | 854 | } |
| 855 | 855 | $parray = array('url' => $purl, 'name' => $pname, |
| 856 | - 'icon' => $picon, |
|
| 857 | - 'mimetype_description' => $pmimetypedescrip); |
|
| 856 | + 'icon' => $picon, |
|
| 857 | + 'mimetype_description' => $pmimetypedescrip); |
|
| 858 | 858 | return $parray; |
| 859 | 859 | } |
| 860 | 860 | |
@@ -928,7 +928,7 @@ discard block |
||
| 928 | 928 | $eventproperties['other'] = $options['other']; |
| 929 | 929 | } |
| 930 | 930 | $event = call_user_func_array('\mod_bigbluebuttonbn\event\bigbluebuttonbn_'.$eventtype.'::create', |
| 931 | - array($eventproperties)); |
|
| 931 | + array($eventproperties)); |
|
| 932 | 932 | $event->trigger(); |
| 933 | 933 | } |
| 934 | 934 | |
@@ -973,7 +973,7 @@ discard block |
||
| 973 | 973 | // Ping again and refresh the cache. |
| 974 | 974 | $meetinginfo = (array) bigbluebuttonbn_wrap_xml_load_file( |
| 975 | 975 | \mod_bigbluebuttonbn\locallib\bigbluebutton::action_url('getMeetingInfo', ['meetingID' => $meetingid]) |
| 976 | - ); |
|
| 976 | + ); |
|
| 977 | 977 | $cache->set($meetingid, array('creation_time' => time(), 'meeting_info' => json_encode($meetinginfo))); |
| 978 | 978 | return $meetinginfo; |
| 979 | 979 | } |
@@ -1209,8 +1209,8 @@ discard block |
||
| 1209 | 1209 | } |
| 1210 | 1210 | $id = 'playbacks-'.$recording['recordID']; |
| 1211 | 1211 | $recordingtypes = html_writer::start_tag('div', array('id' => $id, 'data-imported' => $dataimported, |
| 1212 | - 'data-meetingid' => $recording['meetingID'], 'data-recordingid' => $recording['recordID'], |
|
| 1213 | - 'title' => $title, $visibility => $visibility)); |
|
| 1212 | + 'data-meetingid' => $recording['meetingID'], 'data-recordingid' => $recording['recordID'], |
|
| 1213 | + 'title' => $title, $visibility => $visibility)); |
|
| 1214 | 1214 | foreach ($recording['playbacks'] as $playback) { |
| 1215 | 1215 | $recordingtypes .= bigbluebuttonbn_get_recording_data_row_type($recording, $bigbluebuttonbnid, |
| 1216 | 1216 | $playback).' '; |
@@ -1224,7 +1224,7 @@ discard block |
||
| 1224 | 1224 | $title = get_string('view_recording_format_'.$playback['type'], 'bigbluebuttonbn'); |
| 1225 | 1225 | $onclick = 'M.mod_bigbluebuttonbn.recordings.recording_play(this);'; |
| 1226 | 1226 | $href = $CFG->wwwroot.'/mod/bigbluebuttonbn/bbb_view.php?action=playback&bn='.$bigbluebuttonbnid. |
| 1227 | - '&mid='.$recording['meetingID'].'&rid='.$recording['recordID'].'&rtype='.$playback['type']; |
|
| 1227 | + '&mid='.$recording['meetingID'].'&rid='.$recording['recordID'].'&rtype='.$playback['type']; |
|
| 1228 | 1228 | if (!isset($recording['imported']) || !isset($recording['protected']) || $recording['protected'] === 'false') { |
| 1229 | 1229 | $href .= '&href='.urlencode($playback['url']); |
| 1230 | 1230 | } |
@@ -1326,7 +1326,7 @@ discard block |
||
| 1326 | 1326 | 'onclick' => $onclick, |
| 1327 | 1327 | 'data-action' => $data['action'], |
| 1328 | 1328 | 'data-links' => bigbluebuttonbn_get_count_recording_imported_instances($recording['recordID']) |
| 1329 | - ); |
|
| 1329 | + ); |
|
| 1330 | 1330 | return $OUTPUT->action_icon('#', $icon, null, $linkattributes, false); |
| 1331 | 1331 | } |
| 1332 | 1332 | |
@@ -1443,7 +1443,7 @@ discard block |
||
| 1443 | 1443 | $texthead . $rowdata->activity . $texttail, $texthead . $rowdata->description . $texttail, |
| 1444 | 1444 | $rowdata->preview, $texthead . $rowdata->date_formatted . $texttail, |
| 1445 | 1445 | $rowdata->duration_formatted |
| 1446 | - ); |
|
| 1446 | + ); |
|
| 1447 | 1447 | if ($bbbsession['managerecordings']) { |
| 1448 | 1448 | $row->cells[] = $rowdata->actionbar; |
| 1449 | 1449 | } |
@@ -1708,8 +1708,8 @@ discard block |
||
| 1708 | 1708 | $activitytime = ''; |
| 1709 | 1709 | if ($time) { |
| 1710 | 1710 | $activitytime = calendar_day_representation($time).' '. |
| 1711 | - get_string('mod_form_field_notification_msg_at', 'bigbluebuttonbn').' '. |
|
| 1712 | - calendar_time_representation($time); |
|
| 1711 | + get_string('mod_form_field_notification_msg_at', 'bigbluebuttonbn').' '. |
|
| 1712 | + calendar_time_representation($time); |
|
| 1713 | 1713 | } |
| 1714 | 1714 | |
| 1715 | 1715 | return $activitytime; |
@@ -27,7 +27,7 @@ discard block |
||
| 27 | 27 | |
| 28 | 28 | global $CFG; |
| 29 | 29 | |
| 30 | -require_once(dirname(__FILE__).'/lib.php'); |
|
| 30 | +require_once(dirname(__FILE__) . '/lib.php'); |
|
| 31 | 31 | |
| 32 | 32 | const BIGBLUEBUTTONBN_FORCED = true; |
| 33 | 33 | |
@@ -82,7 +82,7 @@ discard block |
||
| 82 | 82 | if (isset($meta)) { |
| 83 | 83 | $log->meta = $meta; |
| 84 | 84 | } else if ($event == BIGBLUEBUTTONBN_LOG_EVENT_CREATE) { |
| 85 | - $log->meta = '{"record":'.($bbbsession['record'] ? 'true' : 'false').'}'; |
|
| 85 | + $log->meta = '{"record":' . ($bbbsession['record'] ? 'true' : 'false') . '}'; |
|
| 86 | 86 | } |
| 87 | 87 | |
| 88 | 88 | $DB->insert_record('bigbluebuttonbn_logs', $log); |
@@ -134,8 +134,8 @@ discard block |
||
| 134 | 134 | |
| 135 | 135 | if (!is_null($pname) && !is_null($purl)) { |
| 136 | 136 | $method = BIGBLUEBUTTONBN_METHOD_POST; |
| 137 | - $data = "<?xml version='1.0' encoding='UTF-8'?><modules><module name='" . $pname . "'><document url='". |
|
| 138 | - $purl."' /></module></modules>"; |
|
| 137 | + $data = "<?xml version='1.0' encoding='UTF-8'?><modules><module name='" . $pname . "'><document url='" . |
|
| 138 | + $purl . "' /></module></modules>"; |
|
| 139 | 139 | } |
| 140 | 140 | |
| 141 | 141 | $xml = bigbluebuttonbn_wrap_xml_load_file($createmeetingurl, $method, $data); |
@@ -180,7 +180,7 @@ discard block |
||
| 180 | 180 | 'moderatorPW' => $meeting->moderatorPW, |
| 181 | 181 | 'attendeePW' => $meeting->attendeePW, |
| 182 | 182 | 'hasBeenForciblyEnded' => $meeting->hasBeenForciblyEnded, |
| 183 | - 'running' => $meeting->running, ); |
|
| 183 | + 'running' => $meeting->running,); |
|
| 184 | 184 | } |
| 185 | 185 | |
| 186 | 186 | return $meetings; |
@@ -337,7 +337,7 @@ discard block |
||
| 337 | 337 | // Override imported flag with actual ID. |
| 338 | 338 | $recording['imported'] = $recordimported->id; |
| 339 | 339 | if (isset($recordimported->protected)) { |
| 340 | - $recording['protected'] = (string) $recordimported->protected; |
|
| 340 | + $recording['protected'] = (string)$recordimported->protected; |
|
| 341 | 341 | } |
| 342 | 342 | $recordsimportedarray[$recording['recordID']] = $recording; |
| 343 | 343 | } |
@@ -356,37 +356,37 @@ discard block |
||
| 356 | 356 | function bigbluebuttonbn_get_default_config_xml_array() { |
| 357 | 357 | $defaultconfigxml = bigbluebuttonbn_getDefaultConfigXML(); |
| 358 | 358 | |
| 359 | - return (array) $defaultconfigxml; |
|
| 359 | + return (array)$defaultconfigxml; |
|
| 360 | 360 | } |
| 361 | 361 | |
| 362 | 362 | function bigbluebuttonbn_get_recording_array_value($recording) { |
| 363 | 363 | // Add formats. |
| 364 | 364 | $playbackarray = array(); |
| 365 | 365 | foreach ($recording->playback->format as $format) { |
| 366 | - $playbackarray[(string) $format->type] = array('type' => (string) $format->type, |
|
| 367 | - 'url' => (string) $format->url, 'length' => (string) $format->length); |
|
| 366 | + $playbackarray[(string)$format->type] = array('type' => (string)$format->type, |
|
| 367 | + 'url' => (string)$format->url, 'length' => (string)$format->length); |
|
| 368 | 368 | // Add preview per format when existing. |
| 369 | 369 | if ($format->preview) { |
| 370 | 370 | $imagesarray = array(); |
| 371 | 371 | foreach ($format->preview->images->image as $image) { |
| 372 | - $imagearray = array('url' => (string) $image); |
|
| 372 | + $imagearray = array('url' => (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 | } |
| 378 | - $playbackarray[(string) $format->type]['preview'] = $imagesarray; |
|
| 378 | + $playbackarray[(string)$format->type]['preview'] = $imagesarray; |
|
| 379 | 379 | } |
| 380 | 380 | } |
| 381 | 381 | |
| 382 | 382 | // Add the metadata to the recordings array. |
| 383 | 383 | $metadataarray = bigbluebuttonbn_get_recording_array_meta(get_object_vars($recording->metadata)); |
| 384 | - $recordingarray = array('recordID' => (string) $recording->recordID, |
|
| 385 | - 'meetingID' => (string) $recording->meetingID, 'meetingName' => (string) $recording->name, |
|
| 386 | - 'published' => (string) $recording->published, 'startTime' => (string) $recording->startTime, |
|
| 387 | - 'endTime' => (string) $recording->endTime, 'playbacks' => $playbackarray); |
|
| 384 | + $recordingarray = array('recordID' => (string)$recording->recordID, |
|
| 385 | + 'meetingID' => (string)$recording->meetingID, 'meetingName' => (string)$recording->name, |
|
| 386 | + 'published' => (string)$recording->published, 'startTime' => (string)$recording->startTime, |
|
| 387 | + 'endTime' => (string)$recording->endTime, 'playbacks' => $playbackarray); |
|
| 388 | 388 | if (isset($recording->protected)) { |
| 389 | - $recordingarray['protected'] = (string) $recording->protected; |
|
| 389 | + $recordingarray['protected'] = (string)$recording->protected; |
|
| 390 | 390 | } |
| 391 | 391 | return $recordingarray + $metadataarray; |
| 392 | 392 | } |
@@ -397,7 +397,7 @@ discard block |
||
| 397 | 397 | if (is_object($value)) { |
| 398 | 398 | $value = ''; |
| 399 | 399 | } |
| 400 | - $metadataarray['meta_'.$key] = $value; |
|
| 400 | + $metadataarray['meta_' . $key] = $value; |
|
| 401 | 401 | } |
| 402 | 402 | return $metadataarray; |
| 403 | 403 | } |
@@ -455,7 +455,7 @@ discard block |
||
| 455 | 455 | $ids = explode(',', $recordids); |
| 456 | 456 | foreach ($ids as $id) { |
| 457 | 457 | $xml = bigbluebuttonbn_wrap_xml_load_file( |
| 458 | - \mod_bigbluebuttonbn\locallib\bigbluebutton::action_url('updateRecordings', ['recordID' => $id] + (array) $params) |
|
| 458 | + \mod_bigbluebuttonbn\locallib\bigbluebutton::action_url('updateRecordings', ['recordID' => $id] + (array)$params) |
|
| 459 | 459 | ); |
| 460 | 460 | if ($xml && $xml->returncode != 'SUCCESS') { |
| 461 | 461 | return false; |
@@ -532,7 +532,7 @@ discard block |
||
| 532 | 532 | return $xml; |
| 533 | 533 | } catch (Exception $e) { |
| 534 | 534 | libxml_use_internal_errors($previous); |
| 535 | - $error = 'Caught exception: '.$e->getMessage(); |
|
| 535 | + $error = 'Caught exception: ' . $e->getMessage(); |
|
| 536 | 536 | debugging($error, DEBUG_DEVELOPER); |
| 537 | 537 | return null; |
| 538 | 538 | } |
@@ -544,7 +544,7 @@ discard block |
||
| 544 | 544 | $response = simplexml_load_file($url, 'SimpleXMLElement', LIBXML_NOCDATA | LIBXML_NOBLANKS); |
| 545 | 545 | return $response; |
| 546 | 546 | } catch (Exception $e) { |
| 547 | - $error = 'Caught exception: '.$e->getMessage(); |
|
| 547 | + $error = 'Caught exception: ' . $e->getMessage(); |
|
| 548 | 548 | debugging($error, DEBUG_DEVELOPER); |
| 549 | 549 | libxml_use_internal_errors($previous); |
| 550 | 550 | return null; |
@@ -562,8 +562,8 @@ discard block |
||
| 562 | 562 | |
| 563 | 563 | $options = array(); |
| 564 | 564 | $options['CURLOPT_HTTPHEADER'] = array( |
| 565 | - 'Content-Type: '.$contenttype, |
|
| 566 | - 'Content-Length: '.strlen($data), |
|
| 565 | + 'Content-Type: ' . $contenttype, |
|
| 566 | + 'Content-Length: ' . strlen($data), |
|
| 567 | 567 | 'Content-Language: en-US', |
| 568 | 568 | ); |
| 569 | 569 | |
@@ -580,9 +580,9 @@ discard block |
||
| 580 | 580 | if ($userroles) { |
| 581 | 581 | $where = ''; |
| 582 | 582 | foreach ($userroles as $value) { |
| 583 | - $where .= (empty($where) ? ' WHERE' : ' AND').' id='.$value->roleid; |
|
| 583 | + $where .= (empty($where) ? ' WHERE' : ' AND') . ' id=' . $value->roleid; |
|
| 584 | 584 | } |
| 585 | - $userroles = $DB->get_records_sql('SELECT * FROM {role}'.$where); |
|
| 585 | + $userroles = $DB->get_records_sql('SELECT * FROM {role}' . $where); |
|
| 586 | 586 | } |
| 587 | 587 | |
| 588 | 588 | return $userroles; |
@@ -595,7 +595,7 @@ discard block |
||
| 595 | 595 | } |
| 596 | 596 | |
| 597 | 597 | function bigbluebuttonbn_get_users(context $context = null) { |
| 598 | - $users = (array) get_enrolled_users($context, '', 0, 'u.*', null, 0, 0, true); |
|
| 598 | + $users = (array)get_enrolled_users($context, '', 0, 'u.*', null, 0, 0, true); |
|
| 599 | 599 | foreach ($users as $key => $value) { |
| 600 | 600 | $users[$key] = fullname($value); |
| 601 | 601 | } |
@@ -603,7 +603,7 @@ discard block |
||
| 603 | 603 | } |
| 604 | 604 | |
| 605 | 605 | function bigbluebuttonbn_get_users_select(context $context = null) { |
| 606 | - $users = (array) get_enrolled_users($context, '', 0, 'u.*', null, 0, 0, true); |
|
| 606 | + $users = (array)get_enrolled_users($context, '', 0, 'u.*', null, 0, 0, true); |
|
| 607 | 607 | foreach ($users as $key => $value) { |
| 608 | 608 | $users[$key] = array('id' => $value->id, 'name' => fullname($value)); |
| 609 | 609 | } |
@@ -611,7 +611,7 @@ discard block |
||
| 611 | 611 | } |
| 612 | 612 | |
| 613 | 613 | function bigbluebuttonbn_get_roles(context $context = null) { |
| 614 | - $roles = (array) role_get_names($context); |
|
| 614 | + $roles = (array)role_get_names($context); |
|
| 615 | 615 | foreach ($roles as $key => $value) { |
| 616 | 616 | $roles[$key] = $value->localname; |
| 617 | 617 | } |
@@ -619,7 +619,7 @@ discard block |
||
| 619 | 619 | } |
| 620 | 620 | |
| 621 | 621 | function bigbluebuttonbn_get_roles_select(context $context = null) { |
| 622 | - $roles = (array) role_get_names($context); |
|
| 622 | + $roles = (array)role_get_names($context); |
|
| 623 | 623 | foreach ($roles as $key => $value) { |
| 624 | 624 | $roles[$key] = array('id' => $value->id, 'name' => $value->localname); |
| 625 | 625 | } |
@@ -627,7 +627,7 @@ discard block |
||
| 627 | 627 | } |
| 628 | 628 | |
| 629 | 629 | function bigbluebuttonbn_get_role($id) { |
| 630 | - $roles = (array) role_get_names(); |
|
| 630 | + $roles = (array)role_get_names(); |
|
| 631 | 631 | if (is_numeric($id)) { |
| 632 | 632 | return (object)$roles[$id]; |
| 633 | 633 | } |
@@ -681,11 +681,11 @@ discard block |
||
| 681 | 681 | return array(); |
| 682 | 682 | } |
| 683 | 683 | foreach ($rules as $key => $rule) { |
| 684 | - if ( $rule['selectiontype'] !== 'role' || is_numeric($rule['selectionid']) ) { |
|
| 684 | + if ($rule['selectiontype'] !== 'role' || is_numeric($rule['selectionid'])) { |
|
| 685 | 685 | continue; |
| 686 | 686 | } |
| 687 | 687 | $role = bigbluebuttonbn_get_role($rule['selectionid']); |
| 688 | - if ( $role == null ) { |
|
| 688 | + if ($role == null) { |
|
| 689 | 689 | unset($rules[$key]); |
| 690 | 690 | continue; |
| 691 | 691 | } |
@@ -750,10 +750,10 @@ discard block |
||
| 750 | 750 | if (empty($userroles)) { |
| 751 | 751 | $userroles = get_user_roles($context, $userid, true); |
| 752 | 752 | } |
| 753 | - return bigbluebuttonbn_is_moderator_validator($participantlist, $userid , $userroles); |
|
| 753 | + return bigbluebuttonbn_is_moderator_validator($participantlist, $userid, $userroles); |
|
| 754 | 754 | } |
| 755 | 755 | |
| 756 | -function bigbluebuttonbn_is_moderator_validator($participantlist, $userid , $userroles) { |
|
| 756 | +function bigbluebuttonbn_is_moderator_validator($participantlist, $userid, $userroles) { |
|
| 757 | 757 | // Iterate participant rules. |
| 758 | 758 | foreach ($participantlist as $participant) { |
| 759 | 759 | if (bigbluebuttonbn_is_moderator_validate_rule($participant, $userid, $userroles)) { |
@@ -798,9 +798,9 @@ discard block |
||
| 798 | 798 | $isunique = true; |
| 799 | 799 | if ($voicebridge != 0) { |
| 800 | 800 | $table = 'bigbluebuttonbn'; |
| 801 | - $select = 'voicebridge = '.$voicebridge; |
|
| 801 | + $select = 'voicebridge = ' . $voicebridge; |
|
| 802 | 802 | if ($id) { |
| 803 | - $select .= ' AND id <> '.$id; |
|
| 803 | + $select .= ' AND id <> ' . $id; |
|
| 804 | 804 | } |
| 805 | 805 | if ($DB->get_records_select($table, $select)) { |
| 806 | 806 | $isunique = false; |
@@ -861,7 +861,7 @@ discard block |
||
| 861 | 861 | function bigbluebuttonbn_generate_nonce() { |
| 862 | 862 | $mt = microtime(); |
| 863 | 863 | $rand = mt_rand(); |
| 864 | - return md5($mt.$rand); |
|
| 864 | + return md5($mt . $rand); |
|
| 865 | 865 | } |
| 866 | 866 | |
| 867 | 867 | function bigbluebuttonbn_random_password($length = 8) { |
@@ -872,41 +872,41 @@ discard block |
||
| 872 | 872 | |
| 873 | 873 | function bigbluebuttonbn_events() { |
| 874 | 874 | return array( |
| 875 | - (string) BIGBLUEBUTTON_EVENT_ACTIVITY_VIEWED, |
|
| 876 | - (string) BIGBLUEBUTTON_EVENT_ACTIVITY_MANAGEMENT_VIEWED, |
|
| 877 | - (string) BIGBLUEBUTTON_EVENT_LIVE_SESSION, |
|
| 878 | - (string) BIGBLUEBUTTON_EVENT_MEETING_CREATED, |
|
| 879 | - (string) BIGBLUEBUTTON_EVENT_MEETING_ENDED, |
|
| 880 | - (string) BIGBLUEBUTTON_EVENT_MEETING_JOINED, |
|
| 881 | - (string) BIGBLUEBUTTON_EVENT_MEETING_LEFT, |
|
| 882 | - (string) BIGBLUEBUTTON_EVENT_RECORDING_DELETED, |
|
| 883 | - (string) BIGBLUEBUTTON_EVENT_RECORDING_IMPORTED, |
|
| 884 | - (string) BIGBLUEBUTTON_EVENT_RECORDING_PROTECTED, |
|
| 885 | - (string) BIGBLUEBUTTON_EVENT_RECORDING_PUBLISHED, |
|
| 886 | - (string) BIGBLUEBUTTON_EVENT_RECORDING_UNPROTECTED, |
|
| 887 | - (string) BIGBLUEBUTTON_EVENT_RECORDING_UNPUBLISHED, |
|
| 888 | - (string) BIGBLUEBUTTON_EVENT_RECORDING_EDITED, |
|
| 889 | - (string) BIGBLUEBUTTON_EVENT_RECORDING_VIEWED |
|
| 875 | + (string)BIGBLUEBUTTON_EVENT_ACTIVITY_VIEWED, |
|
| 876 | + (string)BIGBLUEBUTTON_EVENT_ACTIVITY_MANAGEMENT_VIEWED, |
|
| 877 | + (string)BIGBLUEBUTTON_EVENT_LIVE_SESSION, |
|
| 878 | + (string)BIGBLUEBUTTON_EVENT_MEETING_CREATED, |
|
| 879 | + (string)BIGBLUEBUTTON_EVENT_MEETING_ENDED, |
|
| 880 | + (string)BIGBLUEBUTTON_EVENT_MEETING_JOINED, |
|
| 881 | + (string)BIGBLUEBUTTON_EVENT_MEETING_LEFT, |
|
| 882 | + (string)BIGBLUEBUTTON_EVENT_RECORDING_DELETED, |
|
| 883 | + (string)BIGBLUEBUTTON_EVENT_RECORDING_IMPORTED, |
|
| 884 | + (string)BIGBLUEBUTTON_EVENT_RECORDING_PROTECTED, |
|
| 885 | + (string)BIGBLUEBUTTON_EVENT_RECORDING_PUBLISHED, |
|
| 886 | + (string)BIGBLUEBUTTON_EVENT_RECORDING_UNPROTECTED, |
|
| 887 | + (string)BIGBLUEBUTTON_EVENT_RECORDING_UNPUBLISHED, |
|
| 888 | + (string)BIGBLUEBUTTON_EVENT_RECORDING_EDITED, |
|
| 889 | + (string)BIGBLUEBUTTON_EVENT_RECORDING_VIEWED |
|
| 890 | 890 | ); |
| 891 | 891 | } |
| 892 | 892 | |
| 893 | 893 | function bigbluebuttonbn_events_action() { |
| 894 | 894 | return array( |
| 895 | - 'view' => (string) BIGBLUEBUTTON_EVENT_ACTIVITY_VIEWED, |
|
| 896 | - 'view_management' => (string) BIGBLUEBUTTON_EVENT_ACTIVITY_MANAGEMENT_VIEWED, |
|
| 897 | - 'live_action' => (string) BIGBLUEBUTTON_EVENT_LIVE_SESSION, |
|
| 898 | - 'meeting_create' => (string) BIGBLUEBUTTON_EVENT_MEETING_CREATED, |
|
| 899 | - 'meeting_end' => (string) BIGBLUEBUTTON_EVENT_MEETING_ENDED, |
|
| 900 | - 'meeting_join' => (string) BIGBLUEBUTTON_EVENT_MEETING_JOINED, |
|
| 901 | - 'meeting_left' => (string) BIGBLUEBUTTON_EVENT_MEETING_LEFT, |
|
| 902 | - 'recording_delete' => (string) BIGBLUEBUTTON_EVENT_RECORDING_DELETED, |
|
| 903 | - 'recording_import' => (string) BIGBLUEBUTTON_EVENT_RECORDING_IMPORTED, |
|
| 904 | - 'recording_protect' => (string) BIGBLUEBUTTON_EVENT_RECORDING_PROTECTED, |
|
| 905 | - 'recording_publish' => (string) BIGBLUEBUTTON_EVENT_RECORDING_PUBLISHED, |
|
| 906 | - 'recording_unprotect' => (string) BIGBLUEBUTTON_EVENT_RECORDING_UNPROTECTED, |
|
| 907 | - 'recording_unpublish' => (string) BIGBLUEBUTTON_EVENT_RECORDING_UNPUBLISHED, |
|
| 908 | - 'recording_edit' => (string) BIGBLUEBUTTON_EVENT_RECORDING_EDITED, |
|
| 909 | - 'recording_play' => (string) BIGBLUEBUTTON_EVENT_RECORDING_VIEWED |
|
| 895 | + 'view' => (string)BIGBLUEBUTTON_EVENT_ACTIVITY_VIEWED, |
|
| 896 | + 'view_management' => (string)BIGBLUEBUTTON_EVENT_ACTIVITY_MANAGEMENT_VIEWED, |
|
| 897 | + 'live_action' => (string)BIGBLUEBUTTON_EVENT_LIVE_SESSION, |
|
| 898 | + 'meeting_create' => (string)BIGBLUEBUTTON_EVENT_MEETING_CREATED, |
|
| 899 | + 'meeting_end' => (string)BIGBLUEBUTTON_EVENT_MEETING_ENDED, |
|
| 900 | + 'meeting_join' => (string)BIGBLUEBUTTON_EVENT_MEETING_JOINED, |
|
| 901 | + 'meeting_left' => (string)BIGBLUEBUTTON_EVENT_MEETING_LEFT, |
|
| 902 | + 'recording_delete' => (string)BIGBLUEBUTTON_EVENT_RECORDING_DELETED, |
|
| 903 | + 'recording_import' => (string)BIGBLUEBUTTON_EVENT_RECORDING_IMPORTED, |
|
| 904 | + 'recording_protect' => (string)BIGBLUEBUTTON_EVENT_RECORDING_PROTECTED, |
|
| 905 | + 'recording_publish' => (string)BIGBLUEBUTTON_EVENT_RECORDING_PUBLISHED, |
|
| 906 | + 'recording_unprotect' => (string)BIGBLUEBUTTON_EVENT_RECORDING_UNPROTECTED, |
|
| 907 | + 'recording_unpublish' => (string)BIGBLUEBUTTON_EVENT_RECORDING_UNPUBLISHED, |
|
| 908 | + 'recording_edit' => (string)BIGBLUEBUTTON_EVENT_RECORDING_EDITED, |
|
| 909 | + 'recording_play' => (string)BIGBLUEBUTTON_EVENT_RECORDING_VIEWED |
|
| 910 | 910 | ); |
| 911 | 911 | } |
| 912 | 912 | |
@@ -927,7 +927,7 @@ discard block |
||
| 927 | 927 | if (array_key_exists('other', $options)) { |
| 928 | 928 | $eventproperties['other'] = $options['other']; |
| 929 | 929 | } |
| 930 | - $event = call_user_func_array('\mod_bigbluebuttonbn\event\bigbluebuttonbn_'.$eventtype.'::create', |
|
| 930 | + $event = call_user_func_array('\mod_bigbluebuttonbn\event\bigbluebuttonbn_' . $eventtype . '::create', |
|
| 931 | 931 | array($eventproperties)); |
| 932 | 932 | $event->trigger(); |
| 933 | 933 | } |
@@ -968,10 +968,10 @@ discard block |
||
| 968 | 968 | $now = time(); |
| 969 | 969 | if (!$forced && isset($result) && $now < ($result['creation_time'] + $cachettl)) { |
| 970 | 970 | // Use the value in the cache. |
| 971 | - return (array) json_decode($result['meeting_info']); |
|
| 971 | + return (array)json_decode($result['meeting_info']); |
|
| 972 | 972 | } |
| 973 | 973 | // Ping again and refresh the cache. |
| 974 | - $meetinginfo = (array) bigbluebuttonbn_wrap_xml_load_file( |
|
| 974 | + $meetinginfo = (array)bigbluebuttonbn_wrap_xml_load_file( |
|
| 975 | 975 | \mod_bigbluebuttonbn\locallib\bigbluebutton::action_url('getMeetingInfo', ['meetingID' => $meetingid]) |
| 976 | 976 | ); |
| 977 | 977 | $cache->set($meetingid, array('creation_time' => time(), 'meeting_info' => json_encode($meetinginfo))); |
@@ -1046,8 +1046,8 @@ discard block |
||
| 1046 | 1046 | * @param string $configxml |
| 1047 | 1047 | */ |
| 1048 | 1048 | function bigbluebuttonbn_set_config_xml_params($meetingid, $configxml) { |
| 1049 | - $params = 'configXML='.urlencode($configxml).'&meetingID='.urlencode($meetingid); |
|
| 1050 | - $configxmlparams = $params.'&checksum='.sha1('setConfigXML'.$params.\mod_bigbluebuttonbn\locallib\config::get('shared_secret')); |
|
| 1049 | + $params = 'configXML=' . urlencode($configxml) . '&meetingID=' . urlencode($meetingid); |
|
| 1050 | + $configxmlparams = $params . '&checksum=' . sha1('setConfigXML' . $params . \mod_bigbluebuttonbn\locallib\config::get('shared_secret')); |
|
| 1051 | 1051 | return $configxmlparams; |
| 1052 | 1052 | } |
| 1053 | 1053 | |
@@ -1056,7 +1056,7 @@ discard block |
||
| 1056 | 1056 | * @param string $configxml |
| 1057 | 1057 | */ |
| 1058 | 1058 | function bigbluebuttonbn_set_config_xml($meetingid, $configxml) { |
| 1059 | - $urldefaultconfig = \mod_bigbluebuttonbn\locallib\config::get('server_url').'api/setConfigXML?'; |
|
| 1059 | + $urldefaultconfig = \mod_bigbluebuttonbn\locallib\config::get('server_url') . 'api/setConfigXML?'; |
|
| 1060 | 1060 | $configxmlparams = bigbluebuttonbn_set_config_xml_params($meetingid, $configxml); |
| 1061 | 1061 | $xml = bigbluebuttonbn_wrap_xml_load_file($urldefaultconfig, BIGBLUEBUTTONBN_METHOD_POST, |
| 1062 | 1062 | $configxmlparams, 'application/x-www-form-urlencoded'); |
@@ -1069,7 +1069,7 @@ discard block |
||
| 1069 | 1069 | */ |
| 1070 | 1070 | function bigbluebuttonbn_set_config_xml_array($meetingid, $configxml) { |
| 1071 | 1071 | $configxml = bigbluebuttonbn_setConfigXML($meetingid, $configxml); |
| 1072 | - $configxmlarray = (array) $configxml; |
|
| 1072 | + $configxmlarray = (array)$configxml; |
|
| 1073 | 1073 | if ($configxmlarray['returncode'] != 'SUCCESS') { |
| 1074 | 1074 | debugging('BigBlueButton was not able to set the custom config.xml file', DEBUG_DEVELOPER); |
| 1075 | 1075 | return ''; |
@@ -1119,7 +1119,7 @@ discard block |
||
| 1119 | 1119 | global $USER; |
| 1120 | 1120 | $starttime = $starttime - ($starttime % 1000); |
| 1121 | 1121 | // Set formatted date. |
| 1122 | - $dateformat = get_string('strftimerecentfull', 'langconfig').' %Z'; |
|
| 1122 | + $dateformat = get_string('strftimerecentfull', 'langconfig') . ' %Z'; |
|
| 1123 | 1123 | return userdate($starttime / 1000, $dateformat, usertimezone($USER->timezone)); |
| 1124 | 1124 | } |
| 1125 | 1125 | |
@@ -1135,7 +1135,7 @@ discard block |
||
| 1135 | 1135 | function bigbluebuttonbn_get_recording_data_row_actionbar($recording, $tools) { |
| 1136 | 1136 | $actionbar = ''; |
| 1137 | 1137 | foreach ($tools as $tool) { |
| 1138 | - if ( $tool == 'protect' && !isset($recording['protected']) ) { |
|
| 1138 | + if ($tool == 'protect' && !isset($recording['protected'])) { |
|
| 1139 | 1139 | continue; |
| 1140 | 1140 | } |
| 1141 | 1141 | $buttonpayload = bigbluebuttonbn_get_recording_data_row_actionbar_payload($recording, $tool); |
@@ -1179,7 +1179,7 @@ discard block |
||
| 1179 | 1179 | $visibility = 'hidden '; |
| 1180 | 1180 | } |
| 1181 | 1181 | $recordingpreview = html_writer::start_tag('div', |
| 1182 | - array('id' => 'preview-'.$recording['recordID'], $visibility => $visibility)); |
|
| 1182 | + array('id' => 'preview-' . $recording['recordID'], $visibility => $visibility)); |
|
| 1183 | 1183 | foreach ($recording['playbacks'] as $playback) { |
| 1184 | 1184 | if (isset($playback['preview'])) { |
| 1185 | 1185 | foreach ($playback['preview'] as $image) { |
@@ -1207,13 +1207,13 @@ discard block |
||
| 1207 | 1207 | if ($recording['published'] === 'false') { |
| 1208 | 1208 | $visibility = 'hidden '; |
| 1209 | 1209 | } |
| 1210 | - $id = 'playbacks-'.$recording['recordID']; |
|
| 1210 | + $id = 'playbacks-' . $recording['recordID']; |
|
| 1211 | 1211 | $recordingtypes = html_writer::start_tag('div', array('id' => $id, 'data-imported' => $dataimported, |
| 1212 | 1212 | 'data-meetingid' => $recording['meetingID'], 'data-recordingid' => $recording['recordID'], |
| 1213 | 1213 | 'title' => $title, $visibility => $visibility)); |
| 1214 | 1214 | foreach ($recording['playbacks'] as $playback) { |
| 1215 | 1215 | $recordingtypes .= bigbluebuttonbn_get_recording_data_row_type($recording, $bigbluebuttonbnid, |
| 1216 | - $playback).' '; |
|
| 1216 | + $playback) . ' '; |
|
| 1217 | 1217 | } |
| 1218 | 1218 | $recordingtypes .= html_writer::end_tag('div'); |
| 1219 | 1219 | return $recordingtypes; |
@@ -1221,12 +1221,12 @@ discard block |
||
| 1221 | 1221 | |
| 1222 | 1222 | function bigbluebuttonbn_get_recording_data_row_type($recording, $bigbluebuttonbnid, $playback) { |
| 1223 | 1223 | global $CFG, $OUTPUT; |
| 1224 | - $title = get_string('view_recording_format_'.$playback['type'], 'bigbluebuttonbn'); |
|
| 1224 | + $title = get_string('view_recording_format_' . $playback['type'], 'bigbluebuttonbn'); |
|
| 1225 | 1225 | $onclick = 'M.mod_bigbluebuttonbn.recordings.recording_play(this);'; |
| 1226 | - $href = $CFG->wwwroot.'/mod/bigbluebuttonbn/bbb_view.php?action=playback&bn='.$bigbluebuttonbnid. |
|
| 1227 | - '&mid='.$recording['meetingID'].'&rid='.$recording['recordID'].'&rtype='.$playback['type']; |
|
| 1226 | + $href = $CFG->wwwroot . '/mod/bigbluebuttonbn/bbb_view.php?action=playback&bn=' . $bigbluebuttonbnid . |
|
| 1227 | + '&mid=' . $recording['meetingID'] . '&rid=' . $recording['recordID'] . '&rtype=' . $playback['type']; |
|
| 1228 | 1228 | if (!isset($recording['imported']) || !isset($recording['protected']) || $recording['protected'] === 'false') { |
| 1229 | - $href .= '&href='.urlencode($playback['url']); |
|
| 1229 | + $href .= '&href=' . urlencode($playback['url']); |
|
| 1230 | 1230 | } |
| 1231 | 1231 | $linkattributes = array('title' => $title, |
| 1232 | 1232 | 'class' => 'btn btn-sm btn-default', 'onclick' => $onclick, |
@@ -1314,11 +1314,11 @@ discard block |
||
| 1314 | 1314 | $target .= '-' . $data['target']; |
| 1315 | 1315 | } |
| 1316 | 1316 | $id = 'recording-' . $target . '-' . $recording['recordID']; |
| 1317 | - $onclick = 'M.mod_bigbluebuttonbn.recordings.recording_'.$data['action'].'(this);'; |
|
| 1317 | + $onclick = 'M.mod_bigbluebuttonbn.recordings.recording_' . $data['action'] . '(this);'; |
|
| 1318 | 1318 | if ((boolean)\mod_bigbluebuttonbn\locallib\config::get('recording_icons_enabled')) { |
| 1319 | 1319 | // With icon for $manageaction. |
| 1320 | 1320 | $iconattributes = array('id' => $id, 'class' => 'iconsmall'); |
| 1321 | - $icon = new pix_icon('i/'.$data['tag'], |
|
| 1321 | + $icon = new pix_icon('i/' . $data['tag'], |
|
| 1322 | 1322 | get_string('view_recording_list_actionbar_' . $data['action'], 'bigbluebuttonbn'), |
| 1323 | 1323 | 'moodle', $iconattributes); |
| 1324 | 1324 | $linkattributes = array( |
@@ -1409,7 +1409,7 @@ discard block |
||
| 1409 | 1409 | if (isset($recordings) && !array_key_exists('messageKey', $recordings)) { |
| 1410 | 1410 | // There are recordings for this meeting. |
| 1411 | 1411 | foreach ($recordings as $recording) { |
| 1412 | - if ( !bigbluebuttonbn_include_recording_table_row($bbbsession, $recording) ) { |
|
| 1412 | + if (!bigbluebuttonbn_include_recording_table_row($bbbsession, $recording)) { |
|
| 1413 | 1413 | continue; |
| 1414 | 1414 | } |
| 1415 | 1415 | bigbluebuttonbn_get_recording_table_row($bbbsession, $recording, $tools, $table); |
@@ -1427,7 +1427,7 @@ discard block |
||
| 1427 | 1427 | } |
| 1428 | 1428 | |
| 1429 | 1429 | $row = new html_table_row(); |
| 1430 | - $row->id = 'recording-td-'.$recording['recordID']; |
|
| 1430 | + $row->id = 'recording-td-' . $recording['recordID']; |
|
| 1431 | 1431 | $row->attributes['data-imported'] = 'false'; |
| 1432 | 1432 | $texthead = ''; |
| 1433 | 1433 | $texttail = ''; |
@@ -1451,7 +1451,7 @@ discard block |
||
| 1451 | 1451 | } |
| 1452 | 1452 | |
| 1453 | 1453 | function bigbluebuttonbn_include_recording_table_row($bbbsession, $recording) { |
| 1454 | - if ( isset($recording['imported']) || !isset($bbbsession['group']) || $recording['meetingID'] == $bbbsession['meetingid'] ) { |
|
| 1454 | + if (isset($recording['imported']) || !isset($bbbsession['group']) || $recording['meetingID'] == $bbbsession['meetingid']) { |
|
| 1455 | 1455 | return true; |
| 1456 | 1456 | } |
| 1457 | 1457 | return false; |
@@ -1466,9 +1466,9 @@ discard block |
||
| 1466 | 1466 | // Build the message_body. |
| 1467 | 1467 | $msg->activity_type = ''; |
| 1468 | 1468 | $msg->activity_title = $bigbluebuttonbn->name; |
| 1469 | - $messagetext = '<p>'.get_string('email_body_recording_ready_for', 'bigbluebuttonbn').' '. |
|
| 1470 | - $msg->activity_type.' "'.$msg->activity_title.'" '. |
|
| 1471 | - get_string('email_body_recording_ready_is_ready', 'bigbluebuttonbn').'.</p>'; |
|
| 1469 | + $messagetext = '<p>' . get_string('email_body_recording_ready_for', 'bigbluebuttonbn') . ' ' . |
|
| 1470 | + $msg->activity_type . ' "' . $msg->activity_title . '" ' . |
|
| 1471 | + get_string('email_body_recording_ready_is_ready', 'bigbluebuttonbn') . '.</p>'; |
|
| 1472 | 1472 | |
| 1473 | 1473 | bigbluebuttonbn_send_notification($sender, $bigbluebuttonbn, $messagetext); |
| 1474 | 1474 | } |
@@ -1566,15 +1566,15 @@ discard block |
||
| 1566 | 1566 | |
| 1567 | 1567 | function bigbluebuttonbn_get_recordings_sql_selectdeleted($courseid, $bigbluebuttonbnid = null, $subset = true) { |
| 1568 | 1568 | if ($bigbluebuttonbnid === null) { |
| 1569 | - return "courseid = '{$courseid}' AND log = '".BIGBLUEBUTTONBN_LOG_EVENT_DELETE. |
|
| 1569 | + return "courseid = '{$courseid}' AND log = '" . BIGBLUEBUTTONBN_LOG_EVENT_DELETE . |
|
| 1570 | 1570 | "' AND meta like '%has_recordings%' AND meta like '%true%'"; |
| 1571 | 1571 | } |
| 1572 | 1572 | if ($subset) { |
| 1573 | - return "bigbluebuttonbnid = '{$bigbluebuttonbnid}' AND log = '".BIGBLUEBUTTONBN_LOG_EVENT_DELETE. |
|
| 1573 | + return "bigbluebuttonbnid = '{$bigbluebuttonbnid}' AND log = '" . BIGBLUEBUTTONBN_LOG_EVENT_DELETE . |
|
| 1574 | 1574 | "' AND meta like '%has_recordings%' AND meta like '%true%'"; |
| 1575 | 1575 | } |
| 1576 | - return "courseid = '{$courseid}' AND bigbluebuttonbnid <> '{$bigbluebuttonbnid}' AND log = '". |
|
| 1577 | - BIGBLUEBUTTONBN_LOG_EVENT_DELETE."' AND meta like '%has_recordings%' AND meta like '%true%'"; |
|
| 1576 | + return "courseid = '{$courseid}' AND bigbluebuttonbnid <> '{$bigbluebuttonbnid}' AND log = '" . |
|
| 1577 | + BIGBLUEBUTTONBN_LOG_EVENT_DELETE . "' AND meta like '%has_recordings%' AND meta like '%true%'"; |
|
| 1578 | 1578 | } |
| 1579 | 1579 | |
| 1580 | 1580 | function bigbluebuttonbn_get_allrecordings($courseid, $bigbluebuttonbnid = null, $subset = true, |
@@ -1623,7 +1623,7 @@ discard block |
||
| 1623 | 1623 | |
| 1624 | 1624 | // Prepare select for loading records based on existent bigbluebuttonbns. |
| 1625 | 1625 | $sql = 'SELECT DISTINCT meetingid, bigbluebuttonbnid FROM {bigbluebuttonbn_logs} WHERE '; |
| 1626 | - $sql .= '(bigbluebuttonbnid='.implode(' OR bigbluebuttonbnid=', array_keys($bigbluebuttonbns)).')'; |
|
| 1626 | + $sql .= '(bigbluebuttonbnid=' . implode(' OR bigbluebuttonbnid=', array_keys($bigbluebuttonbns)) . ')'; |
|
| 1627 | 1627 | // Include only Create events and exclude those with record not true. |
| 1628 | 1628 | $sql .= ' AND log = ? AND meta LIKE ? AND meta LIKE ?'; |
| 1629 | 1629 | // Execute select for loading records based on existent bigbluebuttonbns. |
@@ -1707,8 +1707,8 @@ discard block |
||
| 1707 | 1707 | function bigbluebuttonbn_format_activity_time($time) { |
| 1708 | 1708 | $activitytime = ''; |
| 1709 | 1709 | if ($time) { |
| 1710 | - $activitytime = calendar_day_representation($time).' '. |
|
| 1711 | - get_string('mod_form_field_notification_msg_at', 'bigbluebuttonbn').' '. |
|
| 1710 | + $activitytime = calendar_day_representation($time) . ' ' . |
|
| 1711 | + get_string('mod_form_field_notification_msg_at', 'bigbluebuttonbn') . ' ' . |
|
| 1712 | 1712 | calendar_time_representation($time); |
| 1713 | 1713 | } |
| 1714 | 1714 | |