Completed
Pull Request — master (#56)
by Jesus
02:31
created
classes/event/recording_deleted.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -41,7 +41,7 @@
 block discarded – undo
41 41
      */
42 42
     protected function init() {
43 43
         parent::init('r', self::LEVEL_OTHER);
44
-        $this->description = "The user with id '##userid' has deleted a recording with id ".
44
+        $this->description = "The user with id '##userid' has deleted a recording with id " .
45 45
             "'##other' from the course id '##courseid'.";
46 46
     }
47 47
 
Please login to merge, or discard this patch.
classes/event/recording_published.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -41,7 +41,7 @@
 block discarded – undo
41 41
      */
42 42
     protected function init() {
43 43
         parent::init('r', self::LEVEL_OTHER);
44
-        $this->description = "The user with id '##userid' has published a recording with id ".
44
+        $this->description = "The user with id '##userid' has published a recording with id " .
45 45
             "'##other' in the course id '##courseid'.";
46 46
     }
47 47
 
Please login to merge, or discard this patch.
view.php 2 patches
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;
@@ -148,7 +148,7 @@  discard block
 block discarded – undo
148 148
     $bbbsession['modPW'] = $bbbsession['bigbluebuttonbn']->moderatorpass;
149 149
     $bbbsession['viewerPW'] = $bbbsession['bigbluebuttonbn']->viewerpass;
150 150
     // Database info related to the activity.
151
-    $bbbsession['meetingid'] = $bbbsession['bigbluebuttonbn']->meetingid.'-'.$bbbsession['course']->id.'-'.
151
+    $bbbsession['meetingid'] = $bbbsession['bigbluebuttonbn']->meetingid . '-' . $bbbsession['course']->id . '-' .
152 152
         $bbbsession['bigbluebuttonbn']->id;
153 153
     $bbbsession['meetingname'] = $bbbsession['bigbluebuttonbn']->name;
154 154
     $bbbsession['meetingdescription'] = $bbbsession['bigbluebuttonbn']->intro;
@@ -168,7 +168,7 @@  discard block
 block discarded – undo
168 168
         $bbbsession['welcome'] = get_string('mod_form_field_welcome_default', 'bigbluebuttonbn');
169 169
     }
170 170
     if ($bbbsession['bigbluebuttonbn']->record) {
171
-        $bbbsession['welcome'] .= '<br><br>'.get_string('bbbrecordwarning', 'bigbluebuttonbn');
171
+        $bbbsession['welcome'] .= '<br><br>' . get_string('bbbrecordwarning', 'bigbluebuttonbn');
172 172
     }
173 173
     $bbbsession['openingtime'] = $bbbsession['bigbluebuttonbn']->openingtime;
174 174
     $bbbsession['closingtime'] = $bbbsession['bigbluebuttonbn']->closingtime;
@@ -181,7 +181,7 @@  discard block
 block discarded – undo
181 181
     $bbbsession['originServerName'] = $parsedurl['host'];
182 182
     $bbbsession['originServerUrl'] = $CFG->wwwroot;
183 183
     $bbbsession['originServerCommonName'] = '';
184
-    $bbbsession['originTag'] = 'moodle-mod_bigbluebuttonbn ('.get_config('mod_bigbluebuttonbn', 'version').')';
184
+    $bbbsession['originTag'] = 'moodle-mod_bigbluebuttonbn (' . get_config('mod_bigbluebuttonbn', 'version') . ')';
185 185
     $bbbsession['bnserver'] = bigbluebuttonbn_is_bn_server();
186 186
 }
187 187
 
@@ -236,8 +236,8 @@  discard block
 block discarded – undo
236 236
         $groupname = groups_get_group_name($bbbsession['group']);
237 237
     }
238 238
     // Assign group default values.
239
-    $bbbsession['meetingid'] .= '['.$bbbsession['group'].']';
240
-    $bbbsession['meetingname'] .= ' ('.$groupname.')';
239
+    $bbbsession['meetingid'] .= '[' . $bbbsession['group'] . ']';
240
+    $bbbsession['meetingname'] .= ' (' . $groupname . ')';
241 241
     if (count($groups) == 0) {
242 242
         // Only the All participants group exists.
243 243
         bigbluebuttonbn_view_message_box($bbbsession, get_string('view_groups_notenrolled_warning', 'bigbluebuttonbn'), 'info');
@@ -247,7 +247,7 @@  discard block
 block discarded – undo
247 247
     if (has_capability('moodle/site:accessallgroups', $context)) {
248 248
         bigbluebuttonbn_view_message_box($bbbsession, get_string('view_groups_selection_warning', 'bigbluebuttonbn'));
249 249
     }
250
-    $urltoroot = $CFG->wwwroot.'/mod/bigbluebuttonbn/view.php?id='.$bbbsession['cm']->id;
250
+    $urltoroot = $CFG->wwwroot . '/mod/bigbluebuttonbn/view.php?id=' . $bbbsession['cm']->id;
251 251
     groups_print_activity_menu($bbbsession['cm'], $urltoroot);
252 252
     echo '<br><br>';
253 253
 }
