Completed
Push — master ( e1bd88...b48e3c )
by Jesus
11:06
created
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
             'voicebridge_editable' => false,
61 61
             'importrecordings_enabled' => false,
62 62
             'importrecordings_from_deleted_enabled' => false,
@@ -124,8 +124,8 @@  discard block
 block discarded – undo
124 124
         if (isset($CFG->bigbluebuttonbn[$setting])) {
125 125
             return (string)$CFG->bigbluebuttonbn[$setting];
126 126
         }
127
-        if (isset($CFG->{'bigbluebuttonbn_'.$setting})) {
128
-            return (string)$CFG->{'bigbluebuttonbn_'.$setting};
127
+        if (isset($CFG->{'bigbluebuttonbn_' . $setting})) {
128
+            return (string)$CFG->{'bigbluebuttonbn_' . $setting};
129 129
         }
130 130
         return self::defaultvalue($setting);
131 131
     }
Please login to merge, or discard this patch.
bbb_view.php 1 patch
Spacing   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -23,8 +23,8 @@  discard block
 block discarded – undo
23 23
  * @author    Jesus Federico  (jesus [at] blindsidenetworks [dt] com)
24 24
  */
25 25
 
26
-require_once(dirname(dirname(dirname(__FILE__))).'/config.php');
27
-require_once(dirname(__FILE__).'/locallib.php');
26
+require_once(dirname(dirname(dirname(__FILE__))) . '/config.php');
27
+require_once(dirname(__FILE__) . '/locallib.php');
28 28
 
29 29
 $action = required_param('action', PARAM_TEXT);
30 30
 $id = optional_param('id', 0, PARAM_INT);
@@ -90,7 +90,7 @@  discard block
 block discarded – undo
90 90
         }
91 91
         // If user is not administrator nor moderator (user is steudent) and waiting is required.
92 92
         if (!$bbbsession['administrator'] && !$bbbsession['moderator'] && $bbbsession['wait']) {
93
-            header('Location: '.$bbbsession['logoutURL']);
93
+            header('Location: ' . $bbbsession['logoutURL']);
94 94
             break;
95 95
         }
96 96
         // As the meeting doesn't exist, try to create it.
@@ -104,16 +104,16 @@  discard block
 block discarded – undo
104 104
             // The server is unreachable.
105 105
             if ($bbbsession['administrator']) {
106 106
                 print_error('view_error_unable_join', 'bigbluebuttonbn',
107
-                    $CFG->wwwroot.'/admin/settings.php?section=modsettingbigbluebuttonbn');
107
+                    $CFG->wwwroot . '/admin/settings.php?section=modsettingbigbluebuttonbn');
108 108
                 break;
109 109
             }
110 110
             if ($bbbsession['moderator']) {
111 111
                 print_error('view_error_unable_join_teacher', 'bigbluebuttonbn',
112
-                    $CFG->wwwroot.'/admin/settings.php?section=modsettingbigbluebuttonbn');
112
+                    $CFG->wwwroot . '/admin/settings.php?section=modsettingbigbluebuttonbn');
113 113
                 break;
114 114
             }
115 115
             print_error('view_error_unable_join_student', 'bigbluebuttonbn',
116
-                $CFG->wwwroot.'/admin/settings.php?section=modsettingbigbluebuttonbn');
116
+                $CFG->wwwroot . '/admin/settings.php?section=modsettingbigbluebuttonbn');
117 117
             break;
118 118
         }
119 119
         if ($response['returncode'] == 'FAILED') {
@@ -134,7 +134,7 @@  discard block
 block discarded – undo
134 134
         bigbluebuttonbn_event_log(\mod_bigbluebuttonbn\event\events::$events['meeting_create'], $bigbluebuttonbn);
135 135
         // Internal logger: Insert a record with the meeting created.
136 136
         $overrides = array('meetingid' => $bbbsession['meetingid']);
137
-        $meta = '{"record":'.($bbbsession['record'] ? 'true' : 'false').'}';
137
+        $meta = '{"record":' . ($bbbsession['record'] ? 'true' : 'false') . '}';
138 138
         bigbluebuttonbn_log($bbbsession['bigbluebuttonbn'], BIGBLUEBUTTONBN_LOG_EVENT_CREATE, $overrides, $meta);
139 139
         // Since the meeting is already running, we just join the session.
140 140
         bigbluebutton_bbb_view_join_meeting($bbbsession, $bigbluebuttonbn);
@@ -145,7 +145,7 @@  discard block
 block discarded – undo
145 145
         bigbluebuttonbn_event_log(\mod_bigbluebuttonbn\event\events::$events['recording_play'], $bigbluebuttonbn,
146 146
             ['other' => $rid]);
147 147
         // Execute the redirect.
148
-        header('Location: '.urldecode($href));
148
+        header('Location: ' . urldecode($href));
149 149
         break;
150 150
     default:
151 151
         bigbluebutton_bbb_view_close_window();
@@ -230,7 +230,7 @@  discard block
 block discarded – undo
230 230
         $data['welcome'] .= '<br><br>';
231 231
         $data['welcome'] .= str_replace(
232 232
             '%duration%',
233
-            (string) $durationtime,
233
+            (string)$durationtime,
234 234
             get_string('bbbdurationwarning', 'bigbluebuttonbn')
235 235
           );
236 236
     }
@@ -317,7 +317,7 @@  discard block
 block discarded – undo
317 317
     $meetinginfo = bigbluebuttonbn_get_meeting_info($bbbsession['meetingid'], BIGBLUEBUTTONBN_UPDATE_CACHE);
318 318
     if ($bbbsession['userlimit'] > 0 && intval($meetinginfo['participantCount']) >= $bbbsession['userlimit']) {
319 319
         // No more users allowed to join.
320
-        header('Location: '.$bbbsession['logoutURL']);
320
+        header('Location: ' . $bbbsession['logoutURL']);
321 321
         return;
322 322
     }
323 323
     // Build the URL.
@@ -336,7 +336,7 @@  discard block
 block discarded – undo
336 336
     bigbluebuttonbn_participant_joined($bbbsession['meetingid'],
337 337
         ($bbbsession['administrator'] || $bbbsession['moderator']));
338 338
     // Execute the redirect.
339
-    header('Location: '.$joinurl);
339
+    header('Location: ' . $joinurl);
340 340
 }
341 341
 
342 342
 /**
@@ -348,13 +348,13 @@  discard block
 block discarded – undo
348 348
  */
