Completed
Pull Request — master (#289)
by
unknown
02:23
created
viewlib.php 1 patch
Spacing   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -54,8 +54,8 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 }
@@ -137,7 +137,7 @@  discard block
 block discarded – undo
137 137
         $recordingsdisabled = get_string('view_message_recordings_disabled', 'bigbluebuttonbn');
138 138
         $output .= bigbluebuttonbn_render_warning($recordingsdisabled, 'danger');
139 139
     }
140
-    echo $output.html_writer::empty_tag('br').html_writer::empty_tag('br').html_writer::empty_tag('br');
140
+    echo $output . html_writer::empty_tag('br') . html_writer::empty_tag('br') . html_writer::empty_tag('br');
141 141
     $PAGE->requires->yui_module('moodle-mod_bigbluebuttonbn-broker', 'M.mod_bigbluebuttonbn.broker.init', array($jsvars));
142 142
 }
143 143
 
@@ -206,12 +206,12 @@  discard block
 block discarded – undo
206 206
     // JavaScript variables for room.
207 207
     $openingtime = '';
208 208
     if ($bbbsession['openingtime']) {
209
-        $openingtime = get_string('mod_form_field_openingtime', 'bigbluebuttonbn').': '.
209
+        $openingtime = get_string('mod_form_field_openingtime', 'bigbluebuttonbn') . ': ' .
210 210
             userdate($bbbsession['openingtime']);
211 211
     }
212 212
     $closingtime = '';
213 213
     if ($bbbsession['closingtime']) {
214
-        $closingtime = get_string('mod_form_field_closingtime', 'bigbluebuttonbn').': '.
214
+        $closingtime = get_string('mod_form_field_closingtime', 'bigbluebuttonbn') . ': ' .
215 215
             userdate($bbbsession['closingtime']);
216 216
     }
217 217
     $guestlink = [];
@@ -253,7 +253,7 @@  discard block
 block discarded – undo
253 253
     $output .= $OUTPUT->box_end();
254 254
     // Action button box.
255 255
     $output .= $OUTPUT->box_start('generalbox boxaligncenter', 'bigbluebuttonbn_view_action_button_box');
256
-    $output .= '<br><br><span id="join_button"></span>&nbsp;<span id="end_button"></span>'."\n";
256
+    $output .= '<br><br><span id="join_button"></span>&nbsp;<span id="end_button"></span>' . "\n";
257 257
     $output .= $OUTPUT->box_end();
258 258
     if ($activity == 'ended') {
259 259
         $output .= bigbluebuttonbn_view_ended($bbbsession);
@@ -286,7 +286,7 @@  discard block
 block discarded – undo
286 286
     // If there are meetings with recordings load the data to the table.
287 287
     if ($bbbsession['bigbluebuttonbn']->recordings_html) {
288 288
         // Render a plain html table.
289
-        return bigbluebuttonbn_output_recording_table($bbbsession, $recordings)."\n";
289
+        return bigbluebuttonbn_output_recording_table($bbbsession, $recordings) . "\n";
290 290
     }
291 291
     // JavaScript variables for recordings with YUI.
292 292
     $jsvars += array(
@@ -322,8 +322,8 @@  discard block
 block discarded – undo
322 322
         array('type' => 'button',
323 323
             'value' => get_string('view_recording_button_import', 'bigbluebuttonbn'),
324 324
             'class' => 'btn btn-secondary',
325
-            'onclick' => 'window.location=\''.$CFG->wwwroot.'/mod/bigbluebuttonbn/import_view.php?bn='.
326
-                $bbbsession['bigbluebuttonbn']->id.'\''));
325
+            'onclick' => 'window.location=\'' . $CFG->wwwroot . '/mod/bigbluebuttonbn/import_view.php?bn=' .
326
+                $bbbsession['bigbluebuttonbn']->id . '\''));
327 327
     $output  = html_writer::empty_tag('br');
328 328
     $output .= html_writer::tag('span', $button, array('id' => 'import_recording_links_button'));
329 329
     $output .= html_writer::tag('span', '', array('id' => 'import_recording_links_table'));
@@ -342,10 +342,10 @@  discard block
 block discarded – undo