@@ -314,7 +314,7 @@  discard block
 block discarded – undo
314 314
         $recordingsdisabled = get_string('view_message_recordings_disabled', 'bigbluebuttonbn');
315 315
         $output .= bigbluebuttonbn_render_warning($recordingsdisabled, 'danger');
316 316
     }
317
-    echo $output.html_writer::empty_tag('br').html_writer::empty_tag('br').html_writer::empty_tag('br');
317
+    echo $output . html_writer::empty_tag('br') . html_writer::empty_tag('br') . html_writer::empty_tag('br');
318 318
     $PAGE->requires->yui_module('moodle-mod_bigbluebuttonbn-broker', 'M.mod_bigbluebuttonbn.broker.init', array($jsvars));
319 319
 }
320 320
 
@@ -383,12 +383,12 @@  discard block
 block discarded – undo
383 383
     // JavaScript variables for room.
384 384
     $openingtime = '';
385 385
     if ($bbbsession['openingtime']) {
386
-        $openingtime = get_string('mod_form_field_openingtime', 'bigbluebuttonbn').': '.
386
+        $openingtime = get_string('mod_form_field_openingtime', 'bigbluebuttonbn') . ': ' .
387 387
             userdate($bbbsession['openingtime']);
388 388
     }
389 389
     $closingtime = '';
390 390
     if ($bbbsession['closingtime']) {
391
-        $closingtime = get_string('mod_form_field_closingtime', 'bigbluebuttonbn').': '.
391
+        $closingtime = get_string('mod_form_field_closingtime', 'bigbluebuttonbn') . ': ' .
392 392
             userdate($bbbsession['closingtime']);
393 393
     }
394 394
     $jsvars += array(
@@ -405,7 +405,7 @@  discard block
 block discarded – undo
405 405
     $output .= $OUTPUT->box_end();
406 406
     // Action button box.
407 407
     $output .= $OUTPUT->box_start('generalbox boxaligncenter', 'bigbluebuttonbn_view_action_button_box');
408
-    $output .= '<br><br><span id="join_button"></span>&nbsp;<span id="end_button"></span>'."\n";
408
+    $output .= '<br><br><span id="join_button"></span>&nbsp;<span id="end_button"></span>' . "\n";
409 409
     $output .= $OUTPUT->box_end();
410 410
     if ($activity == 'ended') {
411 411
         $output .= bigbluebuttonbn_view_ended($bbbsession);
@@ -454,7 +454,7 @@  discard block
 block discarded – undo
454 454
     // If there are meetings with recordings load the data to the table.
455 455
     if ($bbbsession['bigbluebuttonbn']->recordings_html) {
456 456
         // Render a plain html table.
457
-        return bigbluebuttonbn_output_recording_table($bbbsession, $recordings)."\n";
457
+        return bigbluebuttonbn_output_recording_table($bbbsession, $recordings) . "\n";
458 458
     }
459 459
     // JavaScript variables for recordings with YUI.
460 460
     $jsvars += array(
@@ -482,8 +482,8 @@  discard block
 block discarded – undo
482 482
         array('type' => 'button',
483 483
               'value' => get_string('view_recording_button_import', 'bigbluebuttonbn'),
484 484
               'class' => 'btn btn-secondary',
485
-              'onclick' => 'window.location=\''.$CFG->wwwroot.'/mod/bigbluebuttonbn/import_view.php?bn='.
486
-                  $bbbsession['bigbluebuttonbn']->id.'\''));
485
+              'onclick' => 'window.location=\'' . $CFG->wwwroot . '/mod/bigbluebuttonbn/import_view.php?bn=' .
486
+                  $bbbsession['bigbluebuttonbn']->id . '\''));
487 487
     $output  = html_writer::empty_tag('br');
488 488
     $output .= html_writer::tag('span', $button, array('id' => 'import_recording_links_button'));
489 489
     $output .= html_writer::tag('span', '', array('id' => 'import_recording_links_table'));
@@ -502,10 +502,10 @@  discard block
 block discarded – undo
