Completed
Pull Request — master (#40)
by Jesus
02:10
created
import_view.php 1 patch
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -96,8 +96,8 @@
 block discarded – undo
96 96
     $output .= html_writer::start_tag('br');
97 97
     $output .= html_writer::tag('input', '',
98 98
         array('type' => 'button', 'class' => 'btn btn-secondary',
99
-              'value' => get_string('view_recording_button_return', 'bigbluebuttonbn'),
100
-              'onclick' => 'window.location=\''.$CFG->wwwroot.'/mod/bigbluebuttonbn/view.php?id='.$cm->id.'\''));
99
+                'value' => get_string('view_recording_button_return', 'bigbluebuttonbn'),
100
+                'onclick' => 'window.location=\''.$CFG->wwwroot.'/mod/bigbluebuttonbn/view.php?id='.$cm->id.'\''));
101 101
 
102 102
     // JavaScript for locales.
103 103
     $PAGE->requires->strings_for_js(array_keys(bigbluebuttonbn_get_strings_for_js()), 'bigbluebuttonbn');
Please login to merge, or discard this patch.
classes/locallib/config.php 1 patch
Indentation   +23 added lines, -23 removed lines patch added patch discarded remove patch
@@ -119,28 +119,28 @@
 block discarded – undo
119 119
      */
120 120
     public static function get_options() {
121 121
         return [
122
-               'version_major' => self::get_moodle_version_major(),
123
-               'voicebridge_editable' => self::get('voicebridge_editable'),
124
-               'waitformoderator_default' => self::get('waitformoderator_default'),
125
-               'waitformoderator_editable' => self::get('waitformoderator_editable'),
126
-               'userlimit_default' => self::get('userlimit_default'),
127
-               'userlimit_editable' => self::get('userlimit_editable'),
128
-               'preuploadpresentation_enabled' => self::get('preuploadpresentation_enabled'),
129
-               'sendnotifications_enabled' => self::get('sendnotifications_enabled'),
130
-               'recordings_enabled' => self::get('recordings_enabled'),
131
-               'recordings_html_default' => self::get('recordings_html_default'),
132
-               'recordings_html_editable' => self::get('recordings_html_editable'),
133
-               'recordings_deleted_default' => self::get('recordings_deleted_default'),
134
-               'recordings_deleted_editable' => self::get('recordings_deleted_editable'),
135
-               'recordings_imported_default' => self::get('recordings_imported_default'),
136
-               'recordings_imported_editable' => self::get('recordings_imported_editable'),
137
-               'recording_default' => self::get('recording_default'),
138
-               'recording_editable' => self::get('recording_editable'),
139
-               'recording_icons_enabled' => self::get('recording_icons_enabled'),
140
-               'general_warning_message' => self::get('general_warning_message'),
141
-               'general_warning_button_text' => self::get('general_warning_button_text'),
142
-               'general_warning_button_href' => self::get('general_warning_button_href'),
143
-               'general_warning_button_class' => self::get('general_warning_button_class'),
144
-          ];
122
+                'version_major' => self::get_moodle_version_major(),
123
+                'voicebridge_editable' => self::get('voicebridge_editable'),
124
+                'waitformoderator_default' => self::get('waitformoderator_default'),
125
+                'waitformoderator_editable' => self::get('waitformoderator_editable'),
126
+                'userlimit_default' => self::get('userlimit_default'),
127
+                'userlimit_editable' => self::get('userlimit_editable'),
128
+                'preuploadpresentation_enabled' => self::get('preuploadpresentation_enabled'),
129
+                'sendnotifications_enabled' => self::get('sendnotifications_enabled'),
130
+                'recordings_enabled' => self::get('recordings_enabled'),
131
+                'recordings_html_default' => self::get('recordings_html_default'),
132
+                'recordings_html_editable' => self::get('recordings_html_editable'),
133
+                'recordings_deleted_default' => self::get('recordings_deleted_default'),
134
+                'recordings_deleted_editable' => self::get('recordings_deleted_editable'),
135
+                'recordings_imported_default' => self::get('recordings_imported_default'),
136
+                'recordings_imported_editable' => self::get('recordings_imported_editable'),
137
+                'recording_default' => self::get('recording_default'),
138
+                'recording_editable' => self::get('recording_editable'),
139
+                'recording_icons_enabled' => self::get('recording_icons_enabled'),
140
+                'general_warning_message' => self::get('general_warning_message'),
141
+                'general_warning_button_text' => self::get('general_warning_button_text'),
142
+                'general_warning_button_href' => self::get('general_warning_button_href'),
143
+                'general_warning_button_class' => self::get('general_warning_button_class'),
144
+            ];
145 145
     }
146 146
 }
Please login to merge, or discard this patch.
bbb_view.php 1 patch
Indentation   +15 added lines, -15 removed lines patch added patch discarded remove patch
@@ -182,10 +182,10 @@  discard block
 block discarded – undo
182 182
 
183 183
 function bigbluebutton_bbb_view_create_meeting_data(&$bbbsession, $bigbluebuttonbn) {
184 184
     $data = ['meetingID' => $bbbsession['meetingid'],
185
-              'name' => $bbbsession['meetingname'],
186
-              'attendeePW' => $bbbsession['viewerPW'],
187
-              'moderatorPW' => $bbbsession['modPW'],
188
-              'logoutURL' => $bbbsession['logoutURL'],
185
+                'name' => $bbbsession['meetingname'],
186
+                'attendeePW' => $bbbsession['viewerPW'],
187
+                'moderatorPW' => $bbbsession['modPW'],
188
+                'logoutURL' => $bbbsession['logoutURL'],
189 189
             ];
190 190
     $data['record'] = bigbluebutton_bbb_view_create_meeting_data_record($bbbsession['record']);
191 191
     $data['welcome'] = trim($bbbsession['welcome']);
@@ -198,7 +198,7 @@  discard block
 block discarded – undo
198 198
             '%duration%',
199 199
             (string) $durationtime,
200 200
             get_string('bbbdurationwarning', 'bigbluebuttonbn')
201
-          );
201
+            );
202 202
     }