349 349
 function bigbluebutton_bbb_view_errors($serrors, $id) {
350 350
     global $CFG, $OUTPUT;
351
-    $errors = (array) json_decode(urldecode($serrors));
351
+    $errors = (array)json_decode(urldecode($serrors));
352 352
     $msgerrors = '';
353 353
     foreach ($errors as $error) {
354
-        $msgerrors .= html_writer::tag('p', $error->{'message'}, array('class' => 'alert alert-danger'))."\n";
354
+        $msgerrors .= html_writer::tag('p', $error->{'message'}, array('class' => 'alert alert-danger')) . "\n";
355 355
     }
356 356
     echo $OUTPUT->header();
357 357
     print_error('view_error_bigbluebutton', 'bigbluebuttonbn',
358
-        $CFG->wwwroot.'/mod/bigbluebuttonbn/view.php?id='.$id, $msgerrors, $serrors);
358
+        $CFG->wwwroot . '/mod/bigbluebuttonbn/view.php?id=' . $id, $msgerrors, $serrors);
359 359
     echo $OUTPUT->footer();
360 360
 }
Please login to merge, or discard this patch.
view.php 1 patch
Spacing   +29 added lines, -29 removed lines patch added patch discarded remove patch
@@ -24,8 +24,8 @@  discard block
 block discarded – undo
24 24
  * @author    Fred Dixon  (ffdixon [at] blindsidenetworks [dt] com)
25 25
  */
26 26
 
27
-require_once(dirname(dirname(dirname(__FILE__))).'/config.php');
28
-require_once(dirname(__FILE__).'/locallib.php');
27
+require_once(dirname(dirname(dirname(__FILE__))) . '/config.php');
28
+require_once(dirname(__FILE__) . '/locallib.php');
29 29
 
30 30
 $id = required_param('id', PARAM_INT);
31 31
 $bn = optional_param('bn', 0, PARAM_INT);
@@ -57,19 +57,19 @@  discard block
 block discarded – undo
57 57
 if (is_null($serverversion)) {
58 58
     if ($bbbsession['administrator']) {
59 59
         print_error('view_error_unable_join', 'bigbluebuttonbn',
60
-            $CFG->wwwroot.'/admin/settings.php?section=modsettingbigbluebuttonbn');
60
+            $CFG->wwwroot . '/admin/settings.php?section=modsettingbigbluebuttonbn');
61 61
         exit;
62 62
     }
63 63
     if ($bbbsession['moderator']) {
64 64
         print_error('view_error_unable_join_teacher', 'bigbluebuttonbn',
65
-            $CFG->wwwroot.'/course/view.php?id='.$bigbluebuttonbn->course);
65
+            $CFG->wwwroot . '/course/view.php?id=' . $bigbluebuttonbn->course);
66 66
         exit;
67 67
     }
68 68
     print_error('view_error_unable_join_student', 'bigbluebuttonbn',
69
-        $CFG->wwwroot.'/course/view.php?id='.$bigbluebuttonbn->course);
69
+        $CFG->wwwroot . '/course/view.php?id=' . $bigbluebuttonbn->course);
70 70
     exit;
71 71
 }
72
-$bbbsession['serverversion'] = (string) $serverversion;
72
+$bbbsession['serverversion'] = (string)$serverversion;
73 73
 
74 74
 // Mark viewed by user (if required).
75 75
 $completion = new completion_info($course);
@@ -77,7 +77,7 @@  discard block
 block discarded – undo
77 77
 
78 78
 // Print the page header.
79 79
 $PAGE->set_context($context);
80
-$PAGE->set_url($CFG->wwwroot.'/mod/bigbluebuttonbn/view.php', array('id' => $cm->id));
80
+$PAGE->set_url($CFG->wwwroot . '/mod/bigbluebuttonbn/view.php', array('id' => $cm->id));
81 81
 $PAGE->set_title(format_string($bigbluebuttonbn->name));
82 82
 $PAGE->set_cacheable(false);
83 83
 $PAGE->set_heading($course->fullname);
@@ -87,11 +87,11 @@  discard block
 block discarded – undo
87 87
 if (!has_capability('moodle/category:manage', $context) && !has_capability('mod/bigbluebuttonbn:join', $context)) {
88 88
     echo $OUTPUT->header();
89 89
     if (isguestuser()) {
90
-        echo $OUTPUT->confirm('<p>'.get_string('view_noguests', 'bigbluebuttonbn').'</p>'.get_string('liketologin'),
91
-            get_login_url(), $CFG->wwwroot.'/course/view.php?id='.$course->id);
90
+        echo $OUTPUT->confirm('<p>' . get_string('view_noguests', 'bigbluebuttonbn') . '</p>' . get_string('liketologin'),
91
+            get_login_url(), $CFG->wwwroot . '/course/view.php?id=' . $course->id);
92 92
     } else {
93
-        echo $OUTPUT->confirm('<p>'.get_string('view_nojoin', 'bigbluebuttonbn').'</p>'.get_string('liketologin'),
94
-            get_login_url(), $CFG->wwwroot.'/course/view.php?id='.$course->id);
93
+        echo $OUTPUT->confirm('<p>' . get_string('view_nojoin', 'bigbluebuttonbn') . '</p>' . get_string('liketologin'),
94
+            get_login_url(), $CFG->wwwroot . '/course/view.php?id=' . $course->id);
95 95
     }
96 96
     echo $OUTPUT->footer();
97 97
     exit;
@@ -99,7 +99,7 @@  discard block
 block discarded – undo
99 99
 
100 100
 // Operation URLs.
101 101
 $bbbsession['bigbluebuttonbnURL'] = $CFG->wwwroot . '/mod/bigbluebuttonbn/view.php?id=' . $bbbsession['cm']->id;
102
-$bbbsession['logoutURL'] = $CFG->wwwroot . '/mod/bigbluebuttonbn/bbb_view.php?action=logout&id='.$id .
102
+$bbbsession['logoutURL'] = $CFG->wwwroot . '/mod/bigbluebuttonbn/bbb_view.php?action=logout&id=' . $id .
103 103
     '&bn=' . $bbbsession['bigbluebuttonbn']->id;
104 104
 $bbbsession['recordingReadyURL'] = $CFG->wwwroot . '/mod/bigbluebuttonbn/bbb_broker.php?action=recording_' .
105 105
     'ready&bigbluebuttonbn=' . $bbbsession['bigbluebuttonbn']->id;
@@ -119,7 +119,7 @@  discard block
 block discarded – undo
119 119
 echo $OUTPUT->footer();
120 120
 
121 121
 // Shows version as a comment.
122
-echo '<!-- '.$bbbsession['originTag'].' -->'."\n";
122
+echo '<!-- ' . $bbbsession['originTag'] . ' -->' . "\n";
123 123
 
124 124
 // Initialize session variable used across views.
125 125
 $SESSION->bigbluebuttonbn_bbbsession = $bbbsession;
@@ -147,7 +147,7 @@  discard block
 block discarded – undo
147 147
     $bbbsession['modPW'] = $bbbsession['bigbluebuttonbn']->moderatorpass;
148 148
     $bbbsession['viewerPW'] = $bbbsession['bigbluebuttonbn']->viewerpass;
149 149
     // Database info related to the activity.
150
-    $bbbsession['meetingid'] = $bbbsession['bigbluebuttonbn']->meetingid.'-'.$bbbsession['course']->id.'-'.
150
+    $bbbsession['meetingid'] = $bbbsession['bigbluebuttonbn']->meetingid . '-' . $bbbsession['course']->id . '-' .
151 151
         $bbbsession['bigbluebuttonbn']->id;
152 152
     $bbbsession['meetingname'] = $bbbsession['bigbluebuttonbn']->name;
153 153
     $bbbsession['meetingdescription'] = $bbbsession['bigbluebuttonbn']->intro;
@@ -167,7 +167,7 @@  discard block
 block discarded – undo
167 167
         $bbbsession['welcome'] = get_string('mod_form_field_welcome_default', 'bigbluebuttonbn');
168 168
     }