502 502
     if (!is_null($bbbsession['presentation']['url'])) {
503 503
         $attributes = array('title' => $bbbsession['presentation']['name']);
504 504
         $icon = new pix_icon($bbbsession['presentation']['icon'], $bbbsession['presentation']['mimetype_description']);
505
-        return '<h4>'.get_string('view_section_title_presentation', 'bigbluebuttonbn').'</h4>'.
506
-                $OUTPUT->action_icon($bbbsession['presentation']['url'], $icon, null, array(), false).
505
+        return '<h4>' . get_string('view_section_title_presentation', 'bigbluebuttonbn') . '</h4>' .
506
+                $OUTPUT->action_icon($bbbsession['presentation']['url'], $icon, null, array(), false) .
507 507
                 $OUTPUT->action_link($bbbsession['presentation']['url'],
508
-                $bbbsession['presentation']['name'], null, $attributes).'<br><br>';
508
+                $bbbsession['presentation']['name'], null, $attributes) . '<br><br>';
509 509
     }
510 510
     return '';
511 511
 }
Please login to merge, or discard this patch.
Indentation   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -434,12 +434,12 @@  discard block
 block discarded – undo
434 434
     $recordings = bigbluebuttonbn_get_recordings(
435 435
         $bbbsession['course']->id, $bigbluebuttonbnid, $enabledfeatures['showroom'],
436 436
         $bbbsession['bigbluebuttonbn']->recordings_deleted
437
-      );
437
+        );
438 438
     if ($enabledfeatures['importrecordings']) {
439 439
         // Get recording links.
440 440
         $recordingsimported = bigbluebuttonbn_get_recordings_imported_array(
441 441
             $bbbsession['course']->id, $bigbluebuttonbnid, $enabledfeatures['showroom']
442
-          );
442
+            );
443 443
         /* Perform aritmetic addition instead of merge so the imported recordings corresponding to existent
444 444
          * recordings are not included. */
445 445
         if ($bbbsession['bigbluebuttonbn']->recordings_imported) {
@@ -457,7 +457,7 @@  discard block
 block discarded – undo
457 457
     // JavaScript variables for recordings.
458 458
     $jsvars += array(
459 459
             'recordings_html' => $bbbsession['bigbluebuttonbn']->recordings_html == '1',
460
-          );
460
+            );
461 461
     // If there are meetings with recordings load the data to the table.
462 462
     if ($bbbsession['bigbluebuttonbn']->recordings_html) {
463 463
         // Render a plain html table.
@@ -467,7 +467,7 @@  discard block
 block discarded – undo
467 467
     $jsvars += array(
468 468
             'columns' => bigbluebuttonbn_get_recording_columns($bbbsession),
469 469
             'data' => bigbluebuttonbn_get_recording_data($bbbsession, $recordings),
470
-          );
470
+            );
471 471
     // Render a YUI table.
472 472
     return html_writer::div('', '', array('id' => 'bigbluebuttonbn_recordings_table'));
473 473
 }
@@ -487,10 +487,10 @@  discard block
 block discarded – undo
487 487
     }
488 488
     $button = html_writer::tag('input', '',
489 489
         array('type' => 'button',
490
-              'value' => get_string('view_recording_button_import', 'bigbluebuttonbn'),
491
-              'class' => 'btn btn-secondary',
492
-              'onclick' => 'window.location=\''.$CFG->wwwroot.'/mod/bigbluebuttonbn/import_view.php?bn='.
493
-                  $bbbsession['bigbluebuttonbn']->id.'\''));
490
+                'value' => get_string('view_recording_button_import', 'bigbluebuttonbn'),
491
+                'class' => 'btn btn-secondary',
492
+                'onclick' => 'window.location=\''.$CFG->wwwroot.'/mod/bigbluebuttonbn/import_view.php?bn='.
493
+                    $bbbsession['bigbluebuttonbn']->id.'\''));
494 494
     $output  = html_writer::empty_tag('br');
495 495
     $output .= html_writer::tag('span', $button, array('id' => 'import_recording_links_button'));
496 496
     $output .= html_writer::tag('span', '', array('id' => 'import_recording_links_table'));
@@ -569,5 +569,5 @@  discard block
 block discarded – undo
569 569
         (string)\mod_bigbluebuttonbn\locallib\config::get('general_warning_button_href'),
570 570
         (string)\mod_bigbluebuttonbn\locallib\config::get('general_warning_button_text'),
571 571
         (string)\mod_bigbluebuttonbn\locallib\config::get('general_warning_button_class')
572
-      );
572
+        );
573 573
 }
Please login to merge, or discard this patch.
classes/privacy/provider.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -212,7 +212,7 @@
 block discarded – undo
