@@ -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); |
@@ -147,7 +147,7 @@ discard block |
||
147 | 147 | public function render_warning_message($message, $type = 'warning') { |
148 | 148 | global $OUTPUT; |
149 | 149 | $output = $OUTPUT->box_start('box boxalignleft adminerror alert alert-' . $type . ' alert-block fade in', |
150 | - 'bigbluebuttonbn_view_general_warning')."\n"; |
|
150 | + 'bigbluebuttonbn_view_general_warning') . "\n"; |
|
151 | 151 | $output .= ' <button type="button" class="close" data-dismiss="alert">×</button>' . $message . "\n"; |
152 | 152 | $output .= $OUTPUT->box_end() . "\n"; |
153 | 153 | $item = new \admin_setting_heading('bigbluebuttonbn_global_deprecated', '', $output); |
@@ -408,7 +408,7 @@ discard block |
||
408 | 408 | return $output; |
409 | 409 | } |
410 | 410 | $output .= $OUTPUT->box_start('box boxalignleft adminerror alert alert-' . $type . ' alert-block fade in', |
411 | - 'bigbluebuttonbn_view_general_warning') . "\n"; |
|
411 | + 'bigbluebuttonbn_view_general_warning') . "\n"; |
|
412 | 412 | $output .= ' ' . $message . "\n"; |
413 | 413 | $output .= ' <div class="singlebutton">' . "\n"; |
414 | 414 | if (!empty($href)) { |
@@ -505,12 +505,12 @@ discard block |
||
505 | 505 | $recordings = bigbluebuttonbn_get_recordings( |
506 | 506 | $bbbsession['course']->id, $bigbluebuttonbnid, $enabledfeatures['showroom'], |
507 | 507 | $bbbsession['bigbluebuttonbn']->recordings_deleted |
508 | - ); |
|
508 | + ); |
|
509 | 509 | if ($enabledfeatures['importrecordings']) { |
510 | 510 | // Get recording links. |
511 | 511 | $recordingsimported = bigbluebuttonbn_get_recordings_imported_array( |
512 | 512 | $bbbsession['course']->id, $bigbluebuttonbnid, $enabledfeatures['showroom'] |
513 | - ); |
|
513 | + ); |
|
514 | 514 | /* Perform aritmetic addition instead of merge so the imported recordings corresponding to existent |
515 | 515 | * recordings are not included. */ |
516 | 516 | $recordings += $recordingsimported; |
@@ -524,7 +524,7 @@ discard block |
||
524 | 524 | // JavaScript variables for recordings. |
525 | 525 | $jsvars += array( |
526 | 526 | 'recordings_html' => $bbbsession['bigbluebuttonbn']->recordings_html == '1', |
527 | - ); |
|
527 | + ); |
|
528 | 528 | // If there are meetings with recordings load the data to the table. |
529 | 529 | if ($bbbsession['bigbluebuttonbn']->recordings_html) { |
530 | 530 | // Render a plain html table. |
@@ -534,7 +534,7 @@ discard block |
||
534 | 534 | $jsvars += array( |
535 | 535 | 'columns' => bigbluebuttonbn_get_recording_columns($bbbsession), |
536 | 536 | 'data' => bigbluebuttonbn_get_recording_data($bbbsession, $recordings), |
537 | - ); |
|
537 | + ); |
|
538 | 538 | // Render a YUI table. |
539 | 539 | return html_writer::div('', '', array('id' => 'bigbluebuttonbn_yui_table')); |
540 | 540 | } |
@@ -554,10 +554,10 @@ discard block |
||
554 | 554 | } |
555 | 555 | $button = html_writer::tag('input', '', |
556 | 556 | array('type' => 'button', |
557 | - 'value' => get_string('view_recording_button_import', 'bigbluebuttonbn'), |
|
558 | - 'class' => 'btn btn-secondary', |
|
559 | - 'onclick' => 'window.location=\''.$CFG->wwwroot.'/mod/bigbluebuttonbn/import_view.php?bn='. |
|
560 | - $bbbsession['bigbluebuttonbn']->id.'\'')); |
|
557 | + 'value' => get_string('view_recording_button_import', 'bigbluebuttonbn'), |
|
558 | + 'class' => 'btn btn-secondary', |
|
559 | + 'onclick' => 'window.location=\''.$CFG->wwwroot.'/mod/bigbluebuttonbn/import_view.php?bn='. |
|
560 | + $bbbsession['bigbluebuttonbn']->id.'\'')); |
|
561 | 561 | $output = html_writer::start_tag('br'); |
562 | 562 | $output .= html_writer::tag('span', $button, array('id' => 'import_recording_links_button')); |
563 | 563 | $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; |
@@ -152,7 +152,7 @@ discard block |
||
152 | 152 | $bbbsession['modPW'] = $bbbsession['bigbluebuttonbn']->moderatorpass; |
153 | 153 | $bbbsession['viewerPW'] = $bbbsession['bigbluebuttonbn']->viewerpass; |
154 | 154 | // Database info related to the activity. |
155 | - $bbbsession['meetingid'] = $bbbsession['bigbluebuttonbn']->meetingid.'-'.$bbbsession['course']->id.'-'. |
|
155 | + $bbbsession['meetingid'] = $bbbsession['bigbluebuttonbn']->meetingid . '-' . $bbbsession['course']->id . '-' . |
|
156 | 156 | $bbbsession['bigbluebuttonbn']->id; |
157 | 157 | $bbbsession['meetingname'] = $bbbsession['bigbluebuttonbn']->name; |
158 | 158 | $bbbsession['meetingdescription'] = $bbbsession['bigbluebuttonbn']->intro; |
@@ -172,7 +172,7 @@ discard block |
||
172 | 172 | $bbbsession['welcome'] = get_string('mod_form_field_welcome_default', 'bigbluebuttonbn'); |
173 | 173 | } |
174 | 174 | if ($bbbsession['bigbluebuttonbn']->record) { |
175 | - $bbbsession['welcome'] .= '<br><br>'.get_string('bbbrecordwarning', 'bigbluebuttonbn'); |
|
175 | + $bbbsession['welcome'] .= '<br><br>' . get_string('bbbrecordwarning', 'bigbluebuttonbn'); |
|
176 | 176 | } |
177 | 177 | $bbbsession['openingtime'] = $bbbsession['bigbluebuttonbn']->openingtime; |
178 | 178 | $bbbsession['closingtime'] = $bbbsession['bigbluebuttonbn']->closingtime; |
@@ -185,7 +185,7 @@ discard block |
||
185 | 185 | $bbbsession['originServerName'] = $parsedurl['host']; |
186 | 186 | $bbbsession['originServerUrl'] = $CFG->wwwroot; |
187 | 187 | $bbbsession['originServerCommonName'] = ''; |
188 | - $bbbsession['originTag'] = 'moodle-mod_bigbluebuttonbn ('.get_config('mod_bigbluebuttonbn', 'version').')'; |
|
188 | + $bbbsession['originTag'] = 'moodle-mod_bigbluebuttonbn (' . get_config('mod_bigbluebuttonbn', 'version') . ')'; |
|
189 | 189 | $bbbsession['bnserver'] = bigbluebuttonbn_is_bn_server(); |
190 | 190 | } |
191 | 191 | |
@@ -257,8 +257,8 @@ discard block |
||
257 | 257 | $groupname = groups_get_group_name($bbbsession['group']); |
258 | 258 | } |
259 | 259 | // Assign group default values. |
260 | - $bbbsession['meetingid'] .= '['.$bbbsession['group'].']'; |
|
261 | - $bbbsession['meetingname'] .= ' ('.$groupname.')'; |
|
260 | + $bbbsession['meetingid'] .= '[' . $bbbsession['group'] . ']'; |
|
261 | + $bbbsession['meetingname'] .= ' (' . $groupname . ')'; |
|
262 | 262 | if (count($groups) == 0) { |
263 | 263 | // Only the All participants group exists. |
264 | 264 | bigbluebuttonbn_view_message_box($bbbsession, get_string('view_groups_notenrolled_warning', 'bigbluebuttonbn'), 'info'); |
@@ -269,7 +269,7 @@ discard block |
||
269 | 269 | return; |
270 | 270 | } |
271 | 271 | bigbluebuttonbn_view_message_box($bbbsession, get_string('view_groups_selection_warning', 'bigbluebuttonbn')); |
272 | - $urltoroot = $CFG->wwwroot.'/mod/bigbluebuttonbn/view.php?id='.$bbbsession['cm']->id; |
|
272 | + $urltoroot = $CFG->wwwroot . '/mod/bigbluebuttonbn/view.php?id=' . $bbbsession['cm']->id; |
|
273 | 273 | groups_print_activity_menu($bbbsession['cm'], $urltoroot); |
274 | 274 | echo '<br><br>'; |
275 | 275 | } |
@@ -316,7 +316,7 @@ discard block |
||
316 | 316 | 'locale' => bigbluebuttonbn_get_localcode(), 'profile_features' => $typeprofiles[0]['features']); |
317 | 317 | // Renders general warning when configured. |
318 | 318 | $cfg = \mod_bigbluebuttonbn\locallib\config::get_options(); |
319 | - $output = ''; |
|
319 | + $output = ''; |
|
320 | 320 | if (bigbluebuttonbn_view_warning_shown($bbbsession)) { |
321 | 321 | $output .= bigbluebuttonbn_view_render_warning( |
322 | 322 | (string)$cfg['general_warning_message'], |
@@ -340,7 +340,7 @@ discard block |
||
340 | 340 | $recordingsdisabled = get_string('view_message_recordings_disabled', 'bigbluebuttonbn'); |
341 | 341 | $output .= bigbluebuttonbn_view_render_warning($recordingsdisabled, 'danger'); |
342 | 342 | } |
343 | - echo $output.html_writer::empty_tag('br').html_writer::empty_tag('br').html_writer::empty_tag('br'); |
|
343 | + echo $output . html_writer::empty_tag('br') . html_writer::empty_tag('br') . html_writer::empty_tag('br'); |
|
344 | 344 | $PAGE->requires->yui_module('moodle-mod_bigbluebuttonbn-broker', 'M.mod_bigbluebuttonbn.broker.init', array($jsvars)); |
345 | 345 | } |
346 | 346 | |
@@ -400,7 +400,7 @@ discard block |
||
400 | 400 | * |
401 | 401 | * @return string |
402 | 402 | */ |
403 | -function bigbluebuttonbn_view_render_warning($message, $type='info', $href='', $text='', $class='') { |
|
403 | +function bigbluebuttonbn_view_render_warning($message, $type = 'info', $href = '', $text = '', $class = '') { |
|
404 | 404 | global $OUTPUT; |
405 | 405 | $output = "\n"; |
406 | 406 | // Evaluates if config_warning is enabled. |
@@ -435,11 +435,11 @@ discard block |
||
435 | 435 | if ($class == '') { |
436 | 436 | $class = 'btn btn-secondary'; |
437 | 437 | } |
438 | - $output = ' <form method="post" action="' . $href . '" class="form-inline">'."\n"; |
|
439 | - $output .= ' <button type="submit" class="' . $class . '"'."\n"; |
|
440 | - $output .= ' title=""'."\n"; |
|
441 | - $output .= ' >' . $text . '</button>'."\n"; |
|
442 | - $output .= ' </form>'."\n"; |
|
438 | + $output = ' <form method="post" action="' . $href . '" class="form-inline">' . "\n"; |
|
439 | + $output .= ' <button type="submit" class="' . $class . '"' . "\n"; |
|
440 | + $output .= ' title=""' . "\n"; |
|
441 | + $output .= ' >' . $text . '</button>' . "\n"; |
|
442 | + $output .= ' </form>' . "\n"; |
|
443 | 443 | return $output; |
444 | 444 | } |
445 | 445 | |
@@ -457,12 +457,12 @@ discard block |
||
457 | 457 | // JavaScript variables for room. |
458 | 458 | $openingtime = ''; |
459 | 459 | if ($bbbsession['openingtime']) { |
460 | - $openingtime = get_string('mod_form_field_openingtime', 'bigbluebuttonbn').': '. |
|
460 | + $openingtime = get_string('mod_form_field_openingtime', 'bigbluebuttonbn') . ': ' . |
|
461 | 461 | userdate($bbbsession['openingtime']); |
462 | 462 | } |
463 | 463 | $closingtime = ''; |
464 | 464 | if ($bbbsession['closingtime']) { |
465 | - $closingtime = get_string('mod_form_field_closingtime', 'bigbluebuttonbn').': '. |
|
465 | + $closingtime = get_string('mod_form_field_closingtime', 'bigbluebuttonbn') . ': ' . |
|
466 | 466 | userdate($bbbsession['closingtime']); |
467 | 467 | } |
468 | 468 | $jsvars += array( |
@@ -479,7 +479,7 @@ discard block |
||
479 | 479 | $output .= $OUTPUT->box_end(); |
480 | 480 | // Action button box. |
481 | 481 | $output .= $OUTPUT->box_start('generalbox boxaligncenter', 'bigbluebuttonbn_view_action_button_box'); |
482 | - $output .= '<br><br><span id="join_button"></span> <span id="end_button"></span>'."\n"; |
|
482 | + $output .= '<br><br><span id="join_button"></span> <span id="end_button"></span>' . "\n"; |
|
483 | 483 | $output .= $OUTPUT->box_end(); |
484 | 484 | if ($activity == 'ended') { |
485 | 485 | $output .= bigbluebuttonbn_view_ended($bbbsession); |
@@ -528,7 +528,7 @@ discard block |
||
528 | 528 | // If there are meetings with recordings load the data to the table. |
529 | 529 | if ($bbbsession['bigbluebuttonbn']->recordings_html) { |
530 | 530 | // Render a plain html table. |
531 | - return bigbluebuttonbn_output_recording_table($bbbsession, $recordings)."\n"; |
|
531 | + return bigbluebuttonbn_output_recording_table($bbbsession, $recordings) . "\n"; |
|
532 | 532 | } |
533 | 533 | // JavaScript variables for recordings with YUI. |
534 | 534 | $jsvars += array( |
@@ -556,8 +556,8 @@ discard block |
||
556 | 556 | array('type' => 'button', |
557 | 557 | 'value' => get_string('view_recording_button_import', 'bigbluebuttonbn'), |
558 | 558 | 'class' => 'btn btn-secondary', |
559 | - 'onclick' => 'window.location=\''.$CFG->wwwroot.'/mod/bigbluebuttonbn/import_view.php?bn='. |
|
560 | - $bbbsession['bigbluebuttonbn']->id.'\'')); |
|
559 | + 'onclick' => 'window.location=\'' . $CFG->wwwroot . '/mod/bigbluebuttonbn/import_view.php?bn=' . |
|
560 | + $bbbsession['bigbluebuttonbn']->id . '\'')); |
|
561 | 561 | $output = html_writer::start_tag('br'); |
562 | 562 | $output .= html_writer::tag('span', $button, array('id' => 'import_recording_links_button')); |
563 | 563 | $output .= html_writer::tag('span', '', array('id' => 'import_recording_links_table')); |
@@ -576,10 +576,10 @@ discard block |
||
576 | 576 | if (!is_null($bbbsession['presentation']['url'])) { |
577 | 577 | $attributes = array('title' => $bbbsession['presentation']['name']); |
578 | 578 | $icon = new pix_icon($bbbsession['presentation']['icon'], $bbbsession['presentation']['mimetype_description']); |
579 | - return '<h4>'.get_string('view_section_title_presentation', 'bigbluebuttonbn').'</h4>'. |
|
580 | - $OUTPUT->action_icon($bbbsession['presentation']['url'], $icon, null, array(), false). |
|
579 | + return '<h4>' . get_string('view_section_title_presentation', 'bigbluebuttonbn') . '</h4>' . |
|
580 | + $OUTPUT->action_icon($bbbsession['presentation']['url'], $icon, null, array(), false) . |
|
581 | 581 | $OUTPUT->action_link($bbbsession['presentation']['url'], |
582 | - $bbbsession['presentation']['name'], null, $attributes).'<br><br>'; |
|
582 | + $bbbsession['presentation']['name'], null, $attributes) . '<br><br>'; |
|
583 | 583 | } |
584 | 584 | return ''; |
585 | 585 | } |