169 169
     if ($bbbsession['bigbluebuttonbn']->record) {
170
-        $bbbsession['welcome'] .= '<br><br>'.get_string('bbbrecordwarning', 'bigbluebuttonbn');
170
+        $bbbsession['welcome'] .= '<br><br>' . get_string('bbbrecordwarning', 'bigbluebuttonbn');
171 171
     }
172 172
     $bbbsession['openingtime'] = $bbbsession['bigbluebuttonbn']->openingtime;
173 173
     $bbbsession['closingtime'] = $bbbsession['bigbluebuttonbn']->closingtime;
@@ -180,7 +180,7 @@  discard block
 block discarded – undo
180 180
     $bbbsession['originServerName'] = $parsedurl['host'];
181 181
     $bbbsession['originServerUrl'] = $CFG->wwwroot;
182 182
     $bbbsession['originServerCommonName'] = '';
183
-    $bbbsession['originTag'] = 'moodle-mod_bigbluebuttonbn ('.get_config('mod_bigbluebuttonbn', 'version').')';
183
+    $bbbsession['originTag'] = 'moodle-mod_bigbluebuttonbn (' . get_config('mod_bigbluebuttonbn', 'version') . ')';
184 184
     $bbbsession['bnserver'] = bigbluebuttonbn_is_bn_server();
185 185
     // Setting for clienttype, assign flash if not enabled, or default if not editable.
186 186
     $bbbsession['clienttype'] = \mod_bigbluebuttonbn\locallib\config::get('clienttype_default');
@@ -243,8 +243,8 @@  discard block
 block discarded – undo
243 243
         $groupname = groups_get_group_name($bbbsession['group']);
244 244
     }
245 245
     // Assign group default values.
246
-    $bbbsession['meetingid'] .= '['.$bbbsession['group'].']';
247
-    $bbbsession['meetingname'] .= ' ('.$groupname.')';
246
+    $bbbsession['meetingid'] .= '[' . $bbbsession['group'] . ']';
247
+    $bbbsession['meetingname'] .= ' (' . $groupname . ')';
248 248
     if (count($groups) == 0) {
249 249
         // Only the All participants group exists.
250 250
         bigbluebuttonbn_view_message_box($bbbsession, get_string('view_groups_notenrolled_warning', 'bigbluebuttonbn'), 'info');
@@ -254,7 +254,7 @@  discard block
 block discarded – undo
254 254
     if (has_capability('moodle/site:accessallgroups', $context)) {
255 255
         bigbluebuttonbn_view_message_box($bbbsession, get_string('view_groups_selection_warning', 'bigbluebuttonbn'));
256 256
     }
257
-    $urltoroot = $CFG->wwwroot.'/mod/bigbluebuttonbn/view.php?id='.$bbbsession['cm']->id;
257
+    $urltoroot = $CFG->wwwroot . '/mod/bigbluebuttonbn/view.php?id=' . $bbbsession['cm']->id;
258 258
     groups_print_activity_menu($bbbsession['cm'], $urltoroot);
259 259
     echo '<br><br>';
260 260
 }
@@ -321,7 +321,7 @@  discard block
 block discarded – undo
321 321
         $recordingsdisabled = get_string('view_message_recordings_disabled', 'bigbluebuttonbn');
322 322
         $output .= bigbluebuttonbn_render_warning($recordingsdisabled, 'danger');
323 323
     }
324
-    echo $output.html_writer::empty_tag('br').html_writer::empty_tag('br').html_writer::empty_tag('br');
324
+    echo $output . html_writer::empty_tag('br') . html_writer::empty_tag('br') . html_writer::empty_tag('br');
325 325
     $PAGE->requires->yui_module('moodle-mod_bigbluebuttonbn-broker', 'M.mod_bigbluebuttonbn.broker.init', array($jsvars));
326 326
 }
327 327
 
@@ -390,12 +390,12 @@  discard block
 block discarded – undo
390 390
     // JavaScript variables for room.
391 391
     $openingtime = '';
392 392
     if ($bbbsession['openingtime']) {
393
-        $openingtime = get_string('mod_form_field_openingtime', 'bigbluebuttonbn').': '.
393
+        $openingtime = get_string('mod_form_field_openingtime', 'bigbluebuttonbn') . ': ' .
394 394
             userdate($bbbsession['openingtime']);
395 395
     }
396 396
     $closingtime = '';
397 397
     if ($bbbsession['closingtime']) {
398
-        $closingtime = get_string('mod_form_field_closingtime', 'bigbluebuttonbn').': '.
398
+        $closingtime = get_string('mod_form_field_closingtime', 'bigbluebuttonbn') . ': ' .
399 399
             userdate($bbbsession['closingtime']);
400 400
     }