203 203
     $voicebridge = intval($bbbsession['voicebridge']);
204 204
     if ($voicebridge > 0 && $voicebridge < 79999) {
@@ -228,22 +228,22 @@  discard block
 block discarded – undo
228 228
 function bigbluebutton_bbb_view_create_meeting_metadata(&$bbbsession) {
229 229
     global $USER;
230 230
     $metadata = ['bbb-origin' => $bbbsession['origin'],
231
-                 'bbb-origin-version' => $bbbsession['originVersion'],
232
-                 'bbb-origin-server-name' => $bbbsession['originServerName'],
233
-                 'bbb-origin-server-common-name' => $bbbsession['originServerCommonName'],
234
-                 'bbb-origin-tag' => $bbbsession['originTag'],
235
-                 'bbb-context' => $bbbsession['course']->fullname,
236
-                 'bbb-recording-name' => $bbbsession['meetingname'],
237
-                 'bbb-recording-description' => bigbluebuttonbn_html2text($bbbsession['meetingdescription'], 64),
238
-                 'bbb-recording-tags' => bigbluebuttonbn_get_tags($bbbsession['cm']->id), // Same as $id.
231
+                    'bbb-origin-version' => $bbbsession['originVersion'],
232
+                    'bbb-origin-server-name' => $bbbsession['originServerName'],
233
+                    'bbb-origin-server-common-name' => $bbbsession['originServerCommonName'],
234
+                    'bbb-origin-tag' => $bbbsession['originTag'],
235
+                    'bbb-context' => $bbbsession['course']->fullname,
236
+                    'bbb-recording-name' => $bbbsession['meetingname'],
237
+                    'bbb-recording-description' => bigbluebuttonbn_html2text($bbbsession['meetingdescription'], 64),
238
+                    'bbb-recording-tags' => bigbluebuttonbn_get_tags($bbbsession['cm']->id), // Same as $id.
239 239
                 ];
240 240
     if ((boolean)\mod_bigbluebuttonbn\locallib\config::get('recordingstatus_enabled')) {
241 241
         $metadata["bn-recording-status"] = json_encode(
242 242
             array(
243 243
                 'email' => array('"' . fullname($USER) . '" <' . $USER->email . '>'),
244 244
                 'context' => $bbbsession['bigbluebuttonbnURL']
245
-              )
246
-          );
245
+                )
246
+            );
247 247
     }
248 248
     if ((boolean)\mod_bigbluebuttonbn\locallib\config::get('recordingready_enabled')) {
249 249
         $metadata['bn-recording-ready-url'] = $bbbsession['recordingReadyURL'];
Please login to merge, or discard this patch.
mod_form.php 1 patch
Indentation   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -93,7 +93,7 @@  discard block
 block discarded – undo
93 93
                 'alt' => $contents,
94 94
                 'title' => $contents,
95 95
                 'src' => $jsvars['pix_icon_delete']
96
-              );
96
+                );
97 97
             $jsvars['pix_icon_delete'] = html_writer::tag('img', '', $options);
98 98
         }
99 99
         $PAGE->requires->yui_module('moodle-mod_bigbluebuttonbn-modform',
@@ -180,8 +180,8 @@  discard block
 block discarded – undo
180 180
             $this->bigbluebuttonbn_mform_add_element($mform, $field['type'], $field['name'], $field['data_type'],
181 181
                 $field['description_key'], 0, ['maxlength' => 4, 'size' => 6],
182 182
                 ['message' => get_string('mod_form_field_voicebridge_format_error', 'bigbluebuttonbn'),
183
-                 'type' => 'numeric', 'rule' => '####', 'validator' => 'server']
184
-              );
183
+                    'type' => 'numeric', 'rule' => '####', 'validator' => 'server']
184
+                );
185 185
         } else {
186 186
             $this->bigbluebuttonbn_mform_add_element($mform, $field['type'], $field['name'], $field['data_type'],
187 187
                 $field['description_key'], 0, ['maxlength' => 4, 'size' => 6]);
@@ -212,7 +212,7 @@  discard block
 block discarded – undo
212 212
 
213 213
     private function bigbluebuttonbn_mform_add_block_room_recordings($mform, $cfg) {
214 214
         $field = ['type' => 'hidden', 'name' => 'recordings_html', 'data_type' => PARAM_INT,
215
-                  'description_key' => null];
215
+                    'description_key' => null];
216 216
         if ($cfg['recordings_html_editable']) {
217 217
             $field['type'] = 'checkbox';
218 218
             $field['description_key'] = 'mod_form_field_recordings_html';
@@ -221,7 +221,7 @@  discard block
 block discarded – undo
221 221
             $field['description_key'], $cfg['recordings_html_default']);
222 222
 
223 223
         $field = ['type' => 'hidden', 'name' => 'recordings_deleted', 'data_type' => PARAM_INT,
224
-                  'description_key' => null];
224
+                    'description_key' => null];
225 225
         if ($cfg['recordings_deleted_editable']) {
226 226
             $field['type'] = 'checkbox';
227 227
             $field['description_key'] = 'mod_form_field_recordings_deleted';
@@ -230,7 +230,7 @@  discard block
 block discarded – undo
230 230
             $field['description_key'], $cfg['recordings_deleted_default']);
231 231
 
