@@ -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 | } |
@@ -292,7 +292,7 @@ discard block |
||
| 292 | 292 | * Helper function to retrieve imported recordings from the Moodle database. |
| 293 | 293 | * The references are stored as events in bigbluebuttonbn_logs. |
| 294 | 294 | * |
| 295 | - * @param string $courseid |
|
| 295 | + * @param integer $courseid |
|
| 296 | 296 | * @param string $bigbluebuttonbnid |
| 297 | 297 | * @param bool $subset |
| 298 | 298 | * |
@@ -320,7 +320,7 @@ discard block |
||
| 320 | 320 | /** |
| 321 | 321 | * Helper function to retrive the default config.xml file. |
| 322 | 322 | * |
| 323 | - * @return string |
|
| 323 | + * @return null|SimpleXMLElement |
|
| 324 | 324 | */ |
| 325 | 325 | function bigbluebuttonbn_get_default_config_xml() { |
| 326 | 326 | $xml = bigbluebuttonbn_wrap_xml_load_file( |
@@ -402,7 +402,7 @@ discard block |
||
| 402 | 402 | * @param object $a |
| 403 | 403 | * @param object $b |
| 404 | 404 | * |
| 405 | - * @return array |
|
| 405 | + * @return integer |
|
| 406 | 406 | */ |
| 407 | 407 | function bigbluebuttonbn_recording_build_sorter($a, $b) { |
| 408 | 408 | if ($a['startTime'] < $b['startTime']) { |
@@ -528,7 +528,7 @@ discard block |
||
| 528 | 528 | * @param string $data |
| 529 | 529 | * @param string $contenttype |
| 530 | 530 | * |
| 531 | - * @return object |
|
| 531 | + * @return null|SimpleXMLElement |
|
| 532 | 532 | */ |
| 533 | 533 | function bigbluebuttonbn_wrap_xml_load_file($url, $method = 'GET', $data = null, $contenttype = 'text/xml') { |
| 534 | 534 | if (extension_loaded('curl')) { |
@@ -569,7 +569,7 @@ discard block |
||
| 569 | 569 | * @param string $data |
| 570 | 570 | * @param string $contenttype |
| 571 | 571 | * |
| 572 | - * @return object |
|
| 572 | + * @return string |
|
| 573 | 573 | */ |
| 574 | 574 | function bigbluebuttonbn_wrap_xml_load_file_curl_request($url, $method = 'GET', $data = null, $contenttype = 'text/xml') { |
| 575 | 575 | $c = new curl(); |
@@ -934,7 +934,7 @@ discard block |
||
| 934 | 934 | * @param integer $instance |
| 935 | 935 | * @param integer $voicebridge |
| 936 | 936 | * |
| 937 | - * @return string |
|
| 937 | + * @return boolean |
|
| 938 | 938 | */ |
| 939 | 939 | function bigbluebuttonbn_voicebridge_unique($instance, $voicebridge) { |
| 940 | 940 | global $DB; |
@@ -1037,7 +1037,7 @@ discard block |
||
| 1037 | 1037 | /** |
| 1038 | 1038 | * Helper returns an array with all possible bigbluebuttonbn events. |
| 1039 | 1039 | * |
| 1040 | - * @return array |
|
| 1040 | + * @return string[] |
|
| 1041 | 1041 | */ |
| 1042 | 1042 | function bigbluebuttonbn_events() { |
| 1043 | 1043 | return array( |
@@ -1246,7 +1246,7 @@ discard block |
||
| 1246 | 1246 | * @param string $meetingid |
| 1247 | 1247 | * @param string $configxml |
| 1248 | 1248 | * |
| 1249 | - * @return object |
|
| 1249 | + * @return null|SimpleXMLElement |
|
| 1250 | 1250 | */ |
| 1251 | 1251 | function bigbluebuttonbn_set_config_xml($meetingid, $configxml) { |
| 1252 | 1252 | $urldefaultconfig = \mod_bigbluebuttonbn\locallib\config::get('server_url').'api/setConfigXML?'; |
@@ -1295,7 +1295,7 @@ discard block |
||
| 1295 | 1295 | * @param array $recording |
| 1296 | 1296 | * @param array $tools |
| 1297 | 1297 | * |
| 1298 | - * @return array |
|
| 1298 | + * @return null|stdClass |
|
| 1299 | 1299 | */ |
| 1300 | 1300 | function bigbluebuttonbn_get_recording_data_row($bbbsession, $recording, $tools = ['protect', 'publish', 'delete']) { |
| 1301 | 1301 | if (!bigbluebuttonbn_include_recording_table_row($bbbsession, $recording)) { |
@@ -1799,7 +1799,7 @@ discard block |
||
| 1799 | 1799 | * |
| 1800 | 1800 | * @param array $bbbsession |
| 1801 | 1801 | * @param array $recording |
| 1802 | - * @param object $rowdata |
|
| 1802 | + * @param stdClass $rowdata |
|
| 1803 | 1803 | * |
| 1804 | 1804 | * @return object |
| 1805 | 1805 | */ |
@@ -1998,7 +1998,7 @@ discard block |
||
| 1998 | 1998 | * Helper function to define the sql used for gattering the bigbluebuttonbnids whose meetingids should be included |
| 1999 | 1999 | * in the getRecordings request considering only those that belong to deleted activities. |
| 2000 | 2000 | * |
| 2001 | - * @param string $courseid |
|
| 2001 | + * @param integer $courseid |
|
| 2002 | 2002 | * @param string $bigbluebuttonbnid |
| 2003 | 2003 | * @param bool $subset |
| 2004 | 2004 | * |
@@ -2022,7 +2022,7 @@ discard block |
||
| 2022 | 2022 | * Helper function to define the sql used for gattering the bigbluebuttonbnids whose meetingids should be included |
| 2023 | 2023 | * in the getRecordings request considering only those that belong to imported recordings. |
| 2024 | 2024 | * |
| 2025 | - * @param string $courseid |
|
| 2025 | + * @param integer $courseid |
|
| 2026 | 2026 | * @param string $bigbluebuttonbnid |
| 2027 | 2027 | * @param bool $subset |
| 2028 | 2028 | * |
@@ -2045,7 +2045,7 @@ discard block |
||
| 2045 | 2045 | /** |
| 2046 | 2046 | * Helper function to get recordings and imported recordings together. |
| 2047 | 2047 | * |
| 2048 | - * @param string $courseid |
|
| 2048 | + * @param integer $courseid |
|
| 2049 | 2049 | * @param string $bigbluebuttonbnid |
| 2050 | 2050 | * @param bool $subset |
| 2051 | 2051 | * @param bool $includedeleted |
@@ -2063,7 +2063,7 @@ discard block |
||
| 2063 | 2063 | * Helper function to retrieve recordings from the BigBlueButton. The references are stored as events |
| 2064 | 2064 | * in bigbluebuttonbn_logs. |
| 2065 | 2065 | * |
| 2066 | - * @param string $courseid |
|
| 2066 | + * @param integer $courseid |
|
| 2067 | 2067 | * @param string $bigbluebuttonbnid |
| 2068 | 2068 | * @param bool $subset |
| 2069 | 2069 | * @param bool $includedeleted |
@@ -123,9 +123,9 @@ discard block |
||
| 123 | 123 | */ |
| 124 | 124 | function bigbluebuttonbn_get_join_url($meetingid, $username, $pw, $logouturl, $configtoken = null, $userid = null) { |
| 125 | 125 | $data = ['meetingID' => $meetingid, |
| 126 | - 'fullName' => $username, |
|
| 127 | - 'password' => $pw, |
|
| 128 | - 'logoutURL' => $logouturl, |
|
| 126 | + 'fullName' => $username, |
|
| 127 | + 'password' => $pw, |
|
| 128 | + 'logoutURL' => $logouturl, |
|
| 129 | 129 | ]; |
| 130 | 130 | if (!is_null($configtoken)) { |
| 131 | 131 | $data['configToken'] = $configtoken; |
@@ -177,23 +177,23 @@ discard block |
||
| 177 | 177 | function bigbluebuttonbn_get_meeting_info_array($meetingid) { |
| 178 | 178 | $xml = bigbluebuttonbn_wrap_xml_load_file( |
| 179 | 179 | \mod_bigbluebuttonbn\locallib\bigbluebutton::action_url('getMeetingInfo', ['meetingID' => $meetingid]) |
| 180 | - ); |
|
| 180 | + ); |
|
| 181 | 181 | if ($xml && $xml->returncode == 'SUCCESS' && empty($xml->messageKey)) { |
| 182 | 182 | // Meeting info was returned. |
| 183 | 183 | return array('returncode' => $xml->returncode, |
| 184 | - 'meetingID' => $xml->meetingID, |
|
| 185 | - 'moderatorPW' => $xml->moderatorPW, |
|
| 186 | - 'attendeePW' => $xml->attendeePW, |
|
| 187 | - 'hasBeenForciblyEnded' => $xml->hasBeenForciblyEnded, |
|
| 188 | - 'running' => $xml->running, |
|
| 189 | - 'recording' => $xml->recording, |
|
| 190 | - 'startTime' => $xml->startTime, |
|
| 191 | - 'endTime' => $xml->endTime, |
|
| 192 | - 'participantCount' => $xml->participantCount, |
|
| 193 | - 'moderatorCount' => $xml->moderatorCount, |
|
| 194 | - 'attendees' => $xml->attendees, |
|
| 195 | - 'metadata' => $xml->metadata, |
|
| 196 | - ); |
|
| 184 | + 'meetingID' => $xml->meetingID, |
|
| 185 | + 'moderatorPW' => $xml->moderatorPW, |
|
| 186 | + 'attendeePW' => $xml->attendeePW, |
|
| 187 | + 'hasBeenForciblyEnded' => $xml->hasBeenForciblyEnded, |
|
| 188 | + 'running' => $xml->running, |
|
| 189 | + 'recording' => $xml->recording, |
|
| 190 | + 'startTime' => $xml->startTime, |
|
| 191 | + 'endTime' => $xml->endTime, |
|
| 192 | + 'participantCount' => $xml->participantCount, |
|
| 193 | + 'moderatorCount' => $xml->moderatorCount, |
|
| 194 | + 'attendees' => $xml->attendees, |
|
| 195 | + 'metadata' => $xml->metadata, |
|
| 196 | + ); |
|
| 197 | 197 | } |
| 198 | 198 | if ($xml) { |
| 199 | 199 | // Either failure or success without meeting info. |
@@ -329,7 +329,7 @@ discard block |
||
| 329 | 329 | function bigbluebuttonbn_get_default_config_xml() { |
| 330 | 330 | $xml = bigbluebuttonbn_wrap_xml_load_file( |
| 331 | 331 | \mod_bigbluebuttonbn\locallib\bigbluebutton::action_url('getDefaultConfigXML') |
| 332 | - ); |
|
| 332 | + ); |
|
| 333 | 333 | return $xml; |
| 334 | 334 | } |
| 335 | 335 | |
@@ -430,7 +430,7 @@ discard block |
||
| 430 | 430 | foreach ($ids as $id) { |
| 431 | 431 | $xml = bigbluebuttonbn_wrap_xml_load_file( |
| 432 | 432 | \mod_bigbluebuttonbn\locallib\bigbluebutton::action_url('deleteRecordings', ['recordID' => $id]) |
| 433 | - ); |
|
| 433 | + ); |
|
| 434 | 434 | if ($xml && $xml->returncode != 'SUCCESS') { |
| 435 | 435 | return false; |
| 436 | 436 | } |
@@ -449,7 +449,7 @@ discard block |
||
| 449 | 449 | foreach ($ids as $id) { |
| 450 | 450 | $xml = bigbluebuttonbn_wrap_xml_load_file( |
| 451 | 451 | \mod_bigbluebuttonbn\locallib\bigbluebutton::action_url('publishRecordings', ['recordID' => $id, 'publish' => $publish]) |
| 452 | - ); |
|
| 452 | + ); |
|
| 453 | 453 | if ($xml && $xml->returncode != 'SUCCESS') { |
| 454 | 454 | return false; |
| 455 | 455 | } |
@@ -468,7 +468,7 @@ discard block |
||
| 468 | 468 | foreach ($ids as $id) { |
| 469 | 469 | $xml = bigbluebuttonbn_wrap_xml_load_file( |
| 470 | 470 | \mod_bigbluebuttonbn\locallib\bigbluebutton::action_url('updateRecordings', ['recordID' => $id] + (array) $params) |
| 471 | - ); |
|
| 471 | + ); |
|
| 472 | 472 | if ($xml && $xml->returncode != 'SUCCESS') { |
| 473 | 473 | return false; |
| 474 | 474 | } |
@@ -485,7 +485,7 @@ discard block |
||
| 485 | 485 | function bigbluebuttonbn_end_meeting($meetingid, $modpw) { |
| 486 | 486 | $xml = bigbluebuttonbn_wrap_xml_load_file( |
| 487 | 487 | \mod_bigbluebuttonbn\locallib\bigbluebutton::action_url('end', ['meetingID' => $meetingid, 'password' => $modpw]) |
| 488 | - ); |
|
| 488 | + ); |
|
| 489 | 489 | if ($xml) { |
| 490 | 490 | // If the xml packet returned failure it displays the message to the user. |
| 491 | 491 | return array('returncode' => $xml->returncode, 'message' => $xml->message, 'messageKey' => $xml->messageKey); |
@@ -505,7 +505,7 @@ discard block |
||
| 505 | 505 | */ |
| 506 | 506 | $xml = bigbluebuttonbn_wrap_xml_load_file( |
| 507 | 507 | \mod_bigbluebuttonbn\locallib\bigbluebutton::action_url('getMeetingInfo', ['meetingID' => $meetingid]) |
| 508 | - ); |
|
| 508 | + ); |
|
| 509 | 509 | return ($xml && $xml->returncode == 'SUCCESS'); |
| 510 | 510 | } |
| 511 | 511 | |
@@ -517,7 +517,7 @@ discard block |
||
| 517 | 517 | function bigbluebuttonbn_get_server_version() { |
| 518 | 518 | $xml = bigbluebuttonbn_wrap_xml_load_file( |
| 519 | 519 | \mod_bigbluebuttonbn\locallib\bigbluebutton::action_url() |
| 520 | - ); |
|
| 520 | + ); |
|
| 521 | 521 | if ($xml && $xml->returncode == 'SUCCESS') { |
| 522 | 522 | return $xml->version; |
| 523 | 523 | } |
@@ -585,10 +585,10 @@ discard block |
||
| 585 | 585 | |
| 586 | 586 | $options = array(); |
| 587 | 587 | $options['CURLOPT_HTTPHEADER'] = array( |
| 588 | - 'Content-Type: '.$contenttype, |
|
| 589 | - 'Content-Length: '.strlen($data), |
|
| 590 | - 'Content-Language: en-US', |
|
| 591 | - ); |
|
| 588 | + 'Content-Type: '.$contenttype, |
|
| 589 | + 'Content-Length: '.strlen($data), |
|
| 590 | + 'Content-Language: en-US', |
|
| 591 | + ); |
|
| 592 | 592 | |
| 593 | 593 | return $c->post($url, $data, $options); |
| 594 | 594 | } |
@@ -731,16 +731,16 @@ discard block |
||
| 731 | 731 | 'all' => array( |
| 732 | 732 | 'name' => get_string('mod_form_field_participant_list_type_all', 'bigbluebuttonbn'), |
| 733 | 733 | 'children' => [] |
| 734 | - ) |
|
| 735 | - ); |
|
| 734 | + ) |
|
| 735 | + ); |
|
| 736 | 736 | $data['role'] = array( |
| 737 | 737 | 'name' => get_string('mod_form_field_participant_list_type_role', 'bigbluebuttonbn'), |
| 738 | 738 | 'children' => bigbluebuttonbn_get_roles_select($context) |
| 739 | - ); |
|
| 739 | + ); |
|
| 740 | 740 | $data['user'] = array( |
| 741 | 741 | 'name' => get_string('mod_form_field_participant_list_type_user', 'bigbluebuttonbn'), |
| 742 | 742 | 'children' => bigbluebuttonbn_get_users_select($context) |
| 743 | - ); |
|
| 743 | + ); |
|
| 744 | 744 | return $data; |
| 745 | 745 | } |
| 746 | 746 | |
@@ -785,9 +785,9 @@ discard block |
||
| 785 | 785 | continue; |
| 786 | 786 | } |
| 787 | 787 | $participantlistarray[] = array( |
| 788 | - 'selectiontype' => 'role', |
|
| 789 | - 'selectionid' => $moderatordefault, |
|
| 790 | - 'role' => BIGBLUEBUTTONBN_ROLE_MODERATOR); |
|
| 788 | + 'selectiontype' => 'role', |
|
| 789 | + 'selectionid' => $moderatordefault, |
|
| 790 | + 'role' => BIGBLUEBUTTONBN_ROLE_MODERATOR); |
|
| 791 | 791 | } |
| 792 | 792 | return $participantlistarray; |
| 793 | 793 | } |
@@ -830,11 +830,11 @@ discard block |
||
| 830 | 830 | 'all' => get_string('mod_form_field_participant_list_type_all', 'bigbluebuttonbn'), |
| 831 | 831 | 'role' => get_string('mod_form_field_participant_list_type_role', 'bigbluebuttonbn'), |
| 832 | 832 | 'user' => get_string('mod_form_field_participant_list_type_user', 'bigbluebuttonbn'), |
| 833 | - ], |
|
| 833 | + ], |
|
| 834 | 834 | 'type_selected' => 'all', |
| 835 | 835 | 'options' => ['all' => '---------------'], |
| 836 | 836 | 'selected' => 'all', |
| 837 | - ]; |
|
| 837 | + ]; |
|
| 838 | 838 | } |
| 839 | 839 | |
| 840 | 840 | /** |
@@ -1120,7 +1120,7 @@ discard block |
||
| 1120 | 1120 | $eventproperties['other'] = $options['other']; |
| 1121 | 1121 | } |
| 1122 | 1122 | $event = call_user_func_array('\mod_bigbluebuttonbn\event\\'.$eventtype.'::create', |
| 1123 | - array($eventproperties)); |
|
| 1123 | + array($eventproperties)); |
|
| 1124 | 1124 | $event->trigger(); |
| 1125 | 1125 | } |
| 1126 | 1126 | |
@@ -1164,7 +1164,7 @@ discard block |
||
| 1164 | 1164 | // Ping again and refresh the cache. |
| 1165 | 1165 | $meetinginfo = (array) bigbluebuttonbn_wrap_xml_load_file( |
| 1166 | 1166 | \mod_bigbluebuttonbn\locallib\bigbluebutton::action_url('getMeetingInfo', ['meetingID' => $meetingid]) |
| 1167 | - ); |
|
| 1167 | + ); |
|
| 1168 | 1168 | $cache->set($meetingid, array('creation_time' => time(), 'meeting_info' => json_encode($meetinginfo))); |
| 1169 | 1169 | return $meetinginfo; |
| 1170 | 1170 | } |
@@ -1534,8 +1534,8 @@ discard block |
||
| 1534 | 1534 | } |
| 1535 | 1535 | $id = 'playbacks-'.$recording['recordID']; |
| 1536 | 1536 | $recordingtypes = html_writer::start_tag('div', array('id' => $id, 'data-imported' => $dataimported, |
| 1537 | - 'data-meetingid' => $recording['meetingID'], 'data-recordingid' => $recording['recordID'], |
|
| 1538 | - 'title' => $title, $visibility => $visibility)); |
|
| 1537 | + 'data-meetingid' => $recording['meetingID'], 'data-recordingid' => $recording['recordID'], |
|
| 1538 | + 'title' => $title, $visibility => $visibility)); |
|
| 1539 | 1539 | foreach ($recording['playbacks'] as $playback) { |
| 1540 | 1540 | $recordingtypes .= bigbluebuttonbn_get_recording_data_row_type($recording, $bbbsession, $playback); |
| 1541 | 1541 | } |
@@ -1560,7 +1560,7 @@ discard block |
||
| 1560 | 1560 | $title = get_string('view_recording_format_'.$playback['type'], 'bigbluebuttonbn'); |
| 1561 | 1561 | $onclick = 'M.mod_bigbluebuttonbn.recordings.recordingPlay(this);'; |
| 1562 | 1562 | $href = $CFG->wwwroot . '/mod/bigbluebuttonbn/bbb_view.php?action=play&bn=' . $bbbsession['bigbluebuttonbn']->id . |
| 1563 | - '&mid='.$recording['meetingID'] . '&rid=' . $recording['recordID'] . '&rtype=' . $playback['type']; |
|
| 1563 | + '&mid='.$recording['meetingID'] . '&rid=' . $recording['recordID'] . '&rtype=' . $playback['type']; |
|
| 1564 | 1564 | if (!isset($recording['imported']) || !isset($recording['protected']) || $recording['protected'] === 'false') { |
| 1565 | 1565 | $href .= '&href='.urlencode(trim($playback['url'])); |
| 1566 | 1566 | } |
@@ -1572,7 +1572,7 @@ discard block |
||
| 1572 | 1572 | 'data-target' => $playback['type'], |
| 1573 | 1573 | 'data-href' => $href, |
| 1574 | 1574 | 'class' => 'btn btn-sm btn-default' |
| 1575 | - ); |
|
| 1575 | + ); |
|
| 1576 | 1576 | return $OUTPUT->action_link('#', $title, null, $linkattributes) . ' '; |
| 1577 | 1577 | } |
| 1578 | 1578 | |
@@ -1686,10 +1686,10 @@ discard block |
||
| 1686 | 1686 | 'id' => $id, |
| 1687 | 1687 | 'onclick' => $onclick, |
| 1688 | 1688 | 'data-action' => $data['action'] |
| 1689 | - ); |
|
| 1689 | + ); |
|
| 1690 | 1690 | if (!isset($recording['imported'])) { |
| 1691 | 1691 | $linkattributes['data-links'] = bigbluebuttonbn_count_recording_imported_instances( |
| 1692 | - $recording['recordID']); |
|
| 1692 | + $recording['recordID']); |
|
| 1693 | 1693 | } |
| 1694 | 1694 | if (isset($data['disabled'])) { |
| 1695 | 1695 | $iconattributes['class'] .= ' fa-' . $data['disabled']; |
@@ -2234,8 +2234,8 @@ discard block |
||
| 2234 | 2234 | $activitytime = ''; |
| 2235 | 2235 | if ($time) { |
| 2236 | 2236 | $activitytime = calendar_day_representation($time).' '. |
| 2237 | - get_string('mod_form_field_notification_msg_at', 'bigbluebuttonbn').' '. |
|
| 2238 | - calendar_time_representation($time); |
|
| 2237 | + get_string('mod_form_field_notification_msg_at', 'bigbluebuttonbn').' '. |
|
| 2238 | + calendar_time_representation($time); |
|
| 2239 | 2239 | } |
| 2240 | 2240 | return $activitytime; |
| 2241 | 2241 | } |
@@ -2535,7 +2535,7 @@ discard block |
||
| 2535 | 2535 | $renderer->render_group_element('participant_moderator_default', |
| 2536 | 2536 | $renderer->render_group_element_configmultiselect('participant_moderator_default', |
| 2537 | 2537 | array_keys($owner), array_merge($owner, $roles)) |
| 2538 | - ); |
|
| 2538 | + ); |
|
| 2539 | 2539 | } |
| 2540 | 2540 | } |
| 2541 | 2541 | |
@@ -2635,7 +2635,7 @@ discard block |
||
| 2635 | 2635 | return $output; |
| 2636 | 2636 | } |
| 2637 | 2637 | $output .= $OUTPUT->box_start('box boxalignleft adminerror alert alert-' . $type . ' alert-block fade in', |
| 2638 | - 'bigbluebuttonbn_view_general_warning') . "\n"; |
|
| 2638 | + 'bigbluebuttonbn_view_general_warning') . "\n"; |
|
| 2639 | 2639 | $output .= ' ' . $message . "\n"; |
| 2640 | 2640 | $output .= ' <div class="singlebutton pull-right">' . "\n"; |
| 2641 | 2641 | if (!empty($href)) { |
@@ -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; |
@@ -104,7 +104,7 @@ discard block |
||
| 104 | 104 | if (isset($meta)) { |
| 105 | 105 | $log->meta = $meta; |
| 106 | 106 | } else if ($event == BIGBLUEBUTTONBN_LOG_EVENT_CREATE) { |
| 107 | - $log->meta = '{"record":'.($bbbsession['record'] ? 'true' : 'false').'}'; |
|
| 107 | + $log->meta = '{"record":' . ($bbbsession['record'] ? 'true' : 'false') . '}'; |
|
| 108 | 108 | } |
| 109 | 109 | $DB->insert_record('bigbluebuttonbn_logs', $log); |
| 110 | 110 | } |
@@ -152,8 +152,8 @@ discard block |
||
| 152 | 152 | $data = null; |
| 153 | 153 | if (!is_null($pname) && !is_null($purl)) { |
| 154 | 154 | $method = 'POST'; |
| 155 | - $data = "<?xml version='1.0' encoding='UTF-8'?><modules><module name='presentation'><document url='". |
|
| 156 | - $purl."' /></module></modules>"; |
|
| 155 | + $data = "<?xml version='1.0' encoding='UTF-8'?><modules><module name='presentation'><document url='" . |
|
| 156 | + $purl . "' /></module></modules>"; |
|
| 157 | 157 | } |
| 158 | 158 | $xml = bigbluebuttonbn_wrap_xml_load_file($createmeetingurl, $method, $data); |
| 159 | 159 | if ($xml) { |
@@ -314,7 +314,7 @@ discard block |
||
| 314 | 314 | // Override imported flag with actual ID. |
| 315 | 315 | $recording['imported'] = $recordimported->id; |
| 316 | 316 | if (isset($recordimported->protected)) { |
| 317 | - $recording['protected'] = (string) $recordimported->protected; |
|
| 317 | + $recording['protected'] = (string)$recordimported->protected; |
|
| 318 | 318 | } |
| 319 | 319 | $recordsimportedarray[$recording['recordID']] = $recording; |
| 320 | 320 | } |
@@ -344,21 +344,21 @@ discard block |
||
| 344 | 344 | // Add formats. |
| 345 | 345 | $playbackarray = array(); |
| 346 | 346 | foreach ($recording->playback->format as $format) { |
| 347 | - $playbackarray[(string) $format->type] = array('type' => (string) $format->type, |
|
| 348 | - 'url' => trim((string) $format->url), 'length' => (string) $format->length); |
|
| 347 | + $playbackarray[(string)$format->type] = array('type' => (string)$format->type, |
|
| 348 | + 'url' => trim((string)$format->url), 'length' => (string)$format->length); |
|
| 349 | 349 | // Add preview per format when existing. |
| 350 | 350 | if ($format->preview) { |
| 351 | - $playbackarray[(string) $format->type]['preview'] = bigbluebuttonbn_get_recording_preview_images($format->preview); |
|
| 351 | + $playbackarray[(string)$format->type]['preview'] = bigbluebuttonbn_get_recording_preview_images($format->preview); |
|
| 352 | 352 | } |
| 353 | 353 | } |
| 354 | 354 | // Add the metadata to the recordings array. |
| 355 | 355 | $metadataarray = bigbluebuttonbn_get_recording_array_meta(get_object_vars($recording->metadata)); |
| 356 | - $recordingarray = array('recordID' => (string) $recording->recordID, |
|
| 357 | - 'meetingID' => (string) $recording->meetingID, 'meetingName' => (string) $recording->name, |
|
| 358 | - 'published' => (string) $recording->published, 'startTime' => (string) $recording->startTime, |
|
| 359 | - 'endTime' => (string) $recording->endTime, 'playbacks' => $playbackarray); |
|
| 356 | + $recordingarray = array('recordID' => (string)$recording->recordID, |
|
| 357 | + 'meetingID' => (string)$recording->meetingID, 'meetingName' => (string)$recording->name, |
|
| 358 | + 'published' => (string)$recording->published, 'startTime' => (string)$recording->startTime, |
|
| 359 | + 'endTime' => (string)$recording->endTime, 'playbacks' => $playbackarray); |
|
| 360 | 360 | if (isset($recording->protected)) { |
| 361 | - $recordingarray['protected'] = (string) $recording->protected; |
|
| 361 | + $recordingarray['protected'] = (string)$recording->protected; |
|
| 362 | 362 | } |
| 363 | 363 | return $recordingarray + $metadataarray; |
| 364 | 364 | } |
@@ -373,9 +373,9 @@ discard block |
||
| 373 | 373 | function bigbluebuttonbn_get_recording_preview_images($preview) { |
| 374 | 374 | $imagesarray = array(); |
| 375 | 375 | foreach ($preview->images->image as $image) { |
| 376 | - $imagearray = array('url' => trim((string) $image)); |
|
| 376 | + $imagearray = array('url' => trim((string)$image)); |
|
| 377 | 377 | foreach ($image->attributes() as $attkey => $attvalue) { |
| 378 | - $imagearray[$attkey] = (string) $attvalue; |
|
| 378 | + $imagearray[$attkey] = (string)$attvalue; |
|
| 379 | 379 | } |
| 380 | 380 | array_push($imagesarray, $imagearray); |
| 381 | 381 | } |
@@ -395,7 +395,7 @@ discard block |
||
| 395 | 395 | if (is_object($value)) { |
| 396 | 396 | $value = ''; |
| 397 | 397 | } |
| 398 | - $metadataarray['meta_'.$key] = $value; |
|
| 398 | + $metadataarray['meta_' . $key] = $value; |
|
| 399 | 399 | } |
| 400 | 400 | return $metadataarray; |
| 401 | 401 | } |
@@ -467,7 +467,7 @@ discard block |
||
| 467 | 467 | $ids = explode(',', $recordids); |
| 468 | 468 | foreach ($ids as $id) { |
| 469 | 469 | $xml = bigbluebuttonbn_wrap_xml_load_file( |
| 470 | - \mod_bigbluebuttonbn\locallib\bigbluebutton::action_url('updateRecordings', ['recordID' => $id] + (array) $params) |
|
| 470 | + \mod_bigbluebuttonbn\locallib\bigbluebutton::action_url('updateRecordings', ['recordID' => $id] + (array)$params) |
|
| 471 | 471 | ); |
| 472 | 472 | if ($xml && $xml->returncode != 'SUCCESS') { |
| 473 | 473 | return false; |
@@ -547,7 +547,7 @@ discard block |
||
| 547 | 547 | return $xml; |
| 548 | 548 | } catch (Exception $e) { |
| 549 | 549 | libxml_use_internal_errors($previous); |
| 550 | - $error = 'Caught exception: '.$e->getMessage(); |
|
| 550 | + $error = 'Caught exception: ' . $e->getMessage(); |
|
| 551 | 551 | debugging($error, DEBUG_DEVELOPER); |
| 552 | 552 | return null; |
| 553 | 553 | } |
@@ -558,7 +558,7 @@ discard block |
||
| 558 | 558 | $response = simplexml_load_file($url, 'SimpleXMLElement', LIBXML_NOCDATA | LIBXML_NOBLANKS); |
| 559 | 559 | return $response; |
| 560 | 560 | } catch (Exception $e) { |
| 561 | - $error = 'Caught exception: '.$e->getMessage(); |
|
| 561 | + $error = 'Caught exception: ' . $e->getMessage(); |
|
| 562 | 562 | debugging($error, DEBUG_DEVELOPER); |
| 563 | 563 | libxml_use_internal_errors($previous); |
| 564 | 564 | return null; |
@@ -585,8 +585,8 @@ discard block |
||
| 585 | 585 | |
| 586 | 586 | $options = array(); |
| 587 | 587 | $options['CURLOPT_HTTPHEADER'] = array( |
| 588 | - 'Content-Type: '.$contenttype, |
|
| 589 | - 'Content-Length: '.strlen($data), |
|
| 588 | + 'Content-Type: ' . $contenttype, |
|
| 589 | + 'Content-Length: ' . strlen($data), |
|
| 590 | 590 | 'Content-Language: en-US', |
| 591 | 591 | ); |
| 592 | 592 | |
@@ -603,7 +603,7 @@ discard block |
||
| 603 | 603 | * @return void |
| 604 | 604 | */ |
| 605 | 605 | function bigbluebuttonbn_end_meeting_if_running($bigbluebuttonbn) { |
| 606 | - $meetingid = $bigbluebuttonbn->meetingid.'-'.$bigbluebuttonbn->course.'-'.$bigbluebuttonbn->id; |
|
| 606 | + $meetingid = $bigbluebuttonbn->meetingid . '-' . $bigbluebuttonbn->course . '-' . $bigbluebuttonbn->id; |
|
| 607 | 607 | if (bigbluebuttonbn_is_meeting_running($meetingid)) { |
| 608 | 608 | bigbluebuttonbn_end_meeting($meetingid, $bigbluebuttonbn->moderatorpass); |
| 609 | 609 | } |
@@ -623,9 +623,9 @@ discard block |
||
| 623 | 623 | if ($userroles) { |
| 624 | 624 | $where = ''; |
| 625 | 625 | foreach ($userroles as $userrole) { |
| 626 | - $where .= (empty($where) ? ' WHERE' : ' OR').' id=' . $userrole->roleid; |
|
| 626 | + $where .= (empty($where) ? ' WHERE' : ' OR') . ' id=' . $userrole->roleid; |
|
| 627 | 627 | } |
| 628 | - $userroles = $DB->get_records_sql('SELECT * FROM {role}'.$where); |
|
| 628 | + $userroles = $DB->get_records_sql('SELECT * FROM {role}' . $where); |
|
| 629 | 629 | } |
| 630 | 630 | return $userroles; |
| 631 | 631 | } |
@@ -648,7 +648,7 @@ discard block |
||
| 648 | 648 | * @return array $users |
| 649 | 649 | */ |
| 650 | 650 | function bigbluebuttonbn_get_users(context $context = null) { |
| 651 | - $users = (array) get_enrolled_users($context, '', 0, 'u.*', null, 0, 0, true); |
|
| 651 | + $users = (array)get_enrolled_users($context, '', 0, 'u.*', null, 0, 0, true); |
|
| 652 | 652 | foreach ($users as $key => $value) { |
| 653 | 653 | $users[$key] = fullname($value); |
| 654 | 654 | } |
@@ -663,7 +663,7 @@ discard block |
||
| 663 | 663 | * @return array $users |
| 664 | 664 | */ |
| 665 | 665 | function bigbluebuttonbn_get_users_select(context $context = null) { |
| 666 | - $users = (array) get_enrolled_users($context, '', 0, 'u.*', null, 0, 0, true); |
|
| 666 | + $users = (array)get_enrolled_users($context, '', 0, 'u.*', null, 0, 0, true); |
|
| 667 | 667 | foreach ($users as $key => $value) { |
| 668 | 668 | $users[$key] = array('id' => $value->id, 'name' => fullname($value)); |
| 669 | 669 | } |
@@ -678,7 +678,7 @@ discard block |
||
| 678 | 678 | * @return array $roles |
| 679 | 679 | */ |
| 680 | 680 | function bigbluebuttonbn_get_roles(context $context = null) { |
| 681 | - $roles = (array) role_get_names($context); |
|
| 681 | + $roles = (array)role_get_names($context); |
|
| 682 | 682 | foreach ($roles as $key => $value) { |
| 683 | 683 | $roles[$key] = $value->localname; |
| 684 | 684 | } |
@@ -693,7 +693,7 @@ discard block |
||
| 693 | 693 | * @return array $users |
| 694 | 694 | */ |
| 695 | 695 | function bigbluebuttonbn_get_roles_select(context $context = null) { |
| 696 | - $roles = (array) role_get_names($context); |
|
| 696 | + $roles = (array)role_get_names($context); |
|
| 697 | 697 | foreach ($roles as $key => $value) { |
| 698 | 698 | $roles[$key] = array('id' => $value->id, 'name' => $value->localname); |
| 699 | 699 | } |
@@ -708,7 +708,7 @@ discard block |
||
| 708 | 708 | * @return object $role |
| 709 | 709 | */ |
| 710 | 710 | function bigbluebuttonbn_get_role($id) { |
| 711 | - $roles = (array) role_get_names(); |
|
| 711 | + $roles = (array)role_get_names(); |
|
| 712 | 712 | if (is_numeric($id)) { |
| 713 | 713 | return (object)$roles[$id]; |
| 714 | 714 | } |
@@ -863,7 +863,7 @@ discard block |
||
| 863 | 863 | if (!isguestuser()) { |
| 864 | 864 | $userroles = bigbluebuttonbn_get_user_roles($context, $userid); |
| 865 | 865 | } |
| 866 | - return bigbluebuttonbn_is_moderator_validator($participantlist, $userid , $userroles); |
|
| 866 | + return bigbluebuttonbn_is_moderator_validator($participantlist, $userid, $userroles); |
|
| 867 | 867 | } |
| 868 | 868 | |
| 869 | 869 | /** |
@@ -1019,7 +1019,7 @@ discard block |
||
| 1019 | 1019 | function bigbluebuttonbn_generate_nonce() { |
| 1020 | 1020 | $mt = microtime(); |
| 1021 | 1021 | $rand = mt_rand(); |
| 1022 | - return md5($mt.$rand); |
|
| 1022 | + return md5($mt . $rand); |
|
| 1023 | 1023 | } |
| 1024 | 1024 | |
| 1025 | 1025 | /** |
@@ -1045,23 +1045,23 @@ discard block |
||
| 1045 | 1045 | */ |
| 1046 | 1046 | function bigbluebuttonbn_events() { |
| 1047 | 1047 | return array( |
| 1048 | - (string) BIGBLUEBUTTON_EVENT_ACTIVITY_CREATED, |
|
| 1049 | - (string) BIGBLUEBUTTON_EVENT_ACTIVITY_VIEWED, |
|
| 1050 | - (string) BIGBLUEBUTTON_EVENT_ACTIVITY_UPDATED, |
|
| 1051 | - (string) BIGBLUEBUTTON_EVENT_ACTIVITY_DELETED, |
|
| 1052 | - (string) BIGBLUEBUTTON_EVENT_MEETING_CREATED, |
|
| 1053 | - (string) BIGBLUEBUTTON_EVENT_MEETING_ENDED, |
|
| 1054 | - (string) BIGBLUEBUTTON_EVENT_MEETING_JOINED, |
|
| 1055 | - (string) BIGBLUEBUTTON_EVENT_MEETING_LEFT, |
|
| 1056 | - (string) BIGBLUEBUTTON_EVENT_RECORDING_DELETED, |
|
| 1057 | - (string) BIGBLUEBUTTON_EVENT_RECORDING_IMPORTED, |
|
| 1058 | - (string) BIGBLUEBUTTON_EVENT_RECORDING_PROTECTED, |
|
| 1059 | - (string) BIGBLUEBUTTON_EVENT_RECORDING_PUBLISHED, |
|
| 1060 | - (string) BIGBLUEBUTTON_EVENT_RECORDING_UNPROTECTED, |
|
| 1061 | - (string) BIGBLUEBUTTON_EVENT_RECORDING_UNPUBLISHED, |
|
| 1062 | - (string) BIGBLUEBUTTON_EVENT_RECORDING_EDITED, |
|
| 1063 | - (string) BIGBLUEBUTTON_EVENT_RECORDING_VIEWED, |
|
| 1064 | - (string) BIGBLUEBUTTON_EVENT_LIVE_SESSION |
|
| 1048 | + (string)BIGBLUEBUTTON_EVENT_ACTIVITY_CREATED, |
|
| 1049 | + (string)BIGBLUEBUTTON_EVENT_ACTIVITY_VIEWED, |
|
| 1050 | + (string)BIGBLUEBUTTON_EVENT_ACTIVITY_UPDATED, |
|
| 1051 | + (string)BIGBLUEBUTTON_EVENT_ACTIVITY_DELETED, |
|
| 1052 | + (string)BIGBLUEBUTTON_EVENT_MEETING_CREATED, |
|
| 1053 | + (string)BIGBLUEBUTTON_EVENT_MEETING_ENDED, |
|
| 1054 | + (string)BIGBLUEBUTTON_EVENT_MEETING_JOINED, |
|
| 1055 | + (string)BIGBLUEBUTTON_EVENT_MEETING_LEFT, |
|
| 1056 | + (string)BIGBLUEBUTTON_EVENT_RECORDING_DELETED, |
|
| 1057 | + (string)BIGBLUEBUTTON_EVENT_RECORDING_IMPORTED, |
|
| 1058 | + (string)BIGBLUEBUTTON_EVENT_RECORDING_PROTECTED, |
|
| 1059 | + (string)BIGBLUEBUTTON_EVENT_RECORDING_PUBLISHED, |
|
| 1060 | + (string)BIGBLUEBUTTON_EVENT_RECORDING_UNPROTECTED, |
|
| 1061 | + (string)BIGBLUEBUTTON_EVENT_RECORDING_UNPUBLISHED, |
|
| 1062 | + (string)BIGBLUEBUTTON_EVENT_RECORDING_EDITED, |
|
| 1063 | + (string)BIGBLUEBUTTON_EVENT_RECORDING_VIEWED, |
|
| 1064 | + (string)BIGBLUEBUTTON_EVENT_LIVE_SESSION |
|
| 1065 | 1065 | ); |
| 1066 | 1066 | } |
| 1067 | 1067 | |
@@ -1072,23 +1072,23 @@ discard block |
||
| 1072 | 1072 | */ |
| 1073 | 1073 | function bigbluebuttonbn_events_action() { |
| 1074 | 1074 | return array( |
| 1075 | - 'create' => (string) BIGBLUEBUTTON_EVENT_ACTIVITY_CREATED, |
|
| 1076 | - 'view' => (string) BIGBLUEBUTTON_EVENT_ACTIVITY_VIEWED, |
|
| 1077 | - 'update' => (string) BIGBLUEBUTTON_EVENT_ACTIVITY_UPDATED, |
|
| 1078 | - 'delete' => (string) BIGBLUEBUTTON_EVENT_ACTIVITY_DELETED, |
|
| 1079 | - 'meeting_create' => (string) BIGBLUEBUTTON_EVENT_MEETING_CREATED, |
|
| 1080 | - 'meeting_end' => (string) BIGBLUEBUTTON_EVENT_MEETING_ENDED, |
|
| 1081 | - 'meeting_join' => (string) BIGBLUEBUTTON_EVENT_MEETING_JOINED, |
|
| 1082 | - 'meeting_left' => (string) BIGBLUEBUTTON_EVENT_MEETING_LEFT, |
|
| 1083 | - 'recording_delete' => (string) BIGBLUEBUTTON_EVENT_RECORDING_DELETED, |
|
| 1084 | - 'recording_import' => (string) BIGBLUEBUTTON_EVENT_RECORDING_IMPORTED, |
|
| 1085 | - 'recording_protect' => (string) BIGBLUEBUTTON_EVENT_RECORDING_PROTECTED, |
|
| 1086 | - 'recording_publish' => (string) BIGBLUEBUTTON_EVENT_RECORDING_PUBLISHED, |
|
| 1087 | - 'recording_unprotect' => (string) BIGBLUEBUTTON_EVENT_RECORDING_UNPROTECTED, |
|
| 1088 | - 'recording_unpublish' => (string) BIGBLUEBUTTON_EVENT_RECORDING_UNPUBLISHED, |
|
| 1089 | - 'recording_edit' => (string) BIGBLUEBUTTON_EVENT_RECORDING_EDITED, |
|
| 1090 | - 'recording_play' => (string) BIGBLUEBUTTON_EVENT_RECORDING_VIEWED, |
|
| 1091 | - 'live_action' => (string) BIGBLUEBUTTON_EVENT_LIVE_SESSION |
|
| 1075 | + 'create' => (string)BIGBLUEBUTTON_EVENT_ACTIVITY_CREATED, |
|
| 1076 | + 'view' => (string)BIGBLUEBUTTON_EVENT_ACTIVITY_VIEWED, |
|
| 1077 | + 'update' => (string)BIGBLUEBUTTON_EVENT_ACTIVITY_UPDATED, |
|
| 1078 | + 'delete' => (string)BIGBLUEBUTTON_EVENT_ACTIVITY_DELETED, |
|
| 1079 | + 'meeting_create' => (string)BIGBLUEBUTTON_EVENT_MEETING_CREATED, |
|
| 1080 | + 'meeting_end' => (string)BIGBLUEBUTTON_EVENT_MEETING_ENDED, |
|
| 1081 | + 'meeting_join' => (string)BIGBLUEBUTTON_EVENT_MEETING_JOINED, |
|
| 1082 | + 'meeting_left' => (string)BIGBLUEBUTTON_EVENT_MEETING_LEFT, |
|
| 1083 | + 'recording_delete' => (string)BIGBLUEBUTTON_EVENT_RECORDING_DELETED, |
|
| 1084 | + 'recording_import' => (string)BIGBLUEBUTTON_EVENT_RECORDING_IMPORTED, |
|
| 1085 | + 'recording_protect' => (string)BIGBLUEBUTTON_EVENT_RECORDING_PROTECTED, |
|
| 1086 | + 'recording_publish' => (string)BIGBLUEBUTTON_EVENT_RECORDING_PUBLISHED, |
|
| 1087 | + 'recording_unprotect' => (string)BIGBLUEBUTTON_EVENT_RECORDING_UNPROTECTED, |
|
| 1088 | + 'recording_unpublish' => (string)BIGBLUEBUTTON_EVENT_RECORDING_UNPUBLISHED, |
|
| 1089 | + 'recording_edit' => (string)BIGBLUEBUTTON_EVENT_RECORDING_EDITED, |
|
| 1090 | + 'recording_play' => (string)BIGBLUEBUTTON_EVENT_RECORDING_VIEWED, |
|
| 1091 | + 'live_action' => (string)BIGBLUEBUTTON_EVENT_LIVE_SESSION |
|
| 1092 | 1092 | ); |
| 1093 | 1093 | } |
| 1094 | 1094 | |
@@ -1119,7 +1119,7 @@ discard block |
||
| 1119 | 1119 | if (array_key_exists('other', $options)) { |
| 1120 | 1120 | $eventproperties['other'] = $options['other']; |
| 1121 | 1121 | } |
| 1122 | - $event = call_user_func_array('\mod_bigbluebuttonbn\event\\'.$eventtype.'::create', |
|
| 1122 | + $event = call_user_func_array('\mod_bigbluebuttonbn\event\\' . $eventtype . '::create', |
|
| 1123 | 1123 | array($eventproperties)); |
| 1124 | 1124 | $event->trigger(); |
| 1125 | 1125 | } |
@@ -1159,10 +1159,10 @@ discard block |
||
| 1159 | 1159 | $now = time(); |
| 1160 | 1160 | if (!$updatecache && isset($result) && $now < ($result['creation_time'] + $cachettl)) { |
| 1161 | 1161 | // Use the value in the cache. |
| 1162 | - return (array) json_decode($result['meeting_info']); |
|
| 1162 | + return (array)json_decode($result['meeting_info']); |
|
| 1163 | 1163 | } |
| 1164 | 1164 | // Ping again and refresh the cache. |
| 1165 | - $meetinginfo = (array) bigbluebuttonbn_wrap_xml_load_file( |
|
| 1165 | + $meetinginfo = (array)bigbluebuttonbn_wrap_xml_load_file( |
|
| 1166 | 1166 | \mod_bigbluebuttonbn\locallib\bigbluebutton::action_url('getMeetingInfo', ['meetingID' => $meetingid]) |
| 1167 | 1167 | ); |
| 1168 | 1168 | $cache->set($meetingid, array('creation_time' => time(), 'meeting_info' => json_encode($meetinginfo))); |
@@ -1257,7 +1257,7 @@ discard block |
||
| 1257 | 1257 | * @return object |
| 1258 | 1258 | */ |
| 1259 | 1259 | function bigbluebuttonbn_set_config_xml($meetingid, $configxml) { |
| 1260 | - $urldefaultconfig = \mod_bigbluebuttonbn\locallib\config::get('server_url').'api/setConfigXML?'; |
|
| 1260 | + $urldefaultconfig = \mod_bigbluebuttonbn\locallib\config::get('server_url') . 'api/setConfigXML?'; |
|
| 1261 | 1261 | $configxmlparams = bigbluebuttonbn_set_config_xml_params($meetingid, $configxml); |
| 1262 | 1262 | $xml = bigbluebuttonbn_wrap_xml_load_file($urldefaultconfig, 'POST', |
| 1263 | 1263 | $configxmlparams, 'application/x-www-form-urlencoded'); |
@@ -1273,8 +1273,8 @@ discard block |
||
| 1273 | 1273 | * @return string |
| 1274 | 1274 | */ |
| 1275 | 1275 | function bigbluebuttonbn_set_config_xml_params($meetingid, $configxml) { |
| 1276 | - $params = 'configXML='.urlencode($configxml).'&meetingID='.urlencode($meetingid); |
|
| 1277 | - $configxmlparams = $params.'&checksum='.sha1('setConfigXML'.$params.\mod_bigbluebuttonbn\locallib\config::get('shared_secret')); |
|
| 1276 | + $params = 'configXML=' . urlencode($configxml) . '&meetingID=' . urlencode($meetingid); |
|
| 1277 | + $configxmlparams = $params . '&checksum=' . sha1('setConfigXML' . $params . \mod_bigbluebuttonbn\locallib\config::get('shared_secret')); |
|
| 1278 | 1278 | return $configxmlparams; |
| 1279 | 1279 | } |
| 1280 | 1280 | |
@@ -1288,7 +1288,7 @@ discard block |
||
| 1288 | 1288 | */ |
| 1289 | 1289 | function bigbluebuttonbn_set_config_xml_array($meetingid, $configxml) { |
| 1290 | 1290 | $configxml = bigbluebuttonbn_setConfigXML($meetingid, $configxml); |
| 1291 | - $configxmlarray = (array) $configxml; |
|
| 1291 | + $configxmlarray = (array)$configxml; |
|
| 1292 | 1292 | if ($configxmlarray['returncode'] != 'SUCCESS') { |
| 1293 | 1293 | debugging('BigBlueButton was not able to set the custom config.xml file', DEBUG_DEVELOPER); |
| 1294 | 1294 | return ''; |
@@ -1380,7 +1380,7 @@ discard block |
||
| 1380 | 1380 | global $USER; |
| 1381 | 1381 | $starttime = $starttime - ($starttime % 1000); |
| 1382 | 1382 | // Set formatted date. |
| 1383 | - $dateformat = get_string('strftimerecentfull', 'langconfig').' %Z'; |
|
| 1383 | + $dateformat = get_string('strftimerecentfull', 'langconfig') . ' %Z'; |
|
| 1384 | 1384 | return userdate($starttime / 1000, $dateformat, usertimezone($USER->timezone)); |
| 1385 | 1385 | } |
| 1386 | 1386 | |
@@ -1491,7 +1491,7 @@ discard block |
||
| 1491 | 1491 | * @return string |
| 1492 | 1492 | */ |
| 1493 | 1493 | function bigbluebuttonbn_get_recording_data_row_preview($recording) { |
| 1494 | - $options = array('id' => 'preview-'.$recording['recordID'], 'class' => 'container'); |
|
| 1494 | + $options = array('id' => 'preview-' . $recording['recordID'], 'class' => 'container'); |
|
| 1495 | 1495 | if ($recording['published'] === 'false') { |
| 1496 | 1496 | $options['hidden'] = 'hidden'; |
| 1497 | 1497 | } |
@@ -1532,7 +1532,7 @@ discard block |
||
| 1532 | 1532 | if ($recording['published'] === 'false') { |
| 1533 | 1533 | $visibility = 'hidden '; |
| 1534 | 1534 | } |
| 1535 | - $id = 'playbacks-'.$recording['recordID']; |
|
| 1535 | + $id = 'playbacks-' . $recording['recordID']; |
|
| 1536 | 1536 | $recordingtypes = html_writer::start_tag('div', array('id' => $id, 'data-imported' => $dataimported, |
| 1537 | 1537 | 'data-meetingid' => $recording['meetingID'], 'data-recordingid' => $recording['recordID'], |
| 1538 | 1538 | 'title' => $title, $visibility => $visibility)); |
@@ -1557,12 +1557,12 @@ discard block |
||
| 1557 | 1557 | if (!bigbluebuttonbn_include_recording_data_row_type($recording, $bbbsession, $playback)) { |
| 1558 | 1558 | return ''; |
| 1559 | 1559 | } |
| 1560 | - $title = get_string('view_recording_format_'.$playback['type'], 'bigbluebuttonbn'); |
|
| 1560 | + $title = get_string('view_recording_format_' . $playback['type'], 'bigbluebuttonbn'); |
|
| 1561 | 1561 | $onclick = 'M.mod_bigbluebuttonbn.recordings.recordingPlay(this);'; |
| 1562 | 1562 | $href = $CFG->wwwroot . '/mod/bigbluebuttonbn/bbb_view.php?action=play&bn=' . $bbbsession['bigbluebuttonbn']->id . |
| 1563 | - '&mid='.$recording['meetingID'] . '&rid=' . $recording['recordID'] . '&rtype=' . $playback['type']; |
|
| 1563 | + '&mid=' . $recording['meetingID'] . '&rid=' . $recording['recordID'] . '&rtype=' . $playback['type']; |
|
| 1564 | 1564 | if (!isset($recording['imported']) || !isset($recording['protected']) || $recording['protected'] === 'false') { |
| 1565 | - $href .= '&href='.urlencode(trim($playback['url'])); |
|
| 1565 | + $href .= '&href=' . urlencode(trim($playback['url'])); |
|
| 1566 | 1566 | } |
| 1567 | 1567 | $id = 'recording-play-' . $playback['type'] . '-' . $recording['recordID']; |
| 1568 | 1568 | $linkattributes = array( |
@@ -1696,7 +1696,7 @@ discard block |
||
| 1696 | 1696 | $linkattributes['class'] = 'disabled'; |
| 1697 | 1697 | unset($linkattributes['onclick']); |
| 1698 | 1698 | } |
| 1699 | - $icon = new pix_icon('i/'.$data['tag'], |
|
| 1699 | + $icon = new pix_icon('i/' . $data['tag'], |
|
| 1700 | 1700 | get_string('view_recording_list_actionbar_' . $data['action'], 'bigbluebuttonbn'), |
| 1701 | 1701 | 'moodle', $iconattributes); |
| 1702 | 1702 | return $OUTPUT->action_icon('#', $icon, null, $linkattributes, false); |
@@ -1813,7 +1813,7 @@ discard block |
||
| 1813 | 1813 | */ |
| 1814 | 1814 | function bigbluebuttonbn_get_recording_table_row($bbbsession, $recording, $rowdata) { |
| 1815 | 1815 | $row = new html_table_row(); |
| 1816 | - $row->id = 'recording-td-'.$recording['recordID']; |
|
| 1816 | + $row->id = 'recording-td-' . $recording['recordID']; |
|
| 1817 | 1817 | $row->attributes['data-imported'] = 'false'; |
| 1818 | 1818 | $texthead = ''; |
| 1819 | 1819 | $texttail = ''; |
@@ -1877,9 +1877,9 @@ discard block |
||
| 1877 | 1877 | function bigbluebuttonbn_send_notification_recording_ready($bigbluebuttonbn) { |
| 1878 | 1878 | $sender = get_admin(); |
| 1879 | 1879 | // Prepare message. |
| 1880 | - $messagetext = '<p>'.get_string('email_body_recording_ready_for', 'bigbluebuttonbn'). |
|
| 1881 | - ' "' . $bigbluebuttonbn->name . '" '. |
|
| 1882 | - get_string('email_body_recording_ready_is_ready', 'bigbluebuttonbn').'.</p>'; |
|
| 1880 | + $messagetext = '<p>' . get_string('email_body_recording_ready_for', 'bigbluebuttonbn') . |
|
| 1881 | + ' "' . $bigbluebuttonbn->name . '" ' . |
|
| 1882 | + get_string('email_body_recording_ready_is_ready', 'bigbluebuttonbn') . '.</p>'; |
|
| 1883 | 1883 | $context = context_course::instance($bigbluebuttonbn->course); |
| 1884 | 1884 | \mod_bigbluebuttonbn\locallib\notifier::notification_send($context, $sender, $bigbluebuttonbn, $messagetext); |
| 1885 | 1885 | } |
@@ -2101,7 +2101,7 @@ discard block |
||
| 2101 | 2101 | } |
| 2102 | 2102 | // Prepare select for loading records based on existent bigbluebuttonbns. |
| 2103 | 2103 | $sql = 'SELECT DISTINCT meetingid, bigbluebuttonbnid FROM {bigbluebuttonbn_logs} WHERE '; |
| 2104 | - $sql .= '(bigbluebuttonbnid='.implode(' OR bigbluebuttonbnid=', array_keys($bigbluebuttonbns)).')'; |
|
| 2104 | + $sql .= '(bigbluebuttonbnid=' . implode(' OR bigbluebuttonbnid=', array_keys($bigbluebuttonbns)) . ')'; |
|
| 2105 | 2105 | // Include only Create events and exclude those with record not true. |
| 2106 | 2106 | $sql .= ' AND log = ? AND meta LIKE ? AND meta LIKE ?'; |
| 2107 | 2107 | // Execute select for loading records based on existent bigbluebuttonbns. |
@@ -2233,8 +2233,8 @@ discard block |
||
| 2233 | 2233 | function bigbluebuttonbn_format_activity_time($time) { |
| 2234 | 2234 | $activitytime = ''; |
| 2235 | 2235 | if ($time) { |
| 2236 | - $activitytime = calendar_day_representation($time).' '. |
|
| 2237 | - get_string('mod_form_field_notification_msg_at', 'bigbluebuttonbn').' '. |
|
| 2236 | + $activitytime = calendar_day_representation($time) . ' ' . |
|
| 2237 | + get_string('mod_form_field_notification_msg_at', 'bigbluebuttonbn') . ' ' . |
|
| 2238 | 2238 | calendar_time_representation($time); |
| 2239 | 2239 | } |
| 2240 | 2240 | return $activitytime; |
@@ -2627,7 +2627,7 @@ discard block |
||
| 2627 | 2627 | * |
| 2628 | 2628 | * @return string |
| 2629 | 2629 | */ |
| 2630 | -function bigbluebuttonbn_render_warning($message, $type='info', $href='', $text='', $class='') { |
|
| 2630 | +function bigbluebuttonbn_render_warning($message, $type = 'info', $href = '', $text = '', $class = '') { |
|
| 2631 | 2631 | global $OUTPUT; |
| 2632 | 2632 | $output = "\n"; |
| 2633 | 2633 | // Evaluates if config_warning is enabled. |
@@ -2666,10 +2666,10 @@ discard block |
||
| 2666 | 2666 | if ($class == '') { |
| 2667 | 2667 | $class = 'btn btn-secondary'; |
| 2668 | 2668 | } |
| 2669 | - $output = ' <form method="post" action="' . $href . '" class="form-inline">'."\n"; |
|
| 2670 | - $output .= ' <button type="submit" class="' . $class . '"'."\n"; |
|
| 2671 | - $output .= ' title="' . $title . '"'."\n"; |
|
| 2672 | - $output .= ' >' . $text . '</button>'."\n"; |
|
| 2673 | - $output .= ' </form>'."\n"; |
|
| 2669 | + $output = ' <form method="post" action="' . $href . '" class="form-inline">' . "\n"; |
|
| 2670 | + $output .= ' <button type="submit" class="' . $class . '"' . "\n"; |
|
| 2671 | + $output .= ' title="' . $title . '"' . "\n"; |
|
| 2672 | + $output .= ' >' . $text . '</button>' . "\n"; |
|
| 2673 | + $output .= ' </form>' . "\n"; |
|
| 2674 | 2674 | return $output; |
| 2675 | 2675 | } |
@@ -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 | $a = optional_param('a', 0, PARAM_INT); |
@@ -89,13 +89,13 @@ discard block |
||
| 89 | 89 | if ($moderator || $administrator) { |
| 90 | 90 | bigbluebuttonbn_event_log(BIGBLUEBUTTON_EVENT_MEETING_ENDED, $bigbluebuttonbn, $cm); |
| 91 | 91 | echo get_string('index_ending', 'bigbluebuttonbn'); |
| 92 | - $meetingid = $bigbluebuttonbn->meetingid.'-'.$course->id.'-'.$bigbluebuttonbn->id; |
|
| 92 | + $meetingid = $bigbluebuttonbn->meetingid . '-' . $course->id . '-' . $bigbluebuttonbn->id; |
|
| 93 | 93 | if ($g != '0') { |
| 94 | - $meetingid .= '['.$g.']'; |
|
| 94 | + $meetingid .= '[' . $g . ']'; |
|
| 95 | 95 | } |
| 96 | 96 | |
| 97 | 97 | bigbluebuttonbn_end_meeting($meetingid, $bigbluebuttonbn->moderatorpass); |
| 98 | - redirect('index.php?id='.$id); |
|
| 98 | + redirect('index.php?id=' . $id); |
|
| 99 | 99 | } |
| 100 | 100 | } |
| 101 | 101 | |
@@ -110,7 +110,7 @@ discard block |
||
| 110 | 110 | // Add a the data for the bigbluebuttonbn instance. |
| 111 | 111 | $groupobj = null; |
| 112 | 112 | if (groups_get_activity_groupmode($cm) > 0) { |
| 113 | - $groupobj = (object) array('id' => 0, 'name' => get_string('allparticipants')); |
|
| 113 | + $groupobj = (object)array('id' => 0, 'name' => get_string('allparticipants')); |
|
| 114 | 114 | } |
| 115 | 115 | $table->data[] = bigbluebuttonbn_index_display_room($canmoderate, $course, $bigbluebuttonbn, $groupobj); |
| 116 | 116 | // Add a the data for the groups belonging to the bigbluebuttonbn instance, if any. |
@@ -136,12 +136,12 @@ discard block |
||
| 136 | 136 | * @return array |
| 137 | 137 | */ |
| 138 | 138 | function bigbluebuttonbn_index_display_room($moderator, $course, $bigbluebuttonbn, $groupobj = null) { |
| 139 | - $meetingid = $bigbluebuttonbn->meetingid.'-'.$course->id.'-'.$bigbluebuttonbn->id; |
|
| 139 | + $meetingid = $bigbluebuttonbn->meetingid . '-' . $course->id . '-' . $bigbluebuttonbn->id; |
|
| 140 | 140 | $paramgroup = ''; |
| 141 | 141 | $groupname = ''; |
| 142 | 142 | if ($groupobj) { |
| 143 | - $meetingid .= '['.$groupobj->id.']'; |
|
| 144 | - $paramgroup = '&group='.$groupobj->id; |
|
| 143 | + $meetingid .= '[' . $groupobj->id . ']'; |
|
| 144 | + $paramgroup = '&group=' . $groupobj->id; |
|
| 145 | 145 | $groupname = $groupobj->name; |
| 146 | 146 | } |
| 147 | 147 | $meetinginfo = bigbluebuttonbn_get_meeting_info_array($meetingid); |
@@ -156,7 +156,7 @@ discard block |
||
| 156 | 156 | return; |
| 157 | 157 | } |
| 158 | 158 | // Output Users in the meeting. |
| 159 | - $joinurl = '<a href="view.php?id='.$bigbluebuttonbn->coursemodule.$paramgroup.'">'.format_string($bigbluebuttonbn->name).'</a>'; |
|
| 159 | + $joinurl = '<a href="view.php?id=' . $bigbluebuttonbn->coursemodule . $paramgroup . '">' . format_string($bigbluebuttonbn->name) . '</a>'; |
|
| 160 | 160 | $group = $groupname; |
| 161 | 161 | $users = ''; |
| 162 | 162 | $viewerlist = ''; |
@@ -201,7 +201,7 @@ discard block |
||
| 201 | 201 | $attendeecount = 0; |
| 202 | 202 | foreach ($meetinginfo['attendees']->attendee as $attendee) { |
| 203 | 203 | if ($attendee->role == $role) { |
| 204 | - $attendeelist .= ($attendeecount++ > 0 ? ', ' : '').$attendee->fullName; |
|
| 204 | + $attendeelist .= ($attendeecount++ > 0 ? ', ' : '') . $attendee->fullName; |
|
| 205 | 205 | } |
| 206 | 206 | } |
| 207 | 207 | } |
@@ -235,17 +235,17 @@ discard block |
||
| 235 | 235 | function bigbluebuttonbn_index_display_room_actions($moderator, $course, $bigbluebuttonbn, $groupobj = null) { |
| 236 | 236 | $actions = ''; |
| 237 | 237 | if ($moderator) { |
| 238 | - $actions .= '<form name="form1" method="post" action="">'."\n"; |
|
| 239 | - $actions .= ' <INPUT type="hidden" name="id" value="'.$course->id.'">'."\n"; |
|
| 240 | - $actions .= ' <INPUT type="hidden" name="a" value="'.$bigbluebuttonbn->id.'">'."\n"; |
|
| 238 | + $actions .= '<form name="form1" method="post" action="">' . "\n"; |
|
| 239 | + $actions .= ' <INPUT type="hidden" name="id" value="' . $course->id . '">' . "\n"; |
|
| 240 | + $actions .= ' <INPUT type="hidden" name="a" value="' . $bigbluebuttonbn->id . '">' . "\n"; |
|
| 241 | 241 | if ($groupobj != null) { |
| 242 | - $actions .= ' <INPUT type="hidden" name="g" value="'.$groupobj->id.'">'."\n"; |
|
| 242 | + $actions .= ' <INPUT type="hidden" name="g" value="' . $groupobj->id . '">' . "\n"; |
|
| 243 | 243 | } |
| 244 | 244 | $actions .= ' <INPUT type="submit" name="submit" value="' . |
| 245 | 245 | get_string('view_conference_action_end', 'bigbluebuttonbn') . |
| 246 | 246 | '" class="btn btn-primary btn-sm" onclick="return confirm(\'' . |
| 247 | 247 | get_string('index_confirm_end', 'bigbluebuttonbn') . '\')">' . "\n"; |
| 248 | - $actions .= '</form>'."\n"; |
|
| 248 | + $actions .= '</form>' . "\n"; |
|
| 249 | 249 | } |
| 250 | 250 | return $actions; |
| 251 | 251 | } |
@@ -52,7 +52,7 @@ |
||
| 52 | 52 | $params .= '&' . $key . '=' . urlencode($value); |
| 53 | 53 | } |
| 54 | 54 | foreach ($metadata as $key => $value) { |
| 55 | - $params .= '&' . 'meta_' . $key.'=' . urlencode($value); |
|
| 55 | + $params .= '&' . 'meta_' . $key . '=' . urlencode($value); |
|
| 56 | 56 | } |
| 57 | 57 | return $baseurl . $params . '&checksum=' . sha1($action . $params . self::sanitized_secret()); |
| 58 | 58 | } |
@@ -41,7 +41,7 @@ |
||
| 41 | 41 | */ |
| 42 | 42 | protected function init() { |
| 43 | 43 | parent::init('r', self::LEVEL_OTHER); |
| 44 | - $this->description = "The user with id '$this->userid' has unprotected a recording with id ". |
|
| 44 | + $this->description = "The user with id '$this->userid' has unprotected a recording with id " . |
|
| 45 | 45 | "'$this->other' in the course id '$this->contextinstanceid'."; |
| 46 | 46 | } |
| 47 | 47 | |
@@ -41,7 +41,7 @@ |
||
| 41 | 41 | */ |
| 42 | 42 | protected function init() { |
| 43 | 43 | parent::init('r', self::LEVEL_OTHER); |
| 44 | - $this->description = "The user with id '$this->userid' has unpublished a recording with id ". |
|
| 44 | + $this->description = "The user with id '$this->userid' has unpublished a recording with id " . |
|
| 45 | 45 | "'$this->other' in the course id '$this->contextinstanceid'."; |
| 46 | 46 | } |
| 47 | 47 | |
@@ -41,7 +41,7 @@ |
||
| 41 | 41 | */ |
| 42 | 42 | protected function init() { |
| 43 | 43 | parent::init('r', self::LEVEL_OTHER); |
| 44 | - $this->description = "The user with id '$this->userid' has protected a recording with id ". |
|
| 44 | + $this->description = "The user with id '$this->userid' has protected a recording with id " . |
|
| 45 | 45 | "'$this->other' in the course id '$this->contextinstanceid'."; |
| 46 | 46 | } |
| 47 | 47 | |
@@ -41,7 +41,7 @@ |
||
| 41 | 41 | */ |
| 42 | 42 | protected function init() { |
| 43 | 43 | parent::init('r', self::LEVEL_OTHER); |
| 44 | - $this->description = "The user with id '$this->userid' has deleted a recording with id ". |
|
| 44 | + $this->description = "The user with id '$this->userid' has deleted a recording with id " . |
|
| 45 | 45 | "'$this->other' from the course id '$this->contextinstanceid'."; |
| 46 | 46 | } |
| 47 | 47 | |
@@ -41,7 +41,7 @@ |
||
| 41 | 41 | */ |
| 42 | 42 | protected function init() { |
| 43 | 43 | parent::init('r', self::LEVEL_OTHER); |
| 44 | - $this->description = "The user with id '$this->userid' has published a recording with id ". |
|
| 44 | + $this->description = "The user with id '$this->userid' has published a recording with id " . |
|
| 45 | 45 | "'$this->other' in the course id '$this->contextinstanceid'."; |
| 46 | 46 | } |
| 47 | 47 | |