401 401
     $jsvars += array(
@@ -412,7 +412,7 @@  discard block
 block discarded – undo
412 412
     $output .= $OUTPUT->box_end();
413 413
     // Action button box.
414 414
     $output .= $OUTPUT->box_start('generalbox boxaligncenter', 'bigbluebuttonbn_view_action_button_box');
415
-    $output .= '<br><br><span id="join_button"></span>&nbsp;<span id="end_button"></span>'."\n";
415
+    $output .= '<br><br><span id="join_button"></span>&nbsp;<span id="end_button"></span>' . "\n";
416 416
     $output .= $OUTPUT->box_end();
417 417
     if ($activity == 'ended') {
418 418
         $output .= bigbluebuttonbn_view_ended($bbbsession);
@@ -465,7 +465,7 @@  discard block
 block discarded – undo
465 465
     // If there are meetings with recordings load the data to the table.
466 466
     if ($bbbsession['bigbluebuttonbn']->recordings_html) {
467 467
         // Render a plain html table.
468
-        return bigbluebuttonbn_output_recording_table($bbbsession, $recordings)."\n";
468
+        return bigbluebuttonbn_output_recording_table($bbbsession, $recordings) . "\n";
469 469
     }
470 470
     // JavaScript variables for recordings with YUI.
471 471
     $jsvars += array(
@@ -493,8 +493,8 @@  discard block
 block discarded – undo
493 493
         array('type' => 'button',
494 494
               'value' => get_string('view_recording_button_import', 'bigbluebuttonbn'),
495 495
               'class' => 'btn btn-secondary',
496
-              'onclick' => 'window.location=\''.$CFG->wwwroot.'/mod/bigbluebuttonbn/import_view.php?bn='.
497
-                  $bbbsession['bigbluebuttonbn']->id.'\''));
496
+              'onclick' => 'window.location=\'' . $CFG->wwwroot . '/mod/bigbluebuttonbn/import_view.php?bn=' .
497
+                  $bbbsession['bigbluebuttonbn']->id . '\''));
498 498
     $output  = html_writer::empty_tag('br');
499 499
     $output .= html_writer::tag('span', $button, array('id' => 'import_recording_links_button'));
500 500
     $output .= html_writer::tag('span', '', array('id' => 'import_recording_links_table'));
@@ -513,10 +513,10 @@  discard block
 block discarded – undo
513 513
     if (!is_null($bbbsession['presentation']['url'])) {
514 514
         $attributes = array('title' => $bbbsession['presentation']['name']);
515 515
         $icon = new pix_icon($bbbsession['presentation']['icon'], $bbbsession['presentation']['mimetype_description']);
516
-        return '<h4>'.get_string('view_section_title_presentation', 'bigbluebuttonbn').'</h4>'.
517
-                $OUTPUT->action_icon($bbbsession['presentation']['url'], $icon, null, array(), false).
516
+        return '<h4>' . get_string('view_section_title_presentation', 'bigbluebuttonbn') . '</h4>' .
517
+                $OUTPUT->action_icon($bbbsession['presentation']['url'], $icon, null, array(), false) .
518 518
                 $OUTPUT->action_link($bbbsession['presentation']['url'],
519
-                $bbbsession['presentation']['name'], null, $attributes).'<br><br>';
519
+                $bbbsession['presentation']['name'], null, $attributes) . '<br><br>';
520 520
     }
521 521
     return '';
522 522
 }
Please login to merge, or discard this patch.
bbb_broker.php 1 patch
Spacing   +17 added lines, -17 removed lines patch added patch discarded remove patch
@@ -23,8 +23,8 @@  discard block
 block discarded – undo
23 23
  * @author    Jesus Federico  (jesus [at] blindsidenetworks [dt] com)
24 24
  */
25 25
 
26
-require_once(dirname(dirname(dirname(__FILE__))).'/config.php');
27
-require_once(dirname(__FILE__).'/locallib.php');
26
+require_once(dirname(dirname(dirname(__FILE__))) . '/config.php');
27
+require_once(dirname(__FILE__) . '/locallib.php');
28 28
 
29 29
 use \Firebase\JWT\JWT;
30 30
 
@@ -42,13 +42,13 @@  discard block
 block discarded – undo
42 42
 require_login(0, false);
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
 
49 49
 $error = bigbluebuttonbn_broker_validate_parameters($params);
50 50
 if (!empty($error)) {
51
-    header('HTTP/1.0 400 Bad Request. '.$error);
51
+    header('HTTP/1.0 400 Bad Request. ' . $error);
52 52
     return;
53 53
 }
54 54
 
@@ -132,11 +132,11 @@  discard block
 block discarded – undo
132 132
         bigbluebuttonbn_broker_live_session_events($params, $bigbluebuttonbn);
133 133
         return;
134 134
     }
135
-    header('HTTP/1.0 400 Bad request. The action '. $a . ' doesn\'t exist');
135
+    header('HTTP/1.0 400 Bad request. The action ' . $a . ' doesn\'t exist');
136 136
     return;
137 137
 
138 138
 } catch (Exception $e) {
139
-    header('HTTP/1.0 500 Internal Server Error. '.$e->getMessage());
139
+    header('HTTP/1.0 500 Internal Server Error. ' . $e->getMessage());
140 140
     return;
141 141
 }
142 142
 
@@ -321,7 +321,7 @@  discard block
 block discarded – undo
321 321
 function bigbluebuttonbn_broker_recording_info_current($recording, $params) {
322 322
     $callbackresponse['status'] = true;
323 323
     $callbackresponse['found'] = true;
324
-    $callbackresponse['published'] = (string) $recording['published'];
324
+    $callbackresponse['published'] = (string)$recording['published'];
325 325
     if (!isset($params['meta']) || empty($params['meta'])) {
326 326
         return $callbackresponse;
327 327
     }
@@ -648,8 +648,8 @@  discard block
 block discarded – undo
648 648
         $decodedparameters = JWT::decode($params['signed_parameters'],
649 649
             \mod_bigbluebuttonbn\locallib\config::get('shared_secret'), array('HS256'));
650 650
     } catch (Exception $e) {
651
-        $error = 'Caught exception: '.$e->getMessage();
652
-        header('HTTP/1.0 400 Bad Request. '.$error);
651
+        $error = 'Caught exception: ' . $e->getMessage();
652
+        header('HTTP/1.0 400 Bad Request. ' . $error);
653 653
         return;
654 654
     }
655 655
     // Validate that the bigbluebuttonbn activity corresponds to the meeting_id received.
@@ -674,12 +674,12 @@  discard block
 block discarded – undo
674 674
             bigbluebuttonbn_send_notification_recording_ready($bigbluebuttonbn);
675 675
         }
676 676
         $overrides = array('meetingid' => $decodedparameters->meeting_id);
677
-        $meta = '{"recordid":'.$decodedparameters->record_id.'}';
677
+        $meta = '{"recordid":' . $decodedparameters->record_id . '}';
678 678
         bigbluebuttonbn_log($bigbluebuttonbn, BIGBLUEBUTTON_LOG_EVENT_CALLBACK, $overrides, $meta);
679 679
         header('HTTP/1.0 202 Accepted');
680 680
     } catch (Exception $e) {
681
-        $error = 'Caught exception: '.$e->getMessage();
682
-        header('HTTP/1.0 503 Service Unavailable. '.$error);
681
+        $error = 'Caught exception: ' . $e->getMessage();
682
+        header('HTTP/1.0 503 Service Unavailable. ' . $error);
683 683
     }