342 342
     if (!is_null($bbbsession['presentation']['url'])) {
343 343
         $attributes = array('title' => $bbbsession['presentation']['name']);
344 344
         $icon = new pix_icon($bbbsession['presentation']['icon'], $bbbsession['presentation']['mimetype_description']);
345
-        return '<h4>'.get_string('view_section_title_presentation', 'bigbluebuttonbn').'</h4>'.
346
-            $OUTPUT->action_icon($bbbsession['presentation']['url'], $icon, null, array(), false).
345
+        return '<h4>' . get_string('view_section_title_presentation', 'bigbluebuttonbn') . '</h4>' .
346
+            $OUTPUT->action_icon($bbbsession['presentation']['url'], $icon, null, array(), false) .
347 347
             $OUTPUT->action_link($bbbsession['presentation']['url'],
348
-                $bbbsession['presentation']['name'], null, $attributes).'<br><br>';
348
+                $bbbsession['presentation']['name'], null, $attributes) . '<br><br>';
349 349
     }
350 350
     return '';
351 351
 }
Please login to merge, or discard this patch.
backup/moodle2/restore_bigbluebuttonbn_stepslib.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -26,7 +26,7 @@  discard block
 block discarded – undo
26 26
 
27 27
 defined('MOODLE_INTERNAL') || die();
28 28
 
29
-require_once($CFG->dirroot.'/mod/bigbluebuttonbn/locallib.php');
29
+require_once($CFG->dirroot . '/mod/bigbluebuttonbn/locallib.php');
30 30
 
31 31
 /**
32 32
  * Define all the restore steps that will be used by the restore_url_activity_task.
@@ -58,7 +58,7 @@  discard block
 block discarded – undo
58 58
      */
