@@ -26,8 +26,8 @@ discard block |
||
| 26 | 26 | |
| 27 | 27 | defined('MOODLE_INTERNAL') || die(); |
| 28 | 28 | |
| 29 | -require_once(dirname(__FILE__).'/locallib.php'); |
|
| 30 | -require_once($CFG->dirroot.'/course/moodleform_mod.php'); |
|
| 29 | +require_once(dirname(__FILE__) . '/locallib.php'); |
|
| 30 | +require_once($CFG->dirroot . '/course/moodleform_mod.php'); |
|
| 31 | 31 | |
| 32 | 32 | /** |
| 33 | 33 | * Moodle class for mod_form. |
@@ -48,7 +48,7 @@ discard block |
||
| 48 | 48 | $serverversion = bigbluebuttonbn_get_server_version(); |
| 49 | 49 | if (is_null($serverversion)) { |
| 50 | 50 | print_error('general_error_unable_connect', 'bigbluebuttonbn', |
| 51 | - $CFG->wwwroot.'/admin/settings.php?section=modsettingbigbluebuttonbn'); |
|
| 51 | + $CFG->wwwroot . '/admin/settings.php?section=modsettingbigbluebuttonbn'); |
|
| 52 | 52 | return; |
| 53 | 53 | } |
| 54 | 54 | // Context. |
@@ -69,7 +69,7 @@ discard block |
||
| 69 | 69 | $context = context_course::instance($course->id); |
| 70 | 70 | // UI configuration options. |
| 71 | 71 | $cfg = \mod_bigbluebuttonbn\locallib\config::get_options(); |
| 72 | -error_log("RABSER DEBUG ".print_r($cfg,true)); |
|
| 72 | +error_log("RABSER DEBUG " . print_r($cfg, true)); |
|
| 73 | 73 | $mform = &$this->_form; |
| 74 | 74 | $jsvars = array(); |
| 75 | 75 | $jsvars['instanceTypeRoomOnly'] = BIGBLUEBUTTONBN_TYPE_ROOM_ONLY; |
@@ -119,7 +119,7 @@ discard block |
||
| 119 | 119 | ); |
| 120 | 120 | $defaultvalues['presentation'] = $draftitemid; |
| 121 | 121 | } catch (Exception $e) { |
| 122 | - debugging('Presentation could not be loaded: '.$e->getMessage(), DEBUG_DEVELOPER); |
|
| 122 | + debugging('Presentation could not be loaded: ' . $e->getMessage(), DEBUG_DEVELOPER); |
|
| 123 | 123 | return; |
| 124 | 124 | } |
| 125 | 125 | } |
@@ -398,9 +398,9 @@ discard block |
||
| 398 | 398 | |
| 399 | 399 | $mform->addElement('header', 'clienttypeselection', get_string('mod_form_block_clienttype', 'bigbluebuttonbn')); |
| 400 | 400 | $this->bigbluebuttonbn_mform_add_element($mform, $field['type'], $field['name'], $field['data_type'], |
| 401 | - $field['description_key'], $cfg['clienttype_default'] ,$clienttype_select_choices); |
|
| 401 | + $field['description_key'], $cfg['clienttype_default'], $clienttype_select_choices); |
|
| 402 | 402 | } else { |
| 403 | - $this->bigbluebuttonbn_mform_add_element($mform, $field['type'], $field['name'], $field['data_type'], null,$cfg['clienttype_default']); |
|
| 403 | + $this->bigbluebuttonbn_mform_add_element($mform, $field['type'], $field['name'], $field['data_type'], null, $cfg['clienttype_default']); |
|
| 404 | 404 | } |
| 405 | 405 | |
| 406 | 406 | } |
@@ -447,7 +447,7 @@ discard block |
||
| 447 | 447 | return; |
| 448 | 448 | } |
| 449 | 449 | $mform->addElement($type, $name, get_string($descriptionkey, 'bigbluebuttonbn'), $options); |
| 450 | - if (get_string_manager()->string_exists($descriptionkey.'_help', 'bigbluebuttonbn')) { |
|
| 450 | + if (get_string_manager()->string_exists($descriptionkey . '_help', 'bigbluebuttonbn')) { |
|
| 451 | 451 | $mform->addHelpButton($name, $descriptionkey, 'bigbluebuttonbn'); |
| 452 | 452 | } |
| 453 | 453 | if (!empty($rule)) { |
@@ -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; |
@@ -87,14 +87,14 @@ discard block |
||
| 87 | 87 | * |
| 88 | 88 | * @return string |
| 89 | 89 | */ |
| 90 | -function bigbluebuttonbn_get_join_url($meetingid, $username, $pw, $logouturl, $configtoken = null, $userid = null, $clienttype=0) { |
|
| 90 | +function bigbluebuttonbn_get_join_url($meetingid, $username, $pw, $logouturl, $configtoken = null, $userid = null, $clienttype = 0) { |
|
| 91 | 91 | $data = ['meetingID' => $meetingid, |
| 92 | 92 | 'fullName' => $username, |
| 93 | 93 | 'password' => $pw, |
| 94 | 94 | 'logoutURL' => $logouturl, |
| 95 | 95 | ]; |
| 96 | 96 | // Choose between Adobe Flash or HTML5 Client |
| 97 | - if ( $clienttype == 1 ) { |
|
| 97 | + if ($clienttype == 1) { |
|
| 98 | 98 | $data['joinViaHtml5'] = 'true'; |
| 99 | 99 | } |
| 100 | 100 | |
@@ -123,8 +123,8 @@ discard block |
||
| 123 | 123 | $data = null; |
| 124 | 124 | if (!is_null($pname) && !is_null($purl)) { |
| 125 | 125 | $method = 'POST'; |
| 126 | - $data = "<?xml version='1.0' encoding='UTF-8'?><modules><module name='presentation'><document url='". |
|
| 127 | - $purl."' /></module></modules>"; |
|
| 126 | + $data = "<?xml version='1.0' encoding='UTF-8'?><modules><module name='presentation'><document url='" . |
|
| 127 | + $purl . "' /></module></modules>"; |
|
| 128 | 128 | } |
| 129 | 129 | $xml = bigbluebuttonbn_wrap_xml_load_file($createmeetingurl, $method, $data); |
| 130 | 130 | if ($xml) { |
@@ -285,7 +285,7 @@ discard block |
||
| 285 | 285 | // Override imported flag with actual ID. |
| 286 | 286 | $recording['imported'] = $recordimported->id; |
| 287 | 287 | if (isset($recordimported->protected)) { |
| 288 | - $recording['protected'] = (string) $recordimported->protected; |
|
| 288 | + $recording['protected'] = (string)$recordimported->protected; |
|
| 289 | 289 | } |
| 290 | 290 | $recordsimportedarray[$recording['recordID']] = $recording; |
| 291 | 291 | } |
@@ -315,21 +315,21 @@ discard block |
||
| 315 | 315 | // Add formats. |
| 316 | 316 | $playbackarray = array(); |
| 317 | 317 | foreach ($recording->playback->format as $format) { |
| 318 | - $playbackarray[(string) $format->type] = array('type' => (string) $format->type, |
|
| 319 | - 'url' => trim((string) $format->url), 'length' => (string) $format->length); |
|
| 318 | + $playbackarray[(string)$format->type] = array('type' => (string)$format->type, |
|
| 319 | + 'url' => trim((string)$format->url), 'length' => (string)$format->length); |
|
| 320 | 320 | // Add preview per format when existing. |
| 321 | 321 | if ($format->preview) { |
| 322 | - $playbackarray[(string) $format->type]['preview'] = bigbluebuttonbn_get_recording_preview_images($format->preview); |
|
| 322 | + $playbackarray[(string)$format->type]['preview'] = bigbluebuttonbn_get_recording_preview_images($format->preview); |
|
| 323 | 323 | } |
| 324 | 324 | } |
| 325 | 325 | // Add the metadata to the recordings array. |
| 326 | 326 | $metadataarray = bigbluebuttonbn_get_recording_array_meta(get_object_vars($recording->metadata)); |
| 327 | - $recordingarray = array('recordID' => (string) $recording->recordID, |
|
| 328 | - 'meetingID' => (string) $recording->meetingID, 'meetingName' => (string) $recording->name, |
|
| 329 | - 'published' => (string) $recording->published, 'startTime' => (string) $recording->startTime, |
|
| 330 | - 'endTime' => (string) $recording->endTime, 'playbacks' => $playbackarray); |
|
| 327 | + $recordingarray = array('recordID' => (string)$recording->recordID, |
|
| 328 | + 'meetingID' => (string)$recording->meetingID, 'meetingName' => (string)$recording->name, |
|
| 329 | + 'published' => (string)$recording->published, 'startTime' => (string)$recording->startTime, |
|
| 330 | + 'endTime' => (string)$recording->endTime, 'playbacks' => $playbackarray); |
|
| 331 | 331 | if (isset($recording->protected)) { |
| 332 | - $recordingarray['protected'] = (string) $recording->protected; |
|
| 332 | + $recordingarray['protected'] = (string)$recording->protected; |
|
| 333 | 333 | } |
| 334 | 334 | return $recordingarray + $metadataarray; |
| 335 | 335 | } |
@@ -344,9 +344,9 @@ discard block |
||
| 344 | 344 | function bigbluebuttonbn_get_recording_preview_images($preview) { |
| 345 | 345 | $imagesarray = array(); |
| 346 | 346 | foreach ($preview->images->image as $image) { |
| 347 | - $imagearray = array('url' => trim((string) $image)); |
|
| 347 | + $imagearray = array('url' => trim((string)$image)); |
|
| 348 | 348 | foreach ($image->attributes() as $attkey => $attvalue) { |
| 349 | - $imagearray[$attkey] = (string) $attvalue; |
|
| 349 | + $imagearray[$attkey] = (string)$attvalue; |
|
| 350 | 350 | } |
| 351 | 351 | array_push($imagesarray, $imagearray); |
| 352 | 352 | } |
@@ -366,7 +366,7 @@ discard block |
||
| 366 | 366 | if (is_object($value)) { |
| 367 | 367 | $value = ''; |
| 368 | 368 | } |
| 369 | - $metadataarray['meta_'.$key] = $value; |
|
| 369 | + $metadataarray['meta_' . $key] = $value; |
|
| 370 | 370 | } |
| 371 | 371 | return $metadataarray; |
| 372 | 372 | } |
@@ -438,7 +438,7 @@ discard block |
||
| 438 | 438 | $ids = explode(',', $recordids); |
| 439 | 439 | foreach ($ids as $id) { |
| 440 | 440 | $xml = bigbluebuttonbn_wrap_xml_load_file( |
| 441 | - \mod_bigbluebuttonbn\locallib\bigbluebutton::action_url('updateRecordings', ['recordID' => $id] + (array) $params) |
|
| 441 | + \mod_bigbluebuttonbn\locallib\bigbluebutton::action_url('updateRecordings', ['recordID' => $id] + (array)$params) |
|
| 442 | 442 | ); |
| 443 | 443 | if ($xml && $xml->returncode != 'SUCCESS') { |
| 444 | 444 | return false; |
@@ -503,7 +503,7 @@ discard block |
||
| 503 | 503 | return $xml; |
| 504 | 504 | } catch (Exception $e) { |
| 505 | 505 | libxml_use_internal_errors($previous); |
| 506 | - $error = 'Caught exception: '.$e->getMessage(); |
|
| 506 | + $error = 'Caught exception: ' . $e->getMessage(); |
|
| 507 | 507 | debugging($error, DEBUG_DEVELOPER); |
| 508 | 508 | return null; |
| 509 | 509 | } |
@@ -514,7 +514,7 @@ discard block |
||
| 514 | 514 | $response = simplexml_load_file($url, 'SimpleXMLElement', LIBXML_NOCDATA | LIBXML_NOBLANKS); |
| 515 | 515 | return $response; |
| 516 | 516 | } catch (Exception $e) { |
| 517 | - $error = 'Caught exception: '.$e->getMessage(); |
|
| 517 | + $error = 'Caught exception: ' . $e->getMessage(); |
|
| 518 | 518 | debugging($error, DEBUG_DEVELOPER); |
| 519 | 519 | libxml_use_internal_errors($previous); |
| 520 | 520 | return null; |
@@ -540,8 +540,8 @@ discard block |
||
| 540 | 540 | } |
| 541 | 541 | $options = array(); |
| 542 | 542 | $options['CURLOPT_HTTPHEADER'] = array( |
| 543 | - 'Content-Type: '.$contenttype, |
|
| 544 | - 'Content-Length: '.strlen($data), |
|
| 543 | + 'Content-Type: ' . $contenttype, |
|
| 544 | + 'Content-Length: ' . strlen($data), |
|
| 545 | 545 | 'Content-Language: en-US', |
| 546 | 546 | ); |
| 547 | 547 | |
@@ -562,7 +562,7 @@ discard block |
||
| 562 | 562 | * @return void |
| 563 | 563 | */ |
| 564 | 564 | function bigbluebuttonbn_end_meeting_if_running($bigbluebuttonbn) { |
| 565 | - $meetingid = $bigbluebuttonbn->meetingid.'-'.$bigbluebuttonbn->course.'-'.$bigbluebuttonbn->id; |
|
| 565 | + $meetingid = $bigbluebuttonbn->meetingid . '-' . $bigbluebuttonbn->course . '-' . $bigbluebuttonbn->id; |
|
| 566 | 566 | if (bigbluebuttonbn_is_meeting_running($meetingid)) { |
| 567 | 567 | bigbluebuttonbn_end_meeting($meetingid, $bigbluebuttonbn->moderatorpass); |
| 568 | 568 | } |
@@ -582,9 +582,9 @@ discard block |
||
| 582 | 582 | if ($userroles) { |
| 583 | 583 | $where = ''; |
| 584 | 584 | foreach ($userroles as $userrole) { |
| 585 | - $where .= (empty($where) ? ' WHERE' : ' OR').' id=' . $userrole->roleid; |
|
| 585 | + $where .= (empty($where) ? ' WHERE' : ' OR') . ' id=' . $userrole->roleid; |
|
| 586 | 586 | } |
| 587 | - $userroles = $DB->get_records_sql('SELECT * FROM {role}'.$where); |
|
| 587 | + $userroles = $DB->get_records_sql('SELECT * FROM {role}' . $where); |
|
| 588 | 588 | } |
| 589 | 589 | return $userroles; |
| 590 | 590 | } |
@@ -607,7 +607,7 @@ discard block |
||
| 607 | 607 | * @return array $users |
| 608 | 608 | */ |
| 609 | 609 | function bigbluebuttonbn_get_users(context $context = null) { |
| 610 | - $users = (array) get_enrolled_users($context, '', 0, 'u.*', null, 0, 0, true); |
|
| 610 | + $users = (array)get_enrolled_users($context, '', 0, 'u.*', null, 0, 0, true); |
|
| 611 | 611 | foreach ($users as $key => $value) { |
| 612 | 612 | $users[$key] = fullname($value); |
| 613 | 613 | } |
@@ -622,7 +622,7 @@ discard block |
||
| 622 | 622 | * @return array $users |
| 623 | 623 | */ |
| 624 | 624 | function bigbluebuttonbn_get_users_select(context $context = null) { |
| 625 | - $users = (array) get_enrolled_users($context, '', 0, 'u.*', null, 0, 0, true); |
|
| 625 | + $users = (array)get_enrolled_users($context, '', 0, 'u.*', null, 0, 0, true); |
|
| 626 | 626 | foreach ($users as $key => $value) { |
| 627 | 627 | $users[$key] = array('id' => $value->id, 'name' => fullname($value)); |
| 628 | 628 | } |
@@ -637,7 +637,7 @@ discard block |
||
| 637 | 637 | * @return array $roles |
| 638 | 638 | */ |
| 639 | 639 | function bigbluebuttonbn_get_roles(context $context = null) { |
| 640 | - $roles = (array) role_get_names($context); |
|
| 640 | + $roles = (array)role_get_names($context); |
|
| 641 | 641 | foreach ($roles as $key => $value) { |
| 642 | 642 | $roles[$key] = $value->localname; |
| 643 | 643 | } |
@@ -652,7 +652,7 @@ discard block |
||
| 652 | 652 | * @return array $users |
| 653 | 653 | */ |
| 654 | 654 | function bigbluebuttonbn_get_roles_select(context $context = null) { |
| 655 | - $roles = (array) role_get_names($context); |
|
| 655 | + $roles = (array)role_get_names($context); |
|
| 656 | 656 | foreach ($roles as $key => $value) { |
| 657 | 657 | $roles[$key] = array('id' => $value->id, 'name' => $value->localname); |
| 658 | 658 | } |
@@ -667,7 +667,7 @@ discard block |
||
| 667 | 667 | * @return object $role |
| 668 | 668 | */ |
| 669 | 669 | function bigbluebuttonbn_get_role($id) { |
| 670 | - $roles = (array) role_get_names(); |
|
| 670 | + $roles = (array)role_get_names(); |
|
| 671 | 671 | if (is_numeric($id) && isset($roles[$id])) { |
| 672 | 672 | return (object)$roles[$id]; |
| 673 | 673 | } |
@@ -824,7 +824,7 @@ discard block |
||
| 824 | 824 | if (!isguestuser()) { |
| 825 | 825 | $userroles = bigbluebuttonbn_get_user_roles($context, $userid); |
| 826 | 826 | } |
| 827 | - return bigbluebuttonbn_is_moderator_validator($participantlist, $userid , $userroles); |
|
| 827 | + return bigbluebuttonbn_is_moderator_validator($participantlist, $userid, $userroles); |
|
| 828 | 828 | } |
| 829 | 829 | |
| 830 | 830 | /** |
@@ -980,7 +980,7 @@ discard block |
||
| 980 | 980 | function bigbluebuttonbn_generate_nonce() { |
| 981 | 981 | $mt = microtime(); |
| 982 | 982 | $rand = mt_rand(); |
| 983 | - return md5($mt.$rand); |
|
| 983 | + return md5($mt . $rand); |
|
| 984 | 984 | } |
| 985 | 985 | |
| 986 | 986 | /** |
@@ -1006,21 +1006,21 @@ discard block |
||
| 1006 | 1006 | */ |
| 1007 | 1007 | function bigbluebuttonbn_events() { |
| 1008 | 1008 | return array( |
| 1009 | - (string) BIGBLUEBUTTON_EVENT_ACTIVITY_VIEWED, |
|
| 1010 | - (string) BIGBLUEBUTTON_EVENT_ACTIVITY_MANAGEMENT_VIEWED, |
|
| 1011 | - (string) BIGBLUEBUTTON_EVENT_LIVE_SESSION, |
|
| 1012 | - (string) BIGBLUEBUTTON_EVENT_MEETING_CREATED, |
|
| 1013 | - (string) BIGBLUEBUTTON_EVENT_MEETING_ENDED, |
|
| 1014 | - (string) BIGBLUEBUTTON_EVENT_MEETING_JOINED, |
|
| 1015 | - (string) BIGBLUEBUTTON_EVENT_MEETING_LEFT, |
|
| 1016 | - (string) BIGBLUEBUTTON_EVENT_RECORDING_DELETED, |
|
| 1017 | - (string) BIGBLUEBUTTON_EVENT_RECORDING_IMPORTED, |
|
| 1018 | - (string) BIGBLUEBUTTON_EVENT_RECORDING_PROTECTED, |
|
| 1019 | - (string) BIGBLUEBUTTON_EVENT_RECORDING_PUBLISHED, |
|
| 1020 | - (string) BIGBLUEBUTTON_EVENT_RECORDING_UNPROTECTED, |
|
| 1021 | - (string) BIGBLUEBUTTON_EVENT_RECORDING_UNPUBLISHED, |
|
| 1022 | - (string) BIGBLUEBUTTON_EVENT_RECORDING_EDITED, |
|
| 1023 | - (string) BIGBLUEBUTTON_EVENT_RECORDING_VIEWED |
|
| 1009 | + (string)BIGBLUEBUTTON_EVENT_ACTIVITY_VIEWED, |
|
| 1010 | + (string)BIGBLUEBUTTON_EVENT_ACTIVITY_MANAGEMENT_VIEWED, |
|
| 1011 | + (string)BIGBLUEBUTTON_EVENT_LIVE_SESSION, |
|
| 1012 | + (string)BIGBLUEBUTTON_EVENT_MEETING_CREATED, |
|
| 1013 | + (string)BIGBLUEBUTTON_EVENT_MEETING_ENDED, |
|
| 1014 | + (string)BIGBLUEBUTTON_EVENT_MEETING_JOINED, |
|
| 1015 | + (string)BIGBLUEBUTTON_EVENT_MEETING_LEFT, |
|
| 1016 | + (string)BIGBLUEBUTTON_EVENT_RECORDING_DELETED, |
|
| 1017 | + (string)BIGBLUEBUTTON_EVENT_RECORDING_IMPORTED, |
|
| 1018 | + (string)BIGBLUEBUTTON_EVENT_RECORDING_PROTECTED, |
|
| 1019 | + (string)BIGBLUEBUTTON_EVENT_RECORDING_PUBLISHED, |
|
| 1020 | + (string)BIGBLUEBUTTON_EVENT_RECORDING_UNPROTECTED, |
|
| 1021 | + (string)BIGBLUEBUTTON_EVENT_RECORDING_UNPUBLISHED, |
|
| 1022 | + (string)BIGBLUEBUTTON_EVENT_RECORDING_EDITED, |
|
| 1023 | + (string)BIGBLUEBUTTON_EVENT_RECORDING_VIEWED |
|
| 1024 | 1024 | ); |
| 1025 | 1025 | } |
| 1026 | 1026 | |
@@ -1031,21 +1031,21 @@ discard block |
||
| 1031 | 1031 | */ |
| 1032 | 1032 | function bigbluebuttonbn_events_action() { |
| 1033 | 1033 | return array( |
| 1034 | - 'view' => (string) BIGBLUEBUTTON_EVENT_ACTIVITY_VIEWED, |
|
| 1035 | - 'view_management' => (string) BIGBLUEBUTTON_EVENT_ACTIVITY_MANAGEMENT_VIEWED, |
|
| 1036 | - 'live_action' => (string) BIGBLUEBUTTON_EVENT_LIVE_SESSION, |
|
| 1037 | - 'meeting_create' => (string) BIGBLUEBUTTON_EVENT_MEETING_CREATED, |
|
| 1038 | - 'meeting_end' => (string) BIGBLUEBUTTON_EVENT_MEETING_ENDED, |
|
| 1039 | - 'meeting_join' => (string) BIGBLUEBUTTON_EVENT_MEETING_JOINED, |
|
| 1040 | - 'meeting_left' => (string) BIGBLUEBUTTON_EVENT_MEETING_LEFT, |
|
| 1041 | - 'recording_delete' => (string) BIGBLUEBUTTON_EVENT_RECORDING_DELETED, |
|
| 1042 | - 'recording_import' => (string) BIGBLUEBUTTON_EVENT_RECORDING_IMPORTED, |
|
| 1043 | - 'recording_protect' => (string) BIGBLUEBUTTON_EVENT_RECORDING_PROTECTED, |
|
| 1044 | - 'recording_publish' => (string) BIGBLUEBUTTON_EVENT_RECORDING_PUBLISHED, |
|
| 1045 | - 'recording_unprotect' => (string) BIGBLUEBUTTON_EVENT_RECORDING_UNPROTECTED, |
|
| 1046 | - 'recording_unpublish' => (string) BIGBLUEBUTTON_EVENT_RECORDING_UNPUBLISHED, |
|
| 1047 | - 'recording_edit' => (string) BIGBLUEBUTTON_EVENT_RECORDING_EDITED, |
|
| 1048 | - 'recording_play' => (string) BIGBLUEBUTTON_EVENT_RECORDING_VIEWED |
|
| 1034 | + 'view' => (string)BIGBLUEBUTTON_EVENT_ACTIVITY_VIEWED, |
|
| 1035 | + 'view_management' => (string)BIGBLUEBUTTON_EVENT_ACTIVITY_MANAGEMENT_VIEWED, |
|
| 1036 | + 'live_action' => (string)BIGBLUEBUTTON_EVENT_LIVE_SESSION, |
|
| 1037 | + 'meeting_create' => (string)BIGBLUEBUTTON_EVENT_MEETING_CREATED, |
|
| 1038 | + 'meeting_end' => (string)BIGBLUEBUTTON_EVENT_MEETING_ENDED, |
|
| 1039 | + 'meeting_join' => (string)BIGBLUEBUTTON_EVENT_MEETING_JOINED, |
|
| 1040 | + 'meeting_left' => (string)BIGBLUEBUTTON_EVENT_MEETING_LEFT, |
|
| 1041 | + 'recording_delete' => (string)BIGBLUEBUTTON_EVENT_RECORDING_DELETED, |
|
| 1042 | + 'recording_import' => (string)BIGBLUEBUTTON_EVENT_RECORDING_IMPORTED, |
|
| 1043 | + 'recording_protect' => (string)BIGBLUEBUTTON_EVENT_RECORDING_PROTECTED, |
|
| 1044 | + 'recording_publish' => (string)BIGBLUEBUTTON_EVENT_RECORDING_PUBLISHED, |
|
| 1045 | + 'recording_unprotect' => (string)BIGBLUEBUTTON_EVENT_RECORDING_UNPROTECTED, |
|
| 1046 | + 'recording_unpublish' => (string)BIGBLUEBUTTON_EVENT_RECORDING_UNPUBLISHED, |
|
| 1047 | + 'recording_edit' => (string)BIGBLUEBUTTON_EVENT_RECORDING_EDITED, |
|
| 1048 | + 'recording_play' => (string)BIGBLUEBUTTON_EVENT_RECORDING_VIEWED |
|
| 1049 | 1049 | ); |
| 1050 | 1050 | } |
| 1051 | 1051 | |
@@ -1076,7 +1076,7 @@ discard block |
||
| 1076 | 1076 | if (array_key_exists('other', $options)) { |
| 1077 | 1077 | $eventproperties['other'] = $options['other']; |
| 1078 | 1078 | } |
| 1079 | - $event = call_user_func_array('\mod_bigbluebuttonbn\event\bigbluebuttonbn_'.$eventtype.'::create', |
|
| 1079 | + $event = call_user_func_array('\mod_bigbluebuttonbn\event\bigbluebuttonbn_' . $eventtype . '::create', |
|
| 1080 | 1080 | array($eventproperties)); |
| 1081 | 1081 | $event->trigger(); |
| 1082 | 1082 | } |
@@ -1116,10 +1116,10 @@ discard block |
||
| 1116 | 1116 | $now = time(); |
| 1117 | 1117 | if (!$updatecache && isset($result) && $now < ($result['creation_time'] + $cachettl)) { |
| 1118 | 1118 | // Use the value in the cache. |
| 1119 | - return (array) json_decode($result['meeting_info']); |
|
| 1119 | + return (array)json_decode($result['meeting_info']); |
|
| 1120 | 1120 | } |
| 1121 | 1121 | // Ping again and refresh the cache. |
| 1122 | - $meetinginfo = (array) bigbluebuttonbn_wrap_xml_load_file( |
|
| 1122 | + $meetinginfo = (array)bigbluebuttonbn_wrap_xml_load_file( |
|
| 1123 | 1123 | \mod_bigbluebuttonbn\locallib\bigbluebutton::action_url('getMeetingInfo', ['meetingID' => $meetingid]) |
| 1124 | 1124 | ); |
| 1125 | 1125 | $cache->set($meetingid, array('creation_time' => time(), 'meeting_info' => json_encode($meetinginfo))); |
@@ -1230,7 +1230,7 @@ discard block |
||
| 1230 | 1230 | * @return object |
| 1231 | 1231 | */ |
| 1232 | 1232 | function bigbluebuttonbn_set_config_xml($meetingid, $configxml) { |
| 1233 | - $urldefaultconfig = \mod_bigbluebuttonbn\locallib\config::get('server_url').'api/setConfigXML?'; |
|
| 1233 | + $urldefaultconfig = \mod_bigbluebuttonbn\locallib\config::get('server_url') . 'api/setConfigXML?'; |
|
| 1234 | 1234 | $configxmlparams = bigbluebuttonbn_set_config_xml_params($meetingid, $configxml); |
| 1235 | 1235 | $xml = bigbluebuttonbn_wrap_xml_load_file($urldefaultconfig, 'POST', |
| 1236 | 1236 | $configxmlparams, 'application/x-www-form-urlencoded'); |
@@ -1246,8 +1246,8 @@ discard block |
||
| 1246 | 1246 | * @return string |
| 1247 | 1247 | */ |
| 1248 | 1248 | function bigbluebuttonbn_set_config_xml_params($meetingid, $configxml) { |
| 1249 | - $params = 'configXML='.urlencode($configxml).'&meetingID='.urlencode($meetingid); |
|
| 1250 | - $configxmlparams = $params.'&checksum='.sha1('setConfigXML'.$params.\mod_bigbluebuttonbn\locallib\config::get('shared_secret')); |
|
| 1249 | + $params = 'configXML=' . urlencode($configxml) . '&meetingID=' . urlencode($meetingid); |
|
| 1250 | + $configxmlparams = $params . '&checksum=' . sha1('setConfigXML' . $params . \mod_bigbluebuttonbn\locallib\config::get('shared_secret')); |
|
| 1251 | 1251 | return $configxmlparams; |
| 1252 | 1252 | } |
| 1253 | 1253 | |
@@ -1261,7 +1261,7 @@ discard block |
||
| 1261 | 1261 | */ |
| 1262 | 1262 | function bigbluebuttonbn_set_config_xml_array($meetingid, $configxml) { |
| 1263 | 1263 | $configxml = bigbluebuttonbn_setConfigXML($meetingid, $configxml); |
| 1264 | - $configxmlarray = (array) $configxml; |
|
| 1264 | + $configxmlarray = (array)$configxml; |
|
| 1265 | 1265 | if ($configxmlarray['returncode'] != 'SUCCESS') { |
| 1266 | 1266 | debugging('BigBlueButton was not able to set the custom config.xml file', DEBUG_DEVELOPER); |
| 1267 | 1267 | return ''; |
@@ -1353,7 +1353,7 @@ discard block |
||
| 1353 | 1353 | global $USER; |
| 1354 | 1354 | $starttime = $starttime - ($starttime % 1000); |
| 1355 | 1355 | // Set formatted date. |
| 1356 | - $dateformat = get_string('strftimerecentfull', 'langconfig').' %Z'; |
|
| 1356 | + $dateformat = get_string('strftimerecentfull', 'langconfig') . ' %Z'; |
|
| 1357 | 1357 | return userdate($starttime / 1000, $dateformat, usertimezone($USER->timezone)); |
| 1358 | 1358 | } |
| 1359 | 1359 | |
@@ -1469,7 +1469,7 @@ discard block |
||
| 1469 | 1469 | * @return string |
| 1470 | 1470 | */ |
| 1471 | 1471 | function bigbluebuttonbn_get_recording_data_row_preview($recording) { |
| 1472 | - $options = array('id' => 'preview-'.$recording['recordID']); |
|
| 1472 | + $options = array('id' => 'preview-' . $recording['recordID']); |
|
| 1473 | 1473 | if ($recording['published'] === 'false') { |
| 1474 | 1474 | $options['hidden'] = 'hidden'; |
| 1475 | 1475 | } |
@@ -1531,7 +1531,7 @@ discard block |
||
| 1531 | 1531 | if ($recording['published'] === 'false') { |
| 1532 | 1532 | $visibility = 'hidden '; |
| 1533 | 1533 | } |
| 1534 | - $id = 'playbacks-'.$recording['recordID']; |
|
| 1534 | + $id = 'playbacks-' . $recording['recordID']; |
|
| 1535 | 1535 | $recordingtypes = html_writer::start_tag('div', array('id' => $id, 'data-imported' => $dataimported, |
| 1536 | 1536 | 'data-meetingid' => $recording['meetingID'], 'data-recordingid' => $recording['recordID'], |
| 1537 | 1537 | 'title' => $title, $visibility => $visibility)); |
@@ -1556,11 +1556,11 @@ discard block |
||
| 1556 | 1556 | if (!bigbluebuttonbn_include_recording_data_row_type($recording, $bbbsession, $playback)) { |
| 1557 | 1557 | return ''; |
| 1558 | 1558 | } |
| 1559 | - $text = get_string('view_recording_format_'.$playback['type'], 'bigbluebuttonbn'); |
|
| 1559 | + $text = get_string('view_recording_format_' . $playback['type'], 'bigbluebuttonbn'); |
|
| 1560 | 1560 | $href = $CFG->wwwroot . '/mod/bigbluebuttonbn/bbb_view.php?action=play&bn=' . $bbbsession['bigbluebuttonbn']->id . |
| 1561 | - '&mid='.$recording['meetingID'] . '&rid=' . $recording['recordID'] . '&rtype=' . $playback['type']; |
|
| 1561 | + '&mid=' . $recording['meetingID'] . '&rid=' . $recording['recordID'] . '&rtype=' . $playback['type']; |
|
| 1562 | 1562 | if (!isset($recording['imported']) || !isset($recording['protected']) || $recording['protected'] === 'false') { |
| 1563 | - $href .= '&href='.urlencode(trim($playback['url'])); |
|
| 1563 | + $href .= '&href=' . urlencode(trim($playback['url'])); |
|
| 1564 | 1564 | } |
| 1565 | 1565 | $linkattributes = array( |
| 1566 | 1566 | 'id' => 'recording-play-' . $playback['type'] . '-' . $recording['recordID'], |
@@ -1729,7 +1729,7 @@ discard block |
||
| 1729 | 1729 | $linkattributes['class'] = 'disabled'; |
| 1730 | 1730 | unset($linkattributes['onclick']); |
| 1731 | 1731 | } |
| 1732 | - $icon = new pix_icon('i/'.$data['tag'], |
|
| 1732 | + $icon = new pix_icon('i/' . $data['tag'], |
|
| 1733 | 1733 | get_string('view_recording_list_actionbar_' . $data['action'], 'bigbluebuttonbn'), |
| 1734 | 1734 | 'moodle', $iconattributes); |
| 1735 | 1735 | return $OUTPUT->action_icon('#', $icon, null, $linkattributes, false); |
@@ -1846,7 +1846,7 @@ discard block |
||
| 1846 | 1846 | */ |
| 1847 | 1847 | function bigbluebuttonbn_get_recording_table_row($bbbsession, $recording, $rowdata) { |
| 1848 | 1848 | $row = new html_table_row(); |
| 1849 | - $row->id = 'recording-tr-'.$recording['recordID']; |
|
| 1849 | + $row->id = 'recording-tr-' . $recording['recordID']; |
|
| 1850 | 1850 | $row->attributes['data-imported'] = 'false'; |
| 1851 | 1851 | $texthead = ''; |
| 1852 | 1852 | $texttail = ''; |
@@ -1906,9 +1906,9 @@ discard block |
||
| 1906 | 1906 | function bigbluebuttonbn_send_notification_recording_ready($bigbluebuttonbn) { |
| 1907 | 1907 | $sender = get_admin(); |
| 1908 | 1908 | // Prepare message. |
| 1909 | - $messagetext = '<p>'.get_string('email_body_recording_ready_for', 'bigbluebuttonbn'). |
|
| 1910 | - ' "' . $bigbluebuttonbn->name . '" '. |
|
| 1911 | - get_string('email_body_recording_ready_is_ready', 'bigbluebuttonbn').'.</p>'; |
|
| 1909 | + $messagetext = '<p>' . get_string('email_body_recording_ready_for', 'bigbluebuttonbn') . |
|
| 1910 | + ' "' . $bigbluebuttonbn->name . '" ' . |
|
| 1911 | + get_string('email_body_recording_ready_is_ready', 'bigbluebuttonbn') . '.</p>'; |
|
| 1912 | 1912 | $context = context_course::instance($bigbluebuttonbn->course); |
| 1913 | 1913 | \mod_bigbluebuttonbn\locallib\notifier::notification_send($context, $sender, $bigbluebuttonbn, $messagetext); |
| 1914 | 1914 | } |
@@ -2130,7 +2130,7 @@ discard block |
||
| 2130 | 2130 | } |
| 2131 | 2131 | // Prepare select for loading records based on existent bigbluebuttonbns. |
| 2132 | 2132 | $sql = 'SELECT DISTINCT meetingid, bigbluebuttonbnid FROM {bigbluebuttonbn_logs} WHERE '; |
| 2133 | - $sql .= '(bigbluebuttonbnid='.implode(' OR bigbluebuttonbnid=', array_keys($bigbluebuttonbns)).')'; |
|
| 2133 | + $sql .= '(bigbluebuttonbnid=' . implode(' OR bigbluebuttonbnid=', array_keys($bigbluebuttonbns)) . ')'; |
|
| 2134 | 2134 | // Include only Create events and exclude those with record not true. |
| 2135 | 2135 | $sql .= ' AND log = ? AND meta LIKE ? AND meta LIKE ?'; |
| 2136 | 2136 | // Execute select for loading records based on existent bigbluebuttonbns. |
@@ -2262,8 +2262,8 @@ discard block |
||
| 2262 | 2262 | function bigbluebuttonbn_format_activity_time($time) { |
| 2263 | 2263 | $activitytime = ''; |
| 2264 | 2264 | if ($time) { |
| 2265 | - $activitytime = calendar_day_representation($time).' '. |
|
| 2266 | - get_string('mod_form_field_notification_msg_at', 'bigbluebuttonbn').' '. |
|
| 2265 | + $activitytime = calendar_day_representation($time) . ' ' . |
|
| 2266 | + get_string('mod_form_field_notification_msg_at', 'bigbluebuttonbn') . ' ' . |
|
| 2267 | 2267 | calendar_time_representation($time); |
| 2268 | 2268 | } |
| 2269 | 2269 | return $activitytime; |
@@ -2689,7 +2689,7 @@ discard block |
||
| 2689 | 2689 | * |
| 2690 | 2690 | * @return string |
| 2691 | 2691 | */ |
| 2692 | -function bigbluebuttonbn_render_warning($message, $type='info', $href='', $text='', $class='') { |
|
| 2692 | +function bigbluebuttonbn_render_warning($message, $type = 'info', $href = '', $text = '', $class = '') { |
|
| 2693 | 2693 | global $OUTPUT; |
| 2694 | 2694 | $output = "\n"; |
| 2695 | 2695 | // Evaluates if config_warning is enabled. |
@@ -2728,11 +2728,11 @@ discard block |
||
| 2728 | 2728 | if ($class == '') { |
| 2729 | 2729 | $class = 'btn btn-secondary'; |
| 2730 | 2730 | } |
| 2731 | - $output = ' <form method="post" action="' . $href . '" class="form-inline">'."\n"; |
|
| 2732 | - $output .= ' <button type="submit" class="' . $class . '"'."\n"; |
|
| 2733 | - $output .= ' title="' . $title . '"'."\n"; |
|
| 2734 | - $output .= ' >' . $text . '</button>'."\n"; |
|
| 2735 | - $output .= ' </form>'."\n"; |
|
| 2731 | + $output = ' <form method="post" action="' . $href . '" class="form-inline">' . "\n"; |
|
| 2732 | + $output .= ' <button type="submit" class="' . $class . '"' . "\n"; |
|
| 2733 | + $output .= ' title="' . $title . '"' . "\n"; |
|
| 2734 | + $output .= ' >' . $text . '</button>' . "\n"; |
|
| 2735 | + $output .= ' </form>' . "\n"; |
|
| 2736 | 2736 | return $output; |
| 2737 | 2737 | } |
| 2738 | 2738 | |
@@ -24,8 +24,8 @@ discard block |
||
| 24 | 24 | * @author Fred Dixon (ffdixon [at] blindsidenetworks [dt] com) |
| 25 | 25 | */ |
| 26 | 26 | |
| 27 | -require_once(dirname(dirname(dirname(__FILE__))).'/config.php'); |
|
| 28 | -require_once(dirname(__FILE__).'/locallib.php'); |
|
| 27 | +require_once(dirname(dirname(dirname(__FILE__))) . '/config.php'); |
|
| 28 | +require_once(dirname(__FILE__) . '/locallib.php'); |
|
| 29 | 29 | |
| 30 | 30 | $id = required_param('id', PARAM_INT); |
| 31 | 31 | $bn = optional_param('n', 0, PARAM_INT); |
@@ -60,19 +60,19 @@ discard block |
||
| 60 | 60 | if (is_null($serverversion)) { |
| 61 | 61 | if ($bbbsession['administrator']) { |
| 62 | 62 | print_error('view_error_unable_join', 'bigbluebuttonbn', |
| 63 | - $CFG->wwwroot.'/admin/settings.php?section=modsettingbigbluebuttonbn'); |
|
| 63 | + $CFG->wwwroot . '/admin/settings.php?section=modsettingbigbluebuttonbn'); |
|
| 64 | 64 | exit; |
| 65 | 65 | } |
| 66 | 66 | if ($bbbsession['moderator']) { |
| 67 | 67 | print_error('view_error_unable_join_teacher', 'bigbluebuttonbn', |
| 68 | - $CFG->wwwroot.'/course/view.php?id='.$bigbluebuttonbn->course); |
|
| 68 | + $CFG->wwwroot . '/course/view.php?id=' . $bigbluebuttonbn->course); |
|
| 69 | 69 | exit; |
| 70 | 70 | } |
| 71 | 71 | print_error('view_error_unable_join_student', 'bigbluebuttonbn', |
| 72 | - $CFG->wwwroot.'/course/view.php?id='.$bigbluebuttonbn->course); |
|
| 72 | + $CFG->wwwroot . '/course/view.php?id=' . $bigbluebuttonbn->course); |
|
| 73 | 73 | exit; |
| 74 | 74 | } |
| 75 | -$bbbsession['serverversion'] = (string) $serverversion; |
|
| 75 | +$bbbsession['serverversion'] = (string)$serverversion; |
|
| 76 | 76 | |
| 77 | 77 | // Mark viewed by user (if required). |
| 78 | 78 | $completion = new completion_info($course); |
@@ -80,7 +80,7 @@ discard block |
||
| 80 | 80 | |
| 81 | 81 | // Print the page header. |
| 82 | 82 | $PAGE->set_context($context); |
| 83 | -$PAGE->set_url($CFG->wwwroot.'/mod/bigbluebuttonbn/view.php', array('id' => $cm->id)); |
|
| 83 | +$PAGE->set_url($CFG->wwwroot . '/mod/bigbluebuttonbn/view.php', array('id' => $cm->id)); |
|
| 84 | 84 | $PAGE->set_title(format_string($bigbluebuttonbn->name)); |
| 85 | 85 | $PAGE->set_cacheable(false); |
| 86 | 86 | $PAGE->set_heading($course->fullname); |
@@ -90,11 +90,11 @@ discard block |
||
| 90 | 90 | if (!has_capability('moodle/category:manage', $context) && !has_capability('mod/bigbluebuttonbn:join', $context)) { |
| 91 | 91 | echo $OUTPUT->header(); |
| 92 | 92 | if (isguestuser()) { |
| 93 | - echo $OUTPUT->confirm('<p>'.get_string('view_noguests', 'bigbluebuttonbn').'</p>'.get_string('liketologin'), |
|
| 94 | - get_login_url(), $CFG->wwwroot.'/course/view.php?id='.$course->id); |
|
| 93 | + echo $OUTPUT->confirm('<p>' . get_string('view_noguests', 'bigbluebuttonbn') . '</p>' . get_string('liketologin'), |
|
| 94 | + get_login_url(), $CFG->wwwroot . '/course/view.php?id=' . $course->id); |
|
| 95 | 95 | } else { |
| 96 | - echo $OUTPUT->confirm('<p>'.get_string('view_nojoin', 'bigbluebuttonbn').'</p>'.get_string('liketologin'), |
|
| 97 | - get_login_url(), $CFG->wwwroot.'/course/view.php?id='.$course->id); |
|
| 96 | + echo $OUTPUT->confirm('<p>' . get_string('view_nojoin', 'bigbluebuttonbn') . '</p>' . get_string('liketologin'), |
|
| 97 | + get_login_url(), $CFG->wwwroot . '/course/view.php?id=' . $course->id); |
|
| 98 | 98 | } |
| 99 | 99 | echo $OUTPUT->footer(); |
| 100 | 100 | exit; |
@@ -102,7 +102,7 @@ discard block |
||
| 102 | 102 | |
| 103 | 103 | // Operation URLs. |
| 104 | 104 | $bbbsession['bigbluebuttonbnURL'] = $CFG->wwwroot . '/mod/bigbluebuttonbn/view.php?id=' . $bbbsession['cm']->id; |
| 105 | -$bbbsession['logoutURL'] = $CFG->wwwroot . '/mod/bigbluebuttonbn/bbb_view.php?action=logout&id='.$id . |
|
| 105 | +$bbbsession['logoutURL'] = $CFG->wwwroot . '/mod/bigbluebuttonbn/bbb_view.php?action=logout&id=' . $id . |
|
| 106 | 106 | '&bn=' . $bbbsession['bigbluebuttonbn']->id; |
| 107 | 107 | $bbbsession['recordingReadyURL'] = $CFG->wwwroot . '/mod/bigbluebuttonbn/bbb_broker.php?action=recording_' . |
| 108 | 108 | 'ready&bigbluebuttonbn=' . $bbbsession['bigbluebuttonbn']->id; |
@@ -122,7 +122,7 @@ discard block |
||
| 122 | 122 | echo $OUTPUT->footer(); |
| 123 | 123 | |
| 124 | 124 | // Shows version as a comment. |
| 125 | -echo '<!-- '.$bbbsession['originTag'].' -->'."\n"; |
|
| 125 | +echo '<!-- ' . $bbbsession['originTag'] . ' -->' . "\n"; |
|
| 126 | 126 | |
| 127 | 127 | // Initialize session variable used across views. |
| 128 | 128 | $SESSION->bigbluebuttonbn_bbbsession = $bbbsession; |
@@ -150,7 +150,7 @@ discard block |
||
| 150 | 150 | $bbbsession['modPW'] = $bbbsession['bigbluebuttonbn']->moderatorpass; |
| 151 | 151 | $bbbsession['viewerPW'] = $bbbsession['bigbluebuttonbn']->viewerpass; |
| 152 | 152 | // Database info related to the activity. |
| 153 | - $bbbsession['meetingid'] = $bbbsession['bigbluebuttonbn']->meetingid.'-'.$bbbsession['course']->id.'-'. |
|
| 153 | + $bbbsession['meetingid'] = $bbbsession['bigbluebuttonbn']->meetingid . '-' . $bbbsession['course']->id . '-' . |
|
| 154 | 154 | $bbbsession['bigbluebuttonbn']->id; |
| 155 | 155 | $bbbsession['meetingname'] = $bbbsession['bigbluebuttonbn']->name; |
| 156 | 156 | $bbbsession['meetingdescription'] = $bbbsession['bigbluebuttonbn']->intro; |
@@ -170,7 +170,7 @@ discard block |
||
| 170 | 170 | $bbbsession['welcome'] = get_string('mod_form_field_welcome_default', 'bigbluebuttonbn'); |
| 171 | 171 | } |
| 172 | 172 | if ($bbbsession['bigbluebuttonbn']->record) { |
| 173 | - $bbbsession['welcome'] .= '<br><br>'.get_string('bbbrecordwarning', 'bigbluebuttonbn'); |
|
| 173 | + $bbbsession['welcome'] .= '<br><br>' . get_string('bbbrecordwarning', 'bigbluebuttonbn'); |
|
| 174 | 174 | } |
| 175 | 175 | $bbbsession['openingtime'] = $bbbsession['bigbluebuttonbn']->openingtime; |
| 176 | 176 | $bbbsession['closingtime'] = $bbbsession['bigbluebuttonbn']->closingtime; |
@@ -183,7 +183,7 @@ discard block |
||
| 183 | 183 | $bbbsession['originServerName'] = $parsedurl['host']; |
| 184 | 184 | $bbbsession['originServerUrl'] = $CFG->wwwroot; |
| 185 | 185 | $bbbsession['originServerCommonName'] = ''; |
| 186 | - $bbbsession['originTag'] = 'moodle-mod_bigbluebuttonbn ('.get_config('mod_bigbluebuttonbn', 'version').')'; |
|
| 186 | + $bbbsession['originTag'] = 'moodle-mod_bigbluebuttonbn (' . get_config('mod_bigbluebuttonbn', 'version') . ')'; |
|
| 187 | 187 | $bbbsession['bnserver'] = bigbluebuttonbn_is_bn_server(); |
| 188 | 188 | $bbbsession['clienttype'] = $bbbsession['bigbluebuttonbn']->clienttype; |
| 189 | 189 | } |
@@ -239,8 +239,8 @@ discard block |
||
| 239 | 239 | $groupname = groups_get_group_name($bbbsession['group']); |
| 240 | 240 | } |
| 241 | 241 | // Assign group default values. |
| 242 | - $bbbsession['meetingid'] .= '['.$bbbsession['group'].']'; |
|
| 243 | - $bbbsession['meetingname'] .= ' ('.$groupname.')'; |
|
| 242 | + $bbbsession['meetingid'] .= '[' . $bbbsession['group'] . ']'; |
|
| 243 | + $bbbsession['meetingname'] .= ' (' . $groupname . ')'; |
|
| 244 | 244 | if (count($groups) == 0) { |
| 245 | 245 | // Only the All participants group exists. |
| 246 | 246 | bigbluebuttonbn_view_message_box($bbbsession, get_string('view_groups_notenrolled_warning', 'bigbluebuttonbn'), 'info'); |
@@ -250,7 +250,7 @@ discard block |
||
| 250 | 250 | if (has_capability('moodle/site:accessallgroups', $context)) { |
| 251 | 251 | bigbluebuttonbn_view_message_box($bbbsession, get_string('view_groups_selection_warning', 'bigbluebuttonbn')); |
| 252 | 252 | } |
| 253 | - $urltoroot = $CFG->wwwroot.'/mod/bigbluebuttonbn/view.php?id='.$bbbsession['cm']->id; |
|
| 253 | + $urltoroot = $CFG->wwwroot . '/mod/bigbluebuttonbn/view.php?id=' . $bbbsession['cm']->id; |
|
| 254 | 254 | groups_print_activity_menu($bbbsession['cm'], $urltoroot); |
| 255 | 255 | echo '<br><br>'; |
| 256 | 256 | } |
@@ -317,7 +317,7 @@ discard block |
||
| 317 | 317 | $recordingsdisabled = get_string('view_message_recordings_disabled', 'bigbluebuttonbn'); |
| 318 | 318 | $output .= bigbluebuttonbn_render_warning($recordingsdisabled, 'danger'); |
| 319 | 319 | } |
| 320 | - echo $output.html_writer::empty_tag('br').html_writer::empty_tag('br').html_writer::empty_tag('br'); |
|
| 320 | + echo $output . html_writer::empty_tag('br') . html_writer::empty_tag('br') . html_writer::empty_tag('br'); |
|
| 321 | 321 | $PAGE->requires->yui_module('moodle-mod_bigbluebuttonbn-broker', 'M.mod_bigbluebuttonbn.broker.init', array($jsvars)); |
| 322 | 322 | } |
| 323 | 323 | |
@@ -386,12 +386,12 @@ discard block |
||
| 386 | 386 | // JavaScript variables for room. |
| 387 | 387 | $openingtime = ''; |
| 388 | 388 | if ($bbbsession['openingtime']) { |
| 389 | - $openingtime = get_string('mod_form_field_openingtime', 'bigbluebuttonbn').': '. |
|
| 389 | + $openingtime = get_string('mod_form_field_openingtime', 'bigbluebuttonbn') . ': ' . |
|
| 390 | 390 | userdate($bbbsession['openingtime']); |
| 391 | 391 | } |
| 392 | 392 | $closingtime = ''; |
| 393 | 393 | if ($bbbsession['closingtime']) { |
| 394 | - $closingtime = get_string('mod_form_field_closingtime', 'bigbluebuttonbn').': '. |
|
| 394 | + $closingtime = get_string('mod_form_field_closingtime', 'bigbluebuttonbn') . ': ' . |
|
| 395 | 395 | userdate($bbbsession['closingtime']); |
| 396 | 396 | } |
| 397 | 397 | $jsvars += array( |
@@ -408,7 +408,7 @@ discard block |
||
| 408 | 408 | $output .= $OUTPUT->box_end(); |
| 409 | 409 | // Action button box. |
| 410 | 410 | $output .= $OUTPUT->box_start('generalbox boxaligncenter', 'bigbluebuttonbn_view_action_button_box'); |
| 411 | - $output .= '<br><br><span id="join_button"></span> <span id="end_button"></span>'."\n"; |
|
| 411 | + $output .= '<br><br><span id="join_button"></span> <span id="end_button"></span>' . "\n"; |
|
| 412 | 412 | $output .= $OUTPUT->box_end(); |
| 413 | 413 | if ($activity == 'ended') { |
| 414 | 414 | $output .= bigbluebuttonbn_view_ended($bbbsession); |
@@ -461,7 +461,7 @@ discard block |
||
| 461 | 461 | // If there are meetings with recordings load the data to the table. |
| 462 | 462 | if ($bbbsession['bigbluebuttonbn']->recordings_html) { |
| 463 | 463 | // Render a plain html table. |
| 464 | - return bigbluebuttonbn_output_recording_table($bbbsession, $recordings)."\n"; |
|
| 464 | + return bigbluebuttonbn_output_recording_table($bbbsession, $recordings) . "\n"; |
|
| 465 | 465 | } |
| 466 | 466 | // JavaScript variables for recordings with YUI. |
| 467 | 467 | $jsvars += array( |
@@ -489,8 +489,8 @@ discard block |
||
| 489 | 489 | array('type' => 'button', |
| 490 | 490 | 'value' => get_string('view_recording_button_import', 'bigbluebuttonbn'), |
| 491 | 491 | 'class' => 'btn btn-secondary', |
| 492 | - 'onclick' => 'window.location=\''.$CFG->wwwroot.'/mod/bigbluebuttonbn/import_view.php?bn='. |
|
| 493 | - $bbbsession['bigbluebuttonbn']->id.'\'')); |
|
| 492 | + 'onclick' => 'window.location=\'' . $CFG->wwwroot . '/mod/bigbluebuttonbn/import_view.php?bn=' . |
|
| 493 | + $bbbsession['bigbluebuttonbn']->id . '\'')); |
|
| 494 | 494 | $output = html_writer::empty_tag('br'); |
| 495 | 495 | $output .= html_writer::tag('span', $button, array('id' => 'import_recording_links_button')); |
| 496 | 496 | $output .= html_writer::tag('span', '', array('id' => 'import_recording_links_table')); |
@@ -509,10 +509,10 @@ discard block |
||
| 509 | 509 | if (!is_null($bbbsession['presentation']['url'])) { |
| 510 | 510 | $attributes = array('title' => $bbbsession['presentation']['name']); |
| 511 | 511 | $icon = new pix_icon($bbbsession['presentation']['icon'], $bbbsession['presentation']['mimetype_description']); |
| 512 | - return '<h4>'.get_string('view_section_title_presentation', 'bigbluebuttonbn').'</h4>'. |
|
| 513 | - $OUTPUT->action_icon($bbbsession['presentation']['url'], $icon, null, array(), false). |
|
| 512 | + return '<h4>' . get_string('view_section_title_presentation', 'bigbluebuttonbn') . '</h4>' . |
|
| 513 | + $OUTPUT->action_icon($bbbsession['presentation']['url'], $icon, null, array(), false) . |
|
| 514 | 514 | $OUTPUT->action_link($bbbsession['presentation']['url'], |
| 515 | - $bbbsession['presentation']['name'], null, $attributes).'<br><br>'; |
|
| 515 | + $bbbsession['presentation']['name'], null, $attributes) . '<br><br>'; |
|
| 516 | 516 | } |
| 517 | 517 | return ''; |
| 518 | 518 | } |