Completed
Push — master ( 829aa5...2abbed )
by Jesus
01:50
created
mod_form.php 2 patches
Indentation   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -219,8 +219,8 @@  discard block
 block discarded – undo
219 219
             $this->bigbluebuttonbn_mform_add_element($mform, $field['type'], $field['name'], $field['data_type'],
220 220
                 $field['description_key'], 0, ['maxlength' => 4, 'size' => 6],
221 221
                 ['message' => get_string('mod_form_field_voicebridge_format_error', 'bigbluebuttonbn'),
222
-                 'type' => 'numeric', 'rule' => '####', 'validator' => 'server']
223
-              );
222
+                    'type' => 'numeric', 'rule' => '####', 'validator' => 'server']
223
+                );
224 224
         } else {
225 225
             $this->bigbluebuttonbn_mform_add_element($mform, $field['type'], $field['name'], $field['data_type'],
226 226
                 $field['description_key'], 0, ['maxlength' => 4, 'size' => 6]);
@@ -290,7 +290,7 @@  discard block
 block discarded – undo
290 290
     private function bigbluebuttonbn_mform_add_block_room_recordings(&$mform, $cfg) {
291 291
         $recordingsettings = false;
292 292
         $field = ['type' => 'hidden', 'name' => 'recordings_html', 'data_type' => PARAM_INT,
293
-                  'description_key' => null];
293
+                    'description_key' => null];
294 294
         if ($cfg['recordings_html_editable']) {
295 295
             $field['type'] = 'checkbox';
296 296
             $field['description_key'] = 'mod_form_field_recordings_html';
@@ -299,7 +299,7 @@  discard block
 block discarded – undo
299 299
         $this->bigbluebuttonbn_mform_add_element($mform, $field['type'], $field['name'], $field['data_type'],
300 300
             $field['description_key'], $cfg['recordings_html_default']);
301 301
         $field = ['type' => 'hidden', 'name' => 'recordings_deleted', 'data_type' => PARAM_INT,
302
-                  'description_key' => null];
302
+                    'description_key' => null];
303 303
         if ($cfg['recordings_deleted_editable']) {
304 304
             $field['type'] = 'checkbox';
305 305
             $field['description_key'] = 'mod_form_field_recordings_deleted';
@@ -308,7 +308,7 @@  discard block
 block discarded – undo
308 308
         $this->bigbluebuttonbn_mform_add_element($mform, $field['type'], $field['name'], $field['data_type'],
309 309
             $field['description_key'], $cfg['recordings_deleted_default']);
310 310
         $field = ['type' => 'hidden', 'name' => 'recordings_imported', 'data_type' => PARAM_INT,
311
-                  'description_key' => null];
311
+                    'description_key' => null];
312 312
         if ($cfg['importrecordings_enabled'] && $cfg['recordings_imported_editable']) {
313 313
             $field['type'] = 'checkbox';
314 314
             $field['description_key'] = 'mod_form_field_recordings_imported';
@@ -317,7 +317,7 @@  discard block
 block discarded – undo
317 317
         $this->bigbluebuttonbn_mform_add_element($mform, $field['type'], $field['name'], $field['data_type'],
318 318
             $field['description_key'], $cfg['recordings_imported_default']);
319 319
         $field = ['type' => 'hidden', 'name' => 'recordings_preview', 'data_type' => PARAM_INT,
320
-                  'description_key' => null];
320
+                    'description_key' => null];
321 321
         if ($cfg['recordings_preview_editable']) {
322 322
             $field['type'] = 'checkbox';
323 323
             $field['description_key'] = 'mod_form_field_recordings_preview';
@@ -394,7 +394,7 @@  discard block
 block discarded – undo
394 394
         $htmlselectiontype = html_writer::select($participantselection['type_options'],
395 395
             'bigbluebuttonbn_participant_selection_type', $participantselection['type_selected'], array(),
396 396
             array('id' => 'bigbluebuttonbn_participant_selection_type',
397
-                  'onchange' => 'M.mod_bigbluebuttonbn.modform.participantSelectionSet(); return 0;'));
397
+                    'onchange' => 'M.mod_bigbluebuttonbn.modform.participantSelectionSet(); return 0;'));
398 398
         $htmlselectionoptions = html_writer::select($participantselection['options'], 'bigbluebuttonbn_participant_selection',
399 399
             $participantselection['selected'], array(),
400 400
             array('id' => 'bigbluebuttonbn_participant_selection', 'disabled' => 'disabled'));
@@ -402,7 +402,7 @@  discard block
 block discarded – undo
402 402
             'type' => 'button', 'class' => 'btn btn-secondary',
403 403
             'value' => get_string('mod_form_field_participant_list_action_add', 'bigbluebuttonbn'),
404 404
             'onclick' => 'M.mod_bigbluebuttonbn.modform.participantAdd(); return 0;'
405
-          ));
405
+            ));
406 406
         $htmladdparticipant = html_writer::tag('div',
407 407
             $htmlselectiontype . '  ' . $htmlselectionoptions . '  ' . $htmlselectioninput, null);
408 408
         $mform->addElement('html', "\n\n");
@@ -444,9 +444,9 @@  discard block
 block discarded – undo
444 444
             $field['type'] = 'select';
445 445
             $field['data_type'] = PARAM_TEXT;
446 446
             $field['description_key'] = 'mod_form_field_block_clienttype';
447
-             $choices = array(BIGBLUEBUTTON_CLIENTTYPE_FLASH => get_string('mod_form_block_clienttype_flash', 'bigbluebuttonbn'),
448
-                             BIGBLUEBUTTON_CLIENTTYPE_HTML5 => get_string('mod_form_block_clienttype_html5', 'bigbluebuttonbn'));
449
-             $mform->addElement('header', 'clienttypeselection', get_string('mod_form_block_clienttype', 'bigbluebuttonbn'));
447
+                $choices = array(BIGBLUEBUTTON_CLIENTTYPE_FLASH => get_string('mod_form_block_clienttype_flash', 'bigbluebuttonbn'),
448
+                                BIGBLUEBUTTON_CLIENTTYPE_HTML5 => get_string('mod_form_block_clienttype_html5', 'bigbluebuttonbn'));
449
+                $mform->addElement('header', 'clienttypeselection', get_string('mod_form_block_clienttype', 'bigbluebuttonbn'));
450 450
             $this->bigbluebuttonbn_mform_add_element($mform, $field['type'], $field['name'], $field['data_type'],
451 451
                                     $field['description_key'], $cfg['clienttype_default'], $choices);
452 452
             return;
Please login to merge, or discard this patch.
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.
@@ -48,7 +48,7 @@  discard block
 block discarded – undo
48 48
         $serverversion = bigbluebuttonbn_get_server_version();
49 49
         if (is_null($serverversion)) {
50 50
             print_error('general_error_unable_connect', 'bigbluebuttonbn',
51
-                $CFG->wwwroot.'/admin/settings.php?section=modsettingbigbluebuttonbn');
51
+                $CFG->wwwroot . '/admin/settings.php?section=modsettingbigbluebuttonbn');
52 52
             return;
53 53
         }
54 54
         // Context.
@@ -80,7 +80,7 @@  discard block
 block discarded – undo
80 80
         // If 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
         $this->bigbluebuttonbn_mform_add_block_profiles($mform, $jsvars['instanceTypeProfiles']);
@@ -136,7 +136,7 @@  discard block
 block discarded – undo
136 136
                 );
137 137
                 $defaultvalues['presentation'] = $draftitemid;
138 138
             } catch (Exception $e) {
139
-                debugging('Presentation could not be loaded: '.$e->getMessage(), DEBUG_DEVELOPER);
139
+                debugging('Presentation could not be loaded: ' . $e->getMessage(), DEBUG_DEVELOPER);
140 140
                 return;
141 141
             }
142 142
             // Completion: tick if completion attendance settings is set to 1 or more.
@@ -564,7 +564,7 @@  discard block
 block discarded – undo
564 564
             return;
565 565
         }
566 566
         $mform->addElement($type, $name, get_string($descriptionkey, 'bigbluebuttonbn'), $options);
567
-        if (get_string_manager()->string_exists($descriptionkey.'_help', 'bigbluebuttonbn')) {
567
+        if (get_string_manager()->string_exists($descriptionkey . '_help', 'bigbluebuttonbn')) {
568 568
             $mform->addHelpButton($name, $descriptionkey, 'bigbluebuttonbn');
569 569
         }
570 570
         if (!empty($rule)) {
Please login to merge, or discard this patch.
bbb_view.php 2 patches
Indentation   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -309,10 +309,10 @@  discard block
 block discarded – undo
309 309
  */
310 310
 function bigbluebuttonbn_bbb_view_create_meeting_data(&$bbbsession) {
311 311
     $data = ['meetingID' => $bbbsession['meetingid'],
312
-              'name' => bigbluebuttonbn_html2text($bbbsession['meetingname'], 64),
313
-              'attendeePW' => $bbbsession['viewerPW'],
314
-              'moderatorPW' => $bbbsession['modPW'],
315
-              'logoutURL' => $bbbsession['logoutURL'],
312
+                'name' => bigbluebuttonbn_html2text($bbbsession['meetingname'], 64),
313
+                'attendeePW' => $bbbsession['viewerPW'],
314
+                'moderatorPW' => $bbbsession['modPW'],
315
+                'logoutURL' => $bbbsession['logoutURL'],
316 316
             ];
317 317
     $data['record'] = bigbluebuttonbn_bbb_view_create_meeting_data_record($bbbsession['record']);
318 318
     // Check if auto_start_record is enable.
@@ -334,7 +334,7 @@  discard block
 block discarded – undo
334 334
             '%duration%',
335 335
             (string) $durationtime,
336 336
             get_string('bbbdurationwarning', 'bigbluebuttonbn')
337
-          );
337
+            );
338 338
     }
339 339
     $voicebridge = intval($bbbsession['voicebridge']);
340 340
     if ($voicebridge > 0 && $voicebridge < 79999) {
Please login to merge, or discard this patch.
Spacing   +20 added lines, -20 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
 global $SESSION;
30 30
 
@@ -63,16 +63,16 @@  discard block
 block discarded – undo
63 63
     if (is_null($serverversion)) {
64 64
         if ($bbbsession['administrator']) {
65 65
             print_error('view_error_unable_join', 'bigbluebuttonbn',
66
-                $CFG->wwwroot.'/admin/settings.php?section=modsettingbigbluebuttonbn');
66
+                $CFG->wwwroot . '/admin/settings.php?section=modsettingbigbluebuttonbn');
67 67
             exit;
68 68
         }
69 69
         if ($bbbsession['moderator']) {
70 70
             print_error('view_error_unable_join_teacher', 'bigbluebuttonbn',
71
-                $CFG->wwwroot.'/course/view.php?id='.$bigbluebuttonbn->course);
71
+                $CFG->wwwroot . '/course/view.php?id=' . $bigbluebuttonbn->course);
72 72
             exit;
73 73
         }
