Completed
Pull Request — v2.2-stable (#74)
by
unknown
02:20
created
view.php 2 patches
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.
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('n', 0, PARAM_INT);
@@ -60,19 +60,19 @@  discard block
 block discarded – undo
60 60
 if (is_null($serverversion)) {
61 61
     if ($bbbsession['administrator']) {
62 62
         print_error('view_error_unable_join', 'bigbluebuttonbn',
63
-            $CFG->wwwroot.'/admin/settings.php?section=modsettingbigbluebuttonbn');
63
+            $CFG->wwwroot . '/admin/settings.php?section=modsettingbigbluebuttonbn');
64 64
         exit;
65 65
     }
66 66
     if ($bbbsession['moderator']) {
67 67
         print_error('view_error_unable_join_teacher', 'bigbluebuttonbn',
68
-            $CFG->wwwroot.'/course/view.php?id='.$bigbluebuttonbn->course);
68
+            $CFG->wwwroot . '/course/view.php?id=' . $bigbluebuttonbn->course);
69 69
         exit;
70 70
     }
71 71
     print_error('view_error_unable_join_student', 'bigbluebuttonbn',
72
-        $CFG->wwwroot.'/course/view.php?id='.$bigbluebuttonbn->course);
72
+        $CFG->wwwroot . '/course/view.php?id=' . $bigbluebuttonbn->course);
73 73
     exit;
74 74
 }
75
-$bbbsession['serverversion'] = (string) $serverversion;
75
+$bbbsession['serverversion'] = (string)$serverversion;
76 76
 
77 77
 // Mark viewed by user (if required).
78 78
 $completion = new completion_info($course);
@@ -80,7 +80,7 @@  discard block
 block discarded – undo
80 80
 
81 81
 // Print the page header.
82 82
 $PAGE->set_context($context);
83
-$PAGE->set_url($CFG->wwwroot.'/mod/bigbluebuttonbn/view.php', array('id' => $cm->id));
83
+$PAGE->set_url($CFG->wwwroot . '/mod/bigbluebuttonbn/view.php', array('id' => $cm->id));
84 84
 $PAGE->set_title(format_string($bigbluebuttonbn->name));
85 85
 $PAGE->set_cacheable(false);
86 86
 $PAGE->set_heading($course->fullname);
@@ -90,11 +90,11 @@  discard block
 block discarded – undo
90 90
 if (!has_capability('moodle/category:manage', $context) && !has_capability('mod/bigbluebuttonbn:join', $context)) {
91 91
     echo $OUTPUT->header();
92 92
     if (isguestuser()) {
93
-        echo $OUTPUT->confirm('<p>'.get_string('view_noguests', '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_noguests', 'bigbluebuttonbn') . '</p>' . get_string('liketologin'),
94
+            get_login_url(), $CFG->wwwroot . '/course/view.php?id=' . $course->id);
95 95
     } else {
96
-        echo $OUTPUT->confirm('<p>'.get_string('view_nojoin', 'bigbluebuttonbn').'</p>'.get_string('liketologin'),
97
-            get_login_url(), $CFG->wwwroot.'/course/view.php?id='.$course->id);
96
+        echo $OUTPUT->confirm('<p>' . get_string('view_nojoin', 'bigbluebuttonbn') . '</p>' . get_string('liketologin'),
97
+            get_login_url(), $CFG->wwwroot . '/course/view.php?id=' . $course->id);
98 98
     }
99 99
     echo $OUTPUT->footer();
100 100
     exit;
@@ -102,7 +102,7 @@  discard block
 block discarded – undo
102 102
 
103 103
 // Operation URLs.
104 104
 $bbbsession['bigbluebuttonbnURL'] = $CFG->wwwroot . '/mod/bigbluebuttonbn/view.php?id=' . $bbbsession['cm']->id;
105
-$bbbsession['logoutURL'] = $CFG->wwwroot . '/mod/bigbluebuttonbn/bbb_view.php?action=logout&id='.$id .
105
+$bbbsession['logoutURL'] = $CFG->wwwroot . '/mod/bigbluebuttonbn/bbb_view.php?action=logout&id=' . $id .
106 106
     '&bn=' . $bbbsession['bigbluebuttonbn']->id;
107 107
 $bbbsession['recordingReadyURL'] = $CFG->wwwroot . '/mod/bigbluebuttonbn/bbb_broker.php?action=recording_' .
108 108
     'ready&bigbluebuttonbn=' . $bbbsession['bigbluebuttonbn']->id;
@@ -122,7 +122,7 @@  discard block
 block discarded – undo
122 122
 echo $OUTPUT->footer();
123 123
 
124 124
 // Shows version as a comment.
125
-echo '<!-- '.$bbbsession['originTag'].' -->'."\n";
125
+echo '<!-- ' . $bbbsession['originTag'] . ' -->' . "\n";
126 126
 
127 127
 // Initialize session variable used across views.
128 128
 $SESSION->bigbluebuttonbn_bbbsession = $bbbsession;
@@ -150,7 +150,7 @@  discard block
 block discarded – undo
150 150
     $bbbsession['modPW'] = $bbbsession['bigbluebuttonbn']->moderatorpass;
151 151
     $bbbsession['viewerPW'] = $bbbsession['bigbluebuttonbn']->viewerpass;
152 152
     // Database info related to the activity.
153
-    $bbbsession['meetingid'] = $bbbsession['bigbluebuttonbn']->meetingid.'-'.$bbbsession['course']->id.'-'.
153
+    $bbbsession['meetingid'] = $bbbsession['bigbluebuttonbn']->meetingid . '-' . $bbbsession['course']->id . '-' .
154 154
         $bbbsession['bigbluebuttonbn']->id;
155 155
     $bbbsession['meetingname'] = $bbbsession['bigbluebuttonbn']->name;
156 156
     $bbbsession['meetingdescription'] = $bbbsession['bigbluebuttonbn']->intro;
@@ -170,7 +170,7 @@  discard block
 block discarded – undo
170 170
         $bbbsession['welcome'] = get_string('mod_form_field_welcome_default', 'bigbluebuttonbn');
171 171
     }