684 684
 }
685 685
 
@@ -700,13 +700,13 @@  discard block
 block discarded – undo
700 700
     $importrecordings = $SESSION->bigbluebuttonbn_importrecordings;
701 701
     if (!isset($importrecordings[$params['id']])) {
702 702
         $error = "Recording {$params['id']} could not be found. It can not be imported";
703
-        header('HTTP/1.0 404 Not found. '.$error);
703
+        header('HTTP/1.0 404 Not found. ' . $error);
704 704
         return;
705 705
     }
706 706
     $callbackresponse = array('status' => true);
707 707
     $importrecordings[$params['id']]['imported'] = true;
708 708
     $overrides = array('meetingid' => $importrecordings[$params['id']]['meetingID']);
709
-    $meta = '{"recording":'.json_encode($importrecordings[$params['id']]).'}';
709
+    $meta = '{"recording":' . json_encode($importrecordings[$params['id']]) . '}';
710 710
     bigbluebuttonbn_log($bbbsession['bigbluebuttonbn'], BIGBLUEBUTTONBN_LOG_EVENT_IMPORT, $overrides, $meta);
711 711
     // Moodle event logger: Create an event for recording imported.
712 712
     if (isset($bbbsession['bigbluebutton']) && isset($bbbsession['cm'])) {
@@ -731,8 +731,8 @@  discard block
 block discarded – undo
731 731
         $decodedparameters = JWT::decode($params['signed_parameters'],
732 732
             \mod_bigbluebuttonbn\locallib\config::get('shared_secret'), array('HS256'));
733 733
     } catch (Exception $e) {
734
-        $error = 'Caught exception: '.$e->getMessage();
735
-        header('HTTP/1.0 400 Bad Request. '.$error);
734
+        $error = 'Caught exception: ' . $e->getMessage();
735
+        header('HTTP/1.0 400 Bad Request. ' . $error);
736 736
         return;
737 737
     }
738 738
     // Validate that the bigbluebuttonbn activity corresponds to the meeting_id received.
@@ -773,7 +773,7 @@  discard block
 block discarded – undo
773 773
     }
774 774
     $action = strtolower($params['action']);
775 775
     if (!array_key_exists($action, $requiredparams)) {
776
-        return 'Action '.$params['action'].' can not be performed.';
776
+        return 'Action ' . $params['action'] . ' can not be performed.';
777 777
     }
778 778
     return bigbluebuttonbn_broker_validate_parameters_message($params, $requiredparams[$action]);
779 779
 }
Please login to merge, or discard this patch.
locallib.php 1 patch
Spacing   +57 added lines, -57 removed lines patch added patch discarded remove patch
@@ -28,7 +28,7 @@  discard block
 block discarded – undo
28 28
 
29 29
 global $CFG;
30 30
 
31
-require_once(dirname(__FILE__).'/lib.php');
31
+require_once(dirname(__FILE__) . '/lib.php');
32 32
 
33 33
 /** @var BIGBLUEBUTTONBN_UPDATE_CACHE boolean set to true indicates that cache has to be updated */
34 34
 const BIGBLUEBUTTONBN_UPDATE_CACHE = true;
@@ -100,7 +100,7 @@  discard block
 block discarded – undo
100 100
               'logoutURL' => $logouturl,
101 101
             ];
102 102
     // Choose between Adobe Flash or HTML5 Client.
103
-    if ( $clienttype == BIGBLUEBUTTON_CLIENTTYPE_HTML5 ) {
103
+    if ($clienttype == BIGBLUEBUTTON_CLIENTTYPE_HTML5) {
104 104
         $data['joinViaHtml5'] = 'true';
105 105
     }
106 106
     if (!is_null($configtoken)) {
@@ -128,8 +128,8 @@  discard block
 block discarded – undo
128 128
     $data = null;
129 129
     if (!is_null($pname) && !is_null($purl)) {
130 130
         $method = 'POST';
131
-        $data = "<?xml version='1.0' encoding='UTF-8'?><modules><module name='presentation'><document url='".
132
-            $purl."' /></module></modules>";
131
+        $data = "<?xml version='1.0' encoding='UTF-8'?><modules><module name='presentation'><document url='" .
132
+            $purl . "' /></module></modules>";
133 133
     }
134 134
     $xml = bigbluebuttonbn_wrap_xml_load_file($createmeetingurl, $method, $data);
135 135
     if ($xml) {
@@ -290,7 +290,7 @@  discard block
 block discarded – undo
290 290
         // Override imported flag with actual ID.
291 291
         $recording['imported'] = $recordimported->id;
292 292
         if (isset($recordimported->protected)) {
293
-            $recording['protected'] = (string) $recordimported->protected;
293
+            $recording['protected'] = (string)$recordimported->protected;
294 294
         }
295 295
         $recordsimportedarray[$recording['recordID']] = $recording;
296 296
     }
@@ -320,21 +320,21 @@  discard block
 block discarded – undo
320 320
     // Add formats.
321 321
     $playbackarray = array();
322 322
     foreach ($recording->playback->format as $format) {
323
-        $playbackarray[(string) $format->type] = array('type' => (string) $format->type,
324
-            'url' => trim((string) $format->url), 'length' => (string) $format->length);
323
+        $playbackarray[(string)$format->type] = array('type' => (string)$format->type,
324
+            'url' => trim((string)$format->url), 'length' => (string)$format->length);
325 325
         // Add preview per format when existing.
326 326
         if ($format->preview) {
327
-            $playbackarray[(string) $format->type]['preview'] = bigbluebuttonbn_get_recording_preview_images($format->preview);
327
+            $playbackarray[(string)$format->type]['preview'] = bigbluebuttonbn_get_recording_preview_images($format->preview);
328 328
         }
329 329
     }
330 330
     // Add the metadata to the recordings array.
331 331
     $metadataarray = bigbluebuttonbn_get_recording_array_meta(get_object_vars($recording->metadata));
332
-    $recordingarray = array('recordID' => (string) $recording->recordID,
333
-        'meetingID' => (string) $recording->meetingID, 'meetingName' => (string) $recording->name,
334
-        'published' => (string) $recording->published, 'startTime' => (string) $recording->startTime,
335
-        'endTime' => (string) $recording->endTime, 'playbacks' => $playbackarray);
332
+    $recordingarray = array('recordID' => (string)$recording->recordID,
333
+        'meetingID' => (string)$recording->meetingID, 'meetingName' => (string)$recording->name,
334
+        'published' => (string)$recording->published, 'startTime' => (string)$recording->startTime,
335
+        'endTime' => (string)$recording->endTime, 'playbacks' => $playbackarray);
336 336
     if (isset($recording->protected)) {
337
-        $recordingarray['protected'] = (string) $recording->protected;
337
+        $recordingarray['protected'] = (string)$recording->protected;
338 338
     }
339 339
     return $recordingarray + $metadataarray;
340 340
 }
@@ -349,9 +349,9 @@  discard block
 block discarded – undo
349 349
 function bigbluebuttonbn_get_recording_preview_images($preview) {
350 350
     $imagesarray = array();
351 351
     foreach ($preview->images->image as $image) {
352
-        $imagearray = array('url' => trim((string) $image));
352
+        $imagearray = array('url' => trim((string)$image));
353 353
         foreach ($image->attributes() as $attkey => $attvalue) {
354
-            $imagearray[$attkey] = (string) $attvalue;
354
+            $imagearray[$attkey] = (string)$attvalue;
355 355
         }
356 356
         array_push($imagesarray, $imagearray);
357 357
     }
@@ -371,7 +371,7 @@  discard block
 block discarded – undo
371 371
         if (is_object($value)) {
372 372
             $value = '';
373 373
         }
374
-        $metadataarray['meta_'.$key] = $value;
374
+        $metadataarray['meta_' . $key] = $value;
375 375
     }
376 376
     return $metadataarray;
377 377
 }
