Completed
Pull Request — master (#141)
by Jesus
01:53
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
     $jsvars += array(
@@ -228,7 +228,7 @@  discard block
 block discarded – undo
228 228
     $output .= $OUTPUT->box_end();
229 229
     // Action button box.
230 230
     $output .= $OUTPUT->box_start('generalbox boxaligncenter', 'bigbluebuttonbn_view_action_button_box');
231
-    $output .= '<br><br><span id="join_button"></span>&nbsp;<span id="end_button"></span>'."\n";
231
+    $output .= '<br><br><span id="join_button"></span>&nbsp;<span id="end_button"></span>' . "\n";
232 232
     $output .= $OUTPUT->box_end();
233 233
     if ($activity == 'ended') {
234 234
         $output .= bigbluebuttonbn_view_ended($bbbsession);
@@ -281,7 +281,7 @@  discard block
 block discarded – undo
281 281
     // If there are meetings with recordings load the data to the table.
282 282
     if ($bbbsession['bigbluebuttonbn']->recordings_html) {
283 283
         // Render a plain html table.
284
-        return bigbluebuttonbn_output_recording_table($bbbsession, $recordings)."\n";
284
+        return bigbluebuttonbn_output_recording_table($bbbsession, $recordings) . "\n";
285 285
     }
286 286
     // JavaScript variables for recordings with YUI.
287 287
     $jsvars += array(
@@ -318,8 +318,8 @@  discard block
 block discarded – undo
318 318
         array('type' => 'button',
319 319
             'value' => get_string('view_recording_button_import', 'bigbluebuttonbn'),
320 320
             'class' => 'btn btn-secondary',
321
-            'onclick' => 'window.location=\''.$CFG->wwwroot.'/mod/bigbluebuttonbn/import_view.php?bn='.
322
-                $bbbsession['bigbluebuttonbn']->id.'\''));
321
+            'onclick' => 'window.location=\'' . $CFG->wwwroot . '/mod/bigbluebuttonbn/import_view.php?bn=' .
322
+                $bbbsession['bigbluebuttonbn']->id . '\''));
323 323
     $output  = html_writer::empty_tag('br');
324 324
     $output .= html_writer::tag('span', $button, array('id' => 'import_recording_links_button'));
325 325
     $output .= html_writer::tag('span', '', array('id' => 'import_recording_links_table'));
@@ -338,10 +338,10 @@  discard block
 block discarded – undo
338 338
     if (!is_null($bbbsession['presentation']['url'])) {
339 339
         $attributes = array('title' => $bbbsession['presentation']['name']);
340 340
         $icon = new pix_icon($bbbsession['presentation']['icon'], $bbbsession['presentation']['mimetype_description']);
341
-        return '<h4>'.get_string('view_section_title_presentation', 'bigbluebuttonbn').'</h4>'.
342
-            $OUTPUT->action_icon($bbbsession['presentation']['url'], $icon, null, array(), false).
341
+        return '<h4>' . get_string('view_section_title_presentation', 'bigbluebuttonbn') . '</h4>' .
342
+            $OUTPUT->action_icon($bbbsession['presentation']['url'], $icon, null, array(), false) .
343 343
             $OUTPUT->action_link($bbbsession['presentation']['url'],
344
-                $bbbsession['presentation']['name'], null, $attributes).'<br><br>';
344
+                $bbbsession['presentation']['name'], null, $attributes) . '<br><br>';
345 345
     }
346 346
     return '';
347 347
 }
Please login to merge, or discard this patch.
index.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -28,8 +28,8 @@
 block discarded – undo
28 28
 use mod_bigbluebuttonbn\output\renderer;
29 29
 use mod_bigbluebuttonbn\output\index;
30 30
 
31
-require(__DIR__.'/../../config.php');
32
-require_once(__DIR__.'/locallib.php');
31
+require(__DIR__ . '/../../config.php');
32
+require_once(__DIR__ . '/locallib.php');
33 33
 
34 34
 $id = required_param('id', PARAM_INT);
35 35
 $a = optional_param('a', 0, PARAM_INT);
Please login to merge, or discard this patch.
brokerlib.php 1 patch
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -208,7 +208,7 @@  discard block
 block discarded – undo
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
     }
@@ -535,8 +535,8 @@  discard block
 block discarded – undo