172 172
     if ($bbbsession['bigbluebuttonbn']->record) {
173
-        $bbbsession['welcome'] .= '<br><br>'.get_string('bbbrecordwarning', 'bigbluebuttonbn');
173
+        $bbbsession['welcome'] .= '<br><br>' . get_string('bbbrecordwarning', 'bigbluebuttonbn');
174 174
     }
175 175
     $bbbsession['openingtime'] = $bbbsession['bigbluebuttonbn']->openingtime;
176 176
     $bbbsession['closingtime'] = $bbbsession['bigbluebuttonbn']->closingtime;
@@ -183,7 +183,7 @@  discard block
 block discarded – undo
183 183
     $bbbsession['originServerName'] = $parsedurl['host'];
184 184
     $bbbsession['originServerUrl'] = $CFG->wwwroot;
185 185
     $bbbsession['originServerCommonName'] = '';
186
-    $bbbsession['originTag'] = 'moodle-mod_bigbluebuttonbn ('.get_config('mod_bigbluebuttonbn', 'version').')';
186
+    $bbbsession['originTag'] = 'moodle-mod_bigbluebuttonbn (' . get_config('mod_bigbluebuttonbn', 'version') . ')';
187 187
     $bbbsession['bnserver'] = bigbluebuttonbn_is_bn_server();
188 188
     $bbbsession['clienttype'] = $bbbsession['bigbluebuttonbn']->clienttype;
189 189
 }
@@ -239,8 +239,8 @@  discard block
 block discarded – undo
239 239
         $groupname = groups_get_group_name($bbbsession['group']);
240 240
     }
241 241
     // Assign group default values.
242
-    $bbbsession['meetingid'] .= '['.$bbbsession['group'].']';
243
-    $bbbsession['meetingname'] .= ' ('.$groupname.')';
242
+    $bbbsession['meetingid'] .= '[' . $bbbsession['group'] . ']';
243
+    $bbbsession['meetingname'] .= ' (' . $groupname . ')';
244 244
     if (count($groups) == 0) {
245 245
         // Only the All participants group exists.
246 246
         bigbluebuttonbn_view_message_box($bbbsession, get_string('view_groups_notenrolled_warning', 'bigbluebuttonbn'), 'info');
@@ -250,7 +250,7 @@  discard block
 block discarded – undo
250 250
     if (has_capability('moodle/site:accessallgroups', $context)) {
251 251
         bigbluebuttonbn_view_message_box($bbbsession, get_string('view_groups_selection_warning', 'bigbluebuttonbn'));
252 252
     }
253
-    $urltoroot = $CFG->wwwroot.'/mod/bigbluebuttonbn/view.php?id='.$bbbsession['cm']->id;
253
+    $urltoroot = $CFG->wwwroot . '/mod/bigbluebuttonbn/view.php?id=' . $bbbsession['cm']->id;
254 254
     groups_print_activity_menu($bbbsession['cm'], $urltoroot);
255 255
     echo '<br><br>';
256 256
 }
@@ -317,7 +317,7 @@  discard block
 block discarded – undo
317 317
         $recordingsdisabled = get_string('view_message_recordings_disabled', 'bigbluebuttonbn');
318 318
         $output .= bigbluebuttonbn_render_warning($recordingsdisabled, 'danger');
319 319
     }
320
-    echo $output.html_writer::empty_tag('br').html_writer::empty_tag('br').html_writer::empty_tag('br');
320
+    echo $output . html_writer::empty_tag('br') . html_writer::empty_tag('br') . html_writer::empty_tag('br');
321 321
     $PAGE->requires->yui_module('moodle-mod_bigbluebuttonbn-broker', 'M.mod_bigbluebuttonbn.broker.init', array($jsvars));
322 322
 }
323 323
 
@@ -386,12 +386,12 @@  discard block
 block discarded – undo
386 386
     // JavaScript variables for room.
387 387
     $openingtime = '';
388 388
     if ($bbbsession['openingtime']) {
389
-        $openingtime = get_string('mod_form_field_openingtime', 'bigbluebuttonbn').': '.
389
+        $openingtime = get_string('mod_form_field_openingtime', 'bigbluebuttonbn') . ': ' .
390 390
             userdate($bbbsession['openingtime']);
391 391
     }
392 392
     $closingtime = '';