@@ -443,7 +443,7 @@  discard block
 block discarded – undo
443 443
     $ids = explode(',', $recordids);
444 444
     foreach ($ids as $id) {
445 445
         $xml = bigbluebuttonbn_wrap_xml_load_file(
446
-            \mod_bigbluebuttonbn\locallib\bigbluebutton::action_url('updateRecordings', ['recordID' => $id] + (array) $params)
446
+            \mod_bigbluebuttonbn\locallib\bigbluebutton::action_url('updateRecordings', ['recordID' => $id] + (array)$params)
447 447
           );
448 448
         if ($xml && $xml->returncode != 'SUCCESS') {
449 449
             return false;
@@ -508,7 +508,7 @@  discard block
 block discarded – undo
508 508
             return $xml;
509 509
         } catch (Exception $e) {
510 510
             libxml_use_internal_errors($previous);
511
-            $error = 'Caught exception: '.$e->getMessage();
511
+            $error = 'Caught exception: ' . $e->getMessage();
512 512
             debugging($error, DEBUG_DEVELOPER);
513 513
             return null;
514 514
         }
@@ -519,7 +519,7 @@  discard block
 block discarded – undo
519 519
         $response = simplexml_load_file($url, 'SimpleXMLElement', LIBXML_NOCDATA | LIBXML_NOBLANKS);
520 520
         return $response;
521 521
     } catch (Exception $e) {
522
-        $error = 'Caught exception: '.$e->getMessage();
522
+        $error = 'Caught exception: ' . $e->getMessage();
523 523
         debugging($error, DEBUG_DEVELOPER);
524 524
         libxml_use_internal_errors($previous);
525 525
         return null;
@@ -545,8 +545,8 @@  discard block
 block discarded – undo
545 545
         }
546 546
         $options = array();
547 547
         $options['CURLOPT_HTTPHEADER'] = array(
548
-                 'Content-Type: '.$contenttype,
549
-                 'Content-Length: '.strlen($data),
548
+                 'Content-Type: ' . $contenttype,
549
+                 'Content-Length: ' . strlen($data),
550 550
                  'Content-Language: en-US',
551 551
                );
552 552
 
@@ -567,7 +567,7 @@  discard block
 block discarded – undo
567 567
  * @return void
568 568
  */
569 569
 function bigbluebuttonbn_end_meeting_if_running($bigbluebuttonbn) {
570
-    $meetingid = $bigbluebuttonbn->meetingid.'-'.$bigbluebuttonbn->course.'-'.$bigbluebuttonbn->id;
570
+    $meetingid = $bigbluebuttonbn->meetingid . '-' . $bigbluebuttonbn->course . '-' . $bigbluebuttonbn->id;
571 571
     if (bigbluebuttonbn_is_meeting_running($meetingid)) {
572 572
         bigbluebuttonbn_end_meeting($meetingid, $bigbluebuttonbn->moderatorpass);
573 573
     }
@@ -587,9 +587,9 @@  discard block
 block discarded – undo
587 587
     if ($userroles) {
588 588
         $where = '';
589 589
         foreach ($userroles as $userrole) {
590
-            $where .= (empty($where) ? ' WHERE' : ' OR').' id=' . $userrole->roleid;
590
+            $where .= (empty($where) ? ' WHERE' : ' OR') . ' id=' . $userrole->roleid;
591 591
         }
592
-        $userroles = $DB->get_records_sql('SELECT * FROM {role}'.$where);
592
+        $userroles = $DB->get_records_sql('SELECT * FROM {role}' . $where);
593 593
     }
594 594
     return $userroles;
595 595
 }
@@ -612,7 +612,7 @@  discard block
 block discarded – undo
612 612
  * @return array $users
613 613
  */