74 74
         print_error('view_error_unable_join_student', 'bigbluebuttonbn',
75
-            $CFG->wwwroot.'/course/view.php?id='.$bigbluebuttonbn->course);
75
+            $CFG->wwwroot . '/course/view.php?id=' . $bigbluebuttonbn->course);
76 76
         exit;
77 77
     }
78 78
 
@@ -97,8 +97,8 @@  discard block
 block discarded – undo
97 97
         }
98 98
 
99 99
         // Assign group default values.
100
-        $bbbsession['meetingid'] .= '['.$bbbsession['group'].']';
101
-        $bbbsession['meetingname'] .= ' ('.$groupname.')';
100
+        $bbbsession['meetingid'] .= '[' . $bbbsession['group'] . ']';
101
+        $bbbsession['meetingname'] .= ' (' . $groupname . ')';
102 102
     }
103 103
 
104 104
     // Initialize session variable used across views.
@@ -163,7 +163,7 @@  discard block
 block discarded – undo
163 163
         }
164 164
         // If user is not administrator nor moderator (user is steudent) and waiting is required.
165 165
         if (!$bbbsession['administrator'] && !$bbbsession['moderator'] && $bbbsession['wait']) {
166
-            header('Location: '.$bbbsession['logoutURL']);
166
+            header('Location: ' . $bbbsession['logoutURL']);
167 167
             break;
168 168
         }
169 169
         // As the meeting doesn't exist, try to create it.
@@ -177,16 +177,16 @@  discard block
 block discarded – undo
177 177
             // The server is unreachable.
178 178
             if ($bbbsession['administrator']) {
179 179
                 print_error('view_error_unable_join', 'bigbluebuttonbn',
180
-                    $CFG->wwwroot.'/admin/settings.php?section=modsettingbigbluebuttonbn');
180
+                    $CFG->wwwroot . '/admin/settings.php?section=modsettingbigbluebuttonbn');
181 181
                 break;
182 182
             }
183 183
             if ($bbbsession['moderator']) {
184 184
                 print_error('view_error_unable_join_teacher', 'bigbluebuttonbn',
185
-                    $CFG->wwwroot.'/admin/settings.php?section=modsettingbigbluebuttonbn');
185
+                    $CFG->wwwroot . '/admin/settings.php?section=modsettingbigbluebuttonbn');
186 186
                 break;
187 187
             }
188 188
             print_error('view_error_unable_join_student', 'bigbluebuttonbn',
189
-                $CFG->wwwroot.'/admin/settings.php?section=modsettingbigbluebuttonbn');
189
+                $CFG->wwwroot . '/admin/settings.php?section=modsettingbigbluebuttonbn');
190 190
             break;
191 191
         }
192 192
         if ($response['returncode'] == 'FAILED') {
@@ -207,7 +207,7 @@  discard block
 block discarded – undo
207 207
         bigbluebuttonbn_event_log(\mod_bigbluebuttonbn\event\events::$events['meeting_create'], $bigbluebuttonbn);
208 208
         // Internal logger: Insert a record with the meeting created.
209 209
         $overrides = array('meetingid' => $bbbsession['meetingid']);
210
-        $meta = '{"record":'.($bbbsession['record'] ? 'true' : 'false').'}';
210
+        $meta = '{"record":' . ($bbbsession['record'] ? 'true' : 'false') . '}';
211 211
         bigbluebuttonbn_log($bbbsession['bigbluebuttonbn'], BIGBLUEBUTTONBN_LOG_EVENT_CREATE, $overrides, $meta);
212 212
         // Since the meeting is already running, we just join the session.
213 213
         bigbluebuttonbn_bbb_view_join_meeting($bbbsession, $bigbluebuttonbn, $origin);
@@ -221,7 +221,7 @@  discard block
 block discarded – undo
221 221
         $overrides = array('meetingid' => $bbbsession['meetingid']);
222 222
         bigbluebuttonbn_log($bbbsession['bigbluebuttonbn'], BIGBLUEBUTTONBN_LOG_EVENT_PLAYED, $overrides);
223 223
         // Execute the redirect.
224
-        header('Location: '.urldecode($href));
224
+        header('Location: ' . urldecode($href));
225 225
         break;
226 226
     default:
227 227
         bigbluebuttonbn_bbb_view_close_window();
@@ -315,7 +315,7 @@  discard block
 block discarded – undo
315 315
         $data['welcome'] .= '<br><br>';
316 316
         $data['welcome'] .= str_replace(
317 317
             '%duration%',
318
-            (string) $durationtime,
318
+            (string)$durationtime,
319 319
             get_string('bbbdurationwarning', 'bigbluebuttonbn')
320 320
           );
321 321
     }
@@ -381,7 +381,7 @@  discard block
 block discarded – undo
381 381
     $meetinginfo = bigbluebuttonbn_get_meeting_info($bbbsession['meetingid'], BIGBLUEBUTTONBN_UPDATE_CACHE);
382 382
     if ($bbbsession['userlimit'] > 0 && intval($meetinginfo['participantCount']) >= $bbbsession['userlimit']) {
383 383
         // No more users allowed to join.
384
-        header('Location: '.$bbbsession['logoutURL']);
384
+        header('Location: ' . $bbbsession['logoutURL']);
385 385
         return;
386 386
     }
387 387
     // Build the URL.
@@ -395,13 +395,13 @@  discard block
 block discarded – undo
395 395
     bigbluebuttonbn_event_log(\mod_bigbluebuttonbn\event\events::$events['meeting_join'], $bigbluebuttonbn);
396 396
     // Internal logger: Instert a record with the meeting created.
397 397
     $overrides = array('meetingid' => $bbbsession['meetingid']);
398
-    $meta = '{"origin":'.$origin.'}';
398
+    $meta = '{"origin":' . $origin . '}';
399 399
     bigbluebuttonbn_log($bbbsession['bigbluebuttonbn'], BIGBLUEBUTTONBN_LOG_EVENT_JOIN, $overrides, $meta);
400 400
     // Before executing the redirect, increment the number of participants.
401 401
     bigbluebuttonbn_participant_joined($bbbsession['meetingid'],
402 402
         ($bbbsession['administrator'] || $bbbsession['moderator']));
403 403
     // Execute the redirect.
404
-    header('Location: '.$joinurl);
404
+    header('Location: ' . $joinurl);
405 405
 }
406 406
 
407 407
 /**
@@ -413,13 +413,13 @@  discard block
 block discarded – undo
413 413
  */
414 414
 function bigbluebuttonbn_bbb_view_errors($serrors, $id) {
415 415
     global $CFG, $OUTPUT;
416
-    $errors = (array) json_decode(urldecode($serrors));
416
+    $errors = (array)json_decode(urldecode($serrors));
417 417
     $msgerrors = '';
418 418
     foreach ($errors as $error) {
419
-        $msgerrors .= html_writer::tag('p', $error->{'message'}, array('class' => 'alert alert-danger'))."\n";
419
+        $msgerrors .= html_writer::tag('p', $error->{'message'}, array('class' => 'alert alert-danger')) . "\n";
420 420
     }
421 421
     echo $OUTPUT->header();
422 422
     print_error('view_error_bigbluebutton', 'bigbluebuttonbn',
423
-        $CFG->wwwroot.'/mod/bigbluebuttonbn/view.php?id='.$id, $msgerrors, $serrors);
423
+        $CFG->wwwroot . '/mod/bigbluebuttonbn/view.php?id=' . $id, $msgerrors, $serrors);
424 424
     echo $OUTPUT->footer();
425 425
 }
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
 
@@ -35,7 +35,7 @@  discard block
 block discarded – undo
35 35
 $params = $_REQUEST;
36 36
 
37 37
 if (!isset($params['action']) || empty($params['action'])) {
38
-    header('HTTP/1.0 400 Bad Request. Parameter ['.$params['action'].'] was not included');
38
+    header('HTTP/1.0 400 Bad Request. Parameter [' . $params['action'] . '] was not included');
39 39
     return;
40 40
 }
41 41
 
@@ -50,7 +50,7 @@  discard block
 block discarded – undo
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
 
@@ -71,7 +71,7 @@  discard block
 block discarded – undo
71 71
         bigbluebuttonbn_broker_meeting_events($bigbluebuttonbn);
72 72
         return;
73 73
     }
74
-    header('HTTP/1.0 400 Bad request. The action '. $a . ' doesn\'t exist');
74
+    header('HTTP/1.0 400 Bad request. The action ' . $a . ' doesn\'t exist');
75 75
 } catch (Exception $e) {
76
-    header('HTTP/1.0 500 Internal Server Error. '.$e->getMessage());
76
+    header('HTTP/1.0 500 Internal Server Error. ' . $e->getMessage());
77 77
 }
Please login to merge, or discard this patch.
lib.php 3 patches
Doc Comments   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -103,7 +103,7 @@  discard block
 block discarded – undo
103 103
  * @uses FEATURE_GRADE_OUTCOMES
104 104
  * @uses FEATURE_SHOW_DESCRIPTION
105 105
  * @param string $feature
106
- * @return mixed True if yes (some features may use other values)
106
+ * @return null|boolean True if yes (some features may use other values)
107 107
  */