393 393
     if ($bbbsession['closingtime']) {
394
-        $closingtime = get_string('mod_form_field_closingtime', 'bigbluebuttonbn').': '.
394
+        $closingtime = get_string('mod_form_field_closingtime', 'bigbluebuttonbn') . ': ' .
395 395
             userdate($bbbsession['closingtime']);
396 396
     }
397 397
     $jsvars += array(
@@ -408,7 +408,7 @@  discard block
 block discarded – undo
408 408
     $output .= $OUTPUT->box_end();
409 409
     // Action button box.
410 410
     $output .= $OUTPUT->box_start('generalbox boxaligncenter', 'bigbluebuttonbn_view_action_button_box');
411
-    $output .= '<br><br><span id="join_button"></span>&nbsp;<span id="end_button"></span>'."\n";
411
+    $output .= '<br><br><span id="join_button"></span>&nbsp;<span id="end_button"></span>' . "\n";
412 412
     $output .= $OUTPUT->box_end();
413 413
     if ($activity == 'ended') {
414 414
         $output .= bigbluebuttonbn_view_ended($bbbsession);
@@ -461,7 +461,7 @@  discard block
 block discarded – undo
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.
464
-        return bigbluebuttonbn_output_recording_table($bbbsession, $recordings)."\n";
464
+        return bigbluebuttonbn_output_recording_table($bbbsession, $recordings) . "\n";
465 465
     }
466 466
     // JavaScript variables for recordings with YUI.
467 467
     $jsvars += array(
@@ -489,8 +489,8 @@  discard block
 block discarded – undo
489 489
         array('type' => 'button',
490 490
               'value' => get_string('view_recording_button_import', 'bigbluebuttonbn'),
491 491
               'class' => 'btn btn-secondary',
492
-              'onclick' => 'window.location=\''.$CFG->wwwroot.'/mod/bigbluebuttonbn/import_view.php?bn='.
493
-                  $bbbsession['bigbluebuttonbn']->id.'\''));
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'));
@@ -509,10 +509,10 @@  discard block
 block discarded – undo
509 509
     if (!is_null($bbbsession['presentation']['url'])) {
510 510
         $attributes = array('title' => $bbbsession['presentation']['name']);
511 511
         $icon = new pix_icon($bbbsession['presentation']['icon'], $bbbsession['presentation']['mimetype_description']);
512
-        return '<h4>'.get_string('view_section_title_presentation', 'bigbluebuttonbn').'</h4>'.
513
-                $OUTPUT->action_icon($bbbsession['presentation']['url'], $icon, null, array(), false).
512
+        return '<h4>' . get_string('view_section_title_presentation', 'bigbluebuttonbn') . '</h4>' .
513
+                $OUTPUT->action_icon($bbbsession['presentation']['url'], $icon, null, array(), false) .
514 514
                 $OUTPUT->action_link($bbbsession['presentation']['url'],
515
-                $bbbsession['presentation']['name'], null, $attributes).'<br><br>';
515
+                $bbbsession['presentation']['name'], null, $attributes) . '<br><br>';
516 516
     }
517 517
     return '';
518 518
 }
Please login to merge, or discard this patch.
classes/locallib/config.php 2 patches
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.
Indentation   +30 added lines, -30 removed lines patch added patch discarded remove patch
@@ -154,35 +154,35 @@
 block discarded – undo
154 154
      */