535 535
         $decodedparameters = \Firebase\JWT\JWT::decode($params['signed_parameters'],
536 536
             \mod_bigbluebuttonbn\locallib\config::get('shared_secret'), array('HS256'));
537 537
     } catch (Exception $e) {
538
-        $error = 'Caught exception: '.$e->getMessage();
539
-        header('HTTP/1.0 400 Bad Request. '.$error);
538
+        $error = 'Caught exception: ' . $e->getMessage();
539
+        header('HTTP/1.0 400 Bad Request. ' . $error);
540 540
         return;
541 541
     }
542 542
     // Validate that the bigbluebuttonbn activity corresponds to the meeting_id received.
@@ -561,12 +561,12 @@  discard block
 block discarded – undo
561 561
             bigbluebuttonbn_send_notification_recording_ready($bigbluebuttonbn);
562 562
         }
563 563
         $overrides = array('meetingid' => $decodedparameters->meeting_id);
564
-        $meta = '{"recordid":'.$decodedparameters->record_id.'}';
564
+        $meta = '{"recordid":' . $decodedparameters->record_id . '}';
565 565
         bigbluebuttonbn_log($bigbluebuttonbn, BIGBLUEBUTTON_LOG_EVENT_CALLBACK, $overrides, $meta);
566 566
         header('HTTP/1.0 202 Accepted');
567 567
     } catch (Exception $e) {
568
-        $error = 'Caught exception: '.$e->getMessage();
569
-        header('HTTP/1.0 503 Service Unavailable. '.$error);
568
+        $error = 'Caught exception: ' . $e->getMessage();
569
+        header('HTTP/1.0 503 Service Unavailable. ' . $error);
570 570
     }
571 571
 }
572 572
 
@@ -587,13 +587,13 @@  discard block
 block discarded – undo
587 587
     $importrecordings = $SESSION->bigbluebuttonbn_importrecordings;
588 588
     if (!isset($importrecordings[$params['id']])) {
589 589
         $error = "Recording {$params['id']} could not be found. It can not be imported";
590
-        header('HTTP/1.0 404 Not found. '.$error);
590
+        header('HTTP/1.0 404 Not found. ' . $error);
591 591
         return;
592 592
     }
593 593
     $callbackresponse = array('status' => true);
594 594
     $importrecordings[$params['id']]['imported'] = true;
595 595
     $overrides = array('meetingid' => $importrecordings[$params['id']]['meetingID']);
596
-    $meta = '{"recording":'.json_encode($importrecordings[$params['id']]).'}';
596
+    $meta = '{"recording":' . json_encode($importrecordings[$params['id']]) . '}';
597 597
     bigbluebuttonbn_log($bbbsession['bigbluebuttonbn'], BIGBLUEBUTTONBN_LOG_EVENT_IMPORT, $overrides, $meta);
598 598
     // Moodle event logger: Create an event for recording imported.
599 599
     if (isset($bbbsession['bigbluebutton']) && isset($bbbsession['cm'])) {
@@ -618,8 +618,8 @@  discard block
 block discarded – undo
618 618
         $decodedparameters = \Firebase\JWT\JWT::decode($params['signed_parameters'],
619 619
             \mod_bigbluebuttonbn\locallib\config::get('shared_secret'), array('HS256'));
620 620
     } catch (Exception $e) {
621
-        $error = 'Caught exception: '.$e->getMessage();
622
-        header('HTTP/1.0 400 Bad Request. '.$error);
621
+        $error = 'Caught exception: ' . $e->getMessage();
622
+        header('HTTP/1.0 400 Bad Request. ' . $error);
623 623
         return;
624 624
     }
625 625
     // Validate that the bigbluebuttonbn activity corresponds to the meeting_id received.
@@ -660,7 +660,7 @@  discard block
 block discarded – undo
660 660
     }
661 661
     $action = strtolower($params['action']);
662 662
     if (!array_key_exists($action, $requiredparams)) {
663
-        return 'Action '.$params['action'].' can not be performed.';
663
+        return 'Action ' . $params['action'] . ' can not be performed.';
664 664
     }
665 665
     return bigbluebuttonbn_broker_validate_parameters_message($params, $requiredparams[$action]);
666 666
 }
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
@@ -23,9 +23,9 @@  discard block
 block discarded – undo
