Completed
Pull Request — master (#355)
by
unknown
02:20
created
recordings.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);
@@ -114,7 +114,7 @@  discard block
 block discarded – undo
114 114
 //echo $OUTPUT->footer();
115 115
 
116 116
 // Shows version as a comment.
117
-echo '<!-- '.$bbbsession['originTag'].' -->'."\n";
117
+echo '<!-- ' . $bbbsession['originTag'] . ' -->' . "\n";
118 118
 
119 119
 // Initialize session variable used across views.
120 120
 $SESSION->bigbluebuttonbn_bbbsession = $bbbsession;
121 121
\ No newline at end of file
Please login to merge, or discard this patch.
classes/locallib/bigbluebutton.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -76,7 +76,7 @@  discard block
 block discarded – undo
76 76
      * @return string
77 77
      */
78 78
     public static function sanitized_url($secondary = false) {
79
-        $pfx=$secondary? 'secondary_' : '';
79
+        $pfx = $secondary ? 'secondary_' : '';
80 80
         $serverurl = trim(config::get($pfx . 'server_url'));
81 81
         if (empty($serverurl)) {
82 82
             $serverurl = trim(config::get('server_url'));
@@ -96,7 +96,7 @@  discard block
 block discarded – undo
96 96
      * @return string
97 97
      */
98 98
     public static function sanitized_secret($secondary = false) {
99
-        $pfx=$secondary? 'secondary_' : '';
99
+        $pfx = $secondary ? 'secondary_' : '';
100 100
         $sharedsecret = trim(config::get($pfx . 'shared_secret'));
101 101
         if (empty($sharedsecret)) {
102 102
             $sharedsecret = trim(config::get('shared_secret'));
@@ -110,7 +110,7 @@  discard block
 block discarded – undo
110 110
      * @return string
111 111
      */
112 112
     public static function root($secondary = false) {
113
-        $pfx=$secondary? 'secondary_' : '';
113
+        $pfx = $secondary ? 'secondary_' : '';
114 114
         $pserverurl = parse_url(trim(config::get($pfx . 'server_url')));
115 115
         $pserverurlport = "";
116 116
         if (isset($pserverurl['port'])) {
@@ -167,7 +167,7 @@  discard block
 block discarded – undo
167 167
         self::view_bbbsession_set($context, $bbbsession);
168 168
 
169 169
         $serverversion = bigbluebuttonbn_get_server_version();
170
-        $bbbsession['serverversion'] = (string) $serverversion;
170
+        $bbbsession['serverversion'] = (string)$serverversion;
171 171
 
172 172
         // Operation URLs.
173 173
         $bbbsession['bigbluebuttonbnURL'] = $CFG->wwwroot . '/mod/bigbluebuttonbn/view.php?id=' . $cm->id;
@@ -205,12 +205,12 @@  discard block
 block discarded – undo
205 205
         $bbbsession['importrecordings'] = ($bbbsession['managerecordings']);
206 206
         $bbbsession['modPW'] = $bbbsession['bigbluebuttonbn']->moderatorpass;
207 207
         $bbbsession['viewerPW'] = $bbbsession['bigbluebuttonbn']->viewerpass;
208
-        $bbbsession['meetingid'] = $bbbsession['bigbluebuttonbn']->meetingid.'-'.$bbbsession['course']->id.'-'.
208
+        $bbbsession['meetingid'] = $bbbsession['bigbluebuttonbn']->meetingid . '-' . $bbbsession['course']->id . '-' .
209 209
             $bbbsession['bigbluebuttonbn']->id;
210 210
         $bbbsession['meetingname'] = $bbbsession['bigbluebuttonbn']->name;
211 211
         $bbbsession['meetingdescription'] = $bbbsession['bigbluebuttonbn']->intro;
212
-        $bbbsession['userlimit'] = intval((int) config::get('userlimit_default'));
213
-        if ((boolean) config::get('userlimit_editable')) {
212
+        $bbbsession['userlimit'] = intval((int)config::get('userlimit_default'));
213
+        if ((boolean)config::get('userlimit_editable')) {
214 214
             $bbbsession['userlimit'] = intval($bbbsession['bigbluebuttonbn']->userlimit);
215 215
         }
216 216
         $bbbsession['voicebridge'] = $bbbsession['bigbluebuttonbn']->voicebridge;
@@ -234,10 +234,10 @@  discard block
 block discarded – undo
234 234
         if ($bbbsession['bigbluebuttonbn']->record) {
235 235
             // Check if is enable record all from start.
236 236
             if ($bbbsession['recordallfromstart']) {
237
-                $bbbsession['welcome'] .= '<br><br>'.get_string('bbbrecordallfromstartwarning',
237
+                $bbbsession['welcome'] .= '<br><br>' . get_string('bbbrecordallfromstartwarning',
238 238
                         'bigbluebuttonbn');
239 239
             } else {
240
-                $bbbsession['welcome'] .= '<br><br>'.get_string('bbbrecordwarning', 'bigbluebuttonbn');
240
+                $bbbsession['welcome'] .= '<br><br>' . get_string('bbbrecordwarning', 'bigbluebuttonbn');
241 241
             }
242 242
         }
243 243
         $bbbsession['openingtime'] = $bbbsession['bigbluebuttonbn']->openingtime;
@@ -262,7 +262,7 @@  discard block
 block discarded – undo
262 262
         $bbbsession['originServerName'] = $parsedurl['host'];
263 263
         $bbbsession['originServerUrl'] = $CFG->wwwroot;
264 264
         $bbbsession['originServerCommonName'] = '';
265
-        $bbbsession['originTag'] = 'moodle-mod_bigbluebuttonbn ('.get_config('mod_bigbluebuttonbn', 'version').')';
265
+        $bbbsession['originTag'] = 'moodle-mod_bigbluebuttonbn (' . get_config('mod_bigbluebuttonbn', 'version') . ')';
266 266
         $bbbsession['bnserver'] = bigbluebuttonbn_is_bn_server();
267 267
         // Setting for clienttype, assign flash if not enabled, or default if not editable.
268 268
         $bbbsession['clienttype'] = config::get('clienttype_default');
Please login to merge, or discard this patch.
classes/locallib/config.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -55,8 +55,8 @@  discard block
 block discarded – undo
55 55
      */
56 56
     public static function defaultvalues() {
57 57
         return array(
58
-            'server_url' => (string) BIGBLUEBUTTONBN_DEFAULT_SERVER_URL,
59
-            'shared_secret' => (string) BIGBLUEBUTTONBN_DEFAULT_SHARED_SECRET,
58
+            'server_url' => (string)BIGBLUEBUTTONBN_DEFAULT_SERVER_URL,
59
+            'shared_secret' => (string)BIGBLUEBUTTONBN_DEFAULT_SHARED_SECRET,
60 60
             'secondary_server_url' => '',
61 61
             'secondary_shared_secret' => '',
62 62
             'voicebridge_editable' => false,
@@ -152,8 +152,8 @@  discard block
 block discarded – undo
152 152
         if (isset($CFG->bigbluebuttonbn[$setting])) {
153 153
             return (string)$CFG->bigbluebuttonbn[$setting];
154 154
         }
155
-        if (isset($CFG->{'bigbluebuttonbn_'.$setting})) {
156
-            return (string)$CFG->{'bigbluebuttonbn_'.$setting};
155
+        if (isset($CFG->{'bigbluebuttonbn_' . $setting})) {
156
+            return (string)$CFG->{'bigbluebuttonbn_' . $setting};
157 157
         }
158 158
         return self::defaultvalue($setting);
159 159
     }
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
 }
@@ -146,7 +146,7 @@  discard block
 block discarded – undo
146 146
         $recordingsdisabled = get_string('view_message_recordings_disabled', 'bigbluebuttonbn');
147 147
         $output .= bigbluebuttonbn_render_warning($recordingsdisabled, 'danger');
148 148
     }
149
-    echo $output.html_writer::empty_tag('br').html_writer::empty_tag('br').html_writer::empty_tag('br');
149
+    echo $output . html_writer::empty_tag('br') . html_writer::empty_tag('br') . html_writer::empty_tag('br');
150 150
     $PAGE->requires->yui_module('moodle-mod_bigbluebuttonbn-broker', 'M.mod_bigbluebuttonbn.broker.init', array($jsvars));
151 151
 }
152 152
 
@@ -174,7 +174,7 @@  discard block
 block discarded – undo
174 174
     $output  = '';
175 175
 
176 176
     $output .= bigbluebuttonbn_view_render_recording_section($bbbsession, $type, $enabledfeatures, $jsvars);
177
-    echo $output.html_writer::empty_tag('br').html_writer::empty_tag('br').html_writer::empty_tag('br');
177
+    echo $output . html_writer::empty_tag('br') . html_writer::empty_tag('br') . html_writer::empty_tag('br');
178 178
     $PAGE->requires->yui_module('moodle-mod_bigbluebuttonbn-recordings',
179 179
             'M.mod_bigbluebuttonbn.recordings.init', array($jsvars));
180 180
 }
@@ -244,12 +244,12 @@  discard block
 block discarded – undo
244 244
     // JavaScript variables for room.
245 245
     $openingtime = '';
246 246
     if ($bbbsession['openingtime']) {
247
-        $openingtime = get_string('mod_form_field_openingtime', 'bigbluebuttonbn').': '.
247
+        $openingtime = get_string('mod_form_field_openingtime', 'bigbluebuttonbn') . ': ' .
248 248
             userdate($bbbsession['openingtime']);
249 249
     }
250 250
     $closingtime = '';
251 251
     if ($bbbsession['closingtime']) {
252
-        $closingtime = get_string('mod_form_field_closingtime', 'bigbluebuttonbn').': '.
252
+        $closingtime = get_string('mod_form_field_closingtime', 'bigbluebuttonbn') . ': ' .
253 253
             userdate($bbbsession['closingtime']);
254 254
     }
255 255
     $jsvars += array(
@@ -266,7 +266,7 @@  discard block
 block discarded – undo
266 266
     $output .= $OUTPUT->box_end();
267 267
     // Action button box.
268 268
     $output .= $OUTPUT->box_start('generalbox boxaligncenter', 'bigbluebuttonbn_view_action_button_box');
269
-    $output .= '<br><br><span id="join_button"></span>&nbsp;<span id="end_button"></span>'."\n";
269
+    $output .= '<br><br><span id="join_button"></span>&nbsp;<span id="end_button"></span>' . "\n";
270 270
     $output .= $OUTPUT->box_end();
271 271
     if ($activity == 'ended') {
272 272
         $output .= bigbluebuttonbn_view_ended($bbbsession);
@@ -299,7 +299,7 @@  discard block
 block discarded – undo
299 299
     // If there are meetings with recordings load the data to the table.
300 300
     if ($bbbsession['bigbluebuttonbn']->recordings_html) {
301 301
         // Render a plain html table.
302
-        return bigbluebuttonbn_output_recording_table($bbbsession, $recordings)."\n";
302
+        return bigbluebuttonbn_output_recording_table($bbbsession, $recordings) . "\n";
303 303
     }
304 304
     // JavaScript variables for recordings with YUI.
305 305
     $jsvars += array(
@@ -335,8 +335,8 @@  discard block
 block discarded – undo
335 335
         array('type' => 'button',
336 336
             'value' => get_string('view_recording_button_import', 'bigbluebuttonbn'),
337 337
             'class' => 'btn btn-secondary',
338
-            'onclick' => 'window.location=\''.$CFG->wwwroot.'/mod/bigbluebuttonbn/import_view.php?bn='.
339
-                $bbbsession['bigbluebuttonbn']->id.'\''));
338
+            'onclick' => 'window.location=\'' . $CFG->wwwroot . '/mod/bigbluebuttonbn/import_view.php?bn=' .
339
+                $bbbsession['bigbluebuttonbn']->id . '\''));
340 340
     $output  = html_writer::empty_tag('br');
341 341
     $output .= html_writer::tag('span', $button, array('id' => 'import_recording_links_button'));
342 342
     $output .= html_writer::tag('span', '', array('id' => 'import_recording_links_table'));
@@ -355,10 +355,10 @@  discard block
 block discarded – undo
355 355
     if (!is_null($bbbsession['presentation']['url'])) {
356 356
         $attributes = array('title' => $bbbsession['presentation']['name']);
357 357
         $icon = new pix_icon($bbbsession['presentation']['icon'], $bbbsession['presentation']['mimetype_description']);
358
-        return '<h4>'.get_string('view_section_title_presentation', 'bigbluebuttonbn').'</h4>'.
359
-            $OUTPUT->action_icon($bbbsession['presentation']['url'], $icon, null, array(), false).
358
+        return '<h4>' . get_string('view_section_title_presentation', 'bigbluebuttonbn') . '</h4>' .
359
+            $OUTPUT->action_icon($bbbsession['presentation']['url'], $icon, null, array(), false) .
360 360
             $OUTPUT->action_link($bbbsession['presentation']['url'],
361
-                $bbbsession['presentation']['name'], null, $attributes).'<br><br>';
361
+                $bbbsession['presentation']['name'], null, $attributes) . '<br><br>';
362 362
     }
363 363
     return '';
364 364
 }
Please login to merge, or discard this patch.