155 155
     public static function get_options() {
156 156
         return array(
157
-               'version_major' => self::get_moodle_version_major(),
158
-               'voicebridge_editable' => self::get('voicebridge_editable'),
159
-               'importrecordings_enabled' => self::get('importrecordings_enabled'),
160
-               'importrecordings_from_deleted_enabled' => self::get('importrecordings_from_deleted_enabled'),
161
-               'waitformoderator_default' => self::get('waitformoderator_default'),
162
-               'waitformoderator_editable' => self::get('waitformoderator_editable'),
163
-               'userlimit_default' => self::get('userlimit_default'),
164
-               'userlimit_editable' => self::get('userlimit_editable'),
165
-               'preuploadpresentation_enabled' => self::get('preuploadpresentation_enabled'),
166
-               'sendnotifications_enabled' => self::get('sendnotifications_enabled'),
167
-               'recordings_enabled' => self::get('recordings_enabled'),
168
-               'recordings_html_default' => self::get('recordings_html_default'),
169
-               'recordings_html_editable' => self::get('recordings_html_editable'),
170
-               'recordings_deleted_default' => self::get('recordings_deleted_default'),
171
-               'recordings_deleted_editable' => self::get('recordings_deleted_editable'),
172
-               'recordings_imported_default' => self::get('recordings_imported_default'),
173
-               'recordings_imported_editable' => self::get('recordings_imported_editable'),
174
-               'recordings_preview_default' => self::get('recordings_preview_default'),
175
-               'recordings_preview_editable' => self::get('recordings_preview_editable'),
176
-               'recording_default' => self::get('recording_default'),
177
-               'recording_editable' => self::get('recording_editable'),
178
-               'recording_icons_enabled' => self::get('recording_icons_enabled'),
179
-               'general_warning_message' => self::get('general_warning_message'),
180
-               'general_warning_box_type' => self::get('general_warning_box_type'),
181
-               'general_warning_button_text' => self::get('general_warning_button_text'),
182
-               'general_warning_button_href' => self::get('general_warning_button_href'),
183
-               'general_warning_button_class' => self::get('general_warning_button_class'),
184
-               'clienttype_editable' => self::get('clienttype_editable'),
185
-               'clienttype_default' => self::get('clienttype_default'),
186
-          );
157
+                'version_major' => self::get_moodle_version_major(),
158
+                'voicebridge_editable' => self::get('voicebridge_editable'),
159
+                'importrecordings_enabled' => self::get('importrecordings_enabled'),
160
+                'importrecordings_from_deleted_enabled' => self::get('importrecordings_from_deleted_enabled'),
161
+                'waitformoderator_default' => self::get('waitformoderator_default'),
162
+                'waitformoderator_editable' => self::get('waitformoderator_editable'),
163
+                'userlimit_default' => self::get('userlimit_default'),
164
+                'userlimit_editable' => self::get('userlimit_editable'),
165
+                'preuploadpresentation_enabled' => self::get('preuploadpresentation_enabled'),
166
+                'sendnotifications_enabled' => self::get('sendnotifications_enabled'),
167
+                'recordings_enabled' => self::get('recordings_enabled'),
168
+                'recordings_html_default' => self::get('recordings_html_default'),
169
+                'recordings_html_editable' => self::get('recordings_html_editable'),
170
+                'recordings_deleted_default' => self::get('recordings_deleted_default'),
171
+                'recordings_deleted_editable' => self::get('recordings_deleted_editable'),
172
+                'recordings_imported_default' => self::get('recordings_imported_default'),
173
+                'recordings_imported_editable' => self::get('recordings_imported_editable'),
174
+                'recordings_preview_default' => self::get('recordings_preview_default'),
175
+                'recordings_preview_editable' => self::get('recordings_preview_editable'),
176
+                'recording_default' => self::get('recording_default'),
177
+                'recording_editable' => self::get('recording_editable'),
178
+                'recording_icons_enabled' => self::get('recording_icons_enabled'),
179
+                'general_warning_message' => self::get('general_warning_message'),
180
+                'general_warning_box_type' => self::get('general_warning_box_type'),
181
+                'general_warning_button_text' => self::get('general_warning_button_text'),
182
+                'general_warning_button_href' => self::get('general_warning_button_href'),
183
+                'general_warning_button_class' => self::get('general_warning_button_class'),
184
+                'clienttype_editable' => self::get('clienttype_editable'),
185
+                'clienttype_default' => self::get('clienttype_default'),
186
+            );
187 187
     }
188 188
 }
Please login to merge, or discard this patch.
bbb_broker.php 2 patches
Indentation   +21 added lines, -21 removed lines patch added patch discarded remove patch
@@ -440,26 +440,26 @@  discard block
 block discarded – undo
440 440
             return array(
441 441
                 'status' => false,
442 442
                 'message' => get_string('view_recording_publish_link_deleted', 'bigbluebuttonbn')
443
-              );
443
+                );
444 444
         }
445 445
         if ($realrecordings[$params['id']]['published'] !== 'true') {
446 446
             return array(
447 447
                 'status' => false,
448 448
                 'message' => get_string('view_recording_publish_link_not_published', 'bigbluebuttonbn')
449
-              );
449
+                );
450 450
         }
451 451
         return array(
452 452
             'status' => bigbluebuttonbn_publish_recording_imported(
453 453
                 $recordings[$params['id']]['imported'], true
454 454
             )
455
-          );
455
+            );
456 456
     }
457 457
     // As the recordingid was not identified as imported recording link, execute actual publish.
458 458
     return array(
459 459
         'status' => bigbluebuttonbn_publish_recordings(
460 460
             $params['id'], 'true'
461 461
         )
462
-      );
462
+        );
463 463
 }
464 464
 