212 212
             function($instanceid, $data) use ($user, $instanceidstocmids) {
213 213
                 $context = \context_module::instance($instanceidstocmids[$instanceid]);
214 214
                 $contextdata = helper::get_context_data($context, $user);
215
-                $finaldata = (object) array_merge((array) $contextdata, ['logs' => $data]);
215
+                $finaldata = (object)array_merge((array)$contextdata, ['logs' => $data]);
216 216
                 helper::export_context_files($context, $user);
217 217
                 writer::with_context($context)->export_data([], $finaldata);
218 218
             }
Please login to merge, or discard this patch.
Indentation   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -61,11 +61,11 @@  discard block
 block discarded – undo
61 61
      */
62 62
     public static function _get_metadata(collection $collection) {
63 63
 
64
-         // The table bigbluebuttonbn stores only the room properties.
65
-         // However, there is a chance that some personal information is stored as metadata.
66
-         // This would be done in the column 'participants' where rules can be set to define BBB roles.
67
-         // It is fair to say that only the userid is stored, which is useless if user is removed.
68
-         // But if this is a concern a refactoring on the way the rules are stored will be required.
64
+            // The table bigbluebuttonbn stores only the room properties.
65
+            // However, there is a chance that some personal information is stored as metadata.
66
+            // This would be done in the column 'participants' where rules can be set to define BBB roles.
67
+            // It is fair to say that only the userid is stored, which is useless if user is removed.
68
+            // But if this is a concern a refactoring on the way the rules are stored will be required.
69 69
         $collection->add_database_table('bigbluebuttonbn', [
70 70
             'participants' => 'privacy:metadata:bigbluebuttonbn:participants',
71 71
         ], 'privacy:metadata:bigbluebuttonbn');
@@ -208,7 +208,7 @@  discard block
 block discarded – undo
208 208
                     'meetingid' => $record->meetingid,
209 209
                     'log' => $record->log,
210 210
                     'meta' => $record->meta,
211
-                  ];
211
+                    ];
212 212
                 return $carry;
213 213
             },
214 214
             function($instanceid, $data) use ($user, $instanceidstocmids) {
Please login to merge, or discard this patch.
classes/locallib/config.php 2 patches
Indentation   +28 added lines, -28 removed lines patch added patch discarded remove patch
@@ -152,33 +152,33 @@
 block discarded – undo
152 152
      */
153 153
     public static function get_options() {
154 154
         return array(
155
-               'version_major' => self::get_moodle_version_major(),
156
-               'voicebridge_editable' => self::get('voicebridge_editable'),
157
-               'importrecordings_enabled' => self::get('importrecordings_enabled'),
158
-               'importrecordings_from_deleted_enabled' => self::get('importrecordings_from_deleted_enabled'),
159
-               'waitformoderator_default' => self::get('waitformoderator_default'),
160
-               'waitformoderator_editable' => self::get('waitformoderator_editable'),
161
-               'userlimit_default' => self::get('userlimit_default'),
162
-               'userlimit_editable' => self::get('userlimit_editable'),
163
-               'preuploadpresentation_enabled' => self::get('preuploadpresentation_enabled'),
164
-               'sendnotifications_enabled' => self::get('sendnotifications_enabled'),
165
-               'recordings_enabled' => self::get('recordings_enabled'),
166
-               'recordings_html_default' => self::get('recordings_html_default'),
167
-               'recordings_html_editable' => self::get('recordings_html_editable'),
168
-               'recordings_deleted_default' => self::get('recordings_deleted_default'),
169
-               'recordings_deleted_editable' => self::get('recordings_deleted_editable'),
170
-               'recordings_imported_default' => self::get('recordings_imported_default'),
171
-               'recordings_imported_editable' => self::get('recordings_imported_editable'),
172
-               'recordings_preview_default' => self::get('recordings_preview_default'),
173
-               'recordings_preview_editable' => self::get('recordings_preview_editable'),
174
-               'recording_default' => self::get('recording_default'),
175
-               'recording_editable' => self::get('recording_editable'),
176
-               'recording_icons_enabled' => self::get('recording_icons_enabled'),
177
-               'general_warning_message' => self::get('general_warning_message'),
178
-               'general_warning_box_type' => self::get('general_warning_box_type'),
179
-               'general_warning_button_text' => self::get('general_warning_button_text'),
180
-               'general_warning_button_href' => self::get('general_warning_button_href'),
181
-               'general_warning_button_class' => self::get('general_warning_button_class'),
182
-          );
155
+                'version_major' => self::get_moodle_version_major(),
156
+                'voicebridge_editable' => self::get('voicebridge_editable'),
157
+                'importrecordings_enabled' => self::get('importrecordings_enabled'),
158
+                'importrecordings_from_deleted_enabled' => self::get('importrecordings_from_deleted_enabled'),
159
+                'waitformoderator_default' => self::get('waitformoderator_default'),
160
+                'waitformoderator_editable' => self::get('waitformoderator_editable'),
161
+                'userlimit_default' => self::get('userlimit_default'),
162
+                'userlimit_editable' => self::get('userlimit_editable'),
163
+                'preuploadpresentation_enabled' => self::get('preuploadpresentation_enabled'),
164
+                'sendnotifications_enabled' => self::get('sendnotifications_enabled'),
165
+                'recordings_enabled' => self::get('recordings_enabled'),
166
+                'recordings_html_default' => self::get('recordings_html_default'),
167
+                'recordings_html_editable' => self::get('recordings_html_editable'),
168
+                'recordings_deleted_default' => self::get('recordings_deleted_default'),
169
+                'recordings_deleted_editable' => self::get('recordings_deleted_editable'),
170
+                'recordings_imported_default' => self::get('recordings_imported_default'),
171
+                'recordings_imported_editable' => self::get('recordings_imported_editable'),
172
+                'recordings_preview_default' => self::get('recordings_preview_default'),
173
+                'recordings_preview_editable' => self::get('recordings_preview_editable'),
174
+                'recording_default' => self::get('recording_default'),
175
+                'recording_editable' => self::get('recording_editable'),
176
+                'recording_icons_enabled' => self::get('recording_icons_enabled'),
177
+                'general_warning_message' => self::get('general_warning_message'),
178
+                'general_warning_box_type' => self::get('general_warning_box_type'),
179
+                'general_warning_button_text' => self::get('general_warning_button_text'),
180
+                'general_warning_button_href' => self::get('general_warning_button_href'),
181
+                'general_warning_button_class' => self::get('general_warning_button_class'),
182
+            );
183 183
     }