232 232
         $field = ['type' => 'hidden', 'name' => 'recordings_imported', 'data_type' => PARAM_INT,
233
-                  'description_key' => null];
233
+                    'description_key' => null];
234 234
         if ($cfg['recordings_imported_editable']) {
235 235
             $field['type'] = 'checkbox';
236 236
             $field['description_key'] = 'mod_form_field_recordings_imported';
@@ -278,7 +278,7 @@  discard block
 block discarded – undo
278 278
         $htmlselectiontype = html_writer::select($participantselection['type_options'],
279 279
             'bigbluebuttonbn_participant_selection_type', $participantselection['type_selected'], array(),
280 280
             array('id' => 'bigbluebuttonbn_participant_selection_type',
281
-                  'onchange' => 'M.mod_bigbluebuttonbn.modform.participant_selection_set(); return 0;'));
281
+                    'onchange' => 'M.mod_bigbluebuttonbn.modform.participant_selection_set(); return 0;'));
282 282
         $htmlselectionoptions = html_writer::select($participantselection['options'], 'bigbluebuttonbn_participant_selection',
283 283
             $participantselection['selected'], array(),
284 284
             array('id' => 'bigbluebuttonbn_participant_selection', 'disabled' => 'disabled'));
@@ -286,7 +286,7 @@  discard block
 block discarded – undo
286 286
             'type' => 'button', 'class' => 'btn btn-secondary',
287 287
             'value' => get_string('mod_form_field_participant_list_action_add', 'bigbluebuttonbn'),
288 288
             'onclick' => 'M.mod_bigbluebuttonbn.modform.participant_add(); return 0;'
289
-          ));
289
+            ));
290 290
         $htmladdparticipant = html_writer::tag('div',
291 291
             $htmlselectiontype . '&nbsp;&nbsp;' . $htmlselectionoptions . '&nbsp;&nbsp;' . $htmlselectioninput, null);
292 292
         $mform->addElement('html', "\n\n");
Please login to merge, or discard this patch.
config-dist.php 1 patch
Indentation   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -67,7 +67,7 @@  discard block
 block discarded – undo
67 67
  * are 1=checked, 0=unchecked.
68 68
  **/
69 69
 
70
- /* When the value is set to 0 (unchecked) the all the features for recordings
70
+    /* When the value is set to 0 (unchecked) the all the features for recordings
71 71
   *  are ignored. Recording features are enabled by default.
72 72
   *  $CFG->bigbluebuttonbn['recordings_enabled'] = 1;
73 73
   */
@@ -97,7 +97,7 @@  discard block
 block discarded – undo
97 97
  * recordings from a different activity even from a different course.
98 98
  **/
99 99
 
100
- /*
100
+    /*
101 101
  * When the value is set to 1 (checked) the bigbluebuttonbn rooms or
102 102
  * activities will have the 'import recordings' capability enabled.
103 103
  * $CFG->bigbluebuttonbn['importrecordings_enabled'] = 0;
@@ -118,7 +118,7 @@  discard block
 block discarded – undo
118 118
  * 'Join session' button enabled
119 119
  **/
120 120
 
121
- /*
121
+    /*
122 122
  * When the value is set to 1 (checked) the bigbluebuttonbn rooms or
123 123
  * activities will have the 'wait for moderator' capability enabled by
124 124
  * default.
@@ -152,7 +152,7 @@  discard block
 block discarded – undo
152 152
  * 5. CONFIGURATION FOR "STATIC VOICE BRIDGE" FEATURE
153 153
  *
154 154
  **/
155
- /*
155
+    /*
156 156
  * A conference voice bridge number can be permanently assigned to a room
157 157
  * or activity.
158 158
  * $CFG->bigbluebuttonbn['voicebridge_editable'] = 0;
@@ -162,7 +162,7 @@  discard block
 block discarded – undo
162 162
  * 6. CONFIGURATION FOR "PRE-UPLOAD PRESENTATION" FEATURE
163 163
  *
164 164
  **/
165
- /*
165
+    /*
166 166
  * Since version 0.8, BigBluebutton has an implementation for allowing
167 167
  * preuploading presentation. When this feature is enabled, users creating or
168 168
  * editing a room or activity can upload a PDF or Office document to the
@@ -179,7 +179,7 @@  discard block
 block discarded – undo
179 179
  * applied to each room or activity, or globally.
180 180
  **/
181 181
 
182
- /*
182
+    /*
183 183
  * The number of users allowed in a session by default when a new room or
184 184
  * conference is added. If the number is set to 0, no limit is established.
185 185
  * $CFG->bigbluebuttonbn['userlimit_default'] = 0;
@@ -200,7 +200,7 @@  discard block
 block discarded – undo
200 200
  * By default only the owner is assigned.
201 201
  **/
202 202
 
203
- /*
203
+    /*
204 204
  * The values for this parameter can be '0' (which identifies the owner) and/or any of the role IDs defined in
205 205
  * Moodle (including the custom parameters). The value used will be the key for the role.
206 206
  * [owner=0|manager=1|coursecreator=2|editingteacher=3|teacher=4|student=5|guest=6|user=7|frontpage=8|ANY_CUSTOM_ROLE=xx]
@@ -211,7 +211,7 @@  discard block
 block discarded – undo
211 211
  * 9. CONFIGURATION FOR "NOTIFICATION SENDING" FEATURE
212 212
  *
213 213
  **/
214
- /*
214
+    /*
215 215
  * When the value is set to 1 (checked) the 'notification sending'
216 216
  * capability can be used by the user creating or editing the room or
217 217
  * activity.
@@ -225,7 +225,7 @@  discard block
 block discarded – undo
225 225
  * 10. CONFIGURATION FOR "RECORDING READY" FEATURE
226 226
  *
227 227
  **/