465 465
 /**
@@ -480,26 +480,26 @@  discard block
 block discarded – undo
480 480
             return array(
481 481
                 'status' => false,
482 482
                 'message' => get_string('view_recording_unprotect_link_deleted', 'bigbluebuttonbn')
483
-              );
483
+                );
484 484
         }
485 485
         if ($realrecordings[$params['id']]['protected'] === 'true') {
486 486
             return array(
487 487
                 'status' => false,
488 488
                 'message' => get_string('view_recording_unprotect_link_not_unprotected', 'bigbluebuttonbn')
489
-              );
489
+                );
490 490
         }
491 491
         return array(
492 492
             'status' => bigbluebuttonbn_protect_recording_imported(
493 493
                 $recordings[$params['id']]['imported'], false
494 494
             )
495
-          );
495
+            );
496 496
     }
497 497
     // As the recordingid was not identified as imported recording link, execute actual uprotect.
498 498
     return array(
499 499
         'status' => bigbluebuttonbn_update_recordings(
500 500
             $params['id'], array('protect' => 'false')
501 501
         )
502
-      );
502
+        );
503 503
 }
504 504
 
505 505
 /**
@@ -518,7 +518,7 @@  discard block
 block discarded – undo
518 518
             'status' => bigbluebuttonbn_publish_recording_imported(
519 519
                 $recordings[$params['id']]['imported'], false
520 520
             )
521
-          );
521
+            );
522 522
     }
523 523
     // As the recordingid was not identified as imported recording link, execute unpublish on a real recording.
524 524
     // First: Unpublish imported links associated to the recording.
@@ -536,7 +536,7 @@  discard block
 block discarded – undo
536 536
         'status' => bigbluebuttonbn_publish_recordings(
537 537
             $params['id'], 'false'
538 538
         )
539
-      );
539
+        );
540 540
 }
541 541
 
542 542
 /**
@@ -555,7 +555,7 @@  discard block
 block discarded – undo
555 555
             'status' => bigbluebuttonbn_protect_recording_imported(
556 556
                 $recordings[$params['id']]['imported'], true
557 557
             )
558
-          );
558
+            );
559 559
     }
560 560
     // As the recordingid was not identified as imported recording link, execute protect on a real recording.
561 561
     // First: Protect imported links associated to the recording.
@@ -573,7 +573,7 @@  discard block
 block discarded – undo
573 573
         'status' => bigbluebuttonbn_update_recordings(
574 574
             $params['id'], array('protect' => 'true')
575 575
         )
576
-      );
576
+        );
577 577
 }
578 578
 
579 579
 /**
@@ -592,7 +592,7 @@  discard block
 block discarded – undo
592 592
             'status' => bigbluebuttonbn_delete_recording_imported(
593 593
                 $recordings[$params['id']]['imported']
594 594
             )
595
-          );
595
+            );
596 596
     }
597 597
     // As the recordingid was not identified as imported recording link, execute delete on a real recording.
598 598
     // First: Delete imported links associated to the recording.
@@ -606,7 +606,7 @@  discard block
 block discarded – undo
606 606
     // Second: Execute the actual delete.
607 607
     return array(
608 608
         'status' => bigbluebuttonbn_delete_recordings($params['id'])
609
-      );
609
+        );
610 610
 }
611 611
 
612 612
 /**
@@ -624,7 +624,7 @@  discard block
 block discarded – undo
624 624
             'status' => bigbluebuttonbn_update_recording_imported(
625 625
                 $recordings[$params['id']]['imported'], json_decode($params['meta'], true)
626 626
             )
627
-          );
627
+            );
628 628
     }
629 629
 
630 630
     // As the recordingid was not identified as imported recording link, execute update on a real recording.
@@ -634,7 +634,7 @@  discard block
 block discarded – undo
634 634
         'status' => bigbluebuttonbn_update_recordings(
635 635
             $params['id'], json_decode($params['meta'])
636 636
         )
637
-      );
637
+        );
638 638
 }
639 639
 
640 640
 /**
@@ -800,11 +800,11 @@  discard block
 block discarded – undo
800 800
     $params['recording_ready'] = [
801 801
             'bigbluebuttonbn' => 'An id for the bigbluebuttonbn instance should be included.',
802 802
             'signed_parameters' => 'A JWT encoded string must be included as [signed_parameters].'
803
-          ];
803
+            ];
804 804
     $params['live_session_events'] = [
805 805
             'bigbluebuttonbn' => 'An id for the bigbluebuttonbn instance should be included.',
806 806
             'signed_parameters' => 'A JWT encoded string must be included as [signed_parameters].'
807
-          ];
807
+            ];
808 808
     return $params;
809 809
 }
810 810
 
@@ -815,9 +815,9 @@  discard block
 block discarded – undo
815 815
  */
816 816
 function bigbluebuttonbn_broker_required_parameters_default($id) {
817 817
     return [
818
-              'id' => "The {$id} must be specified.",
819
-              'callback' => 'This call must include a javascript callback.'
820
-           ];
818
+                'id' => "The {$id} must be specified.",
819
+                'callback' => 'This call must include a javascript callback.'
820
+            ];
821 821
 }
822 822
 
823 823
 /**
Please login to merge, or discard this patch.
Spacing   +16 added lines, -16 removed lines patch added patch discarded remove patch
@@ -24,8 +24,8 @@  discard block
 block discarded – undo
24 24
  */
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
 use \Firebase\JWT\JWT;
31 31
 
@@ -41,13 +41,13 @@  discard block
 block discarded – undo
41 41
 $params['meta'] = optional_param('meta', '', PARAM_TEXT);
42 42
 
43 43
 if (empty($params['action'])) {
44
-    header('HTTP/1.0 400 Bad Request. Parameter ['.$params['action'].'] was not included');
44
+    header('HTTP/1.0 400 Bad Request. Parameter [' . $params['action'] . '] was not included');
45 45
     return;
46 46
 }
47 47
 
48 48
 $error = bigbluebuttonbn_broker_validate_parameters($params);
49 49
 if (!empty($error)) {
50
-    header('HTTP/1.0 400 Bad Request. '.$error);
50
+    header('HTTP/1.0 400 Bad Request. ' . $error);
51 51
     return;
52 52
 }
53 53
 
@@ -132,11 +132,11 @@  discard block
 block discarded – undo
132 132
         bigbluebuttonbn_broker_live_session_events($params, $bigbluebuttonbn, $cm);
133 133
         return;
134 134
     }
135
-    header('HTTP/1.0 400 Bad request. The action '. $a . ' doesn\'t exist');
135
+    header('HTTP/1.0 400 Bad request. The action ' . $a . ' doesn\'t exist');
136 136
     return;
