@@ -35,7 +35,7 @@ discard block |
||
35 | 35 | |
36 | 36 | defined('MOODLE_INTERNAL') || die(); |
37 | 37 | |
38 | -require_once($CFG->dirroot.'/mod/bigbluebuttonbn/locallib.php'); |
|
38 | +require_once($CFG->dirroot . '/mod/bigbluebuttonbn/locallib.php'); |
|
39 | 39 | |
40 | 40 | /** |
41 | 41 | * Class index |
@@ -91,7 +91,7 @@ discard block |
||
91 | 91 | // Add a the data for the bigbluebuttonbn instance. |
92 | 92 | $groupobj = null; |
93 | 93 | if (groups_get_activity_groupmode($cm) > 0) { |
94 | - $groupobj = (object) array('id' => 0, 'name' => get_string('allparticipants')); |
|
94 | + $groupobj = (object)array('id' => 0, 'name' => get_string('allparticipants')); |
|
95 | 95 | } |
96 | 96 | $table->data[] = self::bigbluebuttonbn_index_display_room($canmoderate, $course, $bigbluebuttonbn, $groupobj); |
97 | 97 | // Add a the data for the groups belonging to the bigbluebuttonbn instance, if any. |
@@ -181,7 +181,7 @@ discard block |
||
181 | 181 | $attendeecount = 0; |
182 | 182 | foreach ($meetinginfo['attendees']->attendee as $attendee) { |
183 | 183 | if ($attendee->role == $role) { |
184 | - $attendeelist .= ($attendeecount++ > 0 ? ', ' : '').$attendee->fullName; |
|
184 | + $attendeelist .= ($attendeecount++ > 0 ? ', ' : '') . $attendee->fullName; |
|
185 | 185 | } |
186 | 186 | } |
187 | 187 | } |
@@ -215,18 +215,18 @@ discard block |
||
215 | 215 | public static function bigbluebuttonbn_index_display_room_actions($moderator, $course, $bigbluebuttonbn, $groupobj = null) { |
216 | 216 | $actions = ''; |
217 | 217 | if ($moderator) { |
218 | - $actions .= '<form name="form1" method="post" action="">'."\n"; |
|
219 | - $actions .= ' <INPUT type="hidden" name="id" value="'.$course->id.'">'."\n"; |
|
220 | - $actions .= ' <INPUT type="hidden" name="a" value="'.$bigbluebuttonbn->id.'">'."\n"; |
|
221 | - $actions .= ' <INPUT type="hidden" name="action" value="end">'."\n"; |
|
218 | + $actions .= '<form name="form1" method="post" action="">' . "\n"; |
|
219 | + $actions .= ' <INPUT type="hidden" name="id" value="' . $course->id . '">' . "\n"; |
|
220 | + $actions .= ' <INPUT type="hidden" name="a" value="' . $bigbluebuttonbn->id . '">' . "\n"; |
|
221 | + $actions .= ' <INPUT type="hidden" name="action" value="end">' . "\n"; |
|
222 | 222 | if ($groupobj != null) { |
223 | - $actions .= ' <INPUT type="hidden" name="g" value="'.$groupobj->id.'">'."\n"; |
|
223 | + $actions .= ' <INPUT type="hidden" name="g" value="' . $groupobj->id . '">' . "\n"; |
|
224 | 224 | } |
225 | 225 | $actions .= ' <INPUT type="submit" name="submit" value="' . |
226 | 226 | get_string('view_conference_action_end', 'bigbluebuttonbn') . |
227 | 227 | '" class="btn btn-primary btn-sm" onclick="return confirm(\'' . |
228 | 228 | get_string('index_confirm_end', 'bigbluebuttonbn') . '\')">' . "\n"; |
229 | - $actions .= '</form>'."\n"; |
|
229 | + $actions .= '</form>' . "\n"; |
|
230 | 230 | } |
231 | 231 | return $actions; |
232 | 232 | } |
@@ -208,7 +208,7 @@ discard block |
||
208 | 208 | function bigbluebuttonbn_broker_recording_info_current($recording, $params) { |
209 | 209 | $callbackresponse['status'] = true; |
210 | 210 | $callbackresponse['found'] = true; |
211 | - $callbackresponse['published'] = (string) $recording['published']; |
|
211 | + $callbackresponse['published'] = (string)$recording['published']; |
|
212 | 212 | if (!isset($params['meta']) || empty($params['meta'])) { |
213 | 213 | return $callbackresponse; |
214 | 214 | } |
@@ -559,8 +559,8 @@ discard block |
||
559 | 559 | array('HS256') |
560 | 560 | ); |
561 | 561 | } catch (Exception $e) { |
562 | - $error = 'Caught exception: '.$e->getMessage(); |
|
563 | - header('HTTP/1.0 400 Bad Request. '.$error); |
|
562 | + $error = 'Caught exception: ' . $e->getMessage(); |
|
563 | + header('HTTP/1.0 400 Bad Request. ' . $error); |
|
564 | 564 | return; |
565 | 565 | } |
566 | 566 | // Validate that the bigbluebuttonbn activity corresponds to the meeting_id received. |
@@ -590,8 +590,8 @@ discard block |
||
590 | 590 | bigbluebuttonbn_log($bigbluebuttonbn, BIGBLUEBUTTON_LOG_EVENT_CALLBACK, $overrides, json_encode($meta)); |
591 | 591 | header('HTTP/1.0 202 Accepted'); |
592 | 592 | } catch (Exception $e) { |
593 | - $error = 'Caught exception: '.$e->getMessage(); |
|
594 | - header('HTTP/1.0 503 Service Unavailable. '.$error); |
|
593 | + $error = 'Caught exception: ' . $e->getMessage(); |
|
594 | + header('HTTP/1.0 503 Service Unavailable. ' . $error); |
|
595 | 595 | } |
596 | 596 | } |
597 | 597 | |
@@ -612,13 +612,13 @@ discard block |
||
612 | 612 | $importrecordings = $SESSION->bigbluebuttonbn_importrecordings; |
613 | 613 | if (!isset($importrecordings[$params['id']])) { |
614 | 614 | $error = "Recording {$params['id']} could not be found. It can not be imported"; |
615 | - header('HTTP/1.0 404 Not found. '.$error); |
|
615 | + header('HTTP/1.0 404 Not found. ' . $error); |
|
616 | 616 | return; |
617 | 617 | } |
618 | 618 | $callbackresponse = array('status' => true); |
619 | 619 | $importrecordings[$params['id']]['imported'] = true; |
620 | 620 | $overrides = array('meetingid' => $importrecordings[$params['id']]['meetingID']); |
621 | - $meta = '{"recording":'.json_encode($importrecordings[$params['id']]).'}'; |
|
621 | + $meta = '{"recording":' . json_encode($importrecordings[$params['id']]) . '}'; |
|
622 | 622 | bigbluebuttonbn_log($bbbsession['bigbluebuttonbn'], BIGBLUEBUTTONBN_LOG_EVENT_IMPORT, $overrides, $meta); |
623 | 623 | // Moodle event logger: Create an event for recording imported. |
624 | 624 | if (isset($bbbsession['bigbluebutton']) && isset($bbbsession['cm'])) { |
@@ -712,7 +712,7 @@ discard block |
||
712 | 712 | $action = strtolower($params['action']); |
713 | 713 | $requiredparams = bigbluebuttonbn_broker_required_parameters(); |
714 | 714 | if (!array_key_exists($action, $requiredparams)) { |
715 | - return 'Action '.$params['action'].' can not be performed.'; |
|
715 | + return 'Action ' . $params['action'] . ' can not be performed.'; |
|
716 | 716 | } |
717 | 717 | return bigbluebuttonbn_broker_validate_parameters_message($params, $requiredparams[$action]); |
718 | 718 | } |
@@ -858,7 +858,7 @@ discard block |
||
858 | 858 | $tabledata = array(); |
859 | 859 | $typeprofiles = bigbluebuttonbn_get_instance_type_profiles(); |
860 | 860 | $tabledata['activity'] = bigbluebuttonbn_view_get_activity_status($bbbsession); |
861 | - $tabledata['ping_interval'] = (int) \mod_bigbluebuttonbn\locallib\config::get('waitformoderator_ping_interval') * 1000; |
|
861 | + $tabledata['ping_interval'] = (int)\mod_bigbluebuttonbn\locallib\config::get('waitformoderator_ping_interval') * 1000; |
|
862 | 862 | $tabledata['locale'] = bigbluebuttonbn_get_localcode(); |
863 | 863 | $tabledata['profile_features'] = $typeprofiles[0]['features']; |
864 | 864 | $tabledata['recordings_html'] = $bbbsession['bigbluebuttonbn']->recordings_html == '1'; |
@@ -103,7 +103,7 @@ discard block |
||
103 | 103 | * recordings from a different activity even from a different course. |
104 | 104 | **/ |
105 | 105 | |
106 | - /* |
|
106 | + /* |
|
107 | 107 | * When the value is set to 1 (checked) the bigbluebuttonbn rooms or |
108 | 108 | * activities will have the 'import recordings' capability enabled. |
109 | 109 | * $CFG->bigbluebuttonbn['importrecordings_enabled'] = 0; |
@@ -124,7 +124,7 @@ discard block |
||
124 | 124 | * 'Join session' button enabled |
125 | 125 | **/ |
126 | 126 | |
127 | - /* |
|
127 | + /* |
|
128 | 128 | * When the value is set to 1 (checked) the bigbluebuttonbn rooms or |
129 | 129 | * activities will have the 'wait for moderator' capability enabled by |
130 | 130 | * default. |
@@ -276,7 +276,7 @@ discard block |
||
276 | 276 | * $CFG->bigbluebuttonbn['recordings_preview_editable'] = 0; |
277 | 277 | */ |
278 | 278 | |
279 | - /* When the value is set to 1 (checked) the playback URLs will be validated |
|
279 | + /* When the value is set to 1 (checked) the playback URLs will be validated |
|
280 | 280 | * before the user access it. |
281 | 281 | * $CFG->bigbluebuttonbn['recordings_validate_url'] = 1; |
282 | 282 | */ |
@@ -366,27 +366,27 @@ discard block |
||
366 | 366 | * $CFG->bigbluebuttonbn['general_warning_message'] = "Would you like to record your BigBlueButton sessions for later viewing? "; |
367 | 367 | */ |
368 | 368 | |
369 | - /* |
|
369 | + /* |
|
370 | 370 | * The warning box is always shown to administrators, but it is also possible to define other roles |
371 | 371 | * to whom the it will be shown. The roles are based on the shortnames defined by Moodle: |
372 | 372 | * 'manager,coursecreator,editingteacher,teacher,student,guest,user,frontpage' |
373 | 373 | * $CFG->bigbluebuttonbn['general_warning_roles'] = 'editingteacher,teacher'; |
374 | 374 | */ |
375 | 375 | |
376 | - /* |
|
376 | + /* |
|
377 | 377 | * As the general_warning_message is shown in a box, its type can be defined with general_warning_type |
378 | 378 | * The default type is 'info' which is normaly rendered in blue when using a bootstrap theme. |
379 | 379 | * All the modifiers for boxed in bootstrap can be used [info|success|warning|danger]. |
380 | 380 | * $CFG->bigbluebuttonbn['general_warning_box_type'] = 'info'; |
381 | 381 | */ |
382 | 382 | |
383 | - /* |
|
383 | + /* |
|
384 | 384 | * Additionally, when general_warning_button_href value is different than "", a button |
385 | 385 | * can also be shown right after the message. |
386 | 386 | * $CFG->bigbluebuttonbn['general_warning_button_href'] = "http://blindsidenetworks.com/"; |
387 | 387 | */ |
388 | 388 | |
389 | - /* |
|
389 | + /* |
|
390 | 390 | * Finally, the text and class for the button can be modified |
391 | 391 | * $CFG->bigbluebuttonbn['general_warning_button_text'] = "Upgrade your site"; |
392 | 392 | * $CFG->bigbluebuttonbn['general_warning_button_class'] = "btn btn-primary"; |
@@ -54,8 +54,8 @@ discard block |
||
54 | 54 | $groupname = groups_get_group_name($bbbsession['group']); |
55 | 55 | } |
56 | 56 | // Assign group default values. |
57 | - $bbbsession['meetingid'] .= '['.$bbbsession['group'].']'; |
|
58 | - $bbbsession['meetingname'] .= ' ('.$groupname.')'; |
|
57 | + $bbbsession['meetingid'] .= '[' . $bbbsession['group'] . ']'; |
|
58 | + $bbbsession['meetingname'] .= ' (' . $groupname . ')'; |
|
59 | 59 | if (count($groups) == 0) { |
60 | 60 | // Only the All participants group exists. |
61 | 61 | bigbluebuttonbn_view_message_box($bbbsession, get_string('view_groups_notenrolled_warning', 'bigbluebuttonbn'), 'info'); |
@@ -65,7 +65,7 @@ discard block |
||
65 | 65 | if (has_capability('moodle/site:accessallgroups', $context)) { |
66 | 66 | bigbluebuttonbn_view_message_box($bbbsession, get_string('view_groups_selection_warning', 'bigbluebuttonbn')); |
67 | 67 | } |
68 | - $urltoroot = $CFG->wwwroot.'/mod/bigbluebuttonbn/view.php?id='.$bbbsession['cm']->id; |
|
68 | + $urltoroot = $CFG->wwwroot . '/mod/bigbluebuttonbn/view.php?id=' . $bbbsession['cm']->id; |
|
69 | 69 | groups_print_activity_menu($bbbsession['cm'], $urltoroot); |
70 | 70 | echo '<br><br>'; |
71 | 71 | } |
@@ -136,7 +136,7 @@ discard block |
||
136 | 136 | $recordingsdisabled = get_string('view_message_recordings_disabled', 'bigbluebuttonbn'); |
137 | 137 | $output .= bigbluebuttonbn_render_warning($recordingsdisabled, 'danger'); |
138 | 138 | } |
139 | - echo $output.html_writer::empty_tag('br').html_writer::empty_tag('br').html_writer::empty_tag('br'); |
|
139 | + echo $output . html_writer::empty_tag('br') . html_writer::empty_tag('br') . html_writer::empty_tag('br'); |
|
140 | 140 | $PAGE->requires->yui_module('moodle-mod_bigbluebuttonbn-broker', 'M.mod_bigbluebuttonbn.broker.init', array($jsvars)); |
141 | 141 | } |
142 | 142 | |
@@ -205,12 +205,12 @@ discard block |
||
205 | 205 | // JavaScript variables for room. |
206 | 206 | $openingtime = ''; |
207 | 207 | if ($bbbsession['openingtime']) { |
208 | - $openingtime = get_string('mod_form_field_openingtime', 'bigbluebuttonbn').': '. |
|
208 | + $openingtime = get_string('mod_form_field_openingtime', 'bigbluebuttonbn') . ': ' . |
|
209 | 209 | userdate($bbbsession['openingtime']); |
210 | 210 | } |
211 | 211 | $closingtime = ''; |
212 | 212 | if ($bbbsession['closingtime']) { |
213 | - $closingtime = get_string('mod_form_field_closingtime', 'bigbluebuttonbn').': '. |
|
213 | + $closingtime = get_string('mod_form_field_closingtime', 'bigbluebuttonbn') . ': ' . |
|
214 | 214 | userdate($bbbsession['closingtime']); |
215 | 215 | } |
216 | 216 | $jsvars += array( |
@@ -226,7 +226,7 @@ discard block |
||
226 | 226 | $output .= '<br><span id="control_panel"></span>'; |
227 | 227 | $output .= $OUTPUT->box_end(); |
228 | 228 | // Guest name input box. |
229 | - if(isguestuser($USER)){ |
|
229 | + if (isguestuser($USER)) { |
|
230 | 230 | $output .= $OUTPUT->box_start('generalbox boxaligncenter', 'bigbluebuttonbn_view_guestnameinput_box'); |
231 | 231 | $output .= '<br><span>Name eingeben:</span>'; |
232 | 232 | //added script |
@@ -236,7 +236,7 @@ discard block |
||
236 | 236 | } |
237 | 237 | // Action button box. |
238 | 238 | $output .= $OUTPUT->box_start('generalbox boxaligncenter', 'bigbluebuttonbn_view_action_button_box'); |
239 | - $output .= '<br><br><span id="join_button"></span> <span id="end_button"></span>'."\n"; |
|
239 | + $output .= '<br><br><span id="join_button"></span> <span id="end_button"></span>' . "\n"; |
|
240 | 240 | $output .= $OUTPUT->box_end(); |
241 | 241 | if ($activity == 'ended') { |
242 | 242 | $output .= bigbluebuttonbn_view_ended($bbbsession); |
@@ -269,7 +269,7 @@ discard block |
||
269 | 269 | // If there are meetings with recordings load the data to the table. |
270 | 270 | if ($bbbsession['bigbluebuttonbn']->recordings_html) { |
271 | 271 | // Render a plain html table. |
272 | - return bigbluebuttonbn_output_recording_table($bbbsession, $recordings)."\n"; |
|
272 | + return bigbluebuttonbn_output_recording_table($bbbsession, $recordings) . "\n"; |
|
273 | 273 | } |
274 | 274 | // JavaScript variables for recordings with YUI. |
275 | 275 | $jsvars += array( |
@@ -305,8 +305,8 @@ discard block |
||
305 | 305 | array('type' => 'button', |
306 | 306 | 'value' => get_string('view_recording_button_import', 'bigbluebuttonbn'), |
307 | 307 | 'class' => 'btn btn-secondary', |
308 | - 'onclick' => 'window.location=\''.$CFG->wwwroot.'/mod/bigbluebuttonbn/import_view.php?bn='. |
|
309 | - $bbbsession['bigbluebuttonbn']->id.'\'')); |
|
308 | + 'onclick' => 'window.location=\'' . $CFG->wwwroot . '/mod/bigbluebuttonbn/import_view.php?bn=' . |
|
309 | + $bbbsession['bigbluebuttonbn']->id . '\'')); |
|
310 | 310 | $output = html_writer::empty_tag('br'); |
311 | 311 | $output .= html_writer::tag('span', $button, array('id' => 'import_recording_links_button')); |
312 | 312 | $output .= html_writer::tag('span', '', array('id' => 'import_recording_links_table')); |
@@ -325,10 +325,10 @@ discard block |
||
325 | 325 | if (!is_null($bbbsession['presentation']['url'])) { |
326 | 326 | $attributes = array('title' => $bbbsession['presentation']['name']); |
327 | 327 | $icon = new pix_icon($bbbsession['presentation']['icon'], $bbbsession['presentation']['mimetype_description']); |
328 | - return '<h4>'.get_string('view_section_title_presentation', 'bigbluebuttonbn').'</h4>'. |
|
329 | - $OUTPUT->action_icon($bbbsession['presentation']['url'], $icon, null, array(), false). |
|
328 | + return '<h4>' . get_string('view_section_title_presentation', 'bigbluebuttonbn') . '</h4>' . |
|
329 | + $OUTPUT->action_icon($bbbsession['presentation']['url'], $icon, null, array(), false) . |
|
330 | 330 | $OUTPUT->action_link($bbbsession['presentation']['url'], |
331 | - $bbbsession['presentation']['name'], null, $attributes).'<br><br>'; |
|
331 | + $bbbsession['presentation']['name'], null, $attributes) . '<br><br>'; |
|
332 | 332 | } |
333 | 333 | return ''; |
334 | 334 | } |