@@ -366,26 +366,26 @@ discard block |
||
| 366 | 366 | return array( |
| 367 | 367 | 'status' => false, |
| 368 | 368 | 'message' => get_string('view_recording_publish_link_deleted', 'bigbluebuttonbn') |
| 369 | - ); |
|
| 369 | + ); |
|
| 370 | 370 | } |
| 371 | 371 | if ($realrecordings[$params['id']]['published'] !== 'true') { |
| 372 | 372 | return array( |
| 373 | 373 | 'status' => false, |
| 374 | 374 | 'message' => get_string('view_recording_publish_link_not_published', 'bigbluebuttonbn') |
| 375 | - ); |
|
| 375 | + ); |
|
| 376 | 376 | } |
| 377 | 377 | return array( |
| 378 | 378 | 'status' => bigbluebuttonbn_publish_recording_imported( |
| 379 | 379 | $recordings[$params['id']]['imported'], true |
| 380 | 380 | ) |
| 381 | - ); |
|
| 381 | + ); |
|
| 382 | 382 | } |
| 383 | 383 | // As the recordingid was not identified as imported recording link, execute actual publish. |
| 384 | 384 | return array( |
| 385 | 385 | 'status' => bigbluebuttonbn_publish_recordings( |
| 386 | 386 | $params['id'], 'true' |
| 387 | 387 | ) |
| 388 | - ); |
|
| 388 | + ); |
|
| 389 | 389 | } |
| 390 | 390 | |
| 391 | 391 | /** |
@@ -401,26 +401,26 @@ discard block |
||
| 401 | 401 | return array( |
| 402 | 402 | 'status' => false, |
| 403 | 403 | 'message' => get_string('view_recording_unprotect_link_deleted', 'bigbluebuttonbn') |
| 404 | - ); |
|
| 404 | + ); |
|
| 405 | 405 | } |
| 406 | 406 | if ($realrecordings[$params['id']]['protected'] === 'true') { |
| 407 | 407 | return array( |
| 408 | 408 | 'status' => false, |
| 409 | 409 | 'message' => get_string('view_recording_unprotect_link_not_unprotected', 'bigbluebuttonbn') |
| 410 | - ); |
|
| 410 | + ); |
|
| 411 | 411 | } |
| 412 | 412 | return array( |
| 413 | 413 | 'status' => bigbluebuttonbn_protect_recording_imported( |
| 414 | 414 | $recordings[$params['id']]['imported'], false |
| 415 | 415 | ) |
| 416 | - ); |
|
| 416 | + ); |
|
| 417 | 417 | } |
| 418 | 418 | // As the recordingid was not identified as imported recording link, execute actual uprotect. |
| 419 | 419 | return array( |
| 420 | 420 | 'status' => bigbluebuttonbn_update_recordings( |
| 421 | 421 | $params['id'], array('protect' => 'false') |
| 422 | 422 | ) |
| 423 | - ); |
|
| 423 | + ); |
|
| 424 | 424 | } |
| 425 | 425 | |
| 426 | 426 | /** |
@@ -434,7 +434,7 @@ discard block |
||
| 434 | 434 | 'status' => bigbluebuttonbn_publish_recording_imported( |
| 435 | 435 | $recordings[$params['id']]['imported'], false |
| 436 | 436 | ) |
| 437 | - ); |
|
| 437 | + ); |
|
| 438 | 438 | } |
| 439 | 439 | // As the recordingid was not identified as imported recording link, execute unpublish on a real recording. |
| 440 | 440 | // First: Unpublish imported links associated to the recording. |
@@ -452,7 +452,7 @@ discard block |
||
| 452 | 452 | 'status' => bigbluebuttonbn_publish_recordings( |
| 453 | 453 | $params['id'], 'false' |
| 454 | 454 | ) |
| 455 | - ); |
|
| 455 | + ); |
|
| 456 | 456 | } |
| 457 | 457 | |
| 458 | 458 | /** |
@@ -466,7 +466,7 @@ discard block |
||
| 466 | 466 | 'status' => bigbluebuttonbn_protect_recording_imported( |
| 467 | 467 | $recordings[$params['id']]['imported'], true |
| 468 | 468 | ) |
| 469 | - ); |
|
| 469 | + ); |
|
| 470 | 470 | } |
| 471 | 471 | // As the recordingid was not identified as imported recording link, execute protect on a real recording. |
| 472 | 472 | // First: Protect imported links associated to the recording. |
@@ -484,7 +484,7 @@ discard block |
||
| 484 | 484 | 'status' => bigbluebuttonbn_update_recordings( |
| 485 | 485 | $params['id'], array('protect' => 'true') |
| 486 | 486 | ) |
| 487 | - ); |
|
| 487 | + ); |
|
| 488 | 488 | } |
| 489 | 489 | |
| 490 | 490 | /** |
@@ -498,7 +498,7 @@ discard block |
||
| 498 | 498 | 'status' => bigbluebuttonbn_delete_recording_imported( |
| 499 | 499 | $recordings[$params['id']]['imported'] |
| 500 | 500 | ) |
| 501 | - ); |
|
| 501 | + ); |
|
| 502 | 502 | } |
| 503 | 503 | // As the recordingid was not identified as imported recording link, execute delete on a real recording. |
| 504 | 504 | // First: Delete imported links associated to the recording. |
@@ -514,7 +514,7 @@ discard block |
||
| 514 | 514 | 'status' => bigbluebuttonbn_delete_recordings( |
| 515 | 515 | $params['id'] |
| 516 | 516 | ) |
| 517 | - ); |
|
| 517 | + ); |
|
| 518 | 518 | } |
| 519 | 519 | |
| 520 | 520 | /** |
@@ -527,7 +527,7 @@ discard block |
||
| 527 | 527 | 'status' => bigbluebuttonbn_update_recording_imported( |
| 528 | 528 | $recordings[$params['id']]['imported'], json_decode($params['meta'], true) |
| 529 | 529 | ) |
| 530 | - ); |
|
| 530 | + ); |
|
| 531 | 531 | } |
| 532 | 532 | |
| 533 | 533 | // As the recordingid was not identified as imported recording link, execute update on a real recording. |
@@ -537,7 +537,7 @@ discard block |
||
| 537 | 537 | 'status' => bigbluebuttonbn_update_recordings( |
| 538 | 538 | $params['id'], json_decode($params['meta']) |
| 539 | 539 | ) |
| 540 | - ); |
|
| 540 | + ); |
|
| 541 | 541 | } |
| 542 | 542 | |
| 543 | 543 | /** |
@@ -682,10 +682,10 @@ discard block |
||
| 682 | 682 | $params['recording_import'] = ['id' => 'The recordingID must be specified.']; |
| 683 | 683 | $params['recording_ready'] = [ |
| 684 | 684 | 'signed_parameters' => 'A JWT encoded string must be included as [signed_parameters].' |
| 685 | - ]; |
|
| 685 | + ]; |
|
| 686 | 686 | $params['live_session_events'] = [ |
| 687 | 687 | 'signed_parameters' => 'A JWT encoded string must be included as [signed_parameters].' |
| 688 | - ]; |
|
| 688 | + ]; |
|
| 689 | 689 | return $params; |
| 690 | 690 | } |
| 691 | 691 | |
@@ -23,8 +23,8 @@ discard block |
||
| 23 | 23 | * @author Jesus Federico (jesus [at] blindsidenetworks [dt] com) |
| 24 | 24 | */ |
| 25 | 25 | |
| 26 | -require_once(dirname(dirname(dirname(__FILE__))).'/config.php'); |
|
| 27 | -require_once(dirname(__FILE__).'/locallib.php'); |
|
| 26 | +require_once(dirname(dirname(dirname(__FILE__))) . '/config.php'); |
|
| 27 | +require_once(dirname(__FILE__) . '/locallib.php'); |
|
| 28 | 28 | |
| 29 | 29 | use \Firebase\JWT\JWT; |
| 30 | 30 | |
@@ -40,13 +40,13 @@ discard block |
||
| 40 | 40 | $params['meta'] = optional_param('meta', '', PARAM_TEXT); |
| 41 | 41 | |
| 42 | 42 | if (empty($params['action'])) { |
| 43 | - header('HTTP/1.0 400 Bad Request. Parameter ['.$params['action'].'] was not included'); |
|
| 43 | + header('HTTP/1.0 400 Bad Request. Parameter [' . $params['action'] . '] was not included'); |
|
| 44 | 44 | return; |
| 45 | 45 | } |
| 46 | 46 | |
| 47 | 47 | $error = bigbluebuttonbn_broker_validate_parameters($params); |
| 48 | 48 | if (!empty($error)) { |
| 49 | - header('HTTP/1.0 400 Bad Request. '.$error); |
|
| 49 | + header('HTTP/1.0 400 Bad Request. ' . $error); |
|
| 50 | 50 | return; |
| 51 | 51 | } |
| 52 | 52 | |
@@ -130,11 +130,11 @@ discard block |
||
| 130 | 130 | bigbluebuttonbn_broker_live_session_events($params, $bigbluebuttonbn, $cm); |
| 131 | 131 | return; |
| 132 | 132 | } |
| 133 | - header('HTTP/1.0 400 Bad request. The action '. $a . ' doesn\'t exist'); |
|
| 133 | + header('HTTP/1.0 400 Bad request. The action ' . $a . ' doesn\'t exist'); |
|
| 134 | 134 | return; |
| 135 | 135 | |
| 136 | 136 | } catch (Exception $e) { |
| 137 | - header('HTTP/1.0 500 Internal Server Error. '.$e->getMessage()); |
|
| 137 | + header('HTTP/1.0 500 Internal Server Error. ' . $e->getMessage()); |
|
| 138 | 138 | return; |
| 139 | 139 | } |
| 140 | 140 | |
@@ -320,7 +320,7 @@ discard block |
||
| 320 | 320 | function bigbluebuttonbn_broker_recording_info_current($recording, $params) { |
| 321 | 321 | $callbackresponse['status'] = true; |
| 322 | 322 | $callbackresponse['found'] = true; |
| 323 | - $callbackresponse['published'] = (string) $recording['published']; |
|
| 323 | + $callbackresponse['published'] = (string)$recording['published']; |
|
| 324 | 324 | if (!isset($params['meta']) || empty($params['meta'])) { |
| 325 | 325 | return $callbackresponse; |
| 326 | 326 | } |
@@ -650,8 +650,8 @@ discard block |
||
| 650 | 650 | $decodedparameters = JWT::decode($params['signed_parameters'], |
| 651 | 651 | \mod_bigbluebuttonbn\locallib\config::get('shared_secret'), array('HS256')); |
| 652 | 652 | } catch (Exception $e) { |
| 653 | - $error = 'Caught exception: '.$e->getMessage(); |
|
| 654 | - header('HTTP/1.0 400 Bad Request. '.$error); |
|
| 653 | + $error = 'Caught exception: ' . $e->getMessage(); |
|
| 654 | + header('HTTP/1.0 400 Bad Request. ' . $error); |
|
| 655 | 655 | return; |
| 656 | 656 | } |
| 657 | 657 | // Validate that the bigbluebuttonbn activity corresponds to the meeting_id received. |
@@ -667,8 +667,8 @@ discard block |
||
| 667 | 667 | bigbluebuttonbn_send_notification_recording_ready($bigbluebuttonbn); |
| 668 | 668 | header('HTTP/1.0 202 Accepted'); |
| 669 | 669 | } catch (Exception $e) { |
| 670 | - $error = 'Caught exception: '.$e->getMessage(); |
|
| 671 | - header('HTTP/1.0 503 Service Unavailable. '.$error); |
|
| 670 | + $error = 'Caught exception: ' . $e->getMessage(); |
|
| 671 | + header('HTTP/1.0 503 Service Unavailable. ' . $error); |
|
| 672 | 672 | } |
| 673 | 673 | } |
| 674 | 674 | |
@@ -689,13 +689,13 @@ discard block |
||
| 689 | 689 | $importrecordings = $SESSION->bigbluebuttonbn_importrecordings; |
| 690 | 690 | if (!isset($importrecordings[$params['id']])) { |
| 691 | 691 | $error = "Recording {$params['id']} could not be found. It can not be imported"; |
| 692 | - header('HTTP/1.0 404 Not found. '.$error); |
|
| 692 | + header('HTTP/1.0 404 Not found. ' . $error); |
|
| 693 | 693 | return; |
| 694 | 694 | } |
| 695 | 695 | $callbackresponse = array('status' => true); |
| 696 | 696 | $importrecordings[$params['id']]['imported'] = true; |
| 697 | 697 | $overrides = array('meetingid' => $importrecordings[$params['id']]['meetingID']); |
| 698 | - $meta = '{"recording":'.json_encode($importrecordings[$params['id']]).'}'; |
|
| 698 | + $meta = '{"recording":' . json_encode($importrecordings[$params['id']]) . '}'; |
|
| 699 | 699 | bigbluebuttonbn_logs($bbbsession, BIGBLUEBUTTONBN_LOG_EVENT_IMPORT, $overrides, $meta); |
| 700 | 700 | // Moodle event logger: Create an event for recording imported. |
| 701 | 701 | if (isset($bbbsession['bigbluebutton']) && isset($bbbsession['cm'])) { |
@@ -721,8 +721,8 @@ discard block |
||
| 721 | 721 | $decodedparameters = JWT::decode($params['signed_parameters'], |
| 722 | 722 | \mod_bigbluebuttonbn\locallib\config::get('shared_secret'), array('HS256')); |
| 723 | 723 | } catch (Exception $e) { |
| 724 | - $error = 'Caught exception: '.$e->getMessage(); |
|
| 725 | - header('HTTP/1.0 400 Bad Request. '.$error); |
|
| 724 | + $error = 'Caught exception: ' . $e->getMessage(); |
|
| 725 | + header('HTTP/1.0 400 Bad Request. ' . $error); |
|
| 726 | 726 | return; |
| 727 | 727 | } |
| 728 | 728 | // Validate that the bigbluebuttonbn activity corresponds to the meeting_id received. |
@@ -763,7 +763,7 @@ discard block |
||
| 763 | 763 | } |
| 764 | 764 | $action = strtolower($params['action']); |
| 765 | 765 | if (!array_key_exists($action, $requiredparams)) { |
| 766 | - return 'Action '.$params['action'].' can not be performed.'; |
|
| 766 | + return 'Action ' . $params['action'] . ' can not be performed.'; |
|
| 767 | 767 | } |
| 768 | 768 | return bigbluebuttonbn_broker_validate_parameters_message($params, $requiredparams[$action]); |
| 769 | 769 | } |
@@ -97,7 +97,7 @@ discard block |
||
| 97 | 97 | * @uses FEATURE_GRADE_OUTCOMES |
| 98 | 98 | * @uses FEATURE_SHOW_DESCRIPTION |
| 99 | 99 | * @param string $feature |
| 100 | - * @return mixed True if yes (some features may use other values) |
|
| 100 | + * @return null|boolean True if yes (some features may use other values) |
|
| 101 | 101 | */ |
| 102 | 102 | function bigbluebuttonbn_supports($feature) { |
| 103 | 103 | if (!$feature) { |
@@ -239,7 +239,7 @@ discard block |
||
| 239 | 239 | * @param object $mod |
| 240 | 240 | * @param object $bigbluebuttonbn |
| 241 | 241 | * |
| 242 | - * @return bool |
|
| 242 | + * @return string |
|
| 243 | 243 | */ |
| 244 | 244 | function bigbluebuttonbn_user_outline($course, $user, $mod, $bigbluebuttonbn) { |
| 245 | 245 | global $DB; |
@@ -542,7 +542,7 @@ discard block |
||
| 542 | 542 | * @param stdClass $context context object |
| 543 | 543 | * @param string $filearea file area |
| 544 | 544 | * |
| 545 | - * @return false|null false if file not valid |
|
| 545 | + * @return boolean false if file not valid |
|
| 546 | 546 | */ |
| 547 | 547 | function bigbluebuttonbn_pluginfile_valid($context, $filearea) { |
| 548 | 548 | if ($context->contextlevel != CONTEXT_MODULE) { |
@@ -68,7 +68,7 @@ discard block |
||
| 68 | 68 | * Remove this block when restored |
| 69 | 69 | */ |
| 70 | 70 | |
| 71 | - /** @var BIGBLUEBUTTONBN_DEFAULT_SERVER_URL string of default bigbluebutton server url */ |
|
| 71 | + /** @var BIGBLUEBUTTONBN_DEFAULT_SERVER_URL string of default bigbluebutton server url */ |
|
| 72 | 72 | const BIGBLUEBUTTONBN_DEFAULT_SERVER_URL = 'http://test-install.blindsidenetworks.com/bigbluebutton/'; |
| 73 | 73 | /** @var BIGBLUEBUTTONBN_DEFAULT_SHARED_SECRET string of default bigbluebutton server shared secret */ |
| 74 | 74 | const BIGBLUEBUTTONBN_DEFAULT_SHARED_SECRET = '8cd8ef52e8e101574e400365b55e11a6'; |
@@ -345,12 +345,12 @@ discard block |
||
| 345 | 345 | $str = '<div class="bigbluebuttonbn overview">'."\n"; |
| 346 | 346 | $str .= ' <div class="name">'.get_string('modulename', 'bigbluebuttonbn').': '."\n"; |
| 347 | 347 | $str .= ' <a '.$classes.'href="'.$CFG->wwwroot.'/mod/bigbluebuttonbn/view.php?id='.$bigbluebuttonbn->coursemodule. |
| 348 | - '">'.$bigbluebuttonbn->name.'</a>'."\n"; |
|
| 348 | + '">'.$bigbluebuttonbn->name.'</a>'."\n"; |
|
| 349 | 349 | $str .= ' </div>'."\n"; |
| 350 | 350 | $str .= ' <div class="info">'.get_string($start, 'bigbluebuttonbn').': '.userdate($bigbluebuttonbn->openingtime). |
| 351 | 351 | '</div>'."\n"; |
| 352 | 352 | $str .= ' <div class="info">'.get_string('ends_at', 'bigbluebuttonbn').': '.userdate($bigbluebuttonbn->closingtime) |
| 353 | - .'</div>'."\n"; |
|
| 353 | + .'</div>'."\n"; |
|
| 354 | 354 | $str .= '</div>'."\n"; |
| 355 | 355 | return $str; |
| 356 | 356 | } |
@@ -28,33 +28,33 @@ discard block |
||
| 28 | 28 | |
| 29 | 29 | global $CFG; |
| 30 | 30 | |
| 31 | -require_once($CFG->dirroot.'/calendar/lib.php'); |
|
| 32 | -require_once($CFG->dirroot.'/message/lib.php'); |
|
| 33 | -require_once($CFG->dirroot.'/mod/lti/OAuth.php'); |
|
| 34 | -require_once($CFG->dirroot.'/tag/lib.php'); |
|
| 35 | -require_once($CFG->libdir.'/accesslib.php'); |
|
| 36 | -require_once($CFG->libdir.'/completionlib.php'); |
|
| 37 | -require_once($CFG->libdir.'/datalib.php'); |
|
| 38 | -require_once($CFG->libdir.'/coursecatlib.php'); |
|
| 39 | -require_once($CFG->libdir.'/enrollib.php'); |
|
| 40 | -require_once($CFG->libdir.'/filelib.php'); |
|
| 41 | -require_once($CFG->libdir.'/formslib.php'); |
|
| 42 | - |
|
| 43 | - |
|
| 44 | -if (file_exists(dirname(__FILE__).'/vendor/firebase/php-jwt/src/JWT.php')) { |
|
| 45 | - require_once(dirname(__FILE__).'/vendor/firebase/php-jwt/src/JWT.php'); |
|
| 31 | +require_once($CFG->dirroot . '/calendar/lib.php'); |
|
| 32 | +require_once($CFG->dirroot . '/message/lib.php'); |
|
| 33 | +require_once($CFG->dirroot . '/mod/lti/OAuth.php'); |
|
| 34 | +require_once($CFG->dirroot . '/tag/lib.php'); |
|
| 35 | +require_once($CFG->libdir . '/accesslib.php'); |
|
| 36 | +require_once($CFG->libdir . '/completionlib.php'); |
|
| 37 | +require_once($CFG->libdir . '/datalib.php'); |
|
| 38 | +require_once($CFG->libdir . '/coursecatlib.php'); |
|
| 39 | +require_once($CFG->libdir . '/enrollib.php'); |
|
| 40 | +require_once($CFG->libdir . '/filelib.php'); |
|
| 41 | +require_once($CFG->libdir . '/formslib.php'); |
|
| 42 | + |
|
| 43 | + |
|
| 44 | +if (file_exists(dirname(__FILE__) . '/vendor/firebase/php-jwt/src/JWT.php')) { |
|
| 45 | + require_once(dirname(__FILE__) . '/vendor/firebase/php-jwt/src/JWT.php'); |
|
| 46 | 46 | } |
| 47 | 47 | |
| 48 | 48 | if (!isset($CFG->bigbluebuttonbn)) { |
| 49 | 49 | $CFG->bigbluebuttonbn = array(); |
| 50 | 50 | } |
| 51 | 51 | |
| 52 | -if (file_exists(dirname(__FILE__).'/config.php')) { |
|
| 53 | - require_once(dirname(__FILE__).'/config.php'); |
|
| 52 | +if (file_exists(dirname(__FILE__) . '/config.php')) { |
|
| 53 | + require_once(dirname(__FILE__) . '/config.php'); |
|
| 54 | 54 | // Old BigBlueButtonBN cfg schema. For backward compatibility. |
| 55 | 55 | global $BIGBLUEBUTTONBN_CFG; |
| 56 | 56 | if (isset($BIGBLUEBUTTONBN_CFG)) { |
| 57 | - foreach ((array) $BIGBLUEBUTTONBN_CFG as $key => $value) { |
|
| 57 | + foreach ((array)$BIGBLUEBUTTONBN_CFG as $key => $value) { |
|
| 58 | 58 | $cfgkey = str_replace("bigbluebuttonbn_", "", $key); |
| 59 | 59 | $CFG->bigbluebuttonbn[$cfgkey] = $value; |
| 60 | 60 | } |
@@ -105,18 +105,18 @@ discard block |
||
| 105 | 105 | return null; |
| 106 | 106 | } |
| 107 | 107 | $features = array( |
| 108 | - (string) FEATURE_IDNUMBER => true, |
|
| 109 | - (string) FEATURE_GROUPS => true, |
|
| 110 | - (string) FEATURE_GROUPINGS => true, |
|
| 111 | - (string) FEATURE_GROUPMEMBERSONLY => true, |
|
| 112 | - (string) FEATURE_MOD_INTRO => true, |
|
| 113 | - (string) FEATURE_BACKUP_MOODLE2 => true, |
|
| 114 | - (string) FEATURE_COMPLETION_TRACKS_VIEWS => true, |
|
| 115 | - (string) FEATURE_GRADE_HAS_GRADE => false, |
|
| 116 | - (string) FEATURE_GRADE_OUTCOMES => false, |
|
| 117 | - (string) FEATURE_SHOW_DESCRIPTION => true, |
|
| 108 | + (string)FEATURE_IDNUMBER => true, |
|
| 109 | + (string)FEATURE_GROUPS => true, |
|
| 110 | + (string)FEATURE_GROUPINGS => true, |
|
| 111 | + (string)FEATURE_GROUPMEMBERSONLY => true, |
|
| 112 | + (string)FEATURE_MOD_INTRO => true, |
|
| 113 | + (string)FEATURE_BACKUP_MOODLE2 => true, |
|
| 114 | + (string)FEATURE_COMPLETION_TRACKS_VIEWS => true, |
|
| 115 | + (string)FEATURE_GRADE_HAS_GRADE => false, |
|
| 116 | + (string)FEATURE_GRADE_OUTCOMES => false, |
|
| 117 | + (string)FEATURE_SHOW_DESCRIPTION => true, |
|
| 118 | 118 | ); |
| 119 | - if (isset($features[(string) $feature])) { |
|
| 119 | + if (isset($features[(string)$feature])) { |
|
| 120 | 120 | return $features[$feature]; |
| 121 | 121 | } |
| 122 | 122 | return null; |
@@ -216,7 +216,7 @@ discard block |
||
| 216 | 216 | $log->timecreated = time(); |
| 217 | 217 | $log->log = BIGBLUEBUTTONBN_LOG_EVENT_DELETE; |
| 218 | 218 | $sql = "SELECT * FROM {bigbluebuttonbn_logs} "; |
| 219 | - $sql .= "WHERE bigbluebuttonbnid = ? AND log = ? AND ". $DB->sql_compare_text('meta') . " = ?"; |
|
| 219 | + $sql .= "WHERE bigbluebuttonbnid = ? AND log = ? AND " . $DB->sql_compare_text('meta') . " = ?"; |
|
| 220 | 220 | $logs = $DB->get_records_sql($sql, array($bigbluebuttonbn->id, BIGBLUEBUTTONBN_LOG_EVENT_CREATE, "{\"record\":true}")); |
| 221 | 221 | $log->meta = "{\"has_recordings\":false}"; |
| 222 | 222 | if (!empty($logs)) { |
@@ -245,10 +245,10 @@ discard block |
||
| 245 | 245 | function bigbluebuttonbn_user_outline($course, $user, $mod, $bigbluebuttonbn) { |
| 246 | 246 | global $DB; |
| 247 | 247 | $completed = $DB->count_records('bigbluebuttonbn_logs', array('courseid' => $course->id, |
| 248 | - 'bigbluebuttonbnid' => $bigbluebuttonbn->id, 'userid' => $user->id, 'log' => 'Join', ), '*'); |
|
| 248 | + 'bigbluebuttonbnid' => $bigbluebuttonbn->id, 'userid' => $user->id, 'log' => 'Join',), '*'); |
|
| 249 | 249 | if ($completed > 0) { |
| 250 | - return fullname($user).' '.get_string('view_message_has_joined', 'bigbluebuttonbn').' '. |
|
| 251 | - get_string('view_message_session_for', 'bigbluebuttonbn').' '.(string) $completed.' '. |
|
| 250 | + return fullname($user) . ' ' . get_string('view_message_has_joined', 'bigbluebuttonbn') . ' ' . |
|
| 251 | + get_string('view_message_session_for', 'bigbluebuttonbn') . ' ' . (string)$completed . ' ' . |
|
| 252 | 252 | get_string('view_message_times', 'bigbluebuttonbn'); |
| 253 | 253 | } |
| 254 | 254 | return ''; |
@@ -268,7 +268,7 @@ discard block |
||
| 268 | 268 | function bigbluebuttonbn_user_complete($course, $user, $mod, $bigbluebuttonbn) { |
| 269 | 269 | global $DB; |
| 270 | 270 | $completed = $DB->count_records('bigbluebuttonbn_logs', array('courseid' => $course->id, |
| 271 | - 'bigbluebuttonbnid' => $bigbluebuttonbn->id, 'userid' => $user->id, 'log' => 'Join', ), |
|
| 271 | + 'bigbluebuttonbnid' => $bigbluebuttonbn->id, 'userid' => $user->id, 'log' => 'Join',), |
|
| 272 | 272 | '*', IGNORE_MULTIPLE); |
| 273 | 273 | return $completed > 0; |
| 274 | 274 | } |
@@ -343,16 +343,16 @@ discard block |
||
| 343 | 343 | if ($bigbluebuttonbn->visible) { |
| 344 | 344 | $classes = 'class="dimmed" '; |
| 345 | 345 | } |
| 346 | - $str = '<div class="bigbluebuttonbn overview">'."\n"; |
|
| 347 | - $str .= ' <div class="name">'.get_string('modulename', 'bigbluebuttonbn').': '."\n"; |
|
| 348 | - $str .= ' <a '.$classes.'href="'.$CFG->wwwroot.'/mod/bigbluebuttonbn/view.php?id='.$bigbluebuttonbn->coursemodule. |
|
| 349 | - '">'.$bigbluebuttonbn->name.'</a>'."\n"; |
|
| 350 | - $str .= ' </div>'."\n"; |
|
| 351 | - $str .= ' <div class="info">'.get_string($start, 'bigbluebuttonbn').': '.userdate($bigbluebuttonbn->openingtime). |
|
| 352 | - '</div>'."\n"; |
|
| 353 | - $str .= ' <div class="info">'.get_string('ends_at', 'bigbluebuttonbn').': '.userdate($bigbluebuttonbn->closingtime) |
|
| 354 | - .'</div>'."\n"; |
|
| 355 | - $str .= '</div>'."\n"; |
|
| 346 | + $str = '<div class="bigbluebuttonbn overview">' . "\n"; |
|
| 347 | + $str .= ' <div class="name">' . get_string('modulename', 'bigbluebuttonbn') . ': ' . "\n"; |
|
| 348 | + $str .= ' <a ' . $classes . 'href="' . $CFG->wwwroot . '/mod/bigbluebuttonbn/view.php?id=' . $bigbluebuttonbn->coursemodule . |
|
| 349 | + '">' . $bigbluebuttonbn->name . '</a>' . "\n"; |
|
| 350 | + $str .= ' </div>' . "\n"; |
|
| 351 | + $str .= ' <div class="info">' . get_string($start, 'bigbluebuttonbn') . ': ' . userdate($bigbluebuttonbn->openingtime) . |
|
| 352 | + '</div>' . "\n"; |
|
| 353 | + $str .= ' <div class="info">' . get_string('ends_at', 'bigbluebuttonbn') . ': ' . userdate($bigbluebuttonbn->closingtime) |
|
| 354 | + .'</div>' . "\n"; |
|
| 355 | + $str .= '</div>' . "\n"; |
|
| 356 | 356 | return $str; |
| 357 | 357 | } |
| 358 | 358 | |
@@ -547,7 +547,7 @@ discard block |
||
| 547 | 547 | if (count($files) == 1) { |
| 548 | 548 | // Get the first (and only) file. |
| 549 | 549 | $file = reset($files); |
| 550 | - $filesrc = '/'.$file->get_filename(); |
|
| 550 | + $filesrc = '/' . $file->get_filename(); |
|
| 551 | 551 | } |
| 552 | 552 | return $filesrc; |
| 553 | 553 | } |
@@ -615,7 +615,7 @@ discard block |
||
| 615 | 615 | if (!$filename) { |
| 616 | 616 | return false; |
| 617 | 617 | } |
| 618 | - $fullpath = "/$context->id/mod_bigbluebuttonbn/$filearea/0/".$filename; |
|
| 618 | + $fullpath = "/$context->id/mod_bigbluebuttonbn/$filearea/0/" . $filename; |
|
| 619 | 619 | $fs = get_file_storage(); |
| 620 | 620 | $file = $fs->get_file_by_hash(sha1($fullpath)); |
| 621 | 621 | if (!$file || $file->is_directory()) { |
@@ -77,8 +77,8 @@ |
||
| 77 | 77 | $body .= html_writer::start_tag('br'); |
| 78 | 78 | $body .= html_writer::tag('input', '', |
| 79 | 79 | array('type' => 'button', 'class' => 'btn btn-secondary', |
| 80 | - 'value' => get_string('view_recording_button_return', 'bigbluebuttonbn'), |
|
| 81 | - 'onclick' => 'window.location=\''.$CFG->wwwroot.'/mod/bigbluebuttonbn/view.php?id='.$cm->id.'\'')); |
|
| 80 | + 'value' => get_string('view_recording_button_return', 'bigbluebuttonbn'), |
|
| 81 | + 'onclick' => 'window.location=\''.$CFG->wwwroot.'/mod/bigbluebuttonbn/view.php?id='.$cm->id.'\'')); |
|
| 82 | 82 | // JavaScript for locales. |
| 83 | 83 | $PAGE->requires->strings_for_js(array_keys(bigbluebuttonbn_get_strings_for_js()), 'bigbluebuttonbn'); |
| 84 | 84 | // Require JavaScript modules. |
@@ -23,8 +23,8 @@ discard block |
||
| 23 | 23 | * @author Jesus Federico (jesus [at] blindsidenetworks [dt] com) |
| 24 | 24 | */ |
| 25 | 25 | |
| 26 | -require_once(dirname(dirname(dirname(__FILE__))).'/config.php'); |
|
| 27 | -require_once(dirname(__FILE__).'/locallib.php'); |
|
| 26 | +require_once(dirname(dirname(dirname(__FILE__))) . '/config.php'); |
|
| 27 | +require_once(dirname(__FILE__) . '/locallib.php'); |
|
| 28 | 28 | |
| 29 | 29 | $bn = required_param('bn', PARAM_INT); |
| 30 | 30 | $tc = optional_param('tc', 0, PARAM_INT); |
@@ -78,7 +78,7 @@ discard block |
||
| 78 | 78 | $body .= html_writer::tag('input', '', |
| 79 | 79 | array('type' => 'button', 'class' => 'btn btn-secondary', |
| 80 | 80 | 'value' => get_string('view_recording_button_return', 'bigbluebuttonbn'), |
| 81 | - 'onclick' => 'window.location=\''.$CFG->wwwroot.'/mod/bigbluebuttonbn/view.php?id='.$cm->id.'\'')); |
|
| 81 | + 'onclick' => 'window.location=\'' . $CFG->wwwroot . '/mod/bigbluebuttonbn/view.php?id=' . $cm->id . '\'')); |
|
| 82 | 82 | // JavaScript for locales. |
| 83 | 83 | $PAGE->requires->strings_for_js(array_keys(bigbluebuttonbn_get_strings_for_js()), 'bigbluebuttonbn'); |
| 84 | 84 | // Require JavaScript modules. |
@@ -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. |
@@ -127,7 +127,7 @@ discard block |
||
| 127 | 127 | ); |
| 128 | 128 | $defaultvalues['presentation'] = $draftitemid; |
| 129 | 129 | } catch (Exception $e) { |
| 130 | - debugging('Presentation could not be loaded: '.$e->getMessage(), DEBUG_DEVELOPER); |
|
| 130 | + debugging('Presentation could not be loaded: ' . $e->getMessage(), DEBUG_DEVELOPER); |
|
| 131 | 131 | return; |
| 132 | 132 | } |
| 133 | 133 | } |
@@ -423,7 +423,7 @@ discard block |
||
| 423 | 423 | return; |
| 424 | 424 | } |
| 425 | 425 | $mform->addElement($type, $name, get_string($descriptionkey, 'bigbluebuttonbn'), $options); |
| 426 | - if (get_string_manager()->string_exists($descriptionkey.'_help', 'bigbluebuttonbn')) { |
|
| 426 | + if (get_string_manager()->string_exists($descriptionkey . '_help', 'bigbluebuttonbn')) { |
|
| 427 | 427 | $mform->addHelpButton($name, $descriptionkey, 'bigbluebuttonbn'); |
| 428 | 428 | } |
| 429 | 429 | if (!empty($rule)) { |
@@ -213,8 +213,8 @@ discard block |
||
| 213 | 213 | $this->bigbluebuttonbn_mform_add_element($mform, $field['type'], $field['name'], $field['data_type'], |
| 214 | 214 | $field['description_key'], 0, ['maxlength' => 4, 'size' => 6], |
| 215 | 215 | ['message' => get_string('mod_form_field_voicebridge_format_error', 'bigbluebuttonbn'), |
| 216 | - 'type' => 'numeric', 'rule' => '####', 'validator' => 'server'] |
|
| 217 | - ); |
|
| 216 | + 'type' => 'numeric', 'rule' => '####', 'validator' => 'server'] |
|
| 217 | + ); |
|
| 218 | 218 | } else { |
| 219 | 219 | $this->bigbluebuttonbn_mform_add_element($mform, $field['type'], $field['name'], $field['data_type'], |
| 220 | 220 | $field['description_key'], 0, ['maxlength' => 4, 'size' => 6]); |
@@ -252,7 +252,7 @@ discard block |
||
| 252 | 252 | */ |
| 253 | 253 | private function bigbluebuttonbn_mform_add_block_room_recordings(&$mform, $cfg) { |
| 254 | 254 | $field = ['type' => 'hidden', 'name' => 'recordings_html', 'data_type' => PARAM_INT, |
| 255 | - 'description_key' => null]; |
|
| 255 | + 'description_key' => null]; |
|
| 256 | 256 | if ($cfg['recordings_html_editable']) { |
| 257 | 257 | $field['type'] = 'checkbox'; |
| 258 | 258 | $field['description_key'] = 'mod_form_field_recordings_html'; |
@@ -260,7 +260,7 @@ discard block |
||
| 260 | 260 | $this->bigbluebuttonbn_mform_add_element($mform, $field['type'], $field['name'], $field['data_type'], |
| 261 | 261 | $field['description_key'], $cfg['recordings_html_default']); |
| 262 | 262 | $field = ['type' => 'hidden', 'name' => 'recordings_deleted', 'data_type' => PARAM_INT, |
| 263 | - 'description_key' => null]; |
|
| 263 | + 'description_key' => null]; |
|
| 264 | 264 | if ($cfg['recordings_deleted_editable']) { |
| 265 | 265 | $field['type'] = 'checkbox'; |
| 266 | 266 | $field['description_key'] = 'mod_form_field_recordings_deleted'; |
@@ -268,7 +268,7 @@ discard block |
||
| 268 | 268 | $this->bigbluebuttonbn_mform_add_element($mform, $field['type'], $field['name'], $field['data_type'], |
| 269 | 269 | $field['description_key'], $cfg['recordings_deleted_default']); |
| 270 | 270 | $field = ['type' => 'hidden', 'name' => 'recordings_imported', 'data_type' => PARAM_INT, |
| 271 | - 'description_key' => null]; |
|
| 271 | + 'description_key' => null]; |
|
| 272 | 272 | if ($cfg['recordings_imported_editable']) { |
| 273 | 273 | $field['type'] = 'checkbox'; |
| 274 | 274 | $field['description_key'] = 'mod_form_field_recordings_imported'; |
@@ -276,7 +276,7 @@ discard block |
||
| 276 | 276 | $this->bigbluebuttonbn_mform_add_element($mform, $field['type'], $field['name'], $field['data_type'], |
| 277 | 277 | $field['description_key'], $cfg['recordings_imported_default']); |
| 278 | 278 | $field = ['type' => 'hidden', 'name' => 'recordings_preview', 'data_type' => PARAM_INT, |
| 279 | - 'description_key' => null]; |
|
| 279 | + 'description_key' => null]; |
|
| 280 | 280 | if ($cfg['recordings_preview_editable']) { |
| 281 | 281 | $field['type'] = 'checkbox'; |
| 282 | 282 | $field['description_key'] = 'mod_form_field_recordings_preview'; |
@@ -347,7 +347,7 @@ discard block |
||
| 347 | 347 | $htmlselectiontype = html_writer::select($participantselection['type_options'], |
| 348 | 348 | 'bigbluebuttonbn_participant_selection_type', $participantselection['type_selected'], array(), |
| 349 | 349 | array('id' => 'bigbluebuttonbn_participant_selection_type', |
| 350 | - 'onchange' => 'M.mod_bigbluebuttonbn.modform.participantSelectionSet(); return 0;')); |
|
| 350 | + 'onchange' => 'M.mod_bigbluebuttonbn.modform.participantSelectionSet(); return 0;')); |
|
| 351 | 351 | $htmlselectionoptions = html_writer::select($participantselection['options'], 'bigbluebuttonbn_participant_selection', |
| 352 | 352 | $participantselection['selected'], array(), |
| 353 | 353 | array('id' => 'bigbluebuttonbn_participant_selection', 'disabled' => 'disabled')); |
@@ -355,7 +355,7 @@ discard block |
||
| 355 | 355 | 'type' => 'button', 'class' => 'btn btn-secondary', |
| 356 | 356 | 'value' => get_string('mod_form_field_participant_list_action_add', 'bigbluebuttonbn'), |
| 357 | 357 | 'onclick' => 'M.mod_bigbluebuttonbn.modform.participantAdd(); return 0;' |
| 358 | - )); |
|
| 358 | + )); |
|
| 359 | 359 | $htmladdparticipant = html_writer::tag('div', |
| 360 | 360 | $htmlselectiontype . ' ' . $htmlselectionoptions . ' ' . $htmlselectioninput, null); |
| 361 | 361 | $mform->addElement('html', "\n\n"); |
@@ -55,8 +55,8 @@ discard block |
||
| 55 | 55 | */ |
| 56 | 56 | public static function defaultvalues() { |
| 57 | 57 | return array( |
| 58 | - 'server_url' => (string) BIGBLUEBUTTONBN_DEFAULT_SERVER_URL, |
|
| 59 | - 'shared_secret' => (string) BIGBLUEBUTTONBN_DEFAULT_SHARED_SECRET, |
|
| 58 | + 'server_url' => (string)BIGBLUEBUTTONBN_DEFAULT_SERVER_URL, |
|
| 59 | + 'shared_secret' => (string)BIGBLUEBUTTONBN_DEFAULT_SHARED_SECRET, |
|
| 60 | 60 | 'voicebridge_editable' => 'false', |
| 61 | 61 | 'importrecordings_enabled' => 'false', |
| 62 | 62 | 'importrecordings_from_deleted_enabled' => 'false', |
@@ -119,8 +119,8 @@ discard block |
||
| 119 | 119 | if (isset($CFG->bigbluebuttonbn[$setting])) { |
| 120 | 120 | return (string)$CFG->bigbluebuttonbn[$setting]; |
| 121 | 121 | } |
| 122 | - if (isset($CFG->{'bigbluebuttonbn_'.$setting})) { |
|
| 123 | - return (string)$CFG->{'bigbluebuttonbn_'.$setting}; |
|
| 122 | + if (isset($CFG->{'bigbluebuttonbn_' . $setting})) { |
|
| 123 | + return (string)$CFG->{'bigbluebuttonbn_' . $setting}; |
|
| 124 | 124 | } |
| 125 | 125 | return self::defaultvalue($setting); |
| 126 | 126 | } |
@@ -152,31 +152,31 @@ |
||
| 152 | 152 | */ |
| 153 | 153 | public static function get_options() { |
| 154 | 154 | return array( |
| 155 | - 'version_major' => self::get_moodle_version_major(), |
|
| 156 | - 'voicebridge_editable' => self::get('voicebridge_editable'), |
|
| 157 | - 'waitformoderator_default' => self::get('waitformoderator_default'), |
|
| 158 | - 'waitformoderator_editable' => self::get('waitformoderator_editable'), |
|
| 159 | - 'userlimit_default' => self::get('userlimit_default'), |
|
| 160 | - 'userlimit_editable' => self::get('userlimit_editable'), |
|
| 161 | - 'preuploadpresentation_enabled' => self::get('preuploadpresentation_enabled'), |
|
| 162 | - 'sendnotifications_enabled' => self::get('sendnotifications_enabled'), |
|
| 163 | - 'recordings_enabled' => self::get('recordings_enabled'), |
|
| 164 | - 'recordings_html_default' => self::get('recordings_html_default'), |
|
| 165 | - 'recordings_html_editable' => self::get('recordings_html_editable'), |
|
| 166 | - 'recordings_deleted_default' => self::get('recordings_deleted_default'), |
|
| 167 | - 'recordings_deleted_editable' => self::get('recordings_deleted_editable'), |
|
| 168 | - 'recordings_imported_default' => self::get('recordings_imported_default'), |
|
| 169 | - 'recordings_imported_editable' => self::get('recordings_imported_editable'), |
|
| 170 | - 'recordings_preview_default' => self::get('recordings_preview_default'), |
|
| 171 | - 'recordings_preview_editable' => self::get('recordings_preview_editable'), |
|
| 172 | - 'recording_default' => self::get('recording_default'), |
|
| 173 | - 'recording_editable' => self::get('recording_editable'), |
|
| 174 | - 'recording_icons_enabled' => self::get('recording_icons_enabled'), |
|
| 175 | - 'general_warning_message' => self::get('general_warning_message'), |
|
| 176 | - 'general_warning_box_type' => self::get('general_warning_box_type'), |
|
| 177 | - 'general_warning_button_text' => self::get('general_warning_button_text'), |
|
| 178 | - 'general_warning_button_href' => self::get('general_warning_button_href'), |
|
| 179 | - 'general_warning_button_class' => self::get('general_warning_button_class'), |
|
| 180 | - ); |
|
| 155 | + 'version_major' => self::get_moodle_version_major(), |
|
| 156 | + 'voicebridge_editable' => self::get('voicebridge_editable'), |
|
| 157 | + 'waitformoderator_default' => self::get('waitformoderator_default'), |
|
| 158 | + 'waitformoderator_editable' => self::get('waitformoderator_editable'), |
|
| 159 | + 'userlimit_default' => self::get('userlimit_default'), |
|
| 160 | + 'userlimit_editable' => self::get('userlimit_editable'), |
|
| 161 | + 'preuploadpresentation_enabled' => self::get('preuploadpresentation_enabled'), |
|
| 162 | + 'sendnotifications_enabled' => self::get('sendnotifications_enabled'), |
|
| 163 | + 'recordings_enabled' => self::get('recordings_enabled'), |
|
| 164 | + 'recordings_html_default' => self::get('recordings_html_default'), |
|
| 165 | + 'recordings_html_editable' => self::get('recordings_html_editable'), |
|
| 166 | + 'recordings_deleted_default' => self::get('recordings_deleted_default'), |
|
| 167 | + 'recordings_deleted_editable' => self::get('recordings_deleted_editable'), |
|
| 168 | + 'recordings_imported_default' => self::get('recordings_imported_default'), |
|
| 169 | + 'recordings_imported_editable' => self::get('recordings_imported_editable'), |
|
| 170 | + 'recordings_preview_default' => self::get('recordings_preview_default'), |
|
| 171 | + 'recordings_preview_editable' => self::get('recordings_preview_editable'), |
|
| 172 | + 'recording_default' => self::get('recording_default'), |
|
| 173 | + 'recording_editable' => self::get('recording_editable'), |
|
| 174 | + 'recording_icons_enabled' => self::get('recording_icons_enabled'), |
|
| 175 | + 'general_warning_message' => self::get('general_warning_message'), |
|
| 176 | + 'general_warning_box_type' => self::get('general_warning_box_type'), |
|
| 177 | + 'general_warning_button_text' => self::get('general_warning_button_text'), |
|
| 178 | + 'general_warning_button_href' => self::get('general_warning_button_href'), |
|
| 179 | + 'general_warning_button_class' => self::get('general_warning_button_class'), |
|
| 180 | + ); |
|
| 181 | 181 | } |
| 182 | 182 | } |
@@ -205,7 +205,7 @@ |
||
| 205 | 205 | !isset($CFG->bigbluebuttonbn['recordings_imported_editable']) || |
| 206 | 206 | !isset($CFG->bigbluebuttonbn['recordings_preview_default']) || |
| 207 | 207 | !isset($CFG->bigbluebuttonbn['recordings_preview_editable']) |
| 208 | - ); |
|
| 208 | + ); |
|
| 209 | 209 | } |
| 210 | 210 | |
| 211 | 211 | /** |
@@ -28,7 +28,7 @@ discard block |
||
| 28 | 28 | defined('MOODLE_INTERNAL') || die(); |
| 29 | 29 | |
| 30 | 30 | require_once($CFG->dirroot . '/mod/bigbluebuttonbn/locallib.php'); |
| 31 | -require_once($CFG->libdir.'/adminlib.php'); |
|
| 31 | +require_once($CFG->libdir . '/adminlib.php'); |
|
| 32 | 32 | |
| 33 | 33 | /** |
| 34 | 34 | * Helper class for rendering HTML for settings.php. |
@@ -66,7 +66,7 @@ discard block |
||
| 66 | 66 | $itemname = get_string('config_' . $name, 'bigbluebuttonbn'); |
| 67 | 67 | } |
| 68 | 68 | if ($itemdescription === null) { |
| 69 | - $itemdescription = get_string('config_' .$name . '_description', 'bigbluebuttonbn'); |
|
| 69 | + $itemdescription = get_string('config_' . $name . '_description', 'bigbluebuttonbn'); |
|
| 70 | 70 | } |
| 71 | 71 | $item = new \admin_setting_heading('bigbluebuttonbn_config_' . $name, $itemname, $itemdescription); |
| 72 | 72 | $this->settings->add($item); |
@@ -148,7 +148,7 @@ discard block |
||
| 148 | 148 | public function render_warning_message($name, $message, $type = 'warning', $closable = true) { |
| 149 | 149 | global $OUTPUT; |
| 150 | 150 | $output = $OUTPUT->box_start('box boxalignleft adminerror alert alert-' . $type . ' alert-block fade in', |
| 151 | - 'bigbluebuttonbn_' . $name)."\n"; |
|
| 151 | + 'bigbluebuttonbn_' . $name) . "\n"; |
|
| 152 | 152 | if ($closable) { |
| 153 | 153 | $output .= ' <button type="button" class="close" data-dismiss="alert">×</button>' . "\n"; |
| 154 | 154 | } |
@@ -47,7 +47,7 @@ discard block |
||
| 47 | 47 | public static function notification_process($context, $bigbluebuttonbn, $action) { |
| 48 | 48 | global $USER; |
| 49 | 49 | // Prepare message. |
| 50 | - $msg = (object) array(); |
|
| 50 | + $msg = (object)array(); |
|
| 51 | 51 | // Build the message_body. |
| 52 | 52 | $msg->action = $action; |
| 53 | 53 | $msg->activity_type = ''; |
@@ -72,26 +72,26 @@ discard block |
||
| 72 | 72 | * @return string |
| 73 | 73 | */ |
| 74 | 74 | public static function notification_msg_html($msg) { |
| 75 | - $messagetext = '<p>'.$msg->activity_type.' "'.$msg->activity_title.'" '. |
|
| 76 | - get_string('email_body_notification_meeting_has_been', 'bigbluebuttonbn').' '.$msg->action.'.</p>'."\n"; |
|
| 77 | - $messagetext .= '<p><b>'.$msg->activity_title.'</b> '. |
|
| 78 | - get_string('email_body_notification_meeting_details', 'bigbluebuttonbn').':'."\n"; |
|
| 79 | - $messagetext .= '<table border="0" style="margin: 5px 0 0 20px"><tbody>'."\n"; |
|
| 80 | - $messagetext .= '<tr><td style="font-weight:bold;color:#555;">'. |
|
| 81 | - get_string('email_body_notification_meeting_title', 'bigbluebuttonbn').': </td><td>'."\n"; |
|
| 82 | - $messagetext .= $msg->activity_title.'</td></tr>'."\n"; |
|
| 83 | - $messagetext .= '<tr><td style="font-weight:bold;color:#555;">'. |
|
| 84 | - get_string('email_body_notification_meeting_description', 'bigbluebuttonbn').': </td><td>'."\n"; |
|
| 85 | - $messagetext .= $msg->activity_description.'</td></tr>'."\n"; |
|
| 86 | - $messagetext .= '<tr><td style="font-weight:bold;color:#555;">'. |
|
| 87 | - get_string('email_body_notification_meeting_start_date', 'bigbluebuttonbn').': </td><td>'."\n"; |
|
| 88 | - $messagetext .= $msg->activity_openingtime.'</td></tr>'."\n"; |
|
| 89 | - $messagetext .= '<tr><td style="font-weight:bold;color:#555;">'. |
|
| 90 | - get_string('email_body_notification_meeting_end_date', 'bigbluebuttonbn').': </td><td>'."\n"; |
|
| 91 | - $messagetext .= $msg->activity_closingtime.'</td></tr>'."\n"; |
|
| 92 | - $messagetext .= '<tr><td style="font-weight:bold;color:#555;">'.$msg->action.' '. |
|
| 93 | - get_string('email_body_notification_meeting_by', 'bigbluebuttonbn').': </td><td>'."\n"; |
|
| 94 | - $messagetext .= $msg->activity_owner.'</td></tr></tbody></table></p>'."\n"; |
|
| 75 | + $messagetext = '<p>' . $msg->activity_type . ' "' . $msg->activity_title . '" ' . |
|
| 76 | + get_string('email_body_notification_meeting_has_been', 'bigbluebuttonbn') . ' ' . $msg->action . '.</p>' . "\n"; |
|
| 77 | + $messagetext .= '<p><b>' . $msg->activity_title . '</b> ' . |
|
| 78 | + get_string('email_body_notification_meeting_details', 'bigbluebuttonbn') . ':' . "\n"; |
|
| 79 | + $messagetext .= '<table border="0" style="margin: 5px 0 0 20px"><tbody>' . "\n"; |
|
| 80 | + $messagetext .= '<tr><td style="font-weight:bold;color:#555;">' . |
|
| 81 | + get_string('email_body_notification_meeting_title', 'bigbluebuttonbn') . ': </td><td>' . "\n"; |
|
| 82 | + $messagetext .= $msg->activity_title . '</td></tr>' . "\n"; |
|
| 83 | + $messagetext .= '<tr><td style="font-weight:bold;color:#555;">' . |
|
| 84 | + get_string('email_body_notification_meeting_description', 'bigbluebuttonbn') . ': </td><td>' . "\n"; |
|
| 85 | + $messagetext .= $msg->activity_description . '</td></tr>' . "\n"; |
|
| 86 | + $messagetext .= '<tr><td style="font-weight:bold;color:#555;">' . |
|
| 87 | + get_string('email_body_notification_meeting_start_date', 'bigbluebuttonbn') . ': </td><td>' . "\n"; |
|
| 88 | + $messagetext .= $msg->activity_openingtime . '</td></tr>' . "\n"; |
|
| 89 | + $messagetext .= '<tr><td style="font-weight:bold;color:#555;">' . |
|
| 90 | + get_string('email_body_notification_meeting_end_date', 'bigbluebuttonbn') . ': </td><td>' . "\n"; |
|
| 91 | + $messagetext .= $msg->activity_closingtime . '</td></tr>' . "\n"; |
|
| 92 | + $messagetext .= '<tr><td style="font-weight:bold;color:#555;">' . $msg->action . ' ' . |
|
| 93 | + get_string('email_body_notification_meeting_by', 'bigbluebuttonbn') . ': </td><td>' . "\n"; |
|
| 94 | + $messagetext .= $msg->activity_owner . '</td></tr></tbody></table></p>' . "\n"; |
|
| 95 | 95 | return $messagetext; |
| 96 | 96 | } |
| 97 | 97 | |
@@ -108,14 +108,14 @@ discard block |
||
| 108 | 108 | global $DB; |
| 109 | 109 | $course = $DB->get_record('course', array('id' => $bigbluebuttonbn->course), '*', MUST_EXIST); |
| 110 | 110 | // Complete message. |
| 111 | - $msg = (object) array(); |
|
| 111 | + $msg = (object)array(); |
|
| 112 | 112 | $msg->user_name = fullname($sender); |
| 113 | 113 | $msg->user_email = $sender->email; |
| 114 | 114 | $msg->course_name = "$course->fullname"; |
| 115 | - $message .= '<p><hr/><br/>'.get_string('email_footer_sent_by', 'bigbluebuttonbn').' '. |
|
| 116 | - $msg->user_name.'('.$msg->user_email.') '; |
|
| 117 | - $message .= get_string('email_footer_sent_from', 'bigbluebuttonbn').' '.$msg->course_name.'.</p>'; |
|
| 118 | - $users = (array) get_enrolled_users($context, '', 0, 'u.*', null, 0, 0, true); |
|
| 115 | + $message .= '<p><hr/><br/>' . get_string('email_footer_sent_by', 'bigbluebuttonbn') . ' ' . |
|
| 116 | + $msg->user_name . '(' . $msg->user_email . ') '; |
|
| 117 | + $message .= get_string('email_footer_sent_from', 'bigbluebuttonbn') . ' ' . $msg->course_name . '.</p>'; |
|
| 118 | + $users = (array)get_enrolled_users($context, '', 0, 'u.*', null, 0, 0, true); |
|
| 119 | 119 | foreach ($users as $user) { |
| 120 | 120 | if ($user->id != $sender->id) { |
| 121 | 121 | message_post_message($sender, $user, $message, FORMAT_HTML); |
@@ -98,7 +98,7 @@ discard block |
||
| 98 | 98 | * recordings from a different activity even from a different course. |
| 99 | 99 | **/ |
| 100 | 100 | |
| 101 | - /* |
|
| 101 | + /* |
|
| 102 | 102 | * When the value is set to 1 (checked) the bigbluebuttonbn rooms or |
| 103 | 103 | * activities will have the 'import recordings' capability enabled. |
| 104 | 104 | * $CFG->bigbluebuttonbn['importrecordings_enabled'] = 0; |
@@ -119,7 +119,7 @@ discard block |
||
| 119 | 119 | * 'Join session' button enabled |
| 120 | 120 | **/ |
| 121 | 121 | |
| 122 | - /* |
|
| 122 | + /* |
|
| 123 | 123 | * When the value is set to 1 (checked) the bigbluebuttonbn rooms or |
| 124 | 124 | * activities will have the 'wait for moderator' capability enabled by |
| 125 | 125 | * default. |
@@ -259,13 +259,13 @@ discard block |
||
| 259 | 259 | * $CFG->bigbluebuttonbn['recordings_imported_editable'] = 1; |
| 260 | 260 | */ |
| 261 | 261 | |
| 262 | - /* |
|
| 262 | + /* |
|
| 263 | 263 | * When the value is set to 1 (checked) the bigbluebuttonbn resources |
| 264 | 264 | * will show the recodings with thumbnails. |
| 265 | 265 | * $CFG->bigbluebuttonbn['recordings_preview_default'] = 1; |
| 266 | 266 | */ |
| 267 | 267 | |
| 268 | - /* |
|
| 268 | + /* |
|
| 269 | 269 | * When the value is set to 1 (checked) the 'preview ui' capability can be |
| 270 | 270 | * enabled/disabled by the user creating or editing the resource. |
| 271 | 271 | * $CFG->bigbluebuttonbn['recordings_preview_editable'] = 0; |
@@ -310,27 +310,27 @@ discard block |
||
| 310 | 310 | * $CFG->bigbluebuttonbn['general_warning_message'] = "Would you like to record your BigBlueButton sessions for later viewing? "; |
| 311 | 311 | */ |
| 312 | 312 | |
| 313 | - /* |
|
| 313 | + /* |
|
| 314 | 314 | * The warning box is always shown to administrators, but it is also possible to define other roles |
| 315 | 315 | * to whom the it will be shown. The roles are based on the shortnames defined by Moodle: |
| 316 | 316 | * 'manager,coursecreator,editingteacher,teacher,student,guest,user,frontpage' |
| 317 | 317 | * $CFG->bigbluebuttonbn['general_warning_roles'] = 'editingteacher,teacher'; |
| 318 | 318 | */ |
| 319 | 319 | |
| 320 | - /* |
|
| 320 | + /* |
|
| 321 | 321 | * As the general_warning_message is shown in a box, its type can be defined with general_warning_type |
| 322 | 322 | * The default type is 'info' which is normaly rendered in blue when using a bootstrap theme. |
| 323 | 323 | * All the modifiers for boxed in bootstrap can be used [info|success|warning|danger]. |
| 324 | 324 | * $CFG->bigbluebuttonbn['general_warning_box_type'] = 'info'; |
| 325 | 325 | */ |
| 326 | 326 | |
| 327 | - /* |
|
| 327 | + /* |
|
| 328 | 328 | * Additionally, when general_warning_button_href value is different than "", a button |
| 329 | 329 | * can also be shown right after the message. |
| 330 | 330 | * $CFG->bigbluebuttonbn['general_warning_button_href'] = "http://blindsidenetworks.com/"; |
| 331 | 331 | */ |
| 332 | 332 | |
| 333 | - /* |
|
| 333 | + /* |
|
| 334 | 334 | * Finally, the text and class for the button can be modified |
| 335 | 335 | * $CFG->bigbluebuttonbn['general_warning_button_text'] = "Upgrade your site"; |
| 336 | 336 | * $CFG->bigbluebuttonbn['general_warning_button_class'] = "btn btn-primary"; |
@@ -436,12 +436,12 @@ discard block |
||
| 436 | 436 | $recordings = bigbluebuttonbn_get_recordings( |
| 437 | 437 | $bbbsession['course']->id, $bigbluebuttonbnid, $enabledfeatures['showroom'], |
| 438 | 438 | $bbbsession['bigbluebuttonbn']->recordings_deleted |
| 439 | - ); |
|
| 439 | + ); |
|
| 440 | 440 | if ($enabledfeatures['importrecordings']) { |
| 441 | 441 | // Get recording links. |
| 442 | 442 | $recordingsimported = bigbluebuttonbn_get_recordings_imported_array( |
| 443 | 443 | $bbbsession['course']->id, $bigbluebuttonbnid, $enabledfeatures['showroom'] |
| 444 | - ); |
|
| 444 | + ); |
|
| 445 | 445 | /* Perform aritmetic addition instead of merge so the imported recordings corresponding to existent |
| 446 | 446 | * recordings are not included. */ |
| 447 | 447 | $recordings += $recordingsimported; |
@@ -455,7 +455,7 @@ discard block |
||
| 455 | 455 | // JavaScript variables for recordings. |
| 456 | 456 | $jsvars += array( |
| 457 | 457 | 'recordings_html' => $bbbsession['bigbluebuttonbn']->recordings_html == '1', |
| 458 | - ); |
|
| 458 | + ); |
|
| 459 | 459 | // If there are meetings with recordings load the data to the table. |
| 460 | 460 | if ($bbbsession['bigbluebuttonbn']->recordings_html) { |
| 461 | 461 | // Render a plain html table. |
@@ -465,7 +465,7 @@ discard block |
||
| 465 | 465 | $jsvars += array( |
| 466 | 466 | 'columns' => bigbluebuttonbn_get_recording_columns($bbbsession), |
| 467 | 467 | 'data' => bigbluebuttonbn_get_recording_data($bbbsession, $recordings), |
| 468 | - ); |
|
| 468 | + ); |
|
| 469 | 469 | // Render a YUI table. |
| 470 | 470 | return html_writer::div('', '', array('id' => 'bigbluebuttonbn_yui_table')); |
| 471 | 471 | } |
@@ -485,10 +485,10 @@ discard block |
||
| 485 | 485 | } |
| 486 | 486 | $button = html_writer::tag('input', '', |
| 487 | 487 | array('type' => 'button', |
| 488 | - 'value' => get_string('view_recording_button_import', 'bigbluebuttonbn'), |
|
| 489 | - 'class' => 'btn btn-secondary', |
|
| 490 | - 'onclick' => 'window.location=\''.$CFG->wwwroot.'/mod/bigbluebuttonbn/import_view.php?bn='. |
|
| 491 | - $bbbsession['bigbluebuttonbn']->id.'\'')); |
|
| 488 | + 'value' => get_string('view_recording_button_import', 'bigbluebuttonbn'), |
|
| 489 | + 'class' => 'btn btn-secondary', |
|
| 490 | + 'onclick' => 'window.location=\''.$CFG->wwwroot.'/mod/bigbluebuttonbn/import_view.php?bn='. |
|
| 491 | + $bbbsession['bigbluebuttonbn']->id.'\'')); |
|
| 492 | 492 | $output = html_writer::start_tag('br'); |
| 493 | 493 | $output .= html_writer::tag('span', $button, array('id' => 'import_recording_links_button')); |
| 494 | 494 | $output .= html_writer::tag('span', '', array('id' => 'import_recording_links_table')); |
@@ -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; |
@@ -151,7 +151,7 @@ discard block |
||
| 151 | 151 | $bbbsession['modPW'] = $bbbsession['bigbluebuttonbn']->moderatorpass; |
| 152 | 152 | $bbbsession['viewerPW'] = $bbbsession['bigbluebuttonbn']->viewerpass; |
| 153 | 153 | // Database info related to the activity. |
| 154 | - $bbbsession['meetingid'] = $bbbsession['bigbluebuttonbn']->meetingid.'-'.$bbbsession['course']->id.'-'. |
|
| 154 | + $bbbsession['meetingid'] = $bbbsession['bigbluebuttonbn']->meetingid . '-' . $bbbsession['course']->id . '-' . |
|
| 155 | 155 | $bbbsession['bigbluebuttonbn']->id; |
| 156 | 156 | $bbbsession['meetingname'] = $bbbsession['bigbluebuttonbn']->name; |
| 157 | 157 | $bbbsession['meetingdescription'] = $bbbsession['bigbluebuttonbn']->intro; |
@@ -171,7 +171,7 @@ discard block |
||
| 171 | 171 | $bbbsession['welcome'] = get_string('mod_form_field_welcome_default', 'bigbluebuttonbn'); |
| 172 | 172 | } |
| 173 | 173 | if ($bbbsession['bigbluebuttonbn']->record) { |
| 174 | - $bbbsession['welcome'] .= '<br><br>'.get_string('bbbrecordwarning', 'bigbluebuttonbn'); |
|
| 174 | + $bbbsession['welcome'] .= '<br><br>' . get_string('bbbrecordwarning', 'bigbluebuttonbn'); |
|
| 175 | 175 | } |
| 176 | 176 | $bbbsession['openingtime'] = $bbbsession['bigbluebuttonbn']->openingtime; |
| 177 | 177 | $bbbsession['closingtime'] = $bbbsession['bigbluebuttonbn']->closingtime; |
@@ -184,7 +184,7 @@ discard block |
||
| 184 | 184 | $bbbsession['originServerName'] = $parsedurl['host']; |
| 185 | 185 | $bbbsession['originServerUrl'] = $CFG->wwwroot; |
| 186 | 186 | $bbbsession['originServerCommonName'] = ''; |
| 187 | - $bbbsession['originTag'] = 'moodle-mod_bigbluebuttonbn ('.get_config('mod_bigbluebuttonbn', 'version').')'; |
|
| 187 | + $bbbsession['originTag'] = 'moodle-mod_bigbluebuttonbn (' . get_config('mod_bigbluebuttonbn', 'version') . ')'; |
|
| 188 | 188 | $bbbsession['bnserver'] = bigbluebuttonbn_is_bn_server(); |
| 189 | 189 | } |
| 190 | 190 | |
@@ -242,8 +242,8 @@ discard block |
||
| 242 | 242 | $groupname = groups_get_group_name($bbbsession['group']); |
| 243 | 243 | } |
| 244 | 244 | // Assign group default values. |
| 245 | - $bbbsession['meetingid'] .= '['.$bbbsession['group'].']'; |
|
| 246 | - $bbbsession['meetingname'] .= ' ('.$groupname.')'; |
|
| 245 | + $bbbsession['meetingid'] .= '[' . $bbbsession['group'] . ']'; |
|
| 246 | + $bbbsession['meetingname'] .= ' (' . $groupname . ')'; |
|
| 247 | 247 | if (count($groups) == 0) { |
| 248 | 248 | // Only the All participants group exists. |
| 249 | 249 | bigbluebuttonbn_view_message_box($bbbsession, get_string('view_groups_notenrolled_warning', 'bigbluebuttonbn'), 'info'); |
@@ -254,7 +254,7 @@ discard block |
||
| 254 | 254 | return; |
| 255 | 255 | } |
| 256 | 256 | bigbluebuttonbn_view_message_box($bbbsession, get_string('view_groups_selection_warning', 'bigbluebuttonbn')); |
| 257 | - $urltoroot = $CFG->wwwroot.'/mod/bigbluebuttonbn/view.php?id='.$bbbsession['cm']->id; |
|
| 257 | + $urltoroot = $CFG->wwwroot . '/mod/bigbluebuttonbn/view.php?id=' . $bbbsession['cm']->id; |
|
| 258 | 258 | groups_print_activity_menu($bbbsession['cm'], $urltoroot); |
| 259 | 259 | echo '<br><br>'; |
| 260 | 260 | } |
@@ -301,7 +301,7 @@ discard block |
||
| 301 | 301 | 'locale' => bigbluebuttonbn_get_localcode(), 'profile_features' => $typeprofiles[0]['features']); |
| 302 | 302 | // Renders general warning when configured. |
| 303 | 303 | $cfg = \mod_bigbluebuttonbn\locallib\config::get_options(); |
| 304 | - $output = ''; |
|
| 304 | + $output = ''; |
|
| 305 | 305 | if (bigbluebuttonbn_view_warning_shown($bbbsession)) { |
| 306 | 306 | $output .= bigbluebuttonbn_render_warning( |
| 307 | 307 | (string)$cfg['general_warning_message'], |
@@ -325,7 +325,7 @@ discard block |
||
| 325 | 325 | $recordingsdisabled = get_string('view_message_recordings_disabled', 'bigbluebuttonbn'); |
| 326 | 326 | $output .= bigbluebuttonbn_render_warning($recordingsdisabled, 'danger'); |
| 327 | 327 | } |
| 328 | - echo $output.html_writer::empty_tag('br').html_writer::empty_tag('br').html_writer::empty_tag('br'); |
|
| 328 | + echo $output . html_writer::empty_tag('br') . html_writer::empty_tag('br') . html_writer::empty_tag('br'); |
|
| 329 | 329 | $PAGE->requires->yui_module('moodle-mod_bigbluebuttonbn-broker', 'M.mod_bigbluebuttonbn.broker.init', array($jsvars)); |
| 330 | 330 | } |
| 331 | 331 | |
@@ -388,12 +388,12 @@ discard block |
||
| 388 | 388 | // JavaScript variables for room. |
| 389 | 389 | $openingtime = ''; |
| 390 | 390 | if ($bbbsession['openingtime']) { |
| 391 | - $openingtime = get_string('mod_form_field_openingtime', 'bigbluebuttonbn').': '. |
|
| 391 | + $openingtime = get_string('mod_form_field_openingtime', 'bigbluebuttonbn') . ': ' . |
|
| 392 | 392 | userdate($bbbsession['openingtime']); |
| 393 | 393 | } |
| 394 | 394 | $closingtime = ''; |
| 395 | 395 | if ($bbbsession['closingtime']) { |
| 396 | - $closingtime = get_string('mod_form_field_closingtime', 'bigbluebuttonbn').': '. |
|
| 396 | + $closingtime = get_string('mod_form_field_closingtime', 'bigbluebuttonbn') . ': ' . |
|
| 397 | 397 | userdate($bbbsession['closingtime']); |
| 398 | 398 | } |
| 399 | 399 | $jsvars += array( |
@@ -410,7 +410,7 @@ discard block |
||
| 410 | 410 | $output .= $OUTPUT->box_end(); |
| 411 | 411 | // Action button box. |
| 412 | 412 | $output .= $OUTPUT->box_start('generalbox boxaligncenter', 'bigbluebuttonbn_view_action_button_box'); |
| 413 | - $output .= '<br><br><span id="join_button"></span> <span id="end_button"></span>'."\n"; |
|
| 413 | + $output .= '<br><br><span id="join_button"></span> <span id="end_button"></span>' . "\n"; |
|
| 414 | 414 | $output .= $OUTPUT->box_end(); |
| 415 | 415 | if ($activity == 'ended') { |
| 416 | 416 | $output .= bigbluebuttonbn_view_ended($bbbsession); |
@@ -459,7 +459,7 @@ discard block |
||
| 459 | 459 | // If there are meetings with recordings load the data to the table. |
| 460 | 460 | if ($bbbsession['bigbluebuttonbn']->recordings_html) { |
| 461 | 461 | // Render a plain html table. |
| 462 | - return bigbluebuttonbn_output_recording_table($bbbsession, $recordings)."\n"; |
|
| 462 | + return bigbluebuttonbn_output_recording_table($bbbsession, $recordings) . "\n"; |
|
| 463 | 463 | } |
| 464 | 464 | // JavaScript variables for recordings with YUI. |
| 465 | 465 | $jsvars += array( |
@@ -487,8 +487,8 @@ discard block |
||
| 487 | 487 | array('type' => 'button', |
| 488 | 488 | 'value' => get_string('view_recording_button_import', 'bigbluebuttonbn'), |
| 489 | 489 | 'class' => 'btn btn-secondary', |
| 490 | - 'onclick' => 'window.location=\''.$CFG->wwwroot.'/mod/bigbluebuttonbn/import_view.php?bn='. |
|
| 491 | - $bbbsession['bigbluebuttonbn']->id.'\'')); |
|
| 490 | + 'onclick' => 'window.location=\'' . $CFG->wwwroot . '/mod/bigbluebuttonbn/import_view.php?bn=' . |
|
| 491 | + $bbbsession['bigbluebuttonbn']->id . '\'')); |
|
| 492 | 492 | $output = html_writer::start_tag('br'); |
| 493 | 493 | $output .= html_writer::tag('span', $button, array('id' => 'import_recording_links_button')); |
| 494 | 494 | $output .= html_writer::tag('span', '', array('id' => 'import_recording_links_table')); |
@@ -507,10 +507,10 @@ discard block |
||
| 507 | 507 | if (!is_null($bbbsession['presentation']['url'])) { |
| 508 | 508 | $attributes = array('title' => $bbbsession['presentation']['name']); |
| 509 | 509 | $icon = new pix_icon($bbbsession['presentation']['icon'], $bbbsession['presentation']['mimetype_description']); |
| 510 | - return '<h4>'.get_string('view_section_title_presentation', 'bigbluebuttonbn').'</h4>'. |
|
| 511 | - $OUTPUT->action_icon($bbbsession['presentation']['url'], $icon, null, array(), false). |
|
| 510 | + return '<h4>' . get_string('view_section_title_presentation', 'bigbluebuttonbn') . '</h4>' . |
|
| 511 | + $OUTPUT->action_icon($bbbsession['presentation']['url'], $icon, null, array(), false) . |
|
| 512 | 512 | $OUTPUT->action_link($bbbsession['presentation']['url'], |
| 513 | - $bbbsession['presentation']['name'], null, $attributes).'<br><br>'; |
|
| 513 | + $bbbsession['presentation']['name'], null, $attributes) . '<br><br>'; |
|
| 514 | 514 | } |
| 515 | 515 | return ''; |
| 516 | 516 | } |