108 108
 function bigbluebuttonbn_supports($feature) {
109 109
     if (!$feature) {
@@ -272,7 +272,7 @@  discard block
 block discarded – undo
272 272
  *
273 273
  * @param object $bigbluebuttonbn Id of the module instance
274 274
  *
275
- * @return bool Success/Failure
275
+ * @return boolean|null Success/Failure
276 276
  */
277 277
 function bigbluebuttonbn_delete_instance_log($bigbluebuttonbn) {
278 278
     global $DB;
@@ -293,7 +293,7 @@  discard block
 block discarded – undo
293 293
  * @param object $mod
294 294
  * @param object $bigbluebuttonbn
295 295
  *
296
- * @return bool
296
+ * @return string
297 297
  */
298 298
 function bigbluebuttonbn_user_outline($course, $user, $mod, $bigbluebuttonbn) {
299 299
     if ($completed = bigbluebuttonbn_user_complete($course, $user, $bigbluebuttonbn)) {
@@ -869,7 +869,7 @@  discard block
 block discarded – undo
869 869
  * @param stdClass $context       context object
870 870
  * @param string   $filearea      file area
871 871
  *
872
- * @return false|null false if file not valid
872
+ * @return boolean false if file not valid
873 873
  */
874 874
 function bigbluebuttonbn_pluginfile_valid($context, $filearea) {
875 875
 
Please login to merge, or discard this patch.
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -360,7 +360,7 @@  discard block
 block discarded – undo
360 360
     $sql = "SELECT COUNT(*) FROM {bigbluebuttonbn_logs} ";
361 361
     $sql .= "WHERE courseid = ? AND bigbluebuttonbnid = ? AND userid = ? AND (log = ? OR log = ?)";
362 362
     $result = $DB->count_records_sql($sql, array($course->id, $bigbluebuttonbn->id, $user->id,
363
-                                              BIGBLUEBUTTONBN_LOG_EVENT_JOIN, BIGBLUEBUTTONBN_LOG_EVENT_PLAYED));
363
+                                                BIGBLUEBUTTONBN_LOG_EVENT_JOIN, BIGBLUEBUTTONBN_LOG_EVENT_PLAYED));
364 364
     return $result;
365 365
 }
366 366
 
@@ -593,7 +593,7 @@  discard block
 block discarded – undo
593 593
     $str  = '<div class="bigbluebuttonbn overview">'."\n";
594 594
     $str .= '  <div class="name">'.get_string('modulename', 'bigbluebuttonbn').':&nbsp;'."\n";
595 595
     $str .= '    <a '.$classes.'href="'.$CFG->wwwroot.'/mod/bigbluebuttonbn/view.php?id='.$bigbluebuttonbn->coursemodule.
596
-      '">'.$bigbluebuttonbn->name.'</a>'."\n";
596
+        '">'.$bigbluebuttonbn->name.'</a>'."\n";
597 597
     $str .= '  </div>'."\n";
598 598
     $str .= '  <div class="info">'.get_string($start, 'bigbluebuttonbn').': '.userdate($bigbluebuttonbn->openingtime).
599 599
         '</div>'."\n";
@@ -846,7 +846,7 @@  discard block
 block discarded – undo
846 846
             'bigbluebuttonbn',
847 847
             $bigbluebuttonbn->id,
848 848
             $bigbluebuttonbn->completionexpected
849
-          );
849
+            );
850 850
     }
851 851
 }
852 852
 
Please login to merge, or discard this patch.
Spacing   +34 added lines, -34 removed lines patch added patch discarded remove patch
@@ -30,10 +30,10 @@  discard block
 block discarded – undo
30 30
 
31 31
 // JWT is included in Moodle 3.7 core, but a local package is still needed for backward compatibility.
32 32
 if (!class_exists('\Firebase\JWT\JWT')) {
33
-    if (file_exists($CFG->libdir.'/php-jwt/src/JWT.php')) {
34
-        require_once($CFG->libdir.'/php-jwt/src/JWT.php');
33
+    if (file_exists($CFG->libdir . '/php-jwt/src/JWT.php')) {
34
+        require_once($CFG->libdir . '/php-jwt/src/JWT.php');
35 35
     } else {
36
-        require_once($CFG->dirroot.'/mod/bigbluebuttonbn/vendor/firebase/php-jwt/src/JWT.php');
36
+        require_once($CFG->dirroot . '/mod/bigbluebuttonbn/vendor/firebase/php-jwt/src/JWT.php');
37 37
     }
38 38
 }
39 39
 
@@ -44,8 +44,8 @@  discard block
 block discarded – undo
44 44
         $CFG->bigbluebuttonbn = array();
45 45
     }
46 46
 