228
- /*
228
+    /*
229 229
  * When the value is set to 1 (checked) the 'notify users when recording ready'
230 230
  * capability is enabled, meaning that a message will be sent to all enrolled
231 231
  * users in a course when a recording is ready
@@ -249,7 +249,7 @@  discard block
 block discarded – undo
249 249
  * 12. GENERAL CONFIGURATION FOR RECORDINGS UI
250 250
  *
251 251
  **/
252
- /*
252
+    /*
253 253
  * When the value is set to 1 (checked) the bigbluebuttonbn resources
254 254
  * will show the recodings in an html table by default.
255 255
  * $CFG->bigbluebuttonbn['recordings_html_default'] = 0;
@@ -273,22 +273,22 @@  discard block
 block discarded – undo
273 273
  * $CFG->bigbluebuttonbn['recordings_deleted_editable'] = 0;
274 274
  */
275 275
 
276
- /*
276
+    /*
277 277
   * When the value is set to 1 (checked) the bigbluebuttonbn resources for recordings
278 278
   * will show only the imported links as part of the list.
279 279
   * $CFG->bigbluebuttonbn['recordings_imported_default'] = 0;
280 280
   */
281 281
 
282
- /*
282
+    /*
283 283
   * When the value is set to 1 (checked) the 'show only imported links'
284 284
   * capability can be enabled/disabled by the user creating or editing the resource for recordings.
285 285
   * $CFG->bigbluebuttonbn['recordings_imported_editable'] = 1;
286 286
   */
287 287
 
288
-  /*
288
+    /*
289 289
    *  CONFIGURATION FOR FEATURES OFFERED BY BN SERVERS
290 290
   ** ------------------------------------------------------------------ **/
291
-  /*
291
+    /*
292 292
    * When general_warning_message value is different than "", the string is shown
293 293
    * as a warning message to privileged users (administrators and Teachers or users allowed to edit).
294 294
    * $CFG->bigbluebuttonbn['general_warning_message'] = "This will may have recordings enabled when upgraded to premium.";
Please login to merge, or discard this patch.
bbb_broker.php 1 patch
Indentation   +18 added lines, -18 removed lines patch added patch discarded remove patch
@@ -342,26 +342,26 @@  discard block
 block discarded – undo
342 342
             return array(
343 343
                 'status' => false,
344 344
                 'message' => get_string('view_recording_publish_link_deleted', 'bigbluebuttonbn')
345
-              );
345
+                );
346 346
         }
347 347
         if ($realrecordings[$params['id']]['published'] !== 'true') {
348 348
             return array(
349 349
                 'status' => false,
350 350
                 'message' => get_string('view_recording_publish_link_not_published', 'bigbluebuttonbn')
351
-              );
351
+                );
352 352
         }
353 353
         return array(
354 354
             'status' => bigbluebuttonbn_publish_recording_imported(
355 355
                 $recordings[$params['id']]['imported'], true
356 356
             )
357
-          );
357
+            );
358 358
     }
359 359
     // As the recordingid was not identified as imported recording link, execute actual publish.
360 360
     return array(
361 361
         'status' => bigbluebuttonbn_publish_recordings(
362 362
             $params['id'], 'true'
363 363
         )
364
-      );
364
+        );
365 365
 }
366 366
 
367 367
 function bigbluebuttonbn_broker_recording_action_unprotect($params, $recordings) {
@@ -374,26 +374,26 @@  discard block
 block discarded – undo
374 374
             return array(
375 375
                 'status' => false,
376 376
                 'message' => get_string('view_recording_unprotect_link_deleted', 'bigbluebuttonbn')
377
-              );
377
+                );
378 378
         }
379 379
         if ($realrecordings[$params['id']]['protected'] === 'true') {
380 380
             return array(
381 381
                 'status' => false,
382 382
                 'message' => get_string('view_recording_unprotect_link_not_unprotected', 'bigbluebuttonbn')
383
-              );
383
+                );
384 384
         }
385 385
         return array(
386 386
             'status' => bigbluebuttonbn_protect_recording_imported(
387 387
                 $recordings[$params['id']]['imported'], false
388 388
             )
389
-          );
389
+            );
390 390
     }
391 391
     // As the recordingid was not identified as imported recording link, execute actual uprotect.
392 392
     return array(
393 393
         'status' => bigbluebuttonbn_update_recordings(
394 394
             $params['id'], array('protect' => 'false')
395 395
         )
396
-      );
396
+        );
397 397
 }
398 398
 
399 399
 function bigbluebuttonbn_broker_recording_action_unpublish($params, $recordings) {
@@ -404,7 +404,7 @@  discard block
 block discarded – undo
404 404
             'status' => bigbluebuttonbn_publish_recording_imported(
405 405
                 $recordings[$params['id']]['imported'], false
406 406
             )
407
-          );
407
+            );
408 408
     }
409 409
     // As the recordingid was not identified as imported recording link, execute unpublish on a real recording.
410 410
     // First: Unpublish imported links associated to the recording.
@@ -422,7 +422,7 @@  discard block
 block discarded – undo
422 422
         'status' => bigbluebuttonbn_publish_recordings(
423 423
             $params['id'], 'false'
424 424
         )
425
-      );
425
+        );
426 426
 }
427 427
 
428 428
 function bigbluebuttonbn_broker_recording_action_protect($params, $recordings) {
@@ -433,7 +433,7 @@  discard block
 block discarded – undo
433 433
             'status' => bigbluebuttonbn_protect_recording_imported(
434 434
                 $recordings[$params['id']]['imported'], true
435 435
             )
436
-          );
436
+            );
437 437
     }
438 438
     // As the recordingid was not identified as imported recording link, execute protect on a real recording.
439 439
     // First: Protect imported links associated to the recording.
@@ -451,7 +451,7 @@  discard block
 block discarded – undo
451 451
         'status' => bigbluebuttonbn_update_recordings(
452 452
             $params['id'], array('protect' => 'true')
453 453
         )
454
-      );
454
+        );
455 455
 }
456 456
 
457 457
 function bigbluebuttonbn_broker_recording_action_delete($params, $recordings) {
@@ -462,7 +462,7 @@  discard block
 block discarded – undo
462 462
             'status' => bigbluebuttonbn_delete_recording_imported(
463 463
                 $recordings[$params['id']]['imported']
464 464
             )
465
-          );
465
+            );
466 466
     }
467 467
     // As the recordingid was not identified as imported recording link, execute delete on a real recording.
468 468
     // First: Delete imported links associated to the recording.
@@ -478,7 +478,7 @@  discard block
 block discarded – undo
478 478
         'status' => bigbluebuttonbn_delete_recordings(
479 479
             $params['id']
480 480
         )
481
-      );
481
+        );
482 482
 }
483 483
 
484 484
 function bigbluebuttonbn_broker_recording_action_edit($params, $recordings) {
@@ -488,7 +488,7 @@  discard block
 block discarded – undo
488 488
             'status' => bigbluebuttonbn_update_recording_imported(
489 489
                 $recordings[$params['id']]['imported'], json_decode($params['meta'], true)
490 490
             )
491
-          );
491
+            );
492 492
     }
493 493
 
494 494
     // As the recordingid was not identified as imported recording link, execute update on a real recording.
@@ -498,7 +498,7 @@  discard block
 block discarded – undo
498 498
         'status' => bigbluebuttonbn_update_recordings(
499 499
             $params['id'], json_decode($params['meta'])
500 500
         )
501
-      );
501
+        );
502 502
 }
503 503
 
504 504
 function bigbluebuttonbn_broker_recording_ready($params, $bigbluebuttonbn) {
@@ -625,10 +625,10 @@  discard block
 block discarded – undo
625 625
     $params['recording_import'] = ['id' => 'The recordingID must be specified.'];
626 626
     $params['recording_ready'] = [
627 627
             'signed_parameters' => 'A JWT encoded string must be included as [signed_parameters].'
628
-          ];
628
+            ];
629 629
     $params['live_session_events'] = [
630 630
             'signed_parameters' => 'A JWT encoded string must be included as [signed_parameters].'
631
-          ];
631
+            ];
632 632
     return $params;
633 633
 }
634 634
 
Please login to merge, or discard this patch.
locallib.php 1 patch
Indentation   +55 added lines, -55 removed lines patch added patch discarded remove patch
@@ -94,9 +94,9 @@  discard block
 block discarded – undo
94 94
  */