184 184
 }
Please login to merge, or discard this 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',
@@ -121,8 +121,8 @@  discard block
 block discarded – undo
121 121
         if (isset($CFG->bigbluebuttonbn[$setting])) {
122 122
             return (string)$CFG->bigbluebuttonbn[$setting];
123 123
         }
124
-        if (isset($CFG->{'bigbluebuttonbn_'.$setting})) {
125
-            return (string)$CFG->{'bigbluebuttonbn_'.$setting};
124
+        if (isset($CFG->{'bigbluebuttonbn_' . $setting})) {
125
+            return (string)$CFG->{'bigbluebuttonbn_' . $setting};
126 126
         }
127 127
         return self::defaultvalue($setting);
128 128
     }
Please login to merge, or discard this patch.
classes/external.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -109,7 +109,7 @@
 block discarded – undo
109 109
      * @since Moodle 3.3
110 110
      */
111 111
     public static function get_bigbluebuttonbns_by_courses_parameters() {
112
-        return new external_function_parameters (
112
+        return new external_function_parameters(
113 113
             array(
114 114
                 'courseids' => new external_multiple_structure(
115 115
                     new external_value(PARAM_INT, 'Course id'), 'Array of course ids', VALUE_DEFAULT, array()
Please login to merge, or discard this patch.
lib.php 3 patches
Indentation   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -61,7 +61,7 @@  discard block
 block discarded – undo
61 61
  * Remove this block when restored
62 62
  */
63 63
 
64
- /** @var BIGBLUEBUTTONBN_DEFAULT_SERVER_URL string of default bigbluebutton server url */
64
+    /** @var BIGBLUEBUTTONBN_DEFAULT_SERVER_URL string of default bigbluebutton server url */
65 65
 const BIGBLUEBUTTONBN_DEFAULT_SERVER_URL = 'http://test-install.blindsidenetworks.com/bigbluebutton/';
66 66
 /** @var BIGBLUEBUTTONBN_DEFAULT_SHARED_SECRET string of default bigbluebutton server shared secret */
67 67
 const BIGBLUEBUTTONBN_DEFAULT_SHARED_SECRET = '8cd8ef52e8e101574e400365b55e11a6';
@@ -350,12 +350,12 @@  discard block
 block discarded – undo
350 350
     $str  = '<div class="bigbluebuttonbn overview">'."\n";
351 351
     $str .= '  <div class="name">'.get_string('modulename', 'bigbluebuttonbn').':&nbsp;'."\n";
352 352
     $str .= '    <a '.$classes.'href="'.$CFG->wwwroot.'/mod/bigbluebuttonbn/view.php?id='.$bigbluebuttonbn->coursemodule.
353
-      '">'.$bigbluebuttonbn->name.'</a>'."\n";
353
+        '">'.$bigbluebuttonbn->name.'</a>'."\n";
354 354
     $str .= '  </div>'."\n";
355 355
     $str .= '  <div class="info">'.get_string($start, 'bigbluebuttonbn').': '.userdate($bigbluebuttonbn->openingtime).
356 356
         '</div>'."\n";
357 357
     $str .= '  <div class="info">'.get_string('ends_at', 'bigbluebuttonbn').': '.userdate($bigbluebuttonbn->closingtime)
358
-      .'</div>'."\n";
358
+        .'</div>'."\n";
359 359
     $str .= '</div>'."\n";
360 360
     return $str;
361 361
 }
@@ -540,7 +540,7 @@  discard block
 block discarded – undo
540 540
             $bigbluebuttonbn->coursemodule,
541 541
             'bigbluebuttonbn',
542 542
             $bigbluebuttonbn->id, $bigbluebuttonbn->completionexpected
543
-          );
543
+            );
544 544
     }
545 545
 }
