Completed
Pull Request — master (#339)
by
unknown
02:37
created
view.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -27,9 +27,9 @@  discard block
 block discarded – undo
27 27
 
28 28
 use mod_bigbluebuttonbn\plugin;
29 29
 
30
-require(__DIR__.'/../../config.php');
31
-require_once(__DIR__.'/locallib.php');
32
-require_once(__DIR__.'/viewlib.php');
30
+require(__DIR__ . '/../../config.php');
31
+require_once(__DIR__ . '/locallib.php');
32
+require_once(__DIR__ . '/viewlib.php');
33 33
 
34 34
 $id = required_param('id', PARAM_INT);
35 35
 $bn = optional_param('bn', 0, PARAM_INT);
@@ -58,7 +58,7 @@  discard block
 block discarded – undo
58 58
 mod_bigbluebuttonbn\locallib\bigbluebutton::view_bbbsession_set($PAGE->context, $bbbsession);
59 59
 
60 60
 // Validates if the BigBlueButton server is working.
61
-$serverversion = bigbluebuttonbn_get_server_version();  // In locallib.
61
+$serverversion = bigbluebuttonbn_get_server_version(); // In locallib.
62 62
 if ($serverversion === null) {
63 63
     $errmsg = 'view_error_unable_join_student';
64 64
     $errurl = '/course/view.php';
@@ -72,7 +72,7 @@  discard block
 block discarded – undo
72 72
     }
73 73
     print_error($errmsg, plugin::COMPONENT, new moodle_url($errurl, $errurlparams));
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);
@@ -116,7 +116,7 @@  discard block
 block discarded – undo
116 116
 echo $OUTPUT->footer();
117 117
 
118 118
 // Shows version as a comment.
119
-echo '<!-- '.$bbbsession['originTag'].' -->'."\n";
119
+echo '<!-- ' . $bbbsession['originTag'] . ' -->' . "\n";
120 120
 
121 121
 // Initialize session variable used across views.
122 122
 $SESSION->bigbluebuttonbn_bbbsession = $bbbsession;
123 123
\ No newline at end of file
Please login to merge, or discard this patch.
classes/locallib/mobileview.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -113,7 +113,7 @@
 block discarded – undo
113 113
             $data['welcome'] .= '<br><br>';
114 114
             $data['welcome'] .= str_replace(
115 115
                 '%duration%',
116
-                (string) $durationtime,
116
+                (string)$durationtime,
117 117
                 get_string('bbbdurationwarning', 'bigbluebuttonbn')
118 118
             );
119 119
         }
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.
bbb_ajax.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -25,9 +25,9 @@  discard block
 block discarded – undo
25 25
 
26 26
 define('AJAX_SCRIPT', true);
27 27
 
28
-require(__DIR__.'/../../config.php');
29
-require_once(__DIR__.'/locallib.php');
30
-require_once(__DIR__.'/brokerlib.php');
28
+require(__DIR__ . '/../../config.php');
29
+require_once(__DIR__ . '/locallib.php');
30
+require_once(__DIR__ . '/brokerlib.php');
31 31
 
32 32
 global $PAGE, $USER, $CFG, $SESSION, $DB;
33 33
 
@@ -44,13 +44,13 @@  discard block
 block discarded – undo
44 44
 require_sesskey();
45 45
 
46 46
 if (empty($params['action'])) {
47
-    header('HTTP/1.0 400 Bad Request. Parameter ['.$params['action'].'] was not included');
47
+    header('HTTP/1.0 400 Bad Request. Parameter [' . $params['action'] . '] was not included');
48 48
     return;
49 49
 }
50 50
 
51 51
 $error = bigbluebuttonbn_broker_validate_parameters($params);
52 52
 if (!empty($error)) {
53
-    header('HTTP/1.0 400 Bad Request. '.$error);
53
+    header('HTTP/1.0 400 Bad Request. ' . $error);
54 54
     return;
55 55
 }
56 56
 
@@ -135,7 +135,7 @@  discard block
 block discarded – undo
135 135
         echo $completionvalidate;
136 136
         return;
137 137
     }