95 95
 function bigbluebuttonbn_get_join_url($meetingid, $username, $pw, $logouturl, $configtoken = null, $userid = null) {
96 96
     $data = ['meetingID' => $meetingid,
97
-              'fullName' => $username,
98
-              'password' => $pw,
99
-              'logoutURL' => $logouturl,
97
+                'fullName' => $username,
98
+                'password' => $pw,
99
+                'logoutURL' => $logouturl,
100 100
             ];
101 101
     if (!is_null($configtoken)) {
102 102
         $data['configToken'] = $configtoken;
@@ -140,23 +140,23 @@  discard block
 block discarded – undo
140 140
 function bigbluebuttonbn_get_meeting_info_array($meetingid) {
141 141
     $xml = bigbluebuttonbn_wrap_xml_load_file(
142 142
         \mod_bigbluebuttonbn\locallib\bigbluebutton::action_url('getMeetingInfo', ['meetingID' => $meetingid])
143
-      );
143
+        );
144 144
     if ($xml && $xml->returncode == 'SUCCESS' && empty($xml->messageKey)) {
145 145
         // Meeting info was returned.
146 146
         return array('returncode' => $xml->returncode,
147
-                     'meetingID' => $xml->meetingID,
148
-                     'moderatorPW' => $xml->moderatorPW,
149
-                     'attendeePW' => $xml->attendeePW,
150
-                     'hasBeenForciblyEnded' => $xml->hasBeenForciblyEnded,
151
-                     'running' => $xml->running,
152
-                     'recording' => $xml->recording,
153
-                     'startTime' => $xml->startTime,
154
-                     'endTime' => $xml->endTime,
155
-                     'participantCount' => $xml->participantCount,
156
-                     'moderatorCount' => $xml->moderatorCount,
157
-                     'attendees' => $xml->attendees,
158
-                     'metadata' => $xml->metadata,
159
-                   );
147
+                        'meetingID' => $xml->meetingID,
148
+                        'moderatorPW' => $xml->moderatorPW,
149
+                        'attendeePW' => $xml->attendeePW,
150
+                        'hasBeenForciblyEnded' => $xml->hasBeenForciblyEnded,
151
+                        'running' => $xml->running,
152
+                        'recording' => $xml->recording,
153
+                        'startTime' => $xml->startTime,
154
+                        'endTime' => $xml->endTime,
155
+                        'participantCount' => $xml->participantCount,
156
+                        'moderatorCount' => $xml->moderatorCount,
157
+                        'attendees' => $xml->attendees,
158
+                        'metadata' => $xml->metadata,
159
+                    );
160 160
     }
161 161
     if ($xml) {
162 162
         // Either failure or success without meeting info.
@@ -278,7 +278,7 @@  discard block
 block discarded – undo
278 278
 function bigbluebuttonbn_get_default_config_xml() {
279 279
     $xml = bigbluebuttonbn_wrap_xml_load_file(
280 280
         \mod_bigbluebuttonbn\locallib\bigbluebutton::action_url('getDefaultConfigXML')
281
-      );
281
+        );
282 282
     return $xml;
283 283
 }
284 284
 
@@ -347,7 +347,7 @@  discard block
 block discarded – undo
347 347
     foreach ($ids as $id) {
348 348
         $xml = bigbluebuttonbn_wrap_xml_load_file(
349 349
             \mod_bigbluebuttonbn\locallib\bigbluebutton::action_url('deleteRecordings', ['recordID' => $id])
350
-          );
350
+            );
351 351
         if ($xml && $xml->returncode != 'SUCCESS') {
352 352
             return false;
353 353
         }
@@ -364,7 +364,7 @@  discard block
 block discarded – undo
364 364
     foreach ($ids as $id) {
365 365
         $xml = bigbluebuttonbn_wrap_xml_load_file(
366 366
             \mod_bigbluebuttonbn\locallib\bigbluebutton::action_url('publishRecordings', ['recordID' => $id, 'publish' => $publish])
367
-          );
367
+            );
368 368
         if ($xml && $xml->returncode != 'SUCCESS') {
369 369
             return false;
370 370
         }
@@ -381,7 +381,7 @@  discard block
 block discarded – undo
381 381
     foreach ($ids as $id) {
382 382
         $xml = bigbluebuttonbn_wrap_xml_load_file(
383 383
             \mod_bigbluebuttonbn\locallib\bigbluebutton::action_url('updateRecordings', ['recordID' => $id] + (array) $params)
384
-          );
384
+            );
385 385
         if ($xml && $xml->returncode != 'SUCCESS') {
386 386
             return false;
387 387
         }
@@ -396,7 +396,7 @@  discard block
 block discarded – undo
396 396
 function bigbluebuttonbn_end_meeting($meetingid, $modpw) {
397 397
     $xml = bigbluebuttonbn_wrap_xml_load_file(
398 398
         \mod_bigbluebuttonbn\locallib\bigbluebutton::action_url('end', ['meetingID' => $meetingid, 'password' => $modpw])
399
-      );
399
+        );
400 400
     if ($xml) {
401 401
         // If the xml packet returned failure it displays the message to the user.
402 402
         return array('returncode' => $xml->returncode, 'message' => $xml->message, 'messageKey' => $xml->messageKey);
@@ -411,7 +411,7 @@  discard block
 block discarded – undo
411 411
 function bigbluebuttonbn_is_meeting_running($meetingid) {
412 412
     $xml = bigbluebuttonbn_wrap_xml_load_file(
413 413
         \mod_bigbluebuttonbn\locallib\bigbluebutton::action_url('isMeetingRunning', ['meetingID' => $meetingid])
414
-      );
414
+        );
415 415
     if ($xml && $xml->returncode == 'SUCCESS') {
416 416
         return ($xml->running == 'true');
417 417
     }
@@ -421,7 +421,7 @@  discard block
 block discarded – undo
421 421
 function bigbluebuttonbn_get_server_version() {
422 422
     $xml = bigbluebuttonbn_wrap_xml_load_file(
423 423
         \mod_bigbluebuttonbn\locallib\bigbluebutton::action_url()
424
-      );
424
+        );
425 425
     if ($xml && $xml->returncode == 'SUCCESS') {
426 426
         return $xml->version;
427 427
     }
@@ -476,10 +476,10 @@  discard block
 block discarded – undo
476 476
 
477 477
         $options = array();
478 478
         $options['CURLOPT_HTTPHEADER'] = array(
479
-                 'Content-Type: '.$contenttype,
480
-                 'Content-Length: '.strlen($data),
481
-                 'Content-Language: en-US',
482
-               );
479
+                    'Content-Type: '.$contenttype,
480
+                    'Content-Length: '.strlen($data),
481
+                    'Content-Language: en-US',
482
+                );
483 483
 
484 484
         return $c->post($url, $data, $options);
485 485
     }