614 614
 function bigbluebuttonbn_get_users(context $context = null) {
615
-    $users = (array) get_enrolled_users($context, '', 0, 'u.*', null, 0, 0, true);
615
+    $users = (array)get_enrolled_users($context, '', 0, 'u.*', null, 0, 0, true);
616 616
     foreach ($users as $key => $value) {
617 617
         $users[$key] = fullname($value);
618 618
     }
@@ -627,7 +627,7 @@  discard block
 block discarded – undo
627 627
  * @return array $users
628 628
  */
629 629
 function bigbluebuttonbn_get_users_select(context $context = null) {
630
-    $users = (array) get_enrolled_users($context, '', 0, 'u.*', null, 0, 0, true);
630
+    $users = (array)get_enrolled_users($context, '', 0, 'u.*', null, 0, 0, true);
631 631
     foreach ($users as $key => $value) {
632 632
         $users[$key] = array('id' => $value->id, 'name' => fullname($value));
633 633
     }
@@ -642,7 +642,7 @@  discard block
 block discarded – undo
642 642
  * @return array $roles
643 643
  */
644 644
 function bigbluebuttonbn_get_roles(context $context = null) {
645
-    $roles = (array) role_get_names($context);
645
+    $roles = (array)role_get_names($context);
646 646
     foreach ($roles as $key => $value) {
647 647
         $roles[$key] = $value->localname;
648 648
     }
@@ -657,7 +657,7 @@  discard block
 block discarded – undo
657 657
  * @return array $users
658 658
  */
659 659
 function bigbluebuttonbn_get_roles_select(context $context = null) {
660
-    $roles = (array) role_get_names($context);
660
+    $roles = (array)role_get_names($context);
661 661
     foreach ($roles as $key => $value) {
662 662
         $roles[$key] = array('id' => $value->id, 'name' => $value->localname);
663 663
     }
@@ -672,7 +672,7 @@  discard block
 block discarded – undo
672 672
  * @return object $role
673 673
  */
674 674
 function bigbluebuttonbn_get_role($id) {
675
-    $roles = (array) role_get_names();
675
+    $roles = (array)role_get_names();
676 676
     if (is_numeric($id) && isset($roles[$id])) {
677 677
         return (object)$roles[$id];
678 678
     }
@@ -829,7 +829,7 @@  discard block
 block discarded – undo
829 829
     if (!isguestuser()) {
830 830
         $userroles = bigbluebuttonbn_get_user_roles($context, $userid);
831 831
     }
832
-    return bigbluebuttonbn_is_moderator_validator($participantlist, $userid , $userroles);
832
+    return bigbluebuttonbn_is_moderator_validator($participantlist, $userid, $userroles);
833 833
 }
834 834
 
835 835
 /**
@@ -985,7 +985,7 @@  discard block
 block discarded – undo
985 985
 function bigbluebuttonbn_generate_nonce() {
986 986
     $mt = microtime();
987 987
     $rand = mt_rand();
988
-    return md5($mt.$rand);
988
+    return md5($mt . $rand);
989 989
 }
990 990
 
991 991
 /**
@@ -1075,10 +1075,10 @@  discard block
 block discarded – undo
1075 1075
     $now = time();
1076 1076
     if (!$updatecache && isset($result) && $now < ($result['creation_time'] + $cachettl)) {
1077 1077
         // Use the value in the cache.
1078
-        return (array) json_decode($result['meeting_info']);
1078
+        return (array)json_decode($result['meeting_info']);
1079 1079
     }
1080 1080
     // Ping again and refresh the cache.
1081
-    $meetinginfo = (array) bigbluebuttonbn_wrap_xml_load_file(
1081
+    $meetinginfo = (array)bigbluebuttonbn_wrap_xml_load_file(
1082 1082
         \mod_bigbluebuttonbn\locallib\bigbluebutton::action_url('getMeetingInfo', ['meetingID' => $meetingid])
1083 1083
       );
1084 1084
     $cache->set($meetingid, array('creation_time' => time(), 'meeting_info' => json_encode($meetinginfo)));
@@ -1189,7 +1189,7 @@  discard block
 block discarded – undo
1189 1189
  * @return object
1190 1190
  */
1191 1191
 function bigbluebuttonbn_set_config_xml($meetingid, $configxml) {
1192
-    $urldefaultconfig = \mod_bigbluebuttonbn\locallib\config::get('server_url').'api/setConfigXML?';
1192
+    $urldefaultconfig = \mod_bigbluebuttonbn\locallib\config::get('server_url') . 'api/setConfigXML?';
1193 1193
     $configxmlparams = bigbluebuttonbn_set_config_xml_params($meetingid, $configxml);
1194 1194
     $xml = bigbluebuttonbn_wrap_xml_load_file($urldefaultconfig, 'POST',
1195 1195
         $configxmlparams, 'application/x-www-form-urlencoded');
@@ -1205,8 +1205,8 @@  discard block
 block discarded – undo
1205 1205
  * @return string
1206 1206
  */
1207 1207
 function bigbluebuttonbn_set_config_xml_params($meetingid, $configxml) {
1208
-    $params = 'configXML='.urlencode($configxml).'&meetingID='.urlencode($meetingid);
1209
-    $configxmlparams = $params.'&checksum='.sha1('setConfigXML'.$params.\mod_bigbluebuttonbn\locallib\config::get('shared_secret'));
1208
+    $params = 'configXML=' . urlencode($configxml) . '&meetingID=' . urlencode($meetingid);
1209
+    $configxmlparams = $params . '&checksum=' . sha1('setConfigXML' . $params . \mod_bigbluebuttonbn\locallib\config::get('shared_secret'));
1210 1210
     return $configxmlparams;
1211 1211
 }
1212 1212
 
@@ -1220,7 +1220,7 @@  discard block
 block discarded – undo
1220 1220
  */
1221 1221
 function bigbluebuttonbn_set_config_xml_array($meetingid, $configxml) {
1222 1222
     $configxml = bigbluebuttonbn_setConfigXML($meetingid, $configxml);
1223
-    $configxmlarray = (array) $configxml;
1223
+    $configxmlarray = (array)$configxml;
1224 1224
     if ($configxmlarray['returncode'] != 'SUCCESS') {
1225 1225
         debugging('BigBlueButton was not able to set the custom config.xml file', DEBUG_DEVELOPER);
1226 1226
         return '';
@@ -1312,7 +1312,7 @@  discard block
 block discarded – undo
1312 1312
     global $USER;
1313 1313
     $starttime = $starttime - ($starttime % 1000);
1314 1314
     // Set formatted date.
1315
-    $dateformat = get_string('strftimerecentfull', 'langconfig').' %Z';
1315
+    $dateformat = get_string('strftimerecentfull', 'langconfig') . ' %Z';
1316 1316
     return userdate($starttime / 1000, $dateformat, usertimezone($USER->timezone));
1317 1317
 }
1318 1318
 
@@ -1428,7 +1428,7 @@  discard block
 block discarded – undo
1428 1428
  * @return string
1429 1429
  */
1430 1430
 function bigbluebuttonbn_get_recording_data_row_preview($recording) {
1431
-    $options = array('id' => 'preview-'.$recording['recordID']);
1431
+    $options = array('id' => 'preview-' . $recording['recordID']);
1432 1432
     if ($recording['published'] === 'false') {
1433 1433
         $options['hidden'] = 'hidden';
1434 1434
     }
@@ -1490,7 +1490,7 @@  discard block
 block discarded – undo
1490 1490
     if ($recording['published'] === 'false') {
1491 1491
         $visibility = 'hidden ';
1492 1492
     }
1493
-    $id = 'playbacks-'.$recording['recordID'];
1493
+    $id = 'playbacks-' . $recording['recordID'];
1494 1494
     $recordingtypes = html_writer::start_tag('div', array('id' => $id, 'data-imported' => $dataimported,
1495 1495
           'data-meetingid' => $recording['meetingID'], 'data-recordingid' => $recording['recordID'],
1496 1496
           'title' => $title, $visibility => $visibility));
@@ -1515,11 +1515,11 @@  discard block
 block discarded – undo
1515 1515
     if (!bigbluebuttonbn_include_recording_data_row_type($recording, $bbbsession, $playback)) {
1516 1516
         return '';
1517 1517
     }
1518
-    $text = get_string('view_recording_format_'.$playback['type'], 'bigbluebuttonbn');
1518
+    $text = get_string('view_recording_format_' . $playback['type'], 'bigbluebuttonbn');
1519 1519
     $href = $CFG->wwwroot . '/mod/bigbluebuttonbn/bbb_view.php?action=play&bn=' . $bbbsession['bigbluebuttonbn']->id .
1520
-      '&mid='.$recording['meetingID'] . '&rid=' . $recording['recordID'] . '&rtype=' . $playback['type'];
1520
+      '&mid=' . $recording['meetingID'] . '&rid=' . $recording['recordID'] . '&rtype=' . $playback['type'];
1521 1521
     if (!isset($recording['imported']) || !isset($recording['protected']) || $recording['protected'] === 'false') {
1522
-        $href .= '&href='.urlencode(trim($playback['url']));
1522
+        $href .= '&href=' . urlencode(trim($playback['url']));
1523 1523
     }
1524 1524
     $linkattributes = array(
1525 1525
         'id' => 'recording-play-' . $playback['type'] . '-' . $recording['recordID'],
@@ -1688,7 +1688,7 @@  discard block
 block discarded – undo
1688 1688
             $linkattributes['class'] = 'disabled';
1689 1689
             unset($linkattributes['onclick']);
1690 1690
         }
1691
-        $icon = new pix_icon('i/'.$data['tag'],
1691
+        $icon = new pix_icon('i/' . $data['tag'],
1692 1692
             get_string('view_recording_list_actionbar_' . $data['action'], 'bigbluebuttonbn'),
1693 1693
             'moodle', $iconattributes);
1694 1694
         return $OUTPUT->action_icon('#', $icon, null, $linkattributes, false);
@@ -1805,7 +1805,7 @@  discard block
 block discarded – undo
1805 1805
  */
1806 1806
 function bigbluebuttonbn_get_recording_table_row($bbbsession, $recording, $rowdata) {
1807 1807
     $row = new html_table_row();
1808
-    $row->id = 'recording-tr-'.$recording['recordID'];
1808
+    $row->id = 'recording-tr-' . $recording['recordID'];
1809 1809
     $row->attributes['data-imported'] = 'false';
1810 1810
     $texthead = '';
1811 1811
     $texttail = '';
@@ -1865,9 +1865,9 @@  discard block
 block discarded – undo
1865 1865
 function bigbluebuttonbn_send_notification_recording_ready($bigbluebuttonbn) {
1866 1866
     $sender = get_admin();
1867 1867
     // Prepare message.
1868
-    $messagetext = '<p>'.get_string('email_body_recording_ready_for', 'bigbluebuttonbn').
1869
-        ' &quot;' . $bigbluebuttonbn->name . '&quot; '.
1870
-        get_string('email_body_recording_ready_is_ready', 'bigbluebuttonbn').'.</p>';
1868
+    $messagetext = '<p>' . get_string('email_body_recording_ready_for', 'bigbluebuttonbn') .
1869
+        ' &quot;' . $bigbluebuttonbn->name . '&quot; ' .
1870
+        get_string('email_body_recording_ready_is_ready', 'bigbluebuttonbn') . '.</p>';
1871 1871
     $context = context_course::instance($bigbluebuttonbn->course);
1872 1872
     \mod_bigbluebuttonbn\locallib\notifier::notification_send($context, $sender, $bigbluebuttonbn, $messagetext);
1873 1873
 }
@@ -2089,7 +2089,7 @@  discard block
 block discarded – undo
2089 2089
     }
2090 2090
     // Prepare select for loading records based on existent bigbluebuttonbns.
2091 2091
     $sql = 'SELECT DISTINCT meetingid, bigbluebuttonbnid FROM {bigbluebuttonbn_logs} WHERE ';
2092
-    $sql .= '(bigbluebuttonbnid='.implode(' OR bigbluebuttonbnid=', array_keys($bigbluebuttonbns)).')';
2092
+    $sql .= '(bigbluebuttonbnid=' . implode(' OR bigbluebuttonbnid=', array_keys($bigbluebuttonbns)) . ')';
2093 2093
     // Include only Create events and exclude those with record not true.
2094 2094
     $sql .= ' AND log = ? AND meta LIKE ? AND meta LIKE ?';
2095 2095
     // Execute select for loading records based on existent bigbluebuttonbns.
@@ -2239,8 +2239,8 @@  discard block
 block discarded – undo
2239 2239
 function bigbluebuttonbn_format_activity_time($time) {
2240 2240
     $activitytime = '';
2241 2241
     if ($time) {
2242
-        $activitytime = calendar_day_representation($time).' '.
2243
-          get_string('mod_form_field_notification_msg_at', 'bigbluebuttonbn').' '.
2242
+        $activitytime = calendar_day_representation($time) . ' ' .
2243
+          get_string('mod_form_field_notification_msg_at', 'bigbluebuttonbn') . ' ' .
2244 2244
           calendar_time_representation($time);
2245 2245
     }
2246 2246
     return $activitytime;
@@ -2660,7 +2660,7 @@  discard block
 block discarded – undo
2660 2660
  *
2661 2661
  * @return string
2662 2662
  */
2663
-function bigbluebuttonbn_render_warning($message, $type='info', $href='', $text='', $class='') {
2663
+function bigbluebuttonbn_render_warning($message, $type = 'info', $href = '', $text = '', $class = '') {
2664 2664
     global $OUTPUT;
2665 2665
     $output = "\n";
2666 2666
     // Evaluates if config_warning is enabled.
@@ -2699,11 +2699,11 @@  discard block
 block discarded – undo
2699 2699
     if ($class == '') {
2700 2700
         $class = 'btn btn-secondary';
2701 2701
     }
2702
-    $output  = '  <form method="post" action="' . $href . '" class="form-inline">'."\n";
2703
-    $output .= '      <button type="submit" class="' . $class . '"'."\n";
2704
-    $output .= '          title="' . $title . '"'."\n";
2705
-    $output .= '          >' . $text . '</button>'."\n";
2706
-    $output .= '  </form>'."\n";
2702
+    $output  = '  <form method="post" action="' . $href . '" class="form-inline">' . "\n";
2703
+    $output .= '      <button type="submit" class="' . $class . '"' . "\n";
2704
+    $output .= '          title="' . $title . '"' . "\n";
2705
+    $output .= '          >' . $text . '</button>' . "\n";
2706
+    $output .= '  </form>' . "\n";
2707 2707
     return $output;
2708 2708
 }
2709 2709
 
Please login to merge, or discard this patch.