59 59
     protected function process_bigbluebuttonbn($data) {
60 60
         global $DB;
61
-        $data = (object) $data;
61
+        $data = (object)$data;
62 62
         $data->course = $this->get_courseid();
63 63
         $data->timemodified = $this->apply_date_offset($data->timemodified);
64 64
         $data->guestlinkid = bigbluebuttonbn_random_password(12);
@@ -76,7 +76,7 @@  discard block
 block discarded – undo
76 76
      */
77 77
     protected function process_bigbluebuttonbn_logs($data) {
78 78
         global $DB;
79
-        $data = (object) $data;
79
+        $data = (object)$data;
80 80
         // Apply modifications.
81 81
         $data->courseid = $this->get_mappingid('course', $data->courseid);
82 82
         $data->bigbluebuttonbnid = $this->get_new_parentid('bigbluebuttonbn');
Please login to merge, or discard this patch.
classes/locallib/bigbluebutton.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -149,7 +149,7 @@  discard block
 block discarded – undo
149 149
         self::view_bbbsession_set($context, $bbbsession);
150 150
 
151 151
         $serverversion = bigbluebuttonbn_get_server_version();
152
-        $bbbsession['serverversion'] = (string) $serverversion;
152
+        $bbbsession['serverversion'] = (string)$serverversion;
153 153
 
154 154
         // Operation URLs.
155 155
         $bbbsession['bigbluebuttonbnURL'] = $CFG->wwwroot . '/mod/bigbluebuttonbn/view.php?id=' . $cm->id;
@@ -187,12 +187,12 @@  discard block
 block discarded – undo
187 187
         $bbbsession['importrecordings'] = ($bbbsession['managerecordings']);
188 188
         $bbbsession['modPW'] = $bbbsession['bigbluebuttonbn']->moderatorpass;
189 189
         $bbbsession['viewerPW'] = $bbbsession['bigbluebuttonbn']->viewerpass;
190
-        $bbbsession['meetingid'] = $bbbsession['bigbluebuttonbn']->meetingid.'-'.$bbbsession['course']->id.'-'.
190
+        $bbbsession['meetingid'] = $bbbsession['bigbluebuttonbn']->meetingid . '-' . $bbbsession['course']->id . '-' .
191 191
             $bbbsession['bigbluebuttonbn']->id;
192 192
         $bbbsession['meetingname'] = $bbbsession['bigbluebuttonbn']->name;
193 193
         $bbbsession['meetingdescription'] = $bbbsession['bigbluebuttonbn']->intro;
194
-        $bbbsession['userlimit'] = intval((int) config::get('userlimit_default'));
195
-        if ((boolean) config::get('userlimit_editable')) {
194
+        $bbbsession['userlimit'] = intval((int)config::get('userlimit_default'));
195
+        if ((boolean)config::get('userlimit_editable')) {
196 196
             $bbbsession['userlimit'] = intval($bbbsession['bigbluebuttonbn']->userlimit);
197 197
         }
198 198
         $bbbsession['voicebridge'] = $bbbsession['bigbluebuttonbn']->voicebridge;
@@ -216,10 +216,10 @@  discard block
 block discarded – undo
216 216
         if ($bbbsession['bigbluebuttonbn']->record) {
217 217
             // Check if is enable record all from start.
218 218
             if ($bbbsession['recordallfromstart']) {
219
-                $bbbsession['welcome'] .= '<br><br>'.get_string('bbbrecordallfromstartwarning',
219
+                $bbbsession['welcome'] .= '<br><br>' . get_string('bbbrecordallfromstartwarning',
220 220
                         'bigbluebuttonbn');
221 221
             } else {
222
-                $bbbsession['welcome'] .= '<br><br>'.get_string('bbbrecordwarning', 'bigbluebuttonbn');
222
+                $bbbsession['welcome'] .= '<br><br>' . get_string('bbbrecordwarning', 'bigbluebuttonbn');
223 223
             }
224 224
         }
225 225
         $bbbsession['openingtime'] = $bbbsession['bigbluebuttonbn']->openingtime;
@@ -244,7 +244,7 @@  discard block
 block discarded – undo
244 244
         $bbbsession['originServerName'] = $parsedurl['host'];
245 245
         $bbbsession['originServerUrl'] = $CFG->wwwroot;
246 246
         $bbbsession['originServerCommonName'] = '';
247
-        $bbbsession['originTag'] = 'moodle-mod_bigbluebuttonbn ('.get_config('mod_bigbluebuttonbn', 'version').')';
247
+        $bbbsession['originTag'] = 'moodle-mod_bigbluebuttonbn (' . get_config('mod_bigbluebuttonbn', 'version') . ')';
248 248
         $bbbsession['bnserver'] = bigbluebuttonbn_is_bn_server();
249 249
         // Setting for clienttype, assign flash if not enabled, or default if not editable.
250 250
         $bbbsession['clienttype'] = config::get('clienttype_default');
Please login to merge, or discard this patch.
mod_form.php 2 patches
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -26,8 +26,8 @@  discard block
 block discarded – undo
26 26
 
27 27
 defined('MOODLE_INTERNAL') || die();
28 28
 
29
-require_once(dirname(__FILE__).'/locallib.php');
30
-require_once($CFG->dirroot.'/course/moodleform_mod.php');
29
+require_once(dirname(__FILE__) . '/locallib.php');
30
+require_once($CFG->dirroot . '/course/moodleform_mod.php');
31 31
 
32 32
 /**
33 33
  * Moodle class for mod_form.
@@ -50,7 +50,7 @@  discard block
 block discarded – undo
50 50
         $serverversion = bigbluebuttonbn_get_server_version();
51 51
         if (is_null($serverversion)) {
52 52
             print_error('general_error_unable_connect', 'bigbluebuttonbn',
53
-                $CFG->wwwroot.'/admin/settings.php?section=modsettingbigbluebuttonbn');
53
+                $CFG->wwwroot . '/admin/settings.php?section=modsettingbigbluebuttonbn');
54 54
             return;
55 55
         }
56 56
         $bigbluebuttonbn = null;
@@ -80,7 +80,7 @@  discard block
 block discarded – undo
80 80
             // If still none is allowed, fail and return.
81 81
             if (empty($jsvars['instanceTypeProfiles'])) {
82 82
                 print_error('general_error_not_allowed_to_create_instances)', 'bigbluebuttonbn',
83
-                    $CFG->wwwroot.'/admin/settings.php?section=modsettingbigbluebuttonbn');
83
+                    $CFG->wwwroot . '/admin/settings.php?section=modsettingbigbluebuttonbn');
84 84
                 return;
85 85
             }
86 86
         }
@@ -140,7 +140,7 @@  discard block
 block discarded – undo
140 140
                 );
141 141
                 $defaultvalues['presentation'] = $draftitemid;
142 142
             } catch (Exception $e) {
143
-                debugging('Presentation could not be loaded: '.$e->getMessage(), DEBUG_DEVELOPER);
143
+                debugging('Presentation could not be loaded: ' . $e->getMessage(), DEBUG_DEVELOPER);
144 144
                 return;
145 145
             }
146 146
             // Completion: tick if completion attendance settings is set to 1 or more.
@@ -693,7 +693,7 @@  discard block
 block discarded – undo
693 693
             return;
694 694
         }
695 695
         $mform->addElement($type, $name, get_string($descriptionkey, 'bigbluebuttonbn'), $options);
696
-        if (get_string_manager()->string_exists($descriptionkey.'_help', 'bigbluebuttonbn')) {
696
+        if (get_string_manager()->string_exists($descriptionkey . '_help', 'bigbluebuttonbn')) {
697 697
             $mform->addHelpButton($name, $descriptionkey, 'bigbluebuttonbn');
698 698
         }
699 699
         if (!empty($rule)) {
Please login to merge, or discard this patch.
Indentation   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -313,8 +313,8 @@  discard block
 block discarded – undo
313 313
             $this->bigbluebuttonbn_mform_add_element($mform, $field['type'], $field['name'], $field['data_type'],
314 314
                 $field['description_key'], 0, ['maxlength' => 4, 'size' => 6],
315 315
                 ['message' => get_string('mod_form_field_voicebridge_format_error', 'bigbluebuttonbn'),
316
-                 'type' => 'numeric', 'rule' => '####', 'validator' => 'server']
317
-              );
316
+                    'type' => 'numeric', 'rule' => '####', 'validator' => 'server']
317
+                );
318 318
         } else {
319 319
             $this->bigbluebuttonbn_mform_add_element($mform, $field['type'], $field['name'], $field['data_type'],
320 320
                 $field['description_key'], 0, ['maxlength' => 4, 'size' => 6]);
@@ -486,7 +486,7 @@  discard block
 block discarded – undo
486 486
     private function bigbluebuttonbn_mform_add_block_room_recordings(&$mform, $cfg) {
487 487
         $recordingsettings = false;
488 488
         $field = ['type' => 'hidden', 'name' => 'recordings_html', 'data_type' => PARAM_INT,
489
-                  'description_key' => null];
489
+                    'description_key' => null];
490 490
         if ($cfg['recordings_html_editable']) {
491 491
             $field['type'] = 'checkbox';
492 492
             $field['description_key'] = 'mod_form_field_recordings_html';
@@ -495,7 +495,7 @@  discard block
 block discarded – undo
495 495
         $this->bigbluebuttonbn_mform_add_element($mform, $field['type'], $field['name'], $field['data_type'],
496 496
             $field['description_key'], $cfg['recordings_html_default']);
497 497
         $field = ['type' => 'hidden', 'name' => 'recordings_deleted', 'data_type' => PARAM_INT,
498
-                  'description_key' => null];
498
+                    'description_key' => null];
499 499
         if ($cfg['recordings_deleted_editable']) {
500 500
             $field['type'] = 'checkbox';
501 501
             $field['description_key'] = 'mod_form_field_recordings_deleted';
@@ -504,7 +504,7 @@  discard block
 block discarded – undo
504 504
         $this->bigbluebuttonbn_mform_add_element($mform, $field['type'], $field['name'], $field['data_type'],
505 505
             $field['description_key'], $cfg['recordings_deleted_default']);
506 506
         $field = ['type' => 'hidden', 'name' => 'recordings_imported', 'data_type' => PARAM_INT,
507
-                  'description_key' => null];
507
+                    'description_key' => null];
508 508
         if ($cfg['importrecordings_enabled'] && $cfg['recordings_imported_editable']) {
509 509
             $field['type'] = 'checkbox';
510 510
             $field['description_key'] = 'mod_form_field_recordings_imported';
@@ -513,7 +513,7 @@  discard block
 block discarded – undo
513 513
         $this->bigbluebuttonbn_mform_add_element($mform, $field['type'], $field['name'], $field['data_type'],
514 514
             $field['description_key'], $cfg['recordings_imported_default']);
515 515
         $field = ['type' => 'hidden', 'name' => 'recordings_preview', 'data_type' => PARAM_INT,
516
-                  'description_key' => null];
516
+                    'description_key' => null];
517 517
         if ($cfg['recordings_preview_editable']) {
518 518
             $field['type'] = 'checkbox';
519 519
             $field['description_key'] = 'mod_form_field_recordings_preview';
@@ -590,7 +590,7 @@  discard block
 block discarded – undo
590 590
         $htmlselectiontype = html_writer::select($participantselection['type_options'],
591 591
             'bigbluebuttonbn_participant_selection_type', $participantselection['type_selected'], array(),
592 592
             array('id' => 'bigbluebuttonbn_participant_selection_type',
593
-                  'onchange' => 'M.mod_bigbluebuttonbn.modform.participantSelectionSet(); return 0;'));
593
+                    'onchange' => 'M.mod_bigbluebuttonbn.modform.participantSelectionSet(); return 0;'));
594 594
         $htmlselectionoptions = html_writer::select($participantselection['options'], 'bigbluebuttonbn_participant_selection',
595 595
             $participantselection['selected'], array(),
596 596
             array('id' => 'bigbluebuttonbn_participant_selection', 'disabled' => 'disabled'));
@@ -598,7 +598,7 @@  discard block
 block discarded – undo
598 598
             'type' => 'button', 'class' => 'btn btn-secondary',
599 599
             'value' => get_string('mod_form_field_participant_list_action_add', 'bigbluebuttonbn'),
600 600
             'onclick' => 'M.mod_bigbluebuttonbn.modform.participantAdd(); return 0;'
601
-          ));
601
+            ));
602 602
         $htmladdparticipant = html_writer::tag('div',
603 603
             $htmlselectiontype . '&nbsp;&nbsp;' . $htmlselectionoptions . '&nbsp;&nbsp;' . $htmlselectioninput, null);
604 604
         $mform->addElement('html', "\n\n");
@@ -641,7 +641,7 @@  discard block
 block discarded – undo
641 641
             $field['data_type'] = PARAM_TEXT;
642 642
             $field['description_key'] = 'mod_form_field_block_clienttype';
643 643
             $choices = array(BIGBLUEBUTTON_CLIENTTYPE_FLASH => get_string('mod_form_block_clienttype_flash', 'bigbluebuttonbn'),
644
-                             BIGBLUEBUTTON_CLIENTTYPE_HTML5 => get_string('mod_form_block_clienttype_html5', 'bigbluebuttonbn'));
644
+                                BIGBLUEBUTTON_CLIENTTYPE_HTML5 => get_string('mod_form_block_clienttype_html5', 'bigbluebuttonbn'));
645 645
             $mform->addElement('header', 'clienttypeselection', get_string('mod_form_block_clienttype', 'bigbluebuttonbn'));
646 646
             $this->bigbluebuttonbn_mform_add_element($mform, $field['type'], $field['name'], $field['data_type'],
647 647
                                     $field['description_key'], $cfg['clienttype_default'], $choices);
Please login to merge, or discard this patch.
bbb_ajax.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -26,9 +26,9 @@  discard block
 block discarded – undo
26 26
 define('READ_ONLY_SESSION', true);
27 27
 define('AJAX_SCRIPT', true);
28 28
 
29
-require(__DIR__.'/../../config.php');
30
-require_once(__DIR__.'/locallib.php');
31
-require_once(__DIR__.'/brokerlib.php');
29
+require(__DIR__ . '/../../config.php');
30
+require_once(__DIR__ . '/locallib.php');
31
+require_once(__DIR__ . '/brokerlib.php');
32 32
 
33 33
 global $PAGE, $USER, $CFG, $SESSION, $DB;
34 34
 
@@ -46,13 +46,13 @@  discard block
 block discarded – undo
46 46
 require_sesskey();
47 47
 
48 48
 if (empty($params['action'])) {
49
-    header('HTTP/1.0 400 Bad Request. Parameter ['.$params['action'].'] was not included');
49
+    header('HTTP/1.0 400 Bad Request. Parameter [' . $params['action'] . '] was not included');
50 50
     return;
51 51
 }
52 52
 
53 53
 $error = bigbluebuttonbn_broker_validate_parameters($params);
54 54
 if (!empty($error)) {
55
-    header('HTTP/1.0 400 Bad Request. '.$error);
55
+    header('HTTP/1.0 400 Bad Request. ' . $error);
56 56
     return;
57 57
 }
58 58
 
@@ -142,7 +142,7 @@  discard block
 block discarded – undo
142 142
         echo $password;
143 143
         return;
144 144
     }
145
-    header('HTTP/1.0 400 Bad request. The action '. $a . ' doesn\'t exist');
145
+    header('HTTP/1.0 400 Bad request. The action ' . $a . ' doesn\'t exist');
146 146
 } catch (Exception $e) {
147
-    header('HTTP/1.0 500 Internal Server Error. '.$e->getMessage());
147
+    header('HTTP/1.0 500 Internal Server Error. ' . $e->getMessage());
148 148
 }
Please login to merge, or discard this patch.