@@ -558,13 +558,13 @@  discard block
 block discarded – undo
558 558
 
559 559
 function bigbluebuttonbn_role_unknown() {
560 560
     return array(
561
-              "id" => "0",
562
-              "name" => "",
563
-              "shortname" => "unknown",
564
-              "description" => "",
565
-              "sortorder" => "0",
566
-              "archetype" => "guest",
567
-              "localname" => "Unknown"
561
+                "id" => "0",
562
+                "name" => "",
563
+                "shortname" => "unknown",
564
+                "description" => "",
565
+                "sortorder" => "0",
566
+                "archetype" => "guest",
567
+                "localname" => "Unknown"
568 568
             );
569 569
 }
570 570
 
@@ -573,16 +573,16 @@  discard block
 block discarded – undo
573 573
         'all' => array(
574 574
             'name' => get_string('mod_form_field_participant_list_type_all', 'bigbluebuttonbn'),
575 575
             'children' => []
576
-          )
577
-      );
576
+            )
577
+        );
578 578
     $data['role'] = array(
579 579
         'name' => get_string('mod_form_field_participant_list_type_role', 'bigbluebuttonbn'),
580 580
         'children' => bigbluebuttonbn_get_roles_select($context)
581
-      );
581
+        );
582 582
     $data['user'] = array(
583 583
         'name' => get_string('mod_form_field_participant_list_type_user', 'bigbluebuttonbn'),
584 584
         'children' => bigbluebuttonbn_get_users_select($context)
585
-      );
585
+        );
586 586
     return $data;
587 587
 }
588 588
 
@@ -612,9 +612,9 @@  discard block
 block discarded – undo
612 612
             continue;
613 613
         }
614 614
         $participantlistarray[] = array(
615
-              'selectiontype' => 'role',
616
-              'selectionid' => $moderatordefault,
617
-              'role' => BIGBLUEBUTTONBN_ROLE_MODERATOR);
615
+                'selectiontype' => 'role',
616
+                'selectionid' => $moderatordefault,
617
+                'role' => BIGBLUEBUTTONBN_ROLE_MODERATOR);
618 618
     }