138
-    header('HTTP/1.0 400 Bad request. The action '. $a . ' doesn\'t exist');
138
+    header('HTTP/1.0 400 Bad request. The action ' . $a . ' doesn\'t exist');
139 139
 } catch (Exception $e) {
140
-    header('HTTP/1.0 500 Internal Server Error. '.$e->getMessage());
140
+    header('HTTP/1.0 500 Internal Server Error. ' . $e->getMessage());
141 141
 }
Please login to merge, or discard this patch.
viewlib.php 1 patch
Spacing   +14 added lines, -14 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
 }
@@ -138,7 +138,7 @@  discard block
 block discarded – undo
138 138
         $recordingsdisabled = get_string('view_message_recordings_disabled', 'bigbluebuttonbn');
139 139
         $output .= bigbluebuttonbn_render_warning($recordingsdisabled, 'danger');
140 140
     }
141
-    echo $output.html_writer::empty_tag('br').html_writer::empty_tag('br').html_writer::empty_tag('br');
141
+    echo $output . html_writer::empty_tag('br') . html_writer::empty_tag('br') . html_writer::empty_tag('br');
142 142
     $PAGE->requires->yui_module('moodle-mod_bigbluebuttonbn-broker', 'M.mod_bigbluebuttonbn.broker.init', array($jsvars));
143 143
 }
144 144
 
@@ -207,12 +207,12 @@  discard block
 block discarded – undo
207 207
     // JavaScript variables for room.
208 208
     $openingtime = '';
209 209
     if ($bbbsession['openingtime']) {
210
-        $openingtime = get_string('mod_form_field_openingtime', 'bigbluebuttonbn').': '.
210
+        $openingtime = get_string('mod_form_field_openingtime', 'bigbluebuttonbn') . ': ' .
211 211
             userdate($bbbsession['openingtime']);
212 212
     }
213 213
     $closingtime = '';
214 214
     if ($bbbsession['closingtime']) {
215
-        $closingtime = get_string('mod_form_field_closingtime', 'bigbluebuttonbn').': '.
215
+        $closingtime = get_string('mod_form_field_closingtime', 'bigbluebuttonbn') . ': ' .
216 216
             userdate($bbbsession['closingtime']);
217 217
     }
218 218
     $jsvars += array(
@@ -229,7 +229,7 @@  discard block
 block discarded – undo
229 229
     $output .= $OUTPUT->box_end();
230 230
     // Action button box.
231 231
     $output .= $OUTPUT->box_start('generalbox boxaligncenter', 'bigbluebuttonbn_view_action_button_box');
232
-    $output .= '<br><br><span id="join_button"></span>&nbsp;<span id="end_button"></span>'."\n";
232
+    $output .= '<br><br><span id="join_button"></span>&nbsp;<span id="end_button"></span>' . "\n";
233 233
     $output .= $OUTPUT->box_end();
234 234
     if ($activity == 'ended') {
235 235
         $output .= bigbluebuttonbn_view_ended($bbbsession);
@@ -263,11 +263,11 @@  discard block
 block discarded – undo
263 263
     if ($bbbsession['bigbluebuttonbn']->recordings_html) {
264 264
         $recordings_html = '';
265 265
         //if opencast recoding config is set and checks if opencast is available for the current course
266
-        if ((boolean) \mod_bigbluebuttonbn\locallib\config::get('oc_recording') 
266
+        if ((boolean)\mod_bigbluebuttonbn\locallib\config::get('oc_recording') 
267 267
             && bigbluebuttonbn_check_opencast($bbbsession['course']->id)) {
268 268
             $recordings_html .= bigbluebuttonbn_output_recording_opencast($bbbsession['course']->id);
269 269
         }
270
-        $recordings_html .= bigbluebuttonbn_output_recording_table($bbbsession, $recordings)."\n";
270
+        $recordings_html .= bigbluebuttonbn_output_recording_table($bbbsession, $recordings) . "\n";
271 271
         // Render a plain html table.
272 272
         return $recordings_html;
273 273
     }
@@ -305,8 +305,8 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 }
Please login to merge, or discard this patch.