546 546
 /**
@@ -748,7 +748,7 @@  discard block
 block discarded – undo
748 748
  * @return \core_calendar\local\event\entities\action_interface|null
749 749
  */
750 750
 function mod_bigbluebuttonbn_core_calendar_provide_event_action(calendar_event $event,
751
-                                                       \core_calendar\action_factory $factory) {
751
+                                                        \core_calendar\action_factory $factory) {
752 752
     $cm = get_fast_modinfo($event->courseid)->instances['bigbluebuttonbn'][$event->instance];
753 753
 
754 754
     $completion = new \completion_info($cm->get_course());
Please login to merge, or discard this patch.
Doc Comments   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -102,7 +102,7 @@  discard block
 block discarded – undo
102 102
  * @uses FEATURE_GRADE_OUTCOMES
103 103
  * @uses FEATURE_SHOW_DESCRIPTION
104 104
  * @param string $feature
105
- * @return mixed True if yes (some features may use other values)
105
+ * @return null|boolean True if yes (some features may use other values)
106 106
  */
107 107
 function bigbluebuttonbn_supports($feature) {
108 108
     if (!$feature) {
@@ -187,7 +187,7 @@  discard block
 block discarded – undo
187 187
  *
188 188
  * @param int $id Id of the module instance
189 189
  *
190
- * @return bool Success/Failure
190
+ * @return boolean|null Success/Failure
191 191
  */
192 192
 function bigbluebuttonbn_delete_instance($id) {
193 193
     global $DB;
@@ -214,7 +214,7 @@  discard block
 block discarded – undo
214 214
  *
215 215
  * @param object $bigbluebuttonbn Id of the module instance
216 216
  *
217
- * @return bool Success/Failure
217
+ * @return boolean|null Success/Failure
218 218
  */
219 219
 function bigbluebuttonbn_delete_instance_log($bigbluebuttonbn) {
220 220
     global $DB;
@@ -235,7 +235,7 @@  discard block
 block discarded – undo
235 235
  * @param object $mod
236 236
  * @param object $bigbluebuttonbn
237 237
  *
238
- * @return bool
238
+ * @return string
239 239
  */
240 240
 function bigbluebuttonbn_user_outline($course, $user, $mod, $bigbluebuttonbn) {
241 241
     global $DB;
@@ -592,7 +592,7 @@  discard block
 block discarded – undo
592 592
  * @param stdClass $context       context object
593 593
  * @param string   $filearea      file area
594 594
  *
595
- * @return false|null false if file not valid
595
+ * @return boolean false if file not valid
596 596
  */
597 597
 function bigbluebuttonbn_pluginfile_valid($context, $filearea) {
598 598
     if ($context->contextlevel != CONTEXT_MODULE) {
Please login to merge, or discard this patch.
Spacing   +42 added lines, -42 removed lines patch added patch discarded remove patch
@@ -28,28 +28,28 @@  discard block
 block discarded – undo
28 28
 
29 29
 global $CFG;
30 30
 
31
-require_once($CFG->dirroot.'/calendar/lib.php');
32
-require_once($CFG->dirroot.'/message/lib.php');
33
-require_once($CFG->dirroot.'/mod/lti/OAuth.php');
34
-require_once($CFG->dirroot.'/tag/lib.php');
35
-require_once($CFG->libdir.'/accesslib.php');
36
-require_once($CFG->libdir.'/completionlib.php');
37
-require_once($CFG->libdir.'/datalib.php');
38
-require_once($CFG->libdir.'/enrollib.php');
39
-require_once($CFG->libdir.'/filelib.php');
40
-require_once($CFG->libdir.'/formslib.php');
31
+require_once($CFG->dirroot . '/calendar/lib.php');
32
+require_once($CFG->dirroot . '/message/lib.php');
33
+require_once($CFG->dirroot . '/mod/lti/OAuth.php');
34
+require_once($CFG->dirroot . '/tag/lib.php');
35
+require_once($CFG->libdir . '/accesslib.php');
36
+require_once($CFG->libdir . '/completionlib.php');
37
+require_once($CFG->libdir . '/datalib.php');
38
+require_once($CFG->libdir . '/enrollib.php');
39
+require_once($CFG->libdir . '/filelib.php');
40
+require_once($CFG->libdir . '/formslib.php');
41 41
 
42 42
 
43
-if (file_exists(dirname(__FILE__).'/vendor/firebase/php-jwt/src/JWT.php')) {
44
-    require_once(dirname(__FILE__).'/vendor/firebase/php-jwt/src/JWT.php');
43
+if (file_exists(dirname(__FILE__) . '/vendor/firebase/php-jwt/src/JWT.php')) {
44
+    require_once(dirname(__FILE__) . '/vendor/firebase/php-jwt/src/JWT.php');
45 45
 }
46 46
 
47 47
 if (!isset($CFG->bigbluebuttonbn)) {
48 48
     $CFG->bigbluebuttonbn = array();
49 49
 }
50 50
 
51
-if (file_exists(dirname(__FILE__).'/config.php')) {
52
-    require_once(dirname(__FILE__).'/config.php');
51
+if (file_exists(dirname(__FILE__) . '/config.php')) {
52
+    require_once(dirname(__FILE__) . '/config.php');
53 53
 }
54 54
 
55 55
 /*
@@ -101,18 +101,18 @@  discard block
 block discarded – undo
101 101
         return null;
102 102
     }
103 103
     $features = array(
104
-        (string) FEATURE_IDNUMBER => true,
105
-        (string) FEATURE_GROUPS => true,
106
-        (string) FEATURE_GROUPINGS => true,
107
-        (string) FEATURE_GROUPMEMBERSONLY => true,
108
-        (string) FEATURE_MOD_INTRO => true,
109
-        (string) FEATURE_BACKUP_MOODLE2 => true,
110
-        (string) FEATURE_COMPLETION_TRACKS_VIEWS => true,
111
-        (string) FEATURE_GRADE_HAS_GRADE => false,
112
-        (string) FEATURE_GRADE_OUTCOMES => false,
113
-        (string) FEATURE_SHOW_DESCRIPTION => true,
104
+        (string)FEATURE_IDNUMBER => true,
105
+        (string)FEATURE_GROUPS => true,
106
+        (string)FEATURE_GROUPINGS => true,
107
+        (string)FEATURE_GROUPMEMBERSONLY => true,
108
+        (string)FEATURE_MOD_INTRO => true,
109
+        (string)FEATURE_BACKUP_MOODLE2 => true,
110
+        (string)FEATURE_COMPLETION_TRACKS_VIEWS => true,
111
+        (string)FEATURE_GRADE_HAS_GRADE => false,
112
+        (string)FEATURE_GRADE_OUTCOMES => false,
113
+        (string)FEATURE_SHOW_DESCRIPTION => true,
114 114
     );
115
-    if (isset($features[(string) $feature])) {
115
+    if (isset($features[(string)$feature])) {
116 116
         return $features[$feature];
117 117
     }
118 118
     return null;
@@ -211,7 +211,7 @@  discard block
 block discarded – undo
211 211
 function bigbluebuttonbn_delete_instance_log($bigbluebuttonbn) {
212 212
     global $DB;
213 213
     $sql  = "SELECT * FROM {bigbluebuttonbn_logs} ";
214
-    $sql .= "WHERE bigbluebuttonbnid = ? AND log = ? AND ". $DB->sql_compare_text('meta') . " = ?";
214
+    $sql .= "WHERE bigbluebuttonbnid = ? AND log = ? AND " . $DB->sql_compare_text('meta') . " = ?";
215 215
     $logs = $DB->get_records_sql($sql, array($bigbluebuttonbn->id, BIGBLUEBUTTONBN_LOG_EVENT_CREATE, "{\"record\":true}"));
216 216
     $meta = "{\"has_recordings\":" . empty($logs) ? "true" : "false" . "}";
217 217
     bigbluebuttonbn_log($bigbluebuttonbn, BIGBLUEBUTTONBN_LOG_EVENT_DELETE, [], $meta);
@@ -234,10 +234,10 @@  discard block
 block discarded – undo
234 234
 function bigbluebuttonbn_user_outline($course, $user, $mod, $bigbluebuttonbn) {
235 235
     global $DB;
236 236
     $completed = $DB->count_records('bigbluebuttonbn_logs', array('courseid' => $course->id,
237
-        'bigbluebuttonbnid' => $bigbluebuttonbn->id, 'userid' => $user->id, 'log' => 'Join', ), '*');
237
+        'bigbluebuttonbnid' => $bigbluebuttonbn->id, 'userid' => $user->id, 'log' => 'Join',), '*');
238 238
     if ($completed > 0) {
239
-        return fullname($user).' '.get_string('view_message_has_joined', 'bigbluebuttonbn').' '.
240
-            get_string('view_message_session_for', 'bigbluebuttonbn').' '.(string) $completed.' '.
239
+        return fullname($user) . ' ' . get_string('view_message_has_joined', 'bigbluebuttonbn') . ' ' .
240
+            get_string('view_message_session_for', 'bigbluebuttonbn') . ' ' . (string)$completed . ' ' .
241 241
             get_string('view_message_times', 'bigbluebuttonbn');
242 242
     }
243 243
     return '';
@@ -257,7 +257,7 @@  discard block
 block discarded – undo
257 257
 function bigbluebuttonbn_user_complete($course, $user, $mod, $bigbluebuttonbn) {
258 258
     global $DB;
259 259
     $completed = $DB->count_records('bigbluebuttonbn_logs', array('courseid' => $course->id,
260
-        'bigbluebuttonbnid' => $bigbluebuttonbn->id, 'userid' => $user->id, 'log' => 'Join', ),
260
+        'bigbluebuttonbnid' => $bigbluebuttonbn->id, 'userid' => $user->id, 'log' => 'Join',),
261 261
         '*', IGNORE_MULTIPLE);
262 262
     return $completed > 0;
263 263
 }
@@ -332,16 +332,16 @@  discard block
 block discarded – undo
332 332
     if ($bigbluebuttonbn->visible) {
333 333
         $classes = 'class="dimmed" ';
334 334
     }
335
-    $str  = '<div class="bigbluebuttonbn overview">'."\n";
336
-    $str .= '  <div class="name">'.get_string('modulename', 'bigbluebuttonbn').':&nbsp;'."\n";
337
-    $str .= '    <a '.$classes.'href="'.$CFG->wwwroot.'/mod/bigbluebuttonbn/view.php?id='.$bigbluebuttonbn->coursemodule.
338
-      '">'.$bigbluebuttonbn->name.'</a>'."\n";
339
-    $str .= '  </div>'."\n";
340
-    $str .= '  <div class="info">'.get_string($start, 'bigbluebuttonbn').': '.userdate($bigbluebuttonbn->openingtime).
341
-        '</div>'."\n";
342
-    $str .= '  <div class="info">'.get_string('ends_at', 'bigbluebuttonbn').': '.userdate($bigbluebuttonbn->closingtime)
343
-      .'</div>'."\n";
344
-    $str .= '</div>'."\n";
335
+    $str  = '<div class="bigbluebuttonbn overview">' . "\n";
336
+    $str .= '  <div class="name">' . get_string('modulename', 'bigbluebuttonbn') . ':&nbsp;' . "\n";
337
+    $str .= '    <a ' . $classes . 'href="' . $CFG->wwwroot . '/mod/bigbluebuttonbn/view.php?id=' . $bigbluebuttonbn->coursemodule .
338
+      '">' . $bigbluebuttonbn->name . '</a>' . "\n";
339
+    $str .= '  </div>' . "\n";
340
+    $str .= '  <div class="info">' . get_string($start, 'bigbluebuttonbn') . ': ' . userdate($bigbluebuttonbn->openingtime) .
341
+        '</div>' . "\n";
342
+    $str .= '  <div class="info">' . get_string('ends_at', 'bigbluebuttonbn') . ': ' . userdate($bigbluebuttonbn->closingtime)
343
+      .'</div>' . "\n";
344
+    $str .= '</div>' . "\n";
345 345
     return $str;
346 346
 }
347 347
 
@@ -559,7 +559,7 @@  discard block
 block discarded – undo
559 559
     if (count($files) == 1) {
560 560
         // Get the first (and only) file.
561 561
         $file = reset($files);
562
-        $filesrc = '/'.$file->get_filename();
562
+        $filesrc = '/' . $file->get_filename();
563 563
     }
564 564
     return $filesrc;
565 565
 }
@@ -627,7 +627,7 @@  discard block
 block discarded – undo
627 627
     if (!$filename) {
628 628
         return false;
629 629
     }
630
-    $fullpath = "/$context->id/mod_bigbluebuttonbn/$filearea/0/".$filename;
630
+    $fullpath = "/$context->id/mod_bigbluebuttonbn/$filearea/0/" . $filename;
631 631
     $fs = get_file_storage();
632 632
     $file = $fs->get_file_by_hash(sha1($fullpath));
633 633
     if (!$file || $file->is_directory()) {
Please login to merge, or discard this patch.