619 619
     return $participantlistarray;
620 620
 }
@@ -645,11 +645,11 @@  discard block
 block discarded – undo
645 645
             'all' => get_string('mod_form_field_participant_list_type_all', 'bigbluebuttonbn'),
646 646
             'role' => get_string('mod_form_field_participant_list_type_role', 'bigbluebuttonbn'),
647 647
             'user' => get_string('mod_form_field_participant_list_type_user', 'bigbluebuttonbn'),
648
-          ],
648
+            ],
649 649
         'type_selected' => 'all',
650 650
         'options' => ['all' => '---------------'],
651 651
         'selected' => 'all',
652
-      ];
652
+        ];
653 653
 }
654 654
 
655 655
 function bigbluebuttonbn_is_moderator($context, $participants, $userid = null, $userroles = null) {
@@ -839,7 +839,7 @@  discard block
 block discarded – undo
839 839
         $eventproperties['other'] = $options['other'];
840 840
     }
841 841
     $event = call_user_func_array('\mod_bigbluebuttonbn\event\bigbluebuttonbn_'.$eventtype.'::create',
842
-      array($eventproperties));
842
+        array($eventproperties));
843 843
     $event->trigger();
844 844
 }
845 845
 
@@ -884,7 +884,7 @@  discard block
 block discarded – undo
884 884
     // Ping again and refresh the cache.
885 885
     $meetinginfo = (array) bigbluebuttonbn_wrap_xml_load_file(
886 886
         \mod_bigbluebuttonbn\locallib\bigbluebutton::action_url('getMeetingInfo', ['meetingID' => $meetingid])
887
-      );
887
+        );
888 888
     $cache->set($meetingid, array('creation_time' => time(), 'meeting_info' => json_encode($meetinginfo)));
889 889
     return $meetinginfo;
890 890
 }
@@ -1120,8 +1120,8 @@  discard block
 block discarded – undo
1120 1120
     }
1121 1121
     $id = 'playbacks-'.$recording['recordID'];
1122 1122
     $recordingtypes = html_writer::start_tag('div', array('id' => $id, 'data-imported' => $dataimported,
1123
-          'data-meetingid' => $recording['meetingID'], 'data-recordingid' => $recording['recordID'],
1124
-          'title' => $title, $visibility => $visibility));
1123
+            'data-meetingid' => $recording['meetingID'], 'data-recordingid' => $recording['recordID'],
1124
+            'title' => $title, $visibility => $visibility));
1125 1125
     foreach ($recording['playbacks'] as $playback) {
1126 1126
         $recordingtypes .= bigbluebuttonbn_get_recording_data_row_type($recording, $bigbluebuttonbnid,
1127 1127
             $playback).'&#32;';
@@ -1135,7 +1135,7 @@  discard block
 block discarded – undo
1135 1135
     $title = get_string('view_recording_format_'.$playback['type'], 'bigbluebuttonbn');
1136 1136
     $onclick = 'M.mod_bigbluebuttonbn.recordings.recordingPlay(this);';
1137 1137
     $href = $CFG->wwwroot.'/mod/bigbluebuttonbn/bbb_view.php?action=play&bn='.$bigbluebuttonbnid.
1138
-      '&mid='.$recording['meetingID'].'&rid='.$recording['recordID'].'&rtype='.$playback['type'];
1138
+        '&mid='.$recording['meetingID'].'&rid='.$recording['recordID'].'&rtype='.$playback['type'];
1139 1139
     if (!isset($recording['imported']) || !isset($recording['protected']) || $recording['protected'] === 'false') {
1140 1140
         $href .= '&href='.urlencode(trim($playback['url']));
1141 1141
     }
@@ -1147,7 +1147,7 @@  discard block
 block discarded – undo
1147 1147
         'data-target' => $playback['type'],
1148 1148
         'data-href' => $href,
1149 1149
         'class' => 'btn btn-sm btn-default'
1150
-      );
1150
+        );
1151 1151
     return $OUTPUT->action_link('#', $title, null, $linkattributes);
1152 1152
 }
1153 1153
 
@@ -1231,7 +1231,7 @@  discard block
 block discarded – undo
1231 1231
             'onclick' => $onclick,
1232 1232
             'data-action' => $data['action'],
1233 1233
             'data-links' => bigbluebuttonbn_get_count_recording_imported_instances($recording['recordID'])
1234
-          );
1234
+            );
1235 1235
         return $OUTPUT->action_icon('#', $icon, null, $linkattributes, false);
1236 1236
     }
1237 1237
     // With text for $manageaction.
@@ -1336,7 +1336,7 @@  discard block
 block discarded – undo
1336 1336
         $texthead . $rowdata->activity . $texttail, $texthead . $rowdata->description . $texttail,
1337 1337
         $rowdata->preview, $texthead . $rowdata->date_formatted . $texttail,
1338 1338
         $rowdata->duration_formatted
1339
-      );
1339
+        );
1340 1340
     if ($bbbsession['managerecordings']) {
1341 1341
         $row->cells[] = $rowdata->actionbar;
1342 1342
     }
@@ -1578,8 +1578,8 @@  discard block
 block discarded – undo
1578 1578
     $activitytime = '';
1579 1579
     if ($time) {
1580 1580
         $activitytime = calendar_day_representation($time).' '.
1581
-          get_string('mod_form_field_notification_msg_at', 'bigbluebuttonbn').' '.
1582
-          calendar_time_representation($time);
1581
+            get_string('mod_form_field_notification_msg_at', 'bigbluebuttonbn').' '.
1582
+            calendar_time_representation($time);
1583 1583
     }