137 137
 
138 138
 } catch (Exception $e) {
139
-    header('HTTP/1.0 500 Internal Server Error. '.$e->getMessage());
139
+    header('HTTP/1.0 500 Internal Server Error. ' . $e->getMessage());
140 140
     return;
141 141
 }
142 142
 
@@ -322,7 +322,7 @@  discard block
 block discarded – undo
322 322
 function bigbluebuttonbn_broker_recording_info_current($recording, $params) {
323 323
     $callbackresponse['status'] = true;
324 324
     $callbackresponse['found'] = true;
325
-    $callbackresponse['published'] = (string) $recording['published'];
325
+    $callbackresponse['published'] = (string)$recording['published'];
326 326
     if (!isset($params['meta']) || empty($params['meta'])) {
327 327
         return $callbackresponse;
328 328
     }
@@ -651,8 +651,8 @@  discard block
 block discarded – undo
651 651
         $decodedparameters = JWT::decode($params['signed_parameters'],
652 652
             \mod_bigbluebuttonbn\locallib\config::get('shared_secret'), array('HS256'));
653 653
     } catch (Exception $e) {
654
-        $error = 'Caught exception: '.$e->getMessage();
655
-        header('HTTP/1.0 400 Bad Request. '.$error);
654
+        $error = 'Caught exception: ' . $e->getMessage();
655
+        header('HTTP/1.0 400 Bad Request. ' . $error);
656 656
         return;
657 657
     }
658 658
     // Validate that the bigbluebuttonbn activity corresponds to the meeting_id received.
@@ -668,8 +668,8 @@  discard block
 block discarded – undo
668 668
         bigbluebuttonbn_send_notification_recording_ready($bigbluebuttonbn);
669 669
         header('HTTP/1.0 202 Accepted');
670 670
     } catch (Exception $e) {
671
-        $error = 'Caught exception: '.$e->getMessage();
672
-        header('HTTP/1.0 503 Service Unavailable. '.$error);
671
+        $error = 'Caught exception: ' . $e->getMessage();
672
+        header('HTTP/1.0 503 Service Unavailable. ' . $error);
673 673
     }
674 674
 }
675 675
 
@@ -690,13 +690,13 @@  discard block
 block discarded – undo
690 690
     $importrecordings = $SESSION->bigbluebuttonbn_importrecordings;
691 691
     if (!isset($importrecordings[$params['id']])) {
692 692
         $error = "Recording {$params['id']} could not be found. It can not be imported";
693
-        header('HTTP/1.0 404 Not found. '.$error);
693
+        header('HTTP/1.0 404 Not found. ' . $error);
694 694
         return;
695 695
     }
696 696
     $callbackresponse = array('status' => true);
697 697
     $importrecordings[$params['id']]['imported'] = true;
698 698
     $overrides = array('meetingid' => $importrecordings[$params['id']]['meetingID']);
699
-    $meta = '{"recording":'.json_encode($importrecordings[$params['id']]).'}';
699
+    $meta = '{"recording":' . json_encode($importrecordings[$params['id']]) . '}';
700 700
     bigbluebuttonbn_log($bbbsession['bigbluebuttonbn'], BIGBLUEBUTTONBN_LOG_EVENT_IMPORT, $overrides, $meta);
701 701
     // Moodle event logger: Create an event for recording imported.
702 702
     if (isset($bbbsession['bigbluebutton']) && isset($bbbsession['cm'])) {
@@ -722,8 +722,8 @@  discard block
 block discarded – undo
722 722
         $decodedparameters = JWT::decode($params['signed_parameters'],
723 723
             \mod_bigbluebuttonbn\locallib\config::get('shared_secret'), array('HS256'));
724 724
     } catch (Exception $e) {
725
-        $error = 'Caught exception: '.$e->getMessage();
726
-        header('HTTP/1.0 400 Bad Request. '.$error);
725
+        $error = 'Caught exception: ' . $e->getMessage();
726
+        header('HTTP/1.0 400 Bad Request. ' . $error);
727 727
         return;
728 728
     }
729 729
     // Validate that the bigbluebuttonbn activity corresponds to the meeting_id received.
@@ -758,7 +758,7 @@  discard block
 block discarded – undo
758 758
     $requiredparams = bigbluebuttonbn_broker_required_parameters();
759 759
     $action = strtolower($params['action']);
760 760
     if (!array_key_exists($action, $requiredparams)) {
761
-        return 'Action '.$params['action'].' can not be performed.';
761
+        return 'Action ' . $params['action'] . ' can not be performed.';
762 762
     }
763 763
     return bigbluebuttonbn_broker_validate_parameters_message($params, $requiredparams[$action]);
764 764
 }
Please login to merge, or discard this patch.
classes/locallib/notifier.php 1 patch
Spacing   +26 added lines, -26 removed lines patch added patch discarded remove patch
@@ -47,7 +47,7 @@  discard block
 block discarded – undo