47
-    if (file_exists(dirname(__FILE__).'/config.php')) {
48
-        require_once(dirname(__FILE__).'/config.php');
47
+    if (file_exists(dirname(__FILE__) . '/config.php')) {
48
+        require_once(dirname(__FILE__) . '/config.php');
49 49
     }
50 50
 
51 51
     /*
@@ -103,19 +103,19 @@  discard block
 block discarded – undo
103 103
         return null;
104 104
     }
105 105
     $features = array(
106
-        (string) FEATURE_IDNUMBER => true,
107
-        (string) FEATURE_GROUPS => true,
108
-        (string) FEATURE_GROUPINGS => true,
109
-        (string) FEATURE_GROUPMEMBERSONLY => true,
110
-        (string) FEATURE_MOD_INTRO => true,
111
-        (string) FEATURE_BACKUP_MOODLE2 => true,
112
-        (string) FEATURE_COMPLETION_TRACKS_VIEWS => true,
113
-        (string) FEATURE_COMPLETION_HAS_RULES => true,
114
-        (string) FEATURE_GRADE_HAS_GRADE => false,
115
-        (string) FEATURE_GRADE_OUTCOMES => false,
116
-        (string) FEATURE_SHOW_DESCRIPTION => true,
106
+        (string)FEATURE_IDNUMBER => true,
107
+        (string)FEATURE_GROUPS => true,
108
+        (string)FEATURE_GROUPINGS => true,
109
+        (string)FEATURE_GROUPMEMBERSONLY => true,
110
+        (string)FEATURE_MOD_INTRO => true,
111
+        (string)FEATURE_BACKUP_MOODLE2 => true,
112
+        (string)FEATURE_COMPLETION_TRACKS_VIEWS => true,
113
+        (string)FEATURE_COMPLETION_HAS_RULES => true,
114
+        (string)FEATURE_GRADE_HAS_GRADE => false,
115
+        (string)FEATURE_GRADE_OUTCOMES => false,
116
+        (string)FEATURE_SHOW_DESCRIPTION => true,
117 117
     );
118
-    if (isset($features[(string) $feature])) {
118
+    if (isset($features[(string)$feature])) {
119 119
         return $features[$feature];
120 120
     }
121 121
     return null;
@@ -308,7 +308,7 @@  discard block
 block discarded – undo
308 308
 function bigbluebuttonbn_delete_instance_log($bigbluebuttonbn) {
309 309
     global $DB;
310 310
     $sql  = "SELECT * FROM {bigbluebuttonbn_logs} ";
311
-    $sql .= "WHERE bigbluebuttonbnid = ? AND log = ? AND ". $DB->sql_compare_text('meta') . " = ?";
311
+    $sql .= "WHERE bigbluebuttonbnid = ? AND log = ? AND " . $DB->sql_compare_text('meta') . " = ?";
312 312
     $logs = $DB->get_records_sql($sql, array($bigbluebuttonbn->id, BIGBLUEBUTTONBN_LOG_EVENT_CREATE, "{\"record\":true}"));
313 313
     $meta = "{\"has_recordings\":" . empty($logs) ? "true" : "false" . "}";
314 314
     bigbluebuttonbn_log($bigbluebuttonbn, BIGBLUEBUTTONBN_LOG_EVENT_DELETE, [], $meta);
@@ -329,7 +329,7 @@  discard block
 block discarded – undo
329 329
 function bigbluebuttonbn_user_outline($course, $user, $mod, $bigbluebuttonbn) {
330 330
     if ($completed = bigbluebuttonbn_user_complete($course, $user, $bigbluebuttonbn)) {
331 331
         return fullname($user) . ' ' . get_string('view_message_has_joined', 'bigbluebuttonbn') . ' ' .
332
-            get_string('view_message_session_for', 'bigbluebuttonbn') . ' ' . (string) $completed . ' ' .
332
+            get_string('view_message_session_for', 'bigbluebuttonbn') . ' ' . (string)$completed . ' ' .
333 333
             get_string('view_message_times', 'bigbluebuttonbn');
334 334
     }
335 335
     return '';
@@ -521,7 +521,7 @@  discard block
 block discarded – undo
521 521
  * @return array status array
522 522
  */
523 523
 function bigbluebuttonbn_reset_recordings($courseid) {
524
-    require_once(__DIR__.'/locallib.php');
524
+    require_once(__DIR__ . '/locallib.php');
525 525
     // Criteria for search [courseid | bigbluebuttonbn=null | subset=false | includedeleted=true].
526 526
     $recordings = bigbluebuttonbn_get_recordings($courseid, null, false, true);
527 527
     // Remove all the recordings.
@@ -590,18 +590,18 @@  discard block
 block discarded – undo
590 590
     if ($bigbluebuttonbn->visible) {
591 591
         $classes = 'class="dimmed" ';
592 592
     }
593
-    $str  = '<div class="bigbluebuttonbn overview">'."\n";
594
-    $str .= '  <div class="name">'.get_string('modulename', 'bigbluebuttonbn').':&nbsp;'."\n";
595
-    $str .= '    <a '.$classes.'href="'.$CFG->wwwroot.'/mod/bigbluebuttonbn/view.php?id='.$bigbluebuttonbn->coursemodule.
596
-      '">'.$bigbluebuttonbn->name.'</a>'."\n";
597
-    $str .= '  </div>'."\n";
598
-    $str .= '  <div class="info">'.get_string($start, 'bigbluebuttonbn').': '.userdate($bigbluebuttonbn->openingtime).
599
-        '</div>'."\n";
593
+    $str  = '<div class="bigbluebuttonbn overview">' . "\n";
594
+    $str .= '  <div class="name">' . get_string('modulename', 'bigbluebuttonbn') . ':&nbsp;' . "\n";
595
+    $str .= '    <a ' . $classes . 'href="' . $CFG->wwwroot . '/mod/bigbluebuttonbn/view.php?id=' . $bigbluebuttonbn->coursemodule .
596
+      '">' . $bigbluebuttonbn->name . '</a>' . "\n";
597
+    $str .= '  </div>' . "\n";
598
+    $str .= '  <div class="info">' . get_string($start, 'bigbluebuttonbn') . ': ' . userdate($bigbluebuttonbn->openingtime) .
599
+        '</div>' . "\n";
600 600
     if (!empty($bigbluebuttonbn->closingtime)) {
601
-        $str .= '  <div class="info">'.get_string('ends_at', 'bigbluebuttonbn').': '.userdate($bigbluebuttonbn->closingtime)
602
-                .'</div>'."\n";
601
+        $str .= '  <div class="info">' . get_string('ends_at', 'bigbluebuttonbn') . ': ' . userdate($bigbluebuttonbn->closingtime)
602
+                .'</div>' . "\n";
603 603
     }
604
-    $str .= '</div>'."\n";
604
+    $str .= '</div>' . "\n";
605 605
     return $str;
606 606
 }
607 607
 
@@ -689,7 +689,7 @@  discard block
 block discarded – undo
689 689
  * @return void
690 690
  **/
691 691
 function bigbluebuttonbn_process_pre_save_instance(&$bigbluebuttonbn) {
692
-    require_once(__DIR__.'/locallib.php');
692
+    require_once(__DIR__ . '/locallib.php');
693 693
     $bigbluebuttonbn->timemodified = time();
694 694
     if ((integer)$bigbluebuttonbn->instance == 0) {
695 695
         $bigbluebuttonbn->meetingid = 0;
@@ -795,7 +795,7 @@  discard block
 block discarded – undo
795 795
  **/
796 796
 function bigbluebuttonbn_process_post_save_event(&$bigbluebuttonbn) {
797 797
     global $CFG, $DB;
798
-    require_once($CFG->dirroot.'/calendar/lib.php');
798
+    require_once($CFG->dirroot . '/calendar/lib.php');
799 799
     $eventid = $DB->get_field('event', 'id', array('modulename' => 'bigbluebuttonbn',
800 800
         'instance' => $bigbluebuttonbn->id));
801 801
     // Delete the event from calendar when/if openingtime is NOT set.
@@ -881,7 +881,7 @@  discard block
 block discarded – undo
881 881
     if (count($files) == 1) {
882 882
         // Get the first (and only) file.
883 883
         $file = reset($files);
884
-        $filesrc = '/'.$file->get_filename();
884
+        $filesrc = '/' . $file->get_filename();
885 885
     }
886 886
     return $filesrc;
887 887
 }
@@ -950,7 +950,7 @@  discard block
 block discarded – undo
950 950
     if (!$filename) {
951 951
         return false;
952 952
     }
953
-    $fullpath = "/$context->id/mod_bigbluebuttonbn/$filearea/0/".$filename;
953
+    $fullpath = "/$context->id/mod_bigbluebuttonbn/$filearea/0/" . $filename;
954 954
     $fs = get_file_storage();
955 955
     $file = $fs->get_file_by_hash(sha1($fullpath));
956 956
     if (!$file || $file->is_directory()) {
Please login to merge, or discard this patch.
classes/locallib/notifier.php 2 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -111,7 +111,7 @@
 block discarded – undo
111 111
      *
112 112
      * @param object $bigbluebuttonbn
113 113
      *
114
-     * @return void
114
+     * @return string
115 115
      */
116 116
     public static function htmlmsg_recording_ready($bigbluebuttonbn) {
117 117
         return '<p>'.get_string('email_body_recording_ready_for', 'bigbluebuttonbn').
Please login to merge, or discard this patch.
Spacing   +28 added lines, -28 removed lines patch added patch discarded remove patch
@@ -47,29 +47,29 @@  discard block
 block discarded – undo
47 47
      * @return string
48 48
      */
49 49
     public static function htmlmsg_instance_updated($msg) {
50
-        $messagetext = '<p>'.get_string('pluginname', 'bigbluebuttonbn').
51
-            ' <b>'.$msg->activity_url.'</b> '.
52
-            get_string('email_body_notification_meeting_has_been', 'bigbluebuttonbn').' '.$msg->action.'.</p>'."\n";
53
-        $messagetext .= '<p>'.get_string('email_body_notification_meeting_details', 'bigbluebuttonbn').':'."\n";
54
-        $messagetext .= '<table border="0" style="margin: 5px 0 0 20px"><tbody>'."\n";
55
-        $messagetext .= '<tr><td style="font-weight:bold;color:#555;">'.
56
-            get_string('email_body_notification_meeting_title', 'bigbluebuttonbn').': </td><td>'."\n";
57
-        $messagetext .= $msg->activity_title.'</td></tr>'."\n";
58
-        $messagetext .= '<tr><td style="font-weight:bold;color:#555;">'.
59
-            get_string('email_body_notification_meeting_description', 'bigbluebuttonbn').': </td><td>'."\n";
60
-        $messagetext .= $msg->activity_description.'</td></tr>'."\n";
61
-        $messagetext .= '<tr><td style="font-weight:bold;color:#555;">'.
62
-            get_string('email_body_notification_meeting_start_date', 'bigbluebuttonbn').': </td><td>'."\n";
63
-        $messagetext .= $msg->activity_openingtime.'</td></tr>'."\n";
64
-        $messagetext .= '<tr><td style="font-weight:bold;color:#555;">'.
65
-            get_string('email_body_notification_meeting_end_date', 'bigbluebuttonbn').': </td><td>'."\n";
66
-        $messagetext .= $msg->activity_closingtime.'</td></tr>'."\n";
67
-        $messagetext .= '<tr><td style="font-weight:bold;color:#555;">'.$msg->action.' '.
68
-            get_string('email_body_notification_meeting_by', 'bigbluebuttonbn').': </td><td>'."\n";
69
-        $messagetext .= $msg->activity_owner.'</td></tr></tbody></table></p>'."\n";
70
-        $messagetext .= '<p><hr/><br/>'.get_string('email_footer_sent_by', 'bigbluebuttonbn').' '.
71
-            $msg->user_name.' ';
72
-        $messagetext .= get_string('email_footer_sent_from', 'bigbluebuttonbn').' '.$msg->course_name.'.</p>';
50
+        $messagetext = '<p>' . get_string('pluginname', 'bigbluebuttonbn') .
51
+            ' <b>' . $msg->activity_url . '</b> ' .
52
+            get_string('email_body_notification_meeting_has_been', 'bigbluebuttonbn') . ' ' . $msg->action . '.</p>' . "\n";
53
+        $messagetext .= '<p>' . get_string('email_body_notification_meeting_details', 'bigbluebuttonbn') . ':' . "\n";
54
+        $messagetext .= '<table border="0" style="margin: 5px 0 0 20px"><tbody>' . "\n";
55
+        $messagetext .= '<tr><td style="font-weight:bold;color:#555;">' .
56
+            get_string('email_body_notification_meeting_title', 'bigbluebuttonbn') . ': </td><td>' . "\n";
57
+        $messagetext .= $msg->activity_title . '</td></tr>' . "\n";
58
+        $messagetext .= '<tr><td style="font-weight:bold;color:#555;">' .
59
+            get_string('email_body_notification_meeting_description', 'bigbluebuttonbn') . ': </td><td>' . "\n";
60
+        $messagetext .= $msg->activity_description . '</td></tr>' . "\n";
61
+        $messagetext .= '<tr><td style="font-weight:bold;color:#555;">' .
62
+            get_string('email_body_notification_meeting_start_date', 'bigbluebuttonbn') . ': </td><td>' . "\n";
63
+        $messagetext .= $msg->activity_openingtime . '</td></tr>' . "\n";
64
+        $messagetext .= '<tr><td style="font-weight:bold;color:#555;">' .
65
+            get_string('email_body_notification_meeting_end_date', 'bigbluebuttonbn') . ': </td><td>' . "\n";
66
+        $messagetext .= $msg->activity_closingtime . '</td></tr>' . "\n";
67
+        $messagetext .= '<tr><td style="font-weight:bold;color:#555;">' . $msg->action . ' ' .
68
+            get_string('email_body_notification_meeting_by', 'bigbluebuttonbn') . ': </td><td>' . "\n";
69
+        $messagetext .= $msg->activity_owner . '</td></tr></tbody></table></p>' . "\n";
70
+        $messagetext .= '<p><hr/><br/>' . get_string('email_footer_sent_by', 'bigbluebuttonbn') . ' ' .
71
+            $msg->user_name . ' ';
72
+        $messagetext .= get_string('email_footer_sent_from', 'bigbluebuttonbn') . ' ' . $msg->course_name . '.</p>';
73 73
         return $messagetext;
74 74
     }
75 75
 
@@ -86,7 +86,7 @@  discard block
 block discarded – undo
86 86
         $course = $coursemodinfo->get_course($bigbluebuttonbn->course);
87 87
         $sender = $USER;
88 88
         // Prepare message.
89
-        $msg = (object) array();
89
+        $msg = (object)array();
90 90
         // Build the message_body.
91 91
         $msg->action = $action;
92 92
         $msg->activity_url = html_writer::link(
@@ -120,9 +120,9 @@  discard block
 block discarded – undo
120 120
      * @return void
121 121
      */
122 122
     public static function htmlmsg_recording_ready($bigbluebuttonbn) {
123
-        return '<p>'.get_string('email_body_recording_ready_for', 'bigbluebuttonbn').
124
-            ' &quot;' . $bigbluebuttonbn->name . '&quot; '.
125
-            get_string('email_body_recording_ready_is_ready', 'bigbluebuttonbn').'.</p>';
123
+        return '<p>' . get_string('email_body_recording_ready_for', 'bigbluebuttonbn') .
124
+            ' &quot;' . $bigbluebuttonbn->name . '&quot; ' .
125
+            get_string('email_body_recording_ready_is_ready', 'bigbluebuttonbn') . '.</p>';
126 126
     }
127 127
 
128 128
     /**
@@ -164,7 +164,7 @@  discard block
 block discarded – undo
164 164
                     // Enqueue it.
165 165
                     \core\task\manager::queue_adhoc_task($task);
166 166
                 } catch (Exception $e) {
167
-                    mtrace("Error while enqueuing completion_uopdate_state task. " . (string) $e);
167
+                    mtrace("Error while enqueuing completion_uopdate_state task. " . (string)$e);
168 168
                 }
169 169
             }
170 170
         }
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
 
@@ -42,13 +42,13 @@  discard block
 block discarded – undo
42 42
 require_sesskey();
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
 
@@ -127,7 +127,7 @@  discard block
 block discarded – undo
127 127
         echo $completionvalidate;
128 128
         return;
129 129
     }
130
-    header('HTTP/1.0 400 Bad request. The action '. $a . ' doesn\'t exist');
130
+    header('HTTP/1.0 400 Bad request. The action ' . $a . ' doesn\'t exist');
131 131
 } catch (Exception $e) {
132
-    header('HTTP/1.0 500 Internal Server Error. '.$e->getMessage());
132
+    header('HTTP/1.0 500 Internal Server Error. ' . $e->getMessage());
133 133
 }
Please login to merge, or discard this patch.
locallib.php 3 patches
Doc Comments   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -317,7 +317,7 @@  discard block
 block discarded – undo
317 317
  * Helper function to retrieve imported recordings from the Moodle database.
318 318
  * The references are stored as events in bigbluebuttonbn_logs.
319 319
  *
320
- * @param string $courseid
320
+ * @param integer $courseid
321 321
  * @param string $bigbluebuttonbnid
322 322
  * @param bool   $subset
323 323
  *
@@ -345,7 +345,7 @@  discard block
 block discarded – undo
345 345
 /**
346 346
  * Helper function to retrive the default config.xml file.
347 347
  *
348
- * @return string
348
+ * @return null|SimpleXMLElement
349 349
  */
350 350
 function bigbluebuttonbn_get_default_config_xml() {
351 351
     $xml = bigbluebuttonbn_wrap_xml_load_file(
@@ -427,7 +427,7 @@  discard block
 block discarded – undo
427 427
  * @param object $a
428 428
  * @param object $b
429 429
  *
430
- * @return array
430
+ * @return integer
431 431
  */
432 432
 function bigbluebuttonbn_recording_build_sorter($a, $b) {
433 433
     global $CFG;
@@ -541,7 +541,7 @@  discard block
 block discarded – undo
541 541
  * @param string $data
542 542
  * @param string $contenttype
543 543
  *
544
- * @return object
544
+ * @return null|SimpleXMLElement
545 545
  */
546 546
 function bigbluebuttonbn_wrap_xml_load_file($url, $method = 'GET', $data = null, $contenttype = 'text/xml') {
547 547
     if (extension_loaded('curl')) {
@@ -582,7 +582,7 @@  discard block
 block discarded – undo
582 582
  * @param string $data
583 583
  * @param string $contenttype
584 584
  *
585
- * @return object
585
+ * @return string
586 586
  */
587 587
 function bigbluebuttonbn_wrap_xml_load_file_curl_request($url, $method = 'GET', $data = null, $contenttype = 'text/xml') {
588 588
     global $CFG;
@@ -974,7 +974,7 @@  discard block
 block discarded – undo
974 974
  * @param integer $instance
975 975
  * @param integer $voicebridge
976 976
  *
977
- * @return string
977
+ * @return boolean
978 978
  */
979 979
 function bigbluebuttonbn_voicebridge_unique($instance, $voicebridge) {
980 980
     global $DB;
@@ -1322,7 +1322,7 @@  discard block
 block discarded – undo
1322 1322
  * @param string $meetingid
1323 1323
  * @param string $configxml
1324 1324
  *
1325
- * @return object
1325
+ * @return null|SimpleXMLElement
1326 1326
  */
1327 1327
 function bigbluebuttonbn_set_config_xml($meetingid, $configxml) {
1328 1328
     $urldefaultconfig = \mod_bigbluebuttonbn\locallib\config::get('server_url') . 'api/setConfigXML?';
@@ -1376,7 +1376,7 @@  discard block
 block discarded – undo
1376 1376
  * @param array $recording
1377 1377
  * @param array $tools
1378 1378
  *
1379
- * @return array
1379
+ * @return null|stdClass
1380 1380
  */
1381 1381
 function bigbluebuttonbn_get_recording_data_row($bbbsession, $recording, $tools = ['protect', 'publish', 'delete']) {
1382 1382
     if (!bigbluebuttonbn_include_recording_table_row($bbbsession, $recording)) {
@@ -2018,7 +2018,7 @@  discard block
 block discarded – undo
2018 2018
  *
2019 2019
  * @param array $bbbsession
2020 2020
  * @param array $recording
2021
- * @param object $rowdata
2021
+ * @param stdClass $rowdata
2022 2022
  *
2023 2023
  * @return object
2024 2024
  */
@@ -2215,7 +2215,7 @@  discard block
 block discarded – undo
2215 2215
  *
2216 2216
  * @param array $bbbsession
2217 2217
  * @param array $recordings
2218
- * @param array $tools
2218
+ * @param string[] $tools
2219 2219
  *
2220 2220
  * @return array
2221 2221
  */
@@ -2296,7 +2296,7 @@  discard block
 block discarded – undo
2296 2296
  * Helper function to define the sql used for gattering the bigbluebuttonbnids whose meetingids should be included
2297 2297
  * in the getRecordings request considering only those that belong to deleted activities.
2298 2298
  *
2299
- * @param string $courseid
2299
+ * @param integer $courseid
2300 2300
  * @param string $bigbluebuttonbnid
2301 2301
  * @param bool   $subset
2302 2302
  *
@@ -2320,7 +2320,7 @@  discard block
 block discarded – undo
2320 2320
  * Helper function to define the sql used for gattering the bigbluebuttonbnids whose meetingids should be included
2321 2321
  * in the getRecordings request considering only those that belong to imported recordings.
2322 2322
  *
2323
- * @param string $courseid
2323
+ * @param integer $courseid
2324 2324
  * @param string $bigbluebuttonbnid
2325 2325
  * @param bool   $subset
2326 2326
  *
@@ -2343,7 +2343,7 @@  discard block
 block discarded – undo
2343 2343
 /**
2344 2344
  * Helper function to get recordings and imported recordings together.
2345 2345
  *
2346
- * @param string $courseid
2346
+ * @param integer $courseid
2347 2347
  * @param string $bigbluebuttonbnid
2348 2348
  * @param bool   $subset
2349 2349
  * @param bool   $includedeleted
@@ -2361,7 +2361,7 @@  discard block
 block discarded – undo
2361 2361
  * Helper function to retrieve recordings from the BigBlueButton. The references are stored as events
2362 2362
  * in bigbluebuttonbn_logs.
2363 2363
  *
2364
- * @param string $courseid
2364
+ * @param integer $courseid
2365 2365
  * @param string $bigbluebuttonbnid
2366 2366
  * @param bool   $subset
2367 2367
  * @param bool   $includedeleted
Please login to merge, or discard this patch.
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -796,7 +796,7 @@  discard block
 block discarded – undo
796 796
     $data['role'] = array(
797 797
         'name' => get_string('mod_form_field_participant_list_type_role', 'bigbluebuttonbn'),
798 798
         'children' => bigbluebuttonbn_get_roles_select($context, true)
799
-      );
799
+        );
800 800
     $data['user'] = array(
801 801
         'name' => get_string('mod_form_field_participant_list_type_user', 'bigbluebuttonbn'),
802 802
         'children' => bigbluebuttonbn_get_users_select($context, $bbactivity),
@@ -1704,7 +1704,7 @@  discard block
 block discarded – undo
1704 1704
         'data-action' => 'play',
1705 1705
         'data-target' => $playback['type'],
1706 1706
         'data-href' => $href,
1707
-      );
1707
+        );
1708 1708
     if ($CFG->bigbluebuttonbn_recordings_validate_url && !bigbluebuttonbn_is_bn_server()
1709 1709
             && !bigbluebuttonbn_is_valid_resource(trim($playback['url']))) {
1710 1710
         $linkattributes['class'] = 'btn btn-sm btn-warning';
Please login to merge, or discard this patch.
Spacing   +60 added lines, -60 removed lines patch added patch discarded remove patch
@@ -145,8 +145,8 @@  discard block
 block discarded – undo
145 145
     $payload = null;
146 146
     if (!is_null($pname) && !is_null($purl)) {
147 147
         $method = 'POST';
148
-        $payload = "<?xml version='1.0' encoding='UTF-8'?><modules><module name='presentation'><document url='".
149
-            $purl."' /></module></modules>";
148
+        $payload = "<?xml version='1.0' encoding='UTF-8'?><modules><module name='presentation'><document url='" .
149
+            $purl . "' /></module></modules>";
150 150
     }
151 151
     $xml = bigbluebuttonbn_wrap_xml_load_file($createmeetingurl, $method, $payload);
152 152
     if ($xml) {
@@ -190,7 +190,7 @@  discard block
 block discarded – undo
190 190
     }
191 191
     if ($xml) {
192 192
         // Either failure or success without meeting info.
193
-        return (array) $xml;
193
+        return (array)$xml;
194 194
     }
195 195
     // If the server is unreachable, then prompts the user of the necessary action.
196 196
     return array('returncode' => 'FAILED', 'message' => 'unreachable', 'messageKey' => 'Server is unreachable');
@@ -283,7 +283,7 @@  discard block
 block discarded – undo
283 283
                 foreach ($recordingxml->breakoutRooms->breakoutRoom as $breakoutroom) {
284 284
                     $url = \mod_bigbluebuttonbn\locallib\bigbluebutton::action_url(
285 285
                         'getRecordings',
286
-                        ['recordID' => implode(',', (array) $breakoutroom)]
286
+                        ['recordID' => implode(',', (array)$breakoutroom)]
287 287
                     );
288 288
                     $xml = bigbluebuttonbn_wrap_xml_load_file($url);
289 289
                     if ($xml && $xml->returncode == 'SUCCESS' && isset($xml->recordings)) {
@@ -339,7 +339,7 @@  discard block
 block discarded – undo
339 339
         // Override imported flag with actual ID.
340 340
         $recording['imported'] = $recordimported->id;
341 341
         if (isset($recordimported->protected)) {
342
-            $recording['protected'] = (string) $recordimported->protected;
342
+            $recording['protected'] = (string)$recordimported->protected;
343 343
         }
344 344
         $recordsimportedarray[$recording['recordID']] = $recording;
345 345
     }
@@ -369,21 +369,21 @@  discard block
 block discarded – undo
369 369
     // Add formats.
370 370
     $playbackarray = array();
371 371
     foreach ($recording->playback->format as $format) {
372
-        $playbackarray[(string) $format->type] = array('type' => (string) $format->type,
373
-            'url' => trim((string) $format->url), 'length' => (string) $format->length);
372
+        $playbackarray[(string)$format->type] = array('type' => (string)$format->type,
373
+            'url' => trim((string)$format->url), 'length' => (string)$format->length);
374 374
         // Add preview per format when existing.
375 375
         if ($format->preview) {
376
-            $playbackarray[(string) $format->type]['preview'] = bigbluebuttonbn_get_recording_preview_images($format->preview);
376
+            $playbackarray[(string)$format->type]['preview'] = bigbluebuttonbn_get_recording_preview_images($format->preview);
377 377
         }
378 378
     }
379 379
     // Add the metadata to the recordings array.
380 380
     $metadataarray = bigbluebuttonbn_get_recording_array_meta(get_object_vars($recording->metadata));
381
-    $recordingarray = array('recordID' => (string) $recording->recordID,
382
-        'meetingID' => (string) $recording->meetingID, 'meetingName' => (string) $recording->name,
383
-        'published' => (string) $recording->published, 'startTime' => (string) $recording->startTime,
384
-        'endTime' => (string) $recording->endTime, 'playbacks' => $playbackarray);
381
+    $recordingarray = array('recordID' => (string)$recording->recordID,
382
+        'meetingID' => (string)$recording->meetingID, 'meetingName' => (string)$recording->name,
383
+        'published' => (string)$recording->published, 'startTime' => (string)$recording->startTime,
384
+        'endTime' => (string)$recording->endTime, 'playbacks' => $playbackarray);
385 385
     if (isset($recording->protected)) {
386
-        $recordingarray['protected'] = (string) $recording->protected;
386
+        $recordingarray['protected'] = (string)$recording->protected;
387 387
     }
388 388
     return $recordingarray + $metadataarray;
389 389
 }
@@ -398,9 +398,9 @@  discard block
 block discarded – undo
398 398
 function bigbluebuttonbn_get_recording_preview_images($preview) {
399 399
     $imagesarray = array();
400 400
     foreach ($preview->images->image as $image) {
401
-        $imagearray = array('url' => trim((string) $image));
401
+        $imagearray = array('url' => trim((string)$image));
402 402
         foreach ($image->attributes() as $attkey => $attvalue) {
403
-            $imagearray[$attkey] = (string) $attvalue;
403
+            $imagearray[$attkey] = (string)$attvalue;
404 404
         }
405 405
         array_push($imagesarray, $imagearray);
406 406
     }
@@ -495,7 +495,7 @@  discard block
 block discarded – undo
495 495
     $ids = explode(',', $recordids);
496 496
     foreach ($ids as $id) {
497 497
         $xml = bigbluebuttonbn_wrap_xml_load_file(
498
-            \mod_bigbluebuttonbn\locallib\bigbluebutton::action_url('updateRecordings', ['recordID' => $id] + (array) $params)
498
+            \mod_bigbluebuttonbn\locallib\bigbluebutton::action_url('updateRecordings', ['recordID' => $id] + (array)$params)
499 499
         );
500 500
         if ($xml && $xml->returncode != 'SUCCESS') {
501 501
             return false;
@@ -666,7 +666,7 @@  discard block
 block discarded – undo
666 666
  * @return array $users
667 667
  */
668 668
 function bigbluebuttonbn_get_users(context $context = null) {
669
-    $users = (array) get_enrolled_users($context, '', 0, 'u.*', null, 0, 0, true);
669
+    $users = (array)get_enrolled_users($context, '', 0, 'u.*', null, 0, 0, true);
670 670
     foreach ($users as $key => $value) {
671 671
         $users[$key] = fullname($value);
672 672
     }
@@ -685,7 +685,7 @@  discard block
 block discarded – undo
685 685
 function bigbluebuttonbn_get_users_select(context_course $context, $bbactivity = null) {
686 686
     // CONTRIB-7972, check the group of current user and course group mode.
687 687
     $groups = null;
688
-    $users = (array) get_enrolled_users($context, '', 0, 'u.*', null, 0, 0, true);
688
+    $users = (array)get_enrolled_users($context, '', 0, 'u.*', null, 0, 0, true);
689 689
     $course = get_course($context->instanceid);
690 690
     $groupmode = groups_get_course_groupmode($course);
691 691
     if ($bbactivity) {
@@ -698,7 +698,7 @@  discard block
 block discarded – undo
698 698
         $groups = groups_get_all_groups($course->id, $USER->id);
699 699
         $users = [];
700 700
         foreach ($groups as $g) {
701
-            $users += (array) get_enrolled_users($context, '', $g->id, 'u.*', null, 0, 0, true);
701
+            $users += (array)get_enrolled_users($context, '', $g->id, 'u.*', null, 0, 0, true);
702 702
         }
703 703
     }
704 704
     $userselect = array_map(
@@ -724,12 +724,12 @@  discard block
 block discarded – undo
724 724
     global $CFG;
725 725
 
726 726
     if ($onlyviewableroles == true && $CFG->branch >= 35) {
727
-        $roles = (array) get_viewable_roles($context);
727
+        $roles = (array)get_viewable_roles($context);
728 728
         foreach ($roles as $key => $value) {
729 729
             $roles[$key] = $value;
730 730
         }
731 731
     } else {
732
-        $roles = (array) role_get_names($context);
732
+        $roles = (array)role_get_names($context);
733 733
         foreach ($roles as $key => $value) {
734 734
             $roles[$key] = $value->localname;
735 735
         }
@@ -750,12 +750,12 @@  discard block
 block discarded – undo
750 750
     global $CFG;
751 751
 
752 752
     if ($onlyviewableroles == true && $CFG->branch >= 35) {
753
-        $roles = (array) get_viewable_roles($context);
753
+        $roles = (array)get_viewable_roles($context);
754 754
         foreach ($roles as $key => $value) {
755 755
             $roles[$key] = array('id' => $key, 'name' => $value);
756 756
         }
757 757
     } else {
758
-        $roles = (array) role_get_names($context);
758
+        $roles = (array)role_get_names($context);
759 759
         foreach ($roles as $key => $value) {
760 760
             $roles[$key] = array('id' => $value->id, 'name' => $value->localname);
761 761
         }
@@ -774,9 +774,9 @@  discard block
 block discarded – undo
774 774
  * @return object $role
775 775
  */
776 776
 function bigbluebuttonbn_get_role($id) {
777
-    $roles = (array) role_get_names();
777
+    $roles = (array)role_get_names();
778 778
     if (is_numeric($id) && isset($roles[$id])) {
779
-        return (object) $roles[$id];
779
+        return (object)$roles[$id];
780 780
     }
781 781
     foreach ($roles as $role) {
782 782
         if ($role->shortname == $id) {
@@ -856,7 +856,7 @@  discard block
 block discarded – undo
856 856
             if (!empty($ownerid) && is_enrolled($context, $ownerid)) {
857 857
                 $participantlist[] = array(
858 858
                     'selectiontype' => 'user',
859
-                    'selectionid' => (string) $ownerid,
859
+                    'selectionid' => (string)$ownerid,
860 860
                     'role' => BIGBLUEBUTTONBN_ROLE_MODERATOR);
861 861
             }
862 862
             continue;
@@ -1038,7 +1038,7 @@  discard block
 block discarded – undo
1038 1038
     $now = time();
1039 1039
     if ($closingtime > 0 && $now < $closingtime) {
1040 1040
         $duration = ceil(($closingtime - $now) / 60);
1041
-        $compensationtime = intval((int) \mod_bigbluebuttonbn\locallib\config::get('scheduled_duration_compensation'));
1041
+        $compensationtime = intval((int)\mod_bigbluebuttonbn\locallib\config::get('scheduled_duration_compensation'));
1042 1042
         $duration = intval($duration) + $compensationtime;
1043 1043
     }
1044 1044
     return $duration;
@@ -1240,16 +1240,16 @@  discard block
 block discarded – undo
1240 1240
  * @return array
1241 1241
  */
1242 1242
 function bigbluebuttonbn_get_meeting_info($meetingid, $updatecache = false) {
1243
-    $cachettl = (int) \mod_bigbluebuttonbn\locallib\config::get('waitformoderator_cache_ttl');
1243
+    $cachettl = (int)\mod_bigbluebuttonbn\locallib\config::get('waitformoderator_cache_ttl');
1244 1244
     $cache = cache::make_from_params(cache_store::MODE_APPLICATION, 'mod_bigbluebuttonbn', 'meetings_cache');
1245 1245
     $result = $cache->get($meetingid);
1246 1246
     $now = time();
1247 1247
     if (!$updatecache && !empty($result) && $now < ($result['creation_time'] + $cachettl)) {
1248 1248
         // Use the value in the cache.
1249
-        return (array) json_decode($result['meeting_info']);
1249
+        return (array)json_decode($result['meeting_info']);
1250 1250
     }
1251 1251
     // Ping again and refresh the cache.
1252
-    $meetinginfo = (array) bigbluebuttonbn_wrap_xml_load_file(
1252
+    $meetinginfo = (array)bigbluebuttonbn_wrap_xml_load_file(
1253 1253
         \mod_bigbluebuttonbn\locallib\bigbluebutton::action_url('getMeetingInfo', ['meetingID' => $meetingid])
1254 1254
     );
1255 1255
     $cache->set($meetingid, array('creation_time' => time(), 'meeting_info' => json_encode($meetinginfo)));
@@ -1396,7 +1396,7 @@  discard block
 block discarded – undo
1396 1396
  */
1397 1397
 function bigbluebuttonbn_set_config_xml_array($meetingid, $configxml) {
1398 1398
     $configxml = bigbluebuttonbn_set_config_xml($meetingid, $configxml);
1399
-    $configxmlarray = (array) $configxml;
1399
+    $configxmlarray = (array)$configxml;
1400 1400
     if ($configxmlarray['returncode'] != 'SUCCESS') {
1401 1401
         debugging('BigBlueButton was not able to set the custom config.xml file', DEBUG_DEVELOPER);
1402 1402
         return '';
@@ -1449,7 +1449,7 @@  discard block
 block discarded – undo
1449 1449
  * @return boolean
1450 1450
  */
1451 1451
 function bigbluebuttonbn_get_recording_data_row_editable($bbbsession) {
1452
-    return ($bbbsession['managerecordings'] && ((double) $bbbsession['serverversion'] >= 1.0 || $bbbsession['bnserver']));
1452
+    return ($bbbsession['managerecordings'] && ((double)$bbbsession['serverversion'] >= 1.0 || $bbbsession['bnserver']));
1453 1453
 }
1454 1454
 
1455 1455
 /**
@@ -1460,7 +1460,7 @@  discard block
 block discarded – undo
1460 1460
  * @return boolean
1461 1461
  */
1462 1462
 function bigbluebuttonbn_get_recording_data_preview_enabled($bbbsession) {
1463
-    return ((double) $bbbsession['serverversion'] >= 1.0 && $bbbsession['bigbluebuttonbn']->recordings_preview == '1');
1463
+    return ((double)$bbbsession['serverversion'] >= 1.0 && $bbbsession['bigbluebuttonbn']->recordings_preview == '1');
1464 1464
 }
1465 1465
 
1466 1466
 /**
@@ -1886,7 +1886,7 @@  discard block
 block discarded – undo
1886 1886
     }
1887 1887
     $id = 'recording-' . $target . '-' . $recording['recordID'];
1888 1888
     $onclick = 'M.mod_bigbluebuttonbn.recordings.recording' . ucfirst($data['action']) . '(this); return false;';
1889
-    if ((boolean) \mod_bigbluebuttonbn\locallib\config::get('recording_icons_enabled')) {
1889
+    if ((boolean)\mod_bigbluebuttonbn\locallib\config::get('recording_icons_enabled')) {
1890 1890
         // With icon for $manageaction.
1891 1891
         $iconattributes = array('id' => $id, 'class' => 'iconsmall');
1892 1892
         $linkattributes = array(
@@ -2149,7 +2149,7 @@  discard block
 block discarded – undo
2149 2149
         // Enqueue it.
2150 2150
         \core\task\manager::queue_adhoc_task($task);
2151 2151
     } catch (Exception $e) {
2152
-        mtrace("Error while enqueuing completion_update_state task. " . (string) $e);
2152
+        mtrace("Error while enqueuing completion_update_state task. " . (string)$e);
2153 2153
     }
2154 2154
 }
2155 2155
 
@@ -2163,7 +2163,7 @@  discard block
 block discarded – undo
2163 2163
  */
2164 2164
 function bigbluebuttonbn_completion_update_state($bigbluebuttonbn, $userid) {
2165 2165
     global $CFG;
2166
-    require_once($CFG->libdir.'/completionlib.php');
2166
+    require_once($CFG->libdir . '/completionlib.php');
2167 2167
     list($course, $cm) = get_course_and_cm_from_instance($bigbluebuttonbn, 'bigbluebuttonbn');
2168 2168
     $completion = new completion_info($course);
2169 2169
     if (!$completion->is_enabled($cm)) {
@@ -2588,7 +2588,7 @@  discard block
 block discarded – undo
2588 2588
  */
2589 2589
 function bigbluebuttonbn_format_activity_time($time) {
2590 2590
     global $CFG;
2591
-    require_once($CFG->dirroot.'/calendar/lib.php');
2591
+    require_once($CFG->dirroot . '/calendar/lib.php');
2592 2592
     $activitytime = '';
2593 2593
     if ($time) {
2594 2594
         $activitytime = calendar_day_representation($time) . ' ' .
@@ -2686,7 +2686,7 @@  discard block
 block discarded – undo
2686 2686
  */
2687 2687
 function bigbluebuttonbn_settings_general(&$renderer) {
2688 2688
     // Configuration for BigBlueButton.
2689
-    if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_general_shown()) {
2689
+    if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_general_shown()) {
2690 2690
         $renderer->render_group_header('general');
2691 2691
         $renderer->render_group_element(
2692 2692
             'server_url',
@@ -2708,7 +2708,7 @@  discard block
 block discarded – undo
2708 2708
  */
2709 2709
 function bigbluebuttonbn_settings_record(&$renderer) {
2710 2710
     // Configuration for 'recording' feature.
2711
-    if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_record_meeting_shown()) {
2711
+    if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_record_meeting_shown()) {
2712 2712
         $renderer->render_group_header('recording');
2713 2713
         $renderer->render_group_element(
2714 2714
             'recording_default',
@@ -2752,7 +2752,7 @@  discard block
 block discarded – undo
2752 2752
  */
2753 2753
 function bigbluebuttonbn_settings_importrecordings(&$renderer) {
2754 2754
     // Configuration for 'import recordings' feature.
2755
-    if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_import_recordings_shown()) {
2755
+    if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_import_recordings_shown()) {
2756 2756
         $renderer->render_group_header('importrecordings');
2757 2757
         $renderer->render_group_element(
2758 2758
             'importrecordings_enabled',
@@ -2774,7 +2774,7 @@  discard block
 block discarded – undo
2774 2774
  */
2775 2775
 function bigbluebuttonbn_settings_showrecordings(&$renderer) {
2776 2776
     // Configuration for 'show recordings' feature.
2777
-    if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_show_recordings_shown()) {
2777
+    if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_show_recordings_shown()) {
2778 2778
         $renderer->render_group_header('recordings');
2779 2779
         $renderer->render_group_element(
2780 2780
             'recordings_html_default',
@@ -2828,7 +2828,7 @@  discard block
 block discarded – undo
2828 2828
  */
2829 2829
 function bigbluebuttonbn_settings_waitmoderator(&$renderer) {
2830 2830
     // Configuration for wait for moderator feature.
2831
-    if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_wait_moderator_shown()) {
2831
+    if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_wait_moderator_shown()) {
2832 2832
         $renderer->render_group_header('waitformoderator');
2833 2833
         $renderer->render_group_element(
2834 2834
             'waitformoderator_default',
@@ -2858,7 +2858,7 @@  discard block
 block discarded – undo
2858 2858
  */
2859 2859
 function bigbluebuttonbn_settings_voicebridge(&$renderer) {
2860 2860
     // Configuration for "static voice bridge" feature.
2861
-    if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_static_voice_bridge_shown()) {
2861
+    if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_static_voice_bridge_shown()) {
2862 2862
         $renderer->render_group_header('voicebridge');
2863 2863
         $renderer->render_group_element(
2864 2864
             'voicebridge_editable',
@@ -2876,7 +2876,7 @@  discard block
 block discarded – undo
2876 2876
  */
2877 2877
 function bigbluebuttonbn_settings_preupload(&$renderer) {
2878 2878
     // Configuration for "preupload presentation" feature.
2879
-    if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_preupload_presentation_shown()) {
2879
+    if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_preupload_presentation_shown()) {
2880 2880
         // This feature only works if curl is installed.
2881 2881
         $preuploaddescripion = get_string('config_preuploadpresentation_description', 'bigbluebuttonbn');
2882 2882
         if (!extension_loaded('curl')) {
@@ -2904,7 +2904,7 @@  discard block
 block discarded – undo
2904 2904
  */
2905 2905
 function bigbluebuttonbn_settings_preupload_manage_default_file(&$renderer) {
2906 2906
     // Configuration for "preupload presentation" feature.
2907
-    if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_preupload_presentation_shown()) {
2907
+    if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_preupload_presentation_shown()) {
2908 2908
         if (extension_loaded('curl')) {
2909 2909
             // This feature only works if curl is installed.
2910 2910
             $renderer->render_filemanager_default_file_presentation("presentation_default");
@@ -2921,7 +2921,7 @@  discard block
 block discarded – undo
2921 2921
  */
2922 2922
 function bigbluebuttonbn_settings_userlimit(&$renderer) {
2923 2923
     // Configuration for "user limit" feature.
2924
-    if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_user_limit_shown()) {
2924
+    if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_user_limit_shown()) {
2925 2925
         $renderer->render_group_header('userlimit');
2926 2926
         $renderer->render_group_element(
2927 2927
             'userlimit_default',
@@ -2943,7 +2943,7 @@  discard block
 block discarded – undo
2943 2943
  */
2944 2944
 function bigbluebuttonbn_settings_duration(&$renderer) {
2945 2945
     // Configuration for "scheduled duration" feature.
2946
-    if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_scheduled_duration_shown()) {
2946
+    if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_scheduled_duration_shown()) {
2947 2947
         $renderer->render_group_header('scheduled');
2948 2948
         $renderer->render_group_element(
2949 2949
             'scheduled_duration_enabled',
@@ -2969,7 +2969,7 @@  discard block
 block discarded – undo
2969 2969
  */
2970 2970
 function bigbluebuttonbn_settings_participants(&$renderer) {
2971 2971
     // Configuration for defining the default role/user that will be moderator on new activities.
2972
-    if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_moderator_default_shown()) {
2972
+    if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_moderator_default_shown()) {
2973 2973
         $renderer->render_group_header('participant');
2974 2974
         // UI for 'participants' feature.
2975 2975
         $roles = bigbluebuttonbn_get_roles(null, false);
@@ -2994,7 +2994,7 @@  discard block
 block discarded – undo
2994 2994
  */
2995 2995
 function bigbluebuttonbn_settings_notifications(&$renderer) {
2996 2996
     // Configuration for "send notifications" feature.
2997
-    if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_send_notifications_shown()) {
2997
+    if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_send_notifications_shown()) {
2998 2998
         $renderer->render_group_header('sendnotifications');
2999 2999
         $renderer->render_group_element(
3000 3000
             'sendnotifications_enabled',
@@ -3012,14 +3012,14 @@  discard block
 block discarded – undo
3012 3012
  */
3013 3013
 function bigbluebuttonbn_settings_clienttype(&$renderer) {
3014 3014
     // Configuration for "clienttype" feature.
3015
-    if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_clienttype_shown()) {
3015
+    if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_clienttype_shown()) {
3016 3016
         $renderer->render_group_header('clienttype');
3017 3017
         $renderer->render_group_element(
3018 3018
             'clienttype_editable',
3019 3019
             $renderer->render_group_element_checkbox('clienttype_editable', 0)
3020 3020
         );
3021 3021
         // Web Client default.
3022
-        $default = intval((int) \mod_bigbluebuttonbn\locallib\config::get('clienttype_default'));
3022
+        $default = intval((int)\mod_bigbluebuttonbn\locallib\config::get('clienttype_default'));
3023 3023
         $choices = array(BIGBLUEBUTTON_CLIENTTYPE_FLASH => get_string('mod_form_block_clienttype_flash', 'bigbluebuttonbn'),
3024 3024
             BIGBLUEBUTTON_CLIENTTYPE_HTML5 => get_string('mod_form_block_clienttype_html5', 'bigbluebuttonbn'));
3025 3025
         $renderer->render_group_element(
@@ -3042,7 +3042,7 @@  discard block
 block discarded – undo
3042 3042
  */
3043 3043
 function bigbluebuttonbn_settings_muteonstart(&$renderer) {
3044 3044
     // Configuration for BigBlueButton.
3045
-    if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_muteonstart_shown()) {
3045
+    if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_muteonstart_shown()) {
3046 3046
         $renderer->render_group_header('muteonstart');
3047 3047
         $renderer->render_group_element(
3048 3048
             'muteonstart_default',
@@ -3064,7 +3064,7 @@  discard block
 block discarded – undo
3064 3064
  */
3065 3065
 function bigbluebuttonbn_settings_extended(&$renderer) {
3066 3066
     // Configuration for 'notify users when recording ready' feature.
3067
-    if (!(boolean) \mod_bigbluebuttonbn\settings\validator::section_settings_extended_shown()) {
3067
+    if (!(boolean)\mod_bigbluebuttonbn\settings\validator::section_settings_extended_shown()) {
3068 3068
         return;
3069 3069
     }
3070 3070
     $renderer->render_group_header('extended_capabilities');
@@ -3090,7 +3090,7 @@  discard block
 block discarded – undo
3090 3090
     global $DB;
3091 3091
     do {
3092 3092
         $encodedseed = sha1(bigbluebuttonbn_random_password(12));
3093
-        $meetingid = (string) $DB->get_field('bigbluebuttonbn', 'meetingid', array('meetingid' => $encodedseed));
3093
+        $meetingid = (string)$DB->get_field('bigbluebuttonbn', 'meetingid', array('meetingid' => $encodedseed));
3094 3094
     } while ($meetingid == $encodedseed);
3095 3095
     return $encodedseed;
3096 3096
 }
@@ -3303,7 +3303,7 @@  discard block
 block discarded – undo
3303 3303
 function bigbluebuttonbn_instance_ownerid($bigbluebuttonbn) {
3304 3304
     global $DB;
3305 3305
     $filters = array('bigbluebuttonbnid' => $bigbluebuttonbn->id, 'log' => 'Add');
3306
-    $ownerid = (integer) $DB->get_field('bigbluebuttonbn_logs', 'userid', $filters);
3306
+    $ownerid = (integer)$DB->get_field('bigbluebuttonbn_logs', 'userid', $filters);
3307 3307
     return $ownerid;
3308 3308
 }
3309 3309
 
@@ -3346,8 +3346,8 @@  discard block
 block discarded – undo
3346 3346
     $bbbsession['meetingname'] = $bbbsession['bigbluebuttonbn']->name;
3347 3347
     $bbbsession['meetingdescription'] = $bbbsession['bigbluebuttonbn']->intro;
3348 3348
     // Extra data for setting up the Meeting.
3349
-    $bbbsession['userlimit'] = intval((int) \mod_bigbluebuttonbn\locallib\config::get('userlimit_default'));
3350
-    if ((boolean) \mod_bigbluebuttonbn\locallib\config::get('userlimit_editable')) {
3349
+    $bbbsession['userlimit'] = intval((int)\mod_bigbluebuttonbn\locallib\config::get('userlimit_default'));
3350
+    if ((boolean)\mod_bigbluebuttonbn\locallib\config::get('userlimit_editable')) {
3351 3351
         $bbbsession['userlimit'] = intval($bbbsession['bigbluebuttonbn']->userlimit);
3352 3352
     }
3353 3353
     $bbbsession['voicebridge'] = $bbbsession['bigbluebuttonbn']->voicebridge;
@@ -3495,7 +3495,7 @@  discard block
 block discarded – undo
3495 3495
         'bbb-recording-tags' => bigbluebuttonbn_get_tags($bbbsession['cm']->id), // Same as $id.
3496 3496
     ];
3497 3497
     // Special metadata for recording processing.
3498
-    if ((boolean) \mod_bigbluebuttonbn\locallib\config::get('recordingstatus_enabled')) {
3498
+    if ((boolean)\mod_bigbluebuttonbn\locallib\config::get('recordingstatus_enabled')) {
3499 3499
         $metadata["bn-recording-status"] = json_encode(
3500 3500
             array(
3501 3501
                 'email' => array('"' . fullname($USER) . '" <' . $USER->email . '>'),
@@ -3503,10 +3503,10 @@  discard block
 block discarded – undo
3503 3503
             )
3504 3504
         );
3505 3505
     }
3506
-    if ((boolean) \mod_bigbluebuttonbn\locallib\config::get('recordingready_enabled')) {
3506
+    if ((boolean)\mod_bigbluebuttonbn\locallib\config::get('recordingready_enabled')) {
3507 3507
         $metadata['bn-recording-ready-url'] = $bbbsession['recordingReadyURL'];
3508 3508
     }
3509
-    if ((boolean) \mod_bigbluebuttonbn\locallib\config::get('meetingevents_enabled')) {
3509
+    if ((boolean)\mod_bigbluebuttonbn\locallib\config::get('meetingevents_enabled')) {
3510 3510
         $metadata['analytics-callback-url'] = $bbbsession['meetingEventsURL'];
3511 3511
     }
3512 3512
     return $metadata;
Please login to merge, or discard this patch.
classes/output/index.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -35,7 +35,7 @@  discard block
 block discarded – undo
35 35
 
36 36
 defined('MOODLE_INTERNAL') || die();
37 37
 
38
-require_once($CFG->dirroot.'/mod/bigbluebuttonbn/locallib.php');
38
+require_once($CFG->dirroot . '/mod/bigbluebuttonbn/locallib.php');
39 39
 
40 40
 /**
41 41
  * Class index
@@ -91,7 +91,7 @@  discard block
 block discarded – undo
91 91
                 // Add a the data for the bigbluebuttonbn instance.
92 92
                 $groupobj = null;
93 93
                 if (groups_get_activity_groupmode($cm) > 0) {
94
-                    $groupobj = (object) array('id' => 0, 'name' => get_string('allparticipants'));
94
+                    $groupobj = (object)array('id' => 0, 'name' => get_string('allparticipants'));
95 95
                 }
96 96
                 $table->data[] = self::bigbluebuttonbn_index_display_room($canmoderate, $course, $bigbluebuttonbn, $groupobj);
97 97
                 // Add a the data for the groups belonging to the bigbluebuttonbn instance, if any.
@@ -181,7 +181,7 @@  discard block
 block discarded – undo
181 181
             $attendeecount = 0;
182 182
             foreach ($meetinginfo['attendees']->attendee as $attendee) {
183 183
                 if ($attendee->role == $role) {
184
-                    $attendeelist .= ($attendeecount++ > 0 ? ', ' : '').$attendee->fullName;
184
+                    $attendeelist .= ($attendeecount++ > 0 ? ', ' : '') . $attendee->fullName;
185 185
                 }
186 186
             }
187 187
         }
@@ -215,18 +215,18 @@  discard block
 block discarded – undo
215 215
     public static function bigbluebuttonbn_index_display_room_actions($moderator, $course, $bigbluebuttonbn, $groupobj = null) {
216 216
         $actions = '';
217 217
         if ($moderator) {
218
-            $actions .= '<form name="form1" method="post" action="">'."\n";
219
-            $actions .= '  <INPUT type="hidden" name="id" value="'.$course->id.'">'."\n";
220
-            $actions .= '  <INPUT type="hidden" name="a" value="'.$bigbluebuttonbn->id.'">'."\n";
221
-            $actions .= '  <INPUT type="hidden" name="action" value="end">'."\n";
218
+            $actions .= '<form name="form1" method="post" action="">' . "\n";
219
+            $actions .= '  <INPUT type="hidden" name="id" value="' . $course->id . '">' . "\n";
220
+            $actions .= '  <INPUT type="hidden" name="a" value="' . $bigbluebuttonbn->id . '">' . "\n";
221
+            $actions .= '  <INPUT type="hidden" name="action" value="end">' . "\n";
222 222
             if ($groupobj != null) {
223
-                $actions .= '  <INPUT type="hidden" name="g" value="'.$groupobj->id.'">'."\n";
223
+                $actions .= '  <INPUT type="hidden" name="g" value="' . $groupobj->id . '">' . "\n";
224 224
             }
225 225
             $actions .= '  <INPUT type="submit" name="submit" value="' .
226 226
                 get_string('view_conference_action_end', 'bigbluebuttonbn') .
227 227
                 '" class="btn btn-primary btn-sm" onclick="return confirm(\'' .
228 228
                 get_string('index_confirm_end', 'bigbluebuttonbn') . '\')">' . "\n";
229
-            $actions .= '</form>'."\n";
229
+            $actions .= '</form>' . "\n";
230 230
         }
231 231
         return $actions;
232 232
     }
Please login to merge, or discard this patch.
brokerlib.php 1 patch
Spacing   +9 added lines, -9 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
     }
@@ -559,8 +559,8 @@  discard block
 block discarded – undo
559 559
             array('HS256')
560 560
         );
561 561
     } catch (Exception $e) {
562
-        $error = 'Caught exception: '.$e->getMessage();
563
-        header('HTTP/1.0 400 Bad Request. '.$error);
562
+        $error = 'Caught exception: ' . $e->getMessage();
563
+        header('HTTP/1.0 400 Bad Request. ' . $error);
564 564
         return;
565 565
     }
566 566
     // Validate that the bigbluebuttonbn activity corresponds to the meeting_id received.
@@ -590,8 +590,8 @@  discard block
 block discarded – undo
590 590
         bigbluebuttonbn_log($bigbluebuttonbn, BIGBLUEBUTTON_LOG_EVENT_CALLBACK, $overrides, json_encode($meta));
591 591
         header('HTTP/1.0 202 Accepted');
592 592
     } catch (Exception $e) {
593
-        $error = 'Caught exception: '.$e->getMessage();
594
-        header('HTTP/1.0 503 Service Unavailable. '.$error);
593
+        $error = 'Caught exception: ' . $e->getMessage();
594
+        header('HTTP/1.0 503 Service Unavailable. ' . $error);
595 595
     }
596 596
 }
597 597
 
@@ -612,13 +612,13 @@  discard block
 block discarded – undo
612 612
     $importrecordings = $SESSION->bigbluebuttonbn_importrecordings;
613 613
     if (!isset($importrecordings[$params['id']])) {
614 614
         $error = "Recording {$params['id']} could not be found. It can not be imported";
615
-        header('HTTP/1.0 404 Not found. '.$error);
615
+        header('HTTP/1.0 404 Not found. ' . $error);
616 616
         return;
617 617
     }
618 618
     $callbackresponse = array('status' => true);
619 619
     $importrecordings[$params['id']]['imported'] = true;
620 620
     $overrides = array('meetingid' => $importrecordings[$params['id']]['meetingID']);
621
-    $meta = '{"recording":'.json_encode($importrecordings[$params['id']]).'}';
621
+    $meta = '{"recording":' . json_encode($importrecordings[$params['id']]) . '}';
622 622
     bigbluebuttonbn_log($bbbsession['bigbluebuttonbn'], BIGBLUEBUTTONBN_LOG_EVENT_IMPORT, $overrides, $meta);
623 623
     // Moodle event logger: Create an event for recording imported.
624 624
     if (isset($bbbsession['bigbluebutton']) && isset($bbbsession['cm'])) {
@@ -712,7 +712,7 @@  discard block
 block discarded – undo
712 712
     $action = strtolower($params['action']);
713 713
     $requiredparams = bigbluebuttonbn_broker_required_parameters();
714 714
     if (!array_key_exists($action, $requiredparams)) {
715
-        return 'Action '.$params['action'].' can not be performed.';
715
+        return 'Action ' . $params['action'] . ' can not be performed.';
716 716
     }
717 717
     return bigbluebuttonbn_broker_validate_parameters_message($params, $requiredparams[$action]);
718 718
 }
@@ -858,7 +858,7 @@  discard block
 block discarded – undo
858 858
     $tabledata = array();
859 859
     $typeprofiles = bigbluebuttonbn_get_instance_type_profiles();
860 860
     $tabledata['activity'] = bigbluebuttonbn_view_get_activity_status($bbbsession);
861
-    $tabledata['ping_interval'] = (int) \mod_bigbluebuttonbn\locallib\config::get('waitformoderator_ping_interval') * 1000;
861
+    $tabledata['ping_interval'] = (int)\mod_bigbluebuttonbn\locallib\config::get('waitformoderator_ping_interval') * 1000;
862 862
     $tabledata['locale'] = bigbluebuttonbn_get_localcode();
863 863
     $tabledata['profile_features'] = $typeprofiles[0]['features'];
864 864
     $tabledata['recordings_html'] = $bbbsession['bigbluebuttonbn']->recordings_html == '1';
Please login to merge, or discard this patch.