1584 1584
     return $activitytime;
1585 1585
 }
@@ -1757,7 +1757,7 @@  discard block
 block discarded – undo
1757 1757
         $renderer->render_group_element('participant_moderator_default',
1758 1758
             $renderer->render_group_element_configmultiselect('participant_moderator_default',
1759 1759
                 array_keys($owner), array_merge($owner, $roles))
1760
-          );
1760
+            );
1761 1761
     }
1762 1762
 }
1763 1763
 
Please login to merge, or discard this patch.
backup/moodle2/restore_bigbluebuttonbn_activity_task.class.php 1 patch
Indentation   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -76,10 +76,10 @@  discard block
 block discarded – undo
76 76
     }
77 77
 
78 78
     /**
79
-    * Define the restoring rules for logs belonging to the activity to be executed by the link decoder.
80
-    *
81
-    * @return array
82
-    */
79
+     * Define the restoring rules for logs belonging to the activity to be executed by the link decoder.
80
+     *
81
+     * @return array
82
+     */
83 83
     public static function define_restore_log_rules() {
84 84
         $rules = array();
85 85
         $rules[] = new restore_log_rule('bigbluebuttonbn', 'add', 'view.php?id={course_module}', '{bigbluebuttonbn}');
@@ -90,10 +90,10 @@  discard block
 block discarded – undo
90 90
     }
91 91
 
92 92
     /**
93
-    * Define the restoring rules for course associated to the activity to be executed by the link decoder.
94
-    *
95
-    * @return array
96
-    */
93
+     * Define the restoring rules for course associated to the activity to be executed by the link decoder.
94
+     *
95
+     * @return array
96
+     */
97 97
     public static function define_restore_log_rules_for_course() {
98 98
         $rules = array();
99 99
         $rules[] = new restore_log_rule('bigbluebuttonbn', 'view all', 'index.php?id={course}', null);
Please login to merge, or discard this patch.
view.php 1 patch
Indentation   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -355,7 +355,7 @@  discard block
 block discarded – undo
355 355
         return $output;
356 356
     }
357 357
     $output .= $OUTPUT->box_start('box boxalignleft adminerror alert alert-' . $type . ' alert-block fade in',
358
-      'bigbluebuttonbn_view_general_warning')."\n";
358
+        'bigbluebuttonbn_view_general_warning')."\n";
359 359
     $output .= '  <button type="button" class="close" data-dismiss="alert">&times;</button>'.$message."\n";
360 360
     $output .= '  <div class="singlebutton">'."\n";
361 361
     if (!empty($href)) {
@@ -439,13 +439,13 @@  discard block
 block discarded – undo
439 439
         $recordings = bigbluebuttonbn_get_recordings(
440 440
             $bbbsession['course']->id, $bigbluebuttonbnid, $showroom,
441 441
             $bbbsession['bigbluebuttonbn']->recordings_deleted
442
-          );
442
+            );
443 443
     }
444 444
 
445 445
     // Get recording links.
446 446
     $recordingsimported = bigbluebuttonbn_get_recordings_imported_array(
447 447
         $bbbsession['course']->id, $bigbluebuttonbnid, $showroom
448
-      );
448
+        );
449 449
 
450 450
     /* Perform aritmetic addition instead of merge so the imported recordings corresponding to existent
451 451
      * recordings are not included. */
@@ -461,7 +461,7 @@  discard block
 block discarded – undo
461 461
     // JavaScript variables for recordings.
462 462
     $jsvars += array(
463 463
             'recordings_html' => $bbbsession['bigbluebuttonbn']->recordings_html == '1',
464
-          );
464
+            );
465 465
 
466 466
     // If there are meetings with recordings load the data to the table.
467 467
     if ($bbbsession['bigbluebuttonbn']->recordings_html) {
@@ -473,7 +473,7 @@  discard block
 block discarded – undo
473 473
     $jsvars += array(
474 474
             'columns' => bigbluebuttonbn_get_recording_columns($bbbsession),
475 475
             'data' => bigbluebuttonbn_get_recording_data($bbbsession, $recordings),
476
-          );
476
+            );
477 477
 
478 478
     // Render a YUI table.
479 479
     return html_writer::div('', '', array('id' => 'bigbluebuttonbn_yui_table'));
@@ -484,10 +484,10 @@  discard block
 block discarded – undo
484 484
 
485 485
     $button = html_writer::tag('input', '',
486 486
         array('type' => 'button',
487
-              'value' => get_string('view_recording_button_import', 'bigbluebuttonbn'),
488
-              'class' => 'btn btn-secondary',
489
-              'onclick' => 'window.location=\''.$CFG->wwwroot.'/mod/bigbluebuttonbn/import_view.php?bn='.
490
-                  $bbbsession['bigbluebuttonbn']->id.'\''));
487
+                'value' => get_string('view_recording_button_import', 'bigbluebuttonbn'),
488
+                'class' => 'btn btn-secondary',
489
+                'onclick' => 'window.location=\''.$CFG->wwwroot.'/mod/bigbluebuttonbn/import_view.php?bn='.
490
+                    $bbbsession['bigbluebuttonbn']->id.'\''));
491 491
     $output = html_writer::start_tag('br');
492 492
     $output .= html_writer::tag('span', $button, array('id' => 'import_recording_links_button'));
493 493
     $output .= html_writer::tag('span', '', array('id' => 'import_recording_links_table'));
@@ -505,7 +505,7 @@  discard block
 block discarded – undo
505 505
         return '<h4>'.get_string('view_section_title_presentation', 'bigbluebuttonbn').'</h4>'.
506 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
 
511 511
     return '';
Please login to merge, or discard this patch.