47 47
     public static function notification_process($context, $bigbluebuttonbn, $action) {
48 48
         global $USER;
49 49
         // Prepare message.
50
-        $msg = (object) array();
50
+        $msg = (object)array();
51 51
         // Build the message_body.
52 52
         $msg->action = $action;
53 53
         $msg->activity_type = '';
@@ -72,26 +72,26 @@  discard block
 block discarded – undo
72 72
      * @return string
73 73
      */
74 74
     public static function notification_msg_html($msg) {
75
-        $messagetext = '<p>'.$msg->activity_type.' "'.$msg->activity_title.'" '.
76
-            get_string('email_body_notification_meeting_has_been', 'bigbluebuttonbn').' '.$msg->action.'.</p>'."\n";
77
-        $messagetext .= '<p><b>'.$msg->activity_title.'</b> '.
78
-            get_string('email_body_notification_meeting_details', 'bigbluebuttonbn').':'."\n";
79
-        $messagetext .= '<table border="0" style="margin: 5px 0 0 20px"><tbody>'."\n";
80
-        $messagetext .= '<tr><td style="font-weight:bold;color:#555;">'.
81
-            get_string('email_body_notification_meeting_title', 'bigbluebuttonbn').': </td><td>'."\n";
82
-        $messagetext .= $msg->activity_title.'</td></tr>'."\n";
83
-        $messagetext .= '<tr><td style="font-weight:bold;color:#555;">'.
84
-            get_string('email_body_notification_meeting_description', 'bigbluebuttonbn').': </td><td>'."\n";
85
-        $messagetext .= $msg->activity_description.'</td></tr>'."\n";
86
-        $messagetext .= '<tr><td style="font-weight:bold;color:#555;">'.
87
-            get_string('email_body_notification_meeting_start_date', 'bigbluebuttonbn').': </td><td>'."\n";
88
-        $messagetext .= $msg->activity_openingtime.'</td></tr>'."\n";
89
-        $messagetext .= '<tr><td style="font-weight:bold;color:#555;">'.
90
-            get_string('email_body_notification_meeting_end_date', 'bigbluebuttonbn').': </td><td>'."\n";
91
-        $messagetext .= $msg->activity_closingtime.'</td></tr>'."\n";
92
-        $messagetext .= '<tr><td style="font-weight:bold;color:#555;">'.$msg->action.' '.
93
-            get_string('email_body_notification_meeting_by', 'bigbluebuttonbn').': </td><td>'."\n";
94
-        $messagetext .= $msg->activity_owner.'</td></tr></tbody></table></p>'."\n";
75
+        $messagetext = '<p>' . $msg->activity_type . ' "' . $msg->activity_title . '" ' .
76
+            get_string('email_body_notification_meeting_has_been', 'bigbluebuttonbn') . ' ' . $msg->action . '.</p>' . "\n";
77
+        $messagetext .= '<p><b>' . $msg->activity_title . '</b> ' .
78
+            get_string('email_body_notification_meeting_details', 'bigbluebuttonbn') . ':' . "\n";
79
+        $messagetext .= '<table border="0" style="margin: 5px 0 0 20px"><tbody>' . "\n";
80
+        $messagetext .= '<tr><td style="font-weight:bold;color:#555;">' .
81
+            get_string('email_body_notification_meeting_title', 'bigbluebuttonbn') . ': </td><td>' . "\n";
82
+        $messagetext .= $msg->activity_title . '</td></tr>' . "\n";
83
+        $messagetext .= '<tr><td style="font-weight:bold;color:#555;">' .
84
+            get_string('email_body_notification_meeting_description', 'bigbluebuttonbn') . ': </td><td>' . "\n";
85
+        $messagetext .= $msg->activity_description . '</td></tr>' . "\n";
86
+        $messagetext .= '<tr><td style="font-weight:bold;color:#555;">' .
87
+            get_string('email_body_notification_meeting_start_date', 'bigbluebuttonbn') . ': </td><td>' . "\n";
88
+        $messagetext .= $msg->activity_openingtime . '</td></tr>' . "\n";
89
+        $messagetext .= '<tr><td style="font-weight:bold;color:#555;">' .
90
+            get_string('email_body_notification_meeting_end_date', 'bigbluebuttonbn') . ': </td><td>' . "\n";
91
+        $messagetext .= $msg->activity_closingtime . '</td></tr>' . "\n";
92
+        $messagetext .= '<tr><td style="font-weight:bold;color:#555;">' . $msg->action . ' ' .
93
+            get_string('email_body_notification_meeting_by', 'bigbluebuttonbn') . ': </td><td>' . "\n";
94
+        $messagetext .= $msg->activity_owner . '</td></tr></tbody></table></p>' . "\n";
95 95
         return $messagetext;
96 96
     }
97 97
 
@@ -108,14 +108,14 @@  discard block
 block discarded – undo
108 108
         global $DB;
109 109
         $course = $DB->get_record('course', array('id' => $bigbluebuttonbn->course), '*', MUST_EXIST);
110 110
         // Complete message.
111
-        $msg = (object) array();
111
+        $msg = (object)array();
112 112
         $msg->user_name = fullname($sender);
113 113
         $msg->user_email = $sender->email;
114 114
         $msg->course_name = "$course->fullname";
115
-        $message .= '<p><hr/><br/>'.get_string('email_footer_sent_by', 'bigbluebuttonbn').' '.
116
-            $msg->user_name.'('.$msg->user_email.') ';
117
-        $message .= get_string('email_footer_sent_from', 'bigbluebuttonbn').' '.$msg->course_name.'.</p>';
118
-        $users = (array) get_enrolled_users($context, '', 0, 'u.*', null, 0, 0, true);
115
+        $message .= '<p><hr/><br/>' . get_string('email_footer_sent_by', 'bigbluebuttonbn') . ' ' .
116
+            $msg->user_name . '(' . $msg->user_email . ') ';
117
+        $message .= get_string('email_footer_sent_from', 'bigbluebuttonbn') . ' ' . $msg->course_name . '.</p>';
118
+        $users = (array)get_enrolled_users($context, '', 0, 'u.*', null, 0, 0, true);
119 119
         foreach ($users as $user) {
120 120
             if ($user->id != $sender->id) {
121 121
                 message_post_message($sender, $user, $message, FORMAT_MOODLE);
Please login to merge, or discard this patch.
config-dist.php 1 patch
Indentation   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -98,7 +98,7 @@  discard block
 block discarded – undo
98 98
  * recordings from a different activity even from a different course.
99 99
  **/
100 100
 
101
- /*
101
+    /*
102 102
  * When the value is set to 1 (checked) the bigbluebuttonbn rooms or
103 103
  * activities will have the 'import recordings' capability enabled.
104 104
  * $CFG->bigbluebuttonbn['importrecordings_enabled'] = 0;
@@ -119,7 +119,7 @@  discard block
 block discarded – undo
119 119
  * 'Join session' button enabled
120 120
  **/
121 121
 
122
- /*
122
+    /*
123 123
  * When the value is set to 1 (checked) the bigbluebuttonbn rooms or
124 124
  * activities will have the 'wait for moderator' capability enabled by
125 125
  * default.
@@ -259,32 +259,32 @@  discard block
 block discarded – undo
259 259
  * $CFG->bigbluebuttonbn['recordings_imported_editable'] = 1;
260 260
  */
261 261
 
262
- /*
262
+    /*
263 263
   * When the value is set to 1 (checked) the bigbluebuttonbn resources
264 264
   * will show the recodings with thumbnails.
265 265
   * $CFG->bigbluebuttonbn['recordings_preview_default'] = 1;
266 266
   */
267 267
 
268
- /*
268
+    /*
269 269
   * When the value is set to 1 (checked) the 'preview ui' capability can be
270 270
   * enabled/disabled by the user creating or editing the resource.
271 271
   * $CFG->bigbluebuttonbn['recordings_preview_editable'] = 0;
272 272
   */
273 273
 
274
- /*
274
+    /*
275 275
   * The WebClient by default is the Flash one (value = 0) or
276 276
   * the HTML5 one (value = 1)
277 277
   * $CFG->bigbluebuttonbn['clienttype_default'] = 0;
278 278
   */
279 279
 
280
- /*
280
+    /*
281 281
   * When the value is set to 1 (checked) the 'clienttype'
282 282
   * capability is enabled, meaning that the administrator can choose the default web client type
283 283
   * and if can be editable in each room through the plugin configuration
284 284
   * $CFG->bigbluebuttonbn['clienttype_enabled'] = 0;
285 285
   */
286 286
 
287
- /*
287
+    /*
288 288
   * When the value is set to 1 (checked) the WebClient can be chosen
289 289
   * the user creating or editing the resource.
290 290
   * $CFG->bigbluebuttonbn['clienttype_editable'] = 0;
@@ -330,27 +330,27 @@  discard block
 block discarded – undo
330 330
  * $CFG->bigbluebuttonbn['general_warning_message'] = "Would you like to record your BigBlueButton sessions for later viewing? ";
331 331
  */
332 332
 
333
- /*
333
+    /*
334 334
  * The warning box is always shown to administrators, but it is also possible to define other roles
335 335
  * to whom the it will be shown. The roles are based on the shortnames defined by Moodle:
336 336
  *     'manager,coursecreator,editingteacher,teacher,student,guest,user,frontpage'
337 337
  * $CFG->bigbluebuttonbn['general_warning_roles'] = 'editingteacher,teacher';
338 338
  */
339 339
 
340
- /*
340
+    /*
341 341
  * As the general_warning_message is shown in a box, its type can be defined with general_warning_type
342 342
  * The default type is 'info' which is normaly rendered in blue when using a bootstrap theme.
343 343
  * All the modifiers for boxed in bootstrap can be used [info|success|warning|danger].
344 344
  * $CFG->bigbluebuttonbn['general_warning_box_type'] = 'info';
345 345
  */
346 346
 
347
- /*
347
+    /*
348 348
  * Additionally, when general_warning_button_href value is different than "", a button
349 349
  * can also be shown right after the message.
350 350
  * $CFG->bigbluebuttonbn['general_warning_button_href'] = "http://blindsidenetworks.com/";
351 351
  */
352 352
 
353
- /*
353
+    /*
354 354
  * Finally, the text and class for the button can be modified
355 355
  * $CFG->bigbluebuttonbn['general_warning_button_text'] = "Upgrade your site";
356 356
  * $CFG->bigbluebuttonbn['general_warning_button_class'] = "btn btn-primary";
Please login to merge, or discard this patch.