23 23
  * @author    Jesus Federico  (jesus [at] blindsidenetworks [dt] com)
24 24
  */
25 25
 
26
-require(__DIR__.'/../../config.php');
27
-require_once(__DIR__.'/locallib.php');
28
-require_once(__DIR__.'/brokerlib.php');
26
+require(__DIR__ . '/../../config.php');
27
+require_once(__DIR__ . '/locallib.php');
28
+require_once(__DIR__ . '/brokerlib.php');
29 29
 
30 30
 global $PAGE, $USER, $CFG, $SESSION, $DB;
31 31
 
@@ -41,13 +41,13 @@  discard block
 block discarded – undo
41 41
 require_login(null, true);
42 42
 
43 43
 if (empty($params['action'])) {
44
-    header('HTTP/1.0 400 Bad Request. Parameter ['.$params['action'].'] was not included');
44
+    header('HTTP/1.0 400 Bad Request. Parameter [' . $params['action'] . '] was not included');
45 45
     return;
46 46
 }
47 47
 
48 48
 $error = bigbluebuttonbn_broker_validate_parameters($params);
49 49
 if (!empty($error)) {
50
-    header('HTTP/1.0 400 Bad Request. '.$error);
50
+    header('HTTP/1.0 400 Bad Request. ' . $error);
51 51
     return;
52 52
 }
53 53
 
@@ -121,7 +121,7 @@  discard block
 block discarded – undo
121 121
         echo bigbluebuttonbn_broker_recording_import($bbbsession, $params);
122 122
         return;
123 123
     }
124
-    header('HTTP/1.0 400 Bad request. The action '. $a . ' doesn\'t exist');
124
+    header('HTTP/1.0 400 Bad request. The action ' . $a . ' doesn\'t exist');
125 125
 } catch (Exception $e) {
126
-    header('HTTP/1.0 500 Internal Server Error. '.$e->getMessage());
126
+    header('HTTP/1.0 500 Internal Server Error. ' . $e->getMessage());
127 127
 }
Please login to merge, or discard this patch.
bbb_broker.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -24,9 +24,9 @@  discard block
 block discarded – undo
24 24
  * @author    Darko Miletic  (darko.miletic [at] gmail [dt] com)
25 25
  */
26 26
 
27
-require(__DIR__.'/../../config.php');
28
-require_once(__DIR__.'/locallib.php');
29
-require_once(__DIR__.'/brokerlib.php');
27
+require(__DIR__ . '/../../config.php');
28
+require_once(__DIR__ . '/locallib.php');
29
+require_once(__DIR__ . '/brokerlib.php');
30 30
 
31 31
 use \Firebase\JWT\JWT;
32 32
 
@@ -42,7 +42,7 @@  discard block
 block discarded – undo
42 42
 $params['meta'] = optional_param('meta', '', PARAM_TEXT);
43 43
 
44 44
 if (empty($params['action'])) {
45
-    header('HTTP/1.0 400 Bad Request. Parameter ['.$params['action'].'] was not included');
45
+    header('HTTP/1.0 400 Bad Request. Parameter [' . $params['action'] . '] was not included');
46 46
     return;
47 47
 }
48 48
 
@@ -60,7 +60,7 @@  discard block
 block discarded – undo
60 60
 
61 61
 $error = bigbluebuttonbn_broker_validate_parameters($params);
62 62
 if (!empty($error)) {
63
-    header('HTTP/1.0 400 Bad Request. '.$error);
63
+    header('HTTP/1.0 400 Bad Request. ' . $error);
64 64
     return;
65 65
 }
66 66
 
@@ -79,7 +79,7 @@  discard block
 block discarded – undo
79 79
         bigbluebuttonbn_broker_live_session_events($params, $bigbluebuttonbn);
80 80
         return;
81 81
     }
82
-    header('HTTP/1.0 400 Bad request. The action '. $a . ' doesn\'t exist');
82
+    header('HTTP/1.0 400 Bad request. The action ' . $a . ' doesn\'t exist');
83 83
 } catch (Exception $e) {
84
-    header('HTTP/1.0 500 Internal Server Error. '.$e->getMessage());
84
+    header('HTTP/1.0 500 Internal Server Error. ' . $e->getMessage());
85 85
 }
Please login to merge, or discard this patch.