Completed
Pull Request — master (#44)
by Jesus
02:12
created
backup/moodle2/restore_bigbluebuttonbn_stepslib.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -49,7 +49,7 @@  discard block
 block discarded – undo
49 49
      */
50 50
     protected function process_bigbluebuttonbn($data) {
51 51
         global $DB;
52
-        $data = (object) $data;
52
+        $data = (object)$data;
53 53
         $data->course = $this->get_courseid();
54 54
         $data->timemodified = $this->apply_date_offset($data->timemodified);
55 55
         // Insert the bigbluebuttonbn record.
@@ -65,7 +65,7 @@  discard block
 block discarded – undo
65 65
      */
66 66
     protected function process_bigbluebuttonbn_logs($data) {
67 67
         global $DB;
68
-        $data = (object) $data;
68
+        $data = (object)$data;
69 69
         // Apply modifications.
70 70
         $data->courseid = $this->get_mappingid('course', $data->courseid);
71 71
         $data->bigbluebuttonbnid = $this->get_new_parentid('bigbluebuttonbn');
Please login to merge, or discard this patch.
backup/moodle2/restore_bigbluebuttonbn_activity_task.class.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -25,7 +25,7 @@
 block discarded – undo
25 25
 
26 26
 defined('MOODLE_INTERNAL') || die();
27 27
 
28
-require_once($CFG->dirroot.'/mod/bigbluebuttonbn/backup/moodle2/restore_bigbluebuttonbn_stepslib.php');
28
+require_once($CFG->dirroot . '/mod/bigbluebuttonbn/backup/moodle2/restore_bigbluebuttonbn_stepslib.php');
29 29
 
30 30
 /**
31 31
  * Restore task that provides all the settings and steps to perform one complete restore of the activity.
Please login to merge, or discard this patch.
bbb_view.php 3 patches
Indentation   +15 added lines, -15 removed lines patch added patch discarded remove patch
@@ -198,10 +198,10 @@  discard block
 block discarded – undo
198 198
  */
199 199
 function bigbluebutton_bbb_view_create_meeting_data(&$bbbsession) {
200 200
     $data = ['meetingID' => $bbbsession['meetingid'],
201
-              'name' => bigbluebuttonbn_html2text($bbbsession['meetingname'], 64),
202
-              'attendeePW' => $bbbsession['viewerPW'],
203
-              'moderatorPW' => $bbbsession['modPW'],
204
-              'logoutURL' => $bbbsession['logoutURL'],
201
+                'name' => bigbluebuttonbn_html2text($bbbsession['meetingname'], 64),
202
+                'attendeePW' => $bbbsession['viewerPW'],
203
+                'moderatorPW' => $bbbsession['modPW'],
204
+                'logoutURL' => $bbbsession['logoutURL'],
205 205
             ];
206 206
     $data['record'] = bigbluebutton_bbb_view_create_meeting_data_record($bbbsession['record']);
207 207
     $data['welcome'] = trim($bbbsession['welcome']);
@@ -214,7 +214,7 @@  discard block
 block discarded – undo
214 214
             '%duration%',
215 215
             (string) $durationtime,
216 216
             get_string('bbbdurationwarning', 'bigbluebuttonbn')
217
-          );
217
+            );
218 218
     }
219 219
     $voicebridge = intval($bbbsession['voicebridge']);
220 220
     if ($voicebridge > 0 && $voicebridge < 79999) {
@@ -253,22 +253,22 @@  discard block
 block discarded – undo
253 253
 function bigbluebutton_bbb_view_create_meeting_metadata(&$bbbsession) {
254 254
     global $USER;
255 255
     $metadata = ['bbb-origin' => $bbbsession['origin'],
256
-                 'bbb-origin-version' => $bbbsession['originVersion'],
257
-                 'bbb-origin-server-name' => $bbbsession['originServerName'],
258
-                 'bbb-origin-server-common-name' => $bbbsession['originServerCommonName'],
259
-                 'bbb-origin-tag' => $bbbsession['originTag'],
260
-                 'bbb-context' => $bbbsession['course']->fullname,
261
-                 'bbb-recording-name' => bigbluebuttonbn_html2text($bbbsession['meetingname'], 64),
262
-                 'bbb-recording-description' => bigbluebuttonbn_html2text($bbbsession['meetingdescription'], 64),
263
-                 'bbb-recording-tags' => bigbluebuttonbn_get_tags($bbbsession['cm']->id), // Same as $id.
256
+                    'bbb-origin-version' => $bbbsession['originVersion'],
257
+                    'bbb-origin-server-name' => $bbbsession['originServerName'],
258
+                    'bbb-origin-server-common-name' => $bbbsession['originServerCommonName'],
259
+                    'bbb-origin-tag' => $bbbsession['originTag'],
260
+                    'bbb-context' => $bbbsession['course']->fullname,
261
+                    'bbb-recording-name' => bigbluebuttonbn_html2text($bbbsession['meetingname'], 64),
262
+                    'bbb-recording-description' => bigbluebuttonbn_html2text($bbbsession['meetingdescription'], 64),
263
+                    'bbb-recording-tags' => bigbluebuttonbn_get_tags($bbbsession['cm']->id), // Same as $id.
264 264
                 ];
265 265
     if ((boolean)\mod_bigbluebuttonbn\locallib\config::get('recordingstatus_enabled')) {
266 266
         $metadata["bn-recording-status"] = json_encode(
267 267
             array(
268 268
                 'email' => array('"' . fullname($USER) . '" <' . $USER->email . '>'),
269 269
                 'context' => $bbbsession['bigbluebuttonbnURL']
270
-              )
271
-          );
270
+                )
271
+            );
272 272
     }
273 273
     if ((boolean)\mod_bigbluebuttonbn\locallib\config::get('recordingready_enabled')) {
274 274
         $metadata['bn-recording-ready-url'] = $bbbsession['recordingReadyURL'];
Please login to merge, or discard this patch.
Switch Indentation   +75 added lines, -75 removed lines patch added patch discarded remove patch
@@ -62,91 +62,91 @@
 block discarded – undo
62 62
 }
63 63
 
64 64
 switch (strtolower($action)) {
65
-    case 'logout':
66
-        if (isset($errors) && $errors != '') {
67
-            bigbluebutton_bbb_view_errors($errors, $id);
68
-            break;
69
-        }
70
-        if (is_null($bbbsession)) {
71
-            bigbluebutton_bbb_view_close_window_manually();
72
-            break;
73
-        }
74
-        // Moodle event logger: Create an event for meeting left.
75
-        bigbluebuttonbn_event_log(BIGBLUEBUTTON_EVENT_MEETING_LEFT, $bigbluebuttonbn, $cm);
76
-        // Update the cache.
77
-        $meetinginfo = bigbluebuttonbn_get_meeting_info($bbbsession['meetingid'], BIGBLUEBUTTONBN_UPDATE_CACHE);
78
-        // Close the tab or window where BBB was opened.
79
-        bigbluebutton_bbb_view_close_window();
80
-        break;
81
-    case 'join':
82
-        if (is_null($bbbsession)) {
83
-            print_error('view_error_unable_join', 'bigbluebuttonbn');
84
-            break;
85
-        }
86
-        // See if the session is in progress.
87
-        if (bigbluebuttonbn_is_meeting_running($bbbsession['meetingid'])) {
88
-            // Since the meeting is already running, we just join the session.
89
-            bigbluebutton_bbb_view_join_meeting($bbbsession, $cm, $bigbluebuttonbn);
90
-            break;
91
-        }
92
-        // If user is not administrator nor moderator (user is steudent) and waiting is required.
93
-        if (!$bbbsession['administrator'] && !$bbbsession['moderator'] && $bbbsession['wait']) {
94
-            header('Location: '.$bbbsession['logoutURL']);
65
+        case 'logout':
66
+            if (isset($errors) && $errors != '') {
67
+                bigbluebutton_bbb_view_errors($errors, $id);
68
+                break;
69
+            }
70
+            if (is_null($bbbsession)) {
71
+                bigbluebutton_bbb_view_close_window_manually();
72
+                break;
73
+            }
74
+            // Moodle event logger: Create an event for meeting left.
75
+            bigbluebuttonbn_event_log(BIGBLUEBUTTON_EVENT_MEETING_LEFT, $bigbluebuttonbn, $cm);
76
+            // Update the cache.
77
+            $meetinginfo = bigbluebuttonbn_get_meeting_info($bbbsession['meetingid'], BIGBLUEBUTTONBN_UPDATE_CACHE);
78
+            // Close the tab or window where BBB was opened.
79
+            bigbluebutton_bbb_view_close_window();
95 80
             break;
96
-        }
97
-        // As the meeting doesn't exist, try to create it.
98
-        $response = bigbluebuttonbn_get_create_meeting_array(
99
-            bigbluebutton_bbb_view_create_meeting_data($bbbsession),
100
-            bigbluebutton_bbb_view_create_meeting_metadata($bbbsession),
101
-            $bbbsession['presentation']['name'],
102
-            $bbbsession['presentation']['url']
103
-        );
104
-        if (empty($response)) {
105
-            // The server is unreachable.
106
-            if ($bbbsession['administrator']) {
107
-                print_error('view_error_unable_join', 'bigbluebuttonbn',
108
-                    $CFG->wwwroot.'/admin/settings.php?section=modsettingbigbluebuttonbn');
81
+        case 'join':
82
+            if (is_null($bbbsession)) {
83
+                print_error('view_error_unable_join', 'bigbluebuttonbn');
84
+                break;
85
+            }
86
+            // See if the session is in progress.
87
+            if (bigbluebuttonbn_is_meeting_running($bbbsession['meetingid'])) {
88
+                // Since the meeting is already running, we just join the session.
89
+                bigbluebutton_bbb_view_join_meeting($bbbsession, $cm, $bigbluebuttonbn);
109 90
                 break;
110 91
             }
111
-            if ($bbbsession['moderator']) {
112
-                print_error('view_error_unable_join_teacher', 'bigbluebuttonbn',
92
+            // If user is not administrator nor moderator (user is steudent) and waiting is required.
93
+            if (!$bbbsession['administrator'] && !$bbbsession['moderator'] && $bbbsession['wait']) {
94
+                header('Location: '.$bbbsession['logoutURL']);
95
+                break;
96
+            }
97
+            // As the meeting doesn't exist, try to create it.
98
+            $response = bigbluebuttonbn_get_create_meeting_array(
99
+                bigbluebutton_bbb_view_create_meeting_data($bbbsession),
100
+                bigbluebutton_bbb_view_create_meeting_metadata($bbbsession),
101
+                $bbbsession['presentation']['name'],
102
+                $bbbsession['presentation']['url']
103
+            );
104
+            if (empty($response)) {
105
+                // The server is unreachable.
106
+                if ($bbbsession['administrator']) {
107
+                    print_error('view_error_unable_join', 'bigbluebuttonbn',
108
+                        $CFG->wwwroot.'/admin/settings.php?section=modsettingbigbluebuttonbn');
109
+                    break;
110
+                }
111
+                if ($bbbsession['moderator']) {
112
+                    print_error('view_error_unable_join_teacher', 'bigbluebuttonbn',
113
+                        $CFG->wwwroot.'/admin/settings.php?section=modsettingbigbluebuttonbn');
114
+                    break;
115
+                }
116
+                print_error('view_error_unable_join_student', 'bigbluebuttonbn',
113 117
                     $CFG->wwwroot.'/admin/settings.php?section=modsettingbigbluebuttonbn');
114 118
                 break;
115 119
             }
116
-            print_error('view_error_unable_join_student', 'bigbluebuttonbn',
117
-                $CFG->wwwroot.'/admin/settings.php?section=modsettingbigbluebuttonbn');
118
-            break;
119
-        }
120
-        if ($response['returncode'] == 'FAILED') {
121
-            // The meeting was not created.
122
-            if (!$printerrorkey) {
123
-                print_error($response['message'], 'bigbluebuttonbn');
120
+            if ($response['returncode'] == 'FAILED') {
121
+                // The meeting was not created.
122
+                if (!$printerrorkey) {
123
+                    print_error($response['message'], 'bigbluebuttonbn');
124
+                    break;
125
+                }
126
+                $printerrorkey = bigbluebuttonbn_get_error_key($response['messageKey'], 'view_error_create');
127
+                print_error($printerrorkey, 'bigbluebuttonbn');
128
+                break;
129
+            }
130
+            if ($response['hasBeenForciblyEnded'] == 'true') {
131
+                print_error(get_string('index_error_forciblyended', 'bigbluebuttonbn'));
124 132
                 break;
125 133
             }
126
-            $printerrorkey = bigbluebuttonbn_get_error_key($response['messageKey'], 'view_error_create');
127
-            print_error($printerrorkey, 'bigbluebuttonbn');
134
+            // Moodle event logger: Create an event for meeting created.
135
+            bigbluebuttonbn_event_log(BIGBLUEBUTTON_EVENT_MEETING_CREATED, $bigbluebuttonbn, $cm);
136
+            // Internal logger: Insert a record with the meeting created.
137
+            bigbluebuttonbn_logs($bbbsession, BIGBLUEBUTTONBN_LOG_EVENT_CREATE);
138
+            // Since the meeting is already running, we just join the session.
139
+            bigbluebutton_bbb_view_join_meeting($bbbsession, $cm, $bigbluebuttonbn);
128 140
             break;
129
-        }
130
-        if ($response['hasBeenForciblyEnded'] == 'true') {
131
-            print_error(get_string('index_error_forciblyended', 'bigbluebuttonbn'));
141
+        case 'play':
142
+            $href = bigbluebutton_bbb_view_playback_href($href, $mid, $rid, $rtype);
143
+            // Moodle event logger: Create an event for meeting left.
144
+            bigbluebuttonbn_event_log(BIGBLUEBUTTON_EVENT_RECORDING_VIEWED, $bigbluebuttonbn, $cm, ['other' => $rid]);
145
+            // Execute the redirect.
146
+            header('Location: '.urldecode($href));
132 147
             break;
133
-        }
134
-        // Moodle event logger: Create an event for meeting created.
135
-        bigbluebuttonbn_event_log(BIGBLUEBUTTON_EVENT_MEETING_CREATED, $bigbluebuttonbn, $cm);
136
-        // Internal logger: Insert a record with the meeting created.
137
-        bigbluebuttonbn_logs($bbbsession, BIGBLUEBUTTONBN_LOG_EVENT_CREATE);
138
-        // Since the meeting is already running, we just join the session.
139
-        bigbluebutton_bbb_view_join_meeting($bbbsession, $cm, $bigbluebuttonbn);
140
-        break;
141
-    case 'play':
142
-        $href = bigbluebutton_bbb_view_playback_href($href, $mid, $rid, $rtype);
143
-        // Moodle event logger: Create an event for meeting left.
144
-        bigbluebuttonbn_event_log(BIGBLUEBUTTON_EVENT_RECORDING_VIEWED, $bigbluebuttonbn, $cm, ['other' => $rid]);
145
-        // Execute the redirect.
146
-        header('Location: '.urldecode($href));
147
-        break;
148
-    default:
149
-        bigbluebutton_bbb_view_close_window();
148
+        default:
149
+            bigbluebutton_bbb_view_close_window();
150 150
 }
151 151
 
152 152
 /**
Please login to merge, or discard this patch.
Spacing   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -23,8 +23,8 @@  discard block
 block discarded – undo
23 23
  * @author    Jesus Federico  (jesus [at] blindsidenetworks [dt] com)
24 24
  */
25 25
 
26
-require_once(dirname(dirname(dirname(__FILE__))).'/config.php');
27
-require_once(dirname(__FILE__).'/locallib.php');
26
+require_once(dirname(dirname(dirname(__FILE__))) . '/config.php');
27
+require_once(dirname(__FILE__) . '/locallib.php');
28 28
 
29 29
 $action = required_param('action', PARAM_TEXT);
30 30
 $id = optional_param('id', 0, PARAM_INT);
@@ -91,7 +91,7 @@  discard block
 block discarded – undo
91 91
         }
92 92
         // If user is not administrator nor moderator (user is steudent) and waiting is required.
93 93
         if (!$bbbsession['administrator'] && !$bbbsession['moderator'] && $bbbsession['wait']) {
94
-            header('Location: '.$bbbsession['logoutURL']);
94
+            header('Location: ' . $bbbsession['logoutURL']);
95 95
             break;
96 96
         }
97 97
         // As the meeting doesn't exist, try to create it.
@@ -105,16 +105,16 @@  discard block
 block discarded – undo
105 105
             // The server is unreachable.
106 106
             if ($bbbsession['administrator']) {
107 107
                 print_error('view_error_unable_join', 'bigbluebuttonbn',
108
-                    $CFG->wwwroot.'/admin/settings.php?section=modsettingbigbluebuttonbn');
108
+                    $CFG->wwwroot . '/admin/settings.php?section=modsettingbigbluebuttonbn');
109 109
                 break;
110 110
             }
111 111
             if ($bbbsession['moderator']) {
112 112
                 print_error('view_error_unable_join_teacher', 'bigbluebuttonbn',
113
-                    $CFG->wwwroot.'/admin/settings.php?section=modsettingbigbluebuttonbn');
113
+                    $CFG->wwwroot . '/admin/settings.php?section=modsettingbigbluebuttonbn');
114 114
                 break;
115 115
             }
116 116
             print_error('view_error_unable_join_student', 'bigbluebuttonbn',
117
-                $CFG->wwwroot.'/admin/settings.php?section=modsettingbigbluebuttonbn');
117
+                $CFG->wwwroot . '/admin/settings.php?section=modsettingbigbluebuttonbn');
118 118
             break;
119 119
         }
120 120
         if ($response['returncode'] == 'FAILED') {
@@ -143,7 +143,7 @@  discard block
 block discarded – undo
143 143
         // Moodle event logger: Create an event for meeting left.
144 144
         bigbluebuttonbn_event_log(BIGBLUEBUTTON_EVENT_RECORDING_VIEWED, $bigbluebuttonbn, $cm, ['other' => $rid]);
145 145
         // Execute the redirect.
146
-        header('Location: '.urldecode($href));
146
+        header('Location: ' . urldecode($href));
147 147
         break;
148 148
     default:
149 149
         bigbluebutton_bbb_view_close_window();
@@ -228,7 +228,7 @@  discard block
 block discarded – undo
228 228
         $data['welcome'] .= '<br><br>';
229 229
         $data['welcome'] .= str_replace(
230 230
             '%duration%',
231
-            (string) $durationtime,
231
+            (string)$durationtime,
232 232
             get_string('bbbdurationwarning', 'bigbluebuttonbn')
233 233
           );
234 234
     }
@@ -316,7 +316,7 @@  discard block
 block discarded – undo
316 316
     $meetinginfo = bigbluebuttonbn_get_meeting_info($bbbsession['meetingid'], BIGBLUEBUTTONBN_UPDATE_CACHE);
317 317
     if ($bbbsession['userlimit'] > 0 && intval($meetinginfo['participantCount']) >= $bbbsession['userlimit']) {
318 318
         // No more users allowed to join.
319
-        header('Location: '.$bbbsession['logoutURL']);
319
+        header('Location: ' . $bbbsession['logoutURL']);
320 320
         return;
321 321
     }
322 322
     // Build the URL.
@@ -334,7 +334,7 @@  discard block
 block discarded – undo
334 334
     bigbluebuttonbn_participant_joined($bbbsession['meetingid'],
335 335
         ($bbbsession['administrator'] || $bbbsession['moderator']));
336 336
     // Execute the redirect.
337
-    header('Location: '.$joinurl);
337
+    header('Location: ' . $joinurl);
338 338
 }
339 339
 
340 340
 /**
@@ -346,13 +346,13 @@  discard block
 block discarded – undo
346 346
  */
347 347
 function bigbluebutton_bbb_view_errors($serrors, $id) {
348 348
     global $CFG, $OUTPUT;
349
-    $errors = (array) json_decode(urldecode($serrors));
349
+    $errors = (array)json_decode(urldecode($serrors));
350 350
     $msgerrors = '';
351 351
     foreach ($errors as $error) {
352
-        $msgerrors .= html_writer::tag('p', $error->{'message'}, array('class' => 'alert alert-danger'))."\n";
352
+        $msgerrors .= html_writer::tag('p', $error->{'message'}, array('class' => 'alert alert-danger')) . "\n";
353 353
     }
354 354
     echo $OUTPUT->header();
355 355
     print_error('view_error_bigbluebutton', 'bigbluebuttonbn',
356
-        $CFG->wwwroot.'/mod/bigbluebuttonbn/view.php?id='.$id, $msgerrors, $serrors);
356
+        $CFG->wwwroot . '/mod/bigbluebuttonbn/view.php?id=' . $id, $msgerrors, $serrors);
357 357
     echo $OUTPUT->footer();
358 358
 }
Please login to merge, or discard this patch.
bbb_broker.php 2 patches
Indentation   +18 added lines, -18 removed lines patch added patch discarded remove patch
@@ -366,26 +366,26 @@  discard block
 block discarded – undo
366 366
             return array(
367 367
                 'status' => false,
368 368
                 'message' => get_string('view_recording_publish_link_deleted', 'bigbluebuttonbn')
369
-              );
369
+                );
370 370
         }
371 371
         if ($realrecordings[$params['id']]['published'] !== 'true') {
372 372
             return array(
373 373
                 'status' => false,
374 374
                 'message' => get_string('view_recording_publish_link_not_published', 'bigbluebuttonbn')
375
-              );
375
+                );
376 376
         }
377 377
         return array(
378 378
             'status' => bigbluebuttonbn_publish_recording_imported(
379 379
                 $recordings[$params['id']]['imported'], true
380 380
             )
381
-          );
381
+            );
382 382
     }
383 383
     // As the recordingid was not identified as imported recording link, execute actual publish.
384 384
     return array(
385 385
         'status' => bigbluebuttonbn_publish_recordings(
386 386
             $params['id'], 'true'
387 387
         )
388
-      );
388
+        );
389 389
 }
390 390
 
391 391
 /**
@@ -401,26 +401,26 @@  discard block
 block discarded – undo
401 401
             return array(
402 402
                 'status' => false,
403 403
                 'message' => get_string('view_recording_unprotect_link_deleted', 'bigbluebuttonbn')
404
-              );
404
+                );
405 405
         }
406 406
         if ($realrecordings[$params['id']]['protected'] === 'true') {
407 407
             return array(
408 408
                 'status' => false,
409 409
                 'message' => get_string('view_recording_unprotect_link_not_unprotected', 'bigbluebuttonbn')
410
-              );
410
+                );
411 411
         }
412 412
         return array(
413 413
             'status' => bigbluebuttonbn_protect_recording_imported(
414 414
                 $recordings[$params['id']]['imported'], false
415 415
             )
416
-          );
416
+            );
417 417
     }
418 418
     // As the recordingid was not identified as imported recording link, execute actual uprotect.
419 419
     return array(
420 420
         'status' => bigbluebuttonbn_update_recordings(
421 421
             $params['id'], array('protect' => 'false')
422 422
         )
423
-      );
423
+        );
424 424
 }
425 425
 
426 426
 /**
@@ -434,7 +434,7 @@  discard block
 block discarded – undo
434 434
             'status' => bigbluebuttonbn_publish_recording_imported(
435 435
                 $recordings[$params['id']]['imported'], false
436 436
             )
437
-          );
437
+            );
438 438
     }
439 439
     // As the recordingid was not identified as imported recording link, execute unpublish on a real recording.
440 440
     // First: Unpublish imported links associated to the recording.
@@ -452,7 +452,7 @@  discard block
 block discarded – undo
452 452
         'status' => bigbluebuttonbn_publish_recordings(
453 453
             $params['id'], 'false'
454 454
         )
455
-      );
455
+        );
456 456
 }
457 457
 
458 458
 /**
@@ -466,7 +466,7 @@  discard block
 block discarded – undo
466 466
             'status' => bigbluebuttonbn_protect_recording_imported(
467 467
                 $recordings[$params['id']]['imported'], true
468 468
             )
469
-          );
469
+            );
470 470
     }
471 471
     // As the recordingid was not identified as imported recording link, execute protect on a real recording.
472 472
     // First: Protect imported links associated to the recording.
@@ -484,7 +484,7 @@  discard block
 block discarded – undo
484 484
         'status' => bigbluebuttonbn_update_recordings(
485 485
             $params['id'], array('protect' => 'true')
486 486
         )
487
-      );
487
+        );
488 488
 }
489 489
 
490 490
 /**
@@ -498,7 +498,7 @@  discard block
 block discarded – undo
498 498
             'status' => bigbluebuttonbn_delete_recording_imported(
499 499
                 $recordings[$params['id']]['imported']
500 500
             )
501
-          );
501
+            );
502 502
     }
503 503
     // As the recordingid was not identified as imported recording link, execute delete on a real recording.
504 504
     // First: Delete imported links associated to the recording.
@@ -514,7 +514,7 @@  discard block
 block discarded – undo
514 514
         'status' => bigbluebuttonbn_delete_recordings(
515 515
             $params['id']
516 516
         )
517
-      );
517
+        );
518 518
 }
519 519
 
520 520
 /**
@@ -527,7 +527,7 @@  discard block
 block discarded – undo
527 527
             'status' => bigbluebuttonbn_update_recording_imported(
528 528
                 $recordings[$params['id']]['imported'], json_decode($params['meta'], true)
529 529
             )
530
-          );
530
+            );
531 531
     }
532 532
 
533 533
     // As the recordingid was not identified as imported recording link, execute update on a real recording.
@@ -537,7 +537,7 @@  discard block
 block discarded – undo
537 537
         'status' => bigbluebuttonbn_update_recordings(
538 538
             $params['id'], json_decode($params['meta'])
539 539
         )
540
-      );
540
+        );
541 541
 }
542 542
 
543 543
 /**
@@ -682,10 +682,10 @@  discard block
 block discarded – undo
682 682
     $params['recording_import'] = ['id' => 'The recordingID must be specified.'];
683 683
     $params['recording_ready'] = [
684 684
             'signed_parameters' => 'A JWT encoded string must be included as [signed_parameters].'
685
-          ];
685
+            ];
686 686
     $params['live_session_events'] = [
687 687
             'signed_parameters' => 'A JWT encoded string must be included as [signed_parameters].'
688
-          ];
688
+            ];
689 689
     return $params;
690 690
 }
691 691
 
Please login to merge, or discard this patch.
Spacing   +16 added lines, -16 removed lines patch added patch discarded remove patch
@@ -23,8 +23,8 @@  discard block
 block discarded – undo
23 23
  * @author    Jesus Federico  (jesus [at] blindsidenetworks [dt] com)
24 24
  */
25 25
 
26
-require_once(dirname(dirname(dirname(__FILE__))).'/config.php');
27
-require_once(dirname(__FILE__).'/locallib.php');
26
+require_once(dirname(dirname(dirname(__FILE__))) . '/config.php');
27
+require_once(dirname(__FILE__) . '/locallib.php');
28 28
 
29 29
 use \Firebase\JWT\JWT;
30 30
 
@@ -40,13 +40,13 @@  discard block
 block discarded – undo
40 40
 $params['meta'] = optional_param('meta', '', PARAM_TEXT);
41 41
 
42 42
 if (empty($params['action'])) {
43
-    header('HTTP/1.0 400 Bad Request. Parameter ['.$params['action'].'] was not included');
43
+    header('HTTP/1.0 400 Bad Request. Parameter [' . $params['action'] . '] was not included');
44 44
     return;
45 45
 }
46 46
 
47 47
 $error = bigbluebuttonbn_broker_validate_parameters($params);
48 48
 if (!empty($error)) {
49
-    header('HTTP/1.0 400 Bad Request. '.$error);
49
+    header('HTTP/1.0 400 Bad Request. ' . $error);
50 50
     return;
51 51
 }
52 52
 
@@ -130,11 +130,11 @@  discard block
 block discarded – undo
130 130
         bigbluebuttonbn_broker_live_session_events($params, $bigbluebuttonbn, $cm);
131 131
         return;
132 132
     }
133
-    header('HTTP/1.0 400 Bad request. The action '. $a . ' doesn\'t exist');
133
+    header('HTTP/1.0 400 Bad request. The action ' . $a . ' doesn\'t exist');
134 134
     return;
135 135
 
136 136
 } catch (Exception $e) {
137
-    header('HTTP/1.0 500 Internal Server Error. '.$e->getMessage());
137
+    header('HTTP/1.0 500 Internal Server Error. ' . $e->getMessage());
138 138
     return;
139 139
 }
140 140
 
@@ -270,7 +270,7 @@  discard block
 block discarded – undo
270 270
 function bigbluebuttonbn_broker_recording_info_current($recording, $params) {
271 271
     $callbackresponse['status'] = true;
272 272
     $callbackresponse['found'] = true;
273
-    $callbackresponse['published'] = (string) $recording['published'];
273
+    $callbackresponse['published'] = (string)$recording['published'];
274 274
     if (!isset($params['meta']) || empty($params['meta'])) {
275 275
         return $callbackresponse;
276 276
     }
@@ -549,8 +549,8 @@  discard block
 block discarded – undo
549 549
         $decodedparameters = JWT::decode($params['signed_parameters'],
550 550
             (string)\mod_bigbluebuttonbn\locallib\config::get('shared_secret'), array('HS256'));
551 551
     } catch (Exception $e) {
552
-        $error = 'Caught exception: '.$e->getMessage();
553
-        header('HTTP/1.0 400 Bad Request. '.$error);
552
+        $error = 'Caught exception: ' . $e->getMessage();
553
+        header('HTTP/1.0 400 Bad Request. ' . $error);
554 554
         return;
555 555
     }
556 556
     // Validate that the bigbluebuttonbn activity corresponds to the meeting_id received.
@@ -566,8 +566,8 @@  discard block
 block discarded – undo
566 566
         bigbluebuttonbn_send_notification_recording_ready($bigbluebuttonbn);
567 567
         header('HTTP/1.0 202 Accepted');
568 568
     } catch (Exception $e) {
569
-        $error = 'Caught exception: '.$e->getMessage();
570
-        header('HTTP/1.0 503 Service Unavailable. '.$error);
569
+        $error = 'Caught exception: ' . $e->getMessage();
570
+        header('HTTP/1.0 503 Service Unavailable. ' . $error);
571 571
     }
572 572
 }
573 573
 
@@ -583,13 +583,13 @@  discard block
 block discarded – undo
583 583
     $importrecordings = $SESSION->bigbluebuttonbn_importrecordings;
584 584
     if (!isset($importrecordings[$params['id']])) {
585 585
         $error = "Recording {$params['id']} could not be found. It can not be imported";
586
-        header('HTTP/1.0 404 Not found. '.$error);
586
+        header('HTTP/1.0 404 Not found. ' . $error);
587 587
         return;
588 588
     }
589 589
     $callbackresponse = array('status' => true);
590 590
     $importrecordings[$params['id']]['imported'] = true;
591 591
     $overrides = array('meetingid' => $importrecordings[$params['id']]['meetingID']);
592
-    $meta = '{"recording":'.json_encode($importrecordings[$params['id']]).'}';
592
+    $meta = '{"recording":' . json_encode($importrecordings[$params['id']]) . '}';
593 593
     bigbluebuttonbn_logs($bbbsession, BIGBLUEBUTTONBN_LOG_EVENT_IMPORT, $overrides, $meta);
594 594
     // Moodle event logger: Create an event for recording imported.
595 595
     if (isset($bbbsession['bigbluebutton']) && isset($bbbsession['cm'])) {
@@ -609,8 +609,8 @@  discard block
 block discarded – undo
609 609
         $decodedparameters = JWT::decode($params['signed_parameters'],
610 610
             (string)\mod_bigbluebuttonbn\locallib\config::get('shared_secret'), array('HS256'));
611 611
     } catch (Exception $e) {
612
-        $error = 'Caught exception: '.$e->getMessage();
613
-        header('HTTP/1.0 400 Bad Request. '.$error);
612
+        $error = 'Caught exception: ' . $e->getMessage();
613
+        header('HTTP/1.0 400 Bad Request. ' . $error);
614 614
         return;
615 615
     }
616 616
     // Validate that the bigbluebuttonbn activity corresponds to the meeting_id received.
@@ -646,7 +646,7 @@  discard block
 block discarded – undo
646 646
     }
647 647
     $action = strtolower($params['action']);
648 648
     if (!array_key_exists($action, $requiredparams)) {
649
-        return 'Action '.$params['action'].' can not be performed.';
649
+        return 'Action ' . $params['action'] . ' can not be performed.';
650 650
     }
651 651
     return bigbluebuttonbn_broker_validate_parameters_message($params, $requiredparams[$action]);
652 652
 }
Please login to merge, or discard this patch.
lib.php 3 patches
Doc Comments   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -97,7 +97,7 @@  discard block
 block discarded – undo
97 97
  * @uses FEATURE_GRADE_OUTCOMES
98 98
  * @uses FEATURE_SHOW_DESCRIPTION
99 99
  * @param string $feature
100
- * @return mixed True if yes (some features may use other values)
100
+ * @return null|boolean True if yes (some features may use other values)
101 101
  */
102 102
 function bigbluebuttonbn_supports($feature) {
103 103
     if (!$feature) {
@@ -239,7 +239,7 @@  discard block
 block discarded – undo
239 239
  * @param object $mod
240 240
  * @param object $bigbluebuttonbn
241 241
  *
242
- * @return bool
242
+ * @return string
243 243
  */
244 244
 function bigbluebuttonbn_user_outline($course, $user, $mod, $bigbluebuttonbn) {
245 245
     global $DB;
@@ -542,7 +542,7 @@  discard block
 block discarded – undo
542 542
  * @param stdClass $context       context object
543 543
  * @param string   $filearea      file area
544 544
  *
545
- * @return false|null false if file not valid
545
+ * @return boolean false if file not valid
546 546
  */
547 547
 function bigbluebuttonbn_pluginfile_valid($context, $filearea) {
548 548
     if ($context->contextlevel != CONTEXT_MODULE) {
Please login to merge, or discard this patch.
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -68,7 +68,7 @@  discard block
 block discarded – undo
68 68
  * Remove this block when restored
69 69
  */
70 70
 
71
- /** @var BIGBLUEBUTTONBN_DEFAULT_SERVER_URL string of default bigbluebutton server url */
71
+    /** @var BIGBLUEBUTTONBN_DEFAULT_SERVER_URL string of default bigbluebutton server url */
72 72
 const BIGBLUEBUTTONBN_DEFAULT_SERVER_URL = 'http://test-install.blindsidenetworks.com/bigbluebutton/';
73 73
 /** @var BIGBLUEBUTTONBN_DEFAULT_SHARED_SECRET string of default bigbluebutton server shared secret */
74 74
 const BIGBLUEBUTTONBN_DEFAULT_SHARED_SECRET = '8cd8ef52e8e101574e400365b55e11a6';
@@ -345,12 +345,12 @@  discard block
 block discarded – undo
345 345
     $str  = '<div class="bigbluebuttonbn overview">'."\n";
346 346
     $str .= '  <div class="name">'.get_string('modulename', 'bigbluebuttonbn').':&nbsp;'."\n";
347 347
     $str .= '    <a '.$classes.'href="'.$CFG->wwwroot.'/mod/bigbluebuttonbn/view.php?id='.$bigbluebuttonbn->coursemodule.
348
-      '">'.$bigbluebuttonbn->name.'</a>'."\n";
348
+        '">'.$bigbluebuttonbn->name.'</a>'."\n";
349 349
     $str .= '  </div>'."\n";
350 350
     $str .= '  <div class="info">'.get_string($start, 'bigbluebuttonbn').': '.userdate($bigbluebuttonbn->openingtime).
351 351
         '</div>'."\n";
352 352
     $str .= '  <div class="info">'.get_string('ends_at', 'bigbluebuttonbn').': '.userdate($bigbluebuttonbn->closingtime)
353
-      .'</div>'."\n";
353
+        .'</div>'."\n";
354 354
     $str .= '</div>'."\n";
355 355
     return $str;
356 356
 }
Please login to merge, or discard this patch.
Spacing   +44 added lines, -44 removed lines patch added patch discarded remove patch
@@ -28,32 +28,32 @@  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->libdir.'/accesslib.php');
35
-require_once($CFG->libdir.'/completionlib.php');
36
-require_once($CFG->libdir.'/datalib.php');
37
-require_once($CFG->libdir.'/coursecatlib.php');
38
-require_once($CFG->libdir.'/enrollib.php');
39
-require_once($CFG->libdir.'/filelib.php');
40
-require_once($CFG->libdir.'/formslib.php');
41
-
42
-if (file_exists(dirname(__FILE__).'/vendor/firebase/php-jwt/src/JWT.php')) {
43
-    require_once(dirname(__FILE__).'/vendor/firebase/php-jwt/src/JWT.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->libdir . '/accesslib.php');
35
+require_once($CFG->libdir . '/completionlib.php');
36
+require_once($CFG->libdir . '/datalib.php');
37
+require_once($CFG->libdir . '/coursecatlib.php');
38
+require_once($CFG->libdir . '/enrollib.php');
39
+require_once($CFG->libdir . '/filelib.php');
40
+require_once($CFG->libdir . '/formslib.php');
41
+
42
+if (file_exists(dirname(__FILE__) . '/vendor/firebase/php-jwt/src/JWT.php')) {
43
+    require_once(dirname(__FILE__) . '/vendor/firebase/php-jwt/src/JWT.php');
44 44
 }
45 45
 
46 46
 if (!isset($CFG->bigbluebuttonbn)) {
47 47
     $CFG->bigbluebuttonbn = array();
48 48
 }
49 49
 
50
-if (file_exists(dirname(__FILE__).'/config.php')) {
51
-    require_once(dirname(__FILE__).'/config.php');
50
+if (file_exists(dirname(__FILE__) . '/config.php')) {
51
+    require_once(dirname(__FILE__) . '/config.php');
52 52
     // Old BigBlueButtonBN cfg schema. For backward compatibility.
53 53
     global $BIGBLUEBUTTONBN_CFG;
54 54
 
55 55
     if (isset($BIGBLUEBUTTONBN_CFG)) {
56
-        foreach ((array) $BIGBLUEBUTTONBN_CFG as $key => $value) {
56
+        foreach ((array)$BIGBLUEBUTTONBN_CFG as $key => $value) {
57 57
             $cfgkey = str_replace("bigbluebuttonbn_", "", $key);
58 58
             $CFG->bigbluebuttonbn[$cfgkey] = $value;
59 59
         }
@@ -104,18 +104,18 @@  discard block
 block discarded – undo
104 104
         return null;
105 105
     }
106 106
     $features = array(
107
-        (string) FEATURE_IDNUMBER => true,
108
-        (string) FEATURE_GROUPS => true,
109
-        (string) FEATURE_GROUPINGS => true,
110
-        (string) FEATURE_GROUPMEMBERSONLY => true,
111
-        (string) FEATURE_MOD_INTRO => true,
112
-        (string) FEATURE_BACKUP_MOODLE2 => true,
113
-        (string) FEATURE_COMPLETION_TRACKS_VIEWS => true,
114
-        (string) FEATURE_GRADE_HAS_GRADE => false,
115
-        (string) FEATURE_GRADE_OUTCOMES => false,
116
-        (string) FEATURE_SHOW_DESCRIPTION => true,
107
+        (string)FEATURE_IDNUMBER => true,
108
+        (string)FEATURE_GROUPS => true,
109
+        (string)FEATURE_GROUPINGS => true,
110
+        (string)FEATURE_GROUPMEMBERSONLY => true,
111
+        (string)FEATURE_MOD_INTRO => true,
112
+        (string)FEATURE_BACKUP_MOODLE2 => true,
113
+        (string)FEATURE_COMPLETION_TRACKS_VIEWS => true,
114
+        (string)FEATURE_GRADE_HAS_GRADE => false,
115
+        (string)FEATURE_GRADE_OUTCOMES => false,
116
+        (string)FEATURE_SHOW_DESCRIPTION => true,
117 117
     );
118
-    if (isset($features[(string) $feature])) {
118
+    if (isset($features[(string)$feature])) {
119 119
         return $features[$feature];
120 120
     }
121 121
     return null;
@@ -215,7 +215,7 @@  discard block
 block discarded – undo
215 215
     $log->timecreated = time();
216 216
     $log->log = BIGBLUEBUTTONBN_LOG_EVENT_DELETE;
217 217
     $sql  = "SELECT * FROM {bigbluebuttonbn_logs} ";
218
-    $sql .= "WHERE bigbluebuttonbnid = ? AND log = ? AND ". $DB->sql_compare_text('meta') . " = ?";
218
+    $sql .= "WHERE bigbluebuttonbnid = ? AND log = ? AND " . $DB->sql_compare_text('meta') . " = ?";
219 219
     $logs = $DB->get_records_sql($sql, array($bigbluebuttonbn->id, BIGBLUEBUTTONBN_LOG_EVENT_CREATE, "{\"record\":true}"));
220 220
     $log->meta = "{\"has_recordings\":false}";
221 221
     if (!empty($logs)) {
@@ -244,10 +244,10 @@  discard block
 block discarded – undo
244 244
 function bigbluebuttonbn_user_outline($course, $user, $mod, $bigbluebuttonbn) {
245 245
     global $DB;
246 246
     $completed = $DB->count_records('bigbluebuttonbn_logs', array('courseid' => $course->id,
247
-        'bigbluebuttonbnid' => $bigbluebuttonbn->id, 'userid' => $user->id, 'log' => 'Join', ), '*');
247
+        'bigbluebuttonbnid' => $bigbluebuttonbn->id, 'userid' => $user->id, 'log' => 'Join',), '*');
248 248
     if ($completed > 0) {
249
-        return fullname($user).' '.get_string('view_message_has_joined', 'bigbluebuttonbn').' '.
250
-            get_string('view_message_session_for', 'bigbluebuttonbn').' '.(string) $completed.' '.
249
+        return fullname($user) . ' ' . get_string('view_message_has_joined', 'bigbluebuttonbn') . ' ' .
250
+            get_string('view_message_session_for', 'bigbluebuttonbn') . ' ' . (string)$completed . ' ' .
251 251
             get_string('view_message_times', 'bigbluebuttonbn');
252 252
     }
253 253
     return '';
@@ -267,7 +267,7 @@  discard block
 block discarded – undo
267 267
 function bigbluebuttonbn_user_complete($course, $user, $mod, $bigbluebuttonbn) {
268 268
     global $DB;
269 269
     $completed = $DB->count_records('bigbluebuttonbn_logs', array('courseid' => $course->id,
270
-        'bigbluebuttonbnid' => $bigbluebuttonbn->id, 'userid' => $user->id, 'log' => 'Join', ),
270
+        'bigbluebuttonbnid' => $bigbluebuttonbn->id, 'userid' => $user->id, 'log' => 'Join',),
271 271
         '*', IGNORE_MULTIPLE);
272 272
     return $completed > 0;
273 273
 }
@@ -342,16 +342,16 @@  discard block
 block discarded – undo
342 342
     if ($bigbluebuttonbn->visible) {
343 343
         $classes = 'class="dimmed" ';
344 344
     }
345
-    $str  = '<div class="bigbluebuttonbn overview">'."\n";
346
-    $str .= '  <div class="name">'.get_string('modulename', 'bigbluebuttonbn').':&nbsp;'."\n";
347
-    $str .= '    <a '.$classes.'href="'.$CFG->wwwroot.'/mod/bigbluebuttonbn/view.php?id='.$bigbluebuttonbn->coursemodule.
348
-      '">'.$bigbluebuttonbn->name.'</a>'."\n";
349
-    $str .= '  </div>'."\n";
350
-    $str .= '  <div class="info">'.get_string($start, 'bigbluebuttonbn').': '.userdate($bigbluebuttonbn->openingtime).
351
-        '</div>'."\n";
352
-    $str .= '  <div class="info">'.get_string('ends_at', 'bigbluebuttonbn').': '.userdate($bigbluebuttonbn->closingtime)
353
-      .'</div>'."\n";
354
-    $str .= '</div>'."\n";
345
+    $str  = '<div class="bigbluebuttonbn overview">' . "\n";
346
+    $str .= '  <div class="name">' . get_string('modulename', 'bigbluebuttonbn') . ':&nbsp;' . "\n";
347
+    $str .= '    <a ' . $classes . 'href="' . $CFG->wwwroot . '/mod/bigbluebuttonbn/view.php?id=' . $bigbluebuttonbn->coursemodule .
348
+      '">' . $bigbluebuttonbn->name . '</a>' . "\n";
349
+    $str .= '  </div>' . "\n";
350
+    $str .= '  <div class="info">' . get_string($start, 'bigbluebuttonbn') . ': ' . userdate($bigbluebuttonbn->openingtime) .
351
+        '</div>' . "\n";
352
+    $str .= '  <div class="info">' . get_string('ends_at', 'bigbluebuttonbn') . ': ' . userdate($bigbluebuttonbn->closingtime)
353
+      .'</div>' . "\n";
354
+    $str .= '</div>' . "\n";
355 355
     return $str;
356 356
 }
357 357
 
@@ -505,7 +505,7 @@  discard block
 block discarded – undo
505 505
     if (count($files) == 1) {
506 506
         // Get the first (and only) file.
507 507
         $file = reset($files);
508
-        $filesrc = '/'.$file->get_filename();
508
+        $filesrc = '/' . $file->get_filename();
509 509
     }
510 510
     return $filesrc;
511 511
 }
@@ -573,7 +573,7 @@  discard block
 block discarded – undo
573 573
     if (!$filename) {
574 574
         return false;
575 575
     }
576
-    $fullpath = "/$context->id/mod_bigbluebuttonbn/$filearea/0/".$filename;
576
+    $fullpath = "/$context->id/mod_bigbluebuttonbn/$filearea/0/" . $filename;
577 577
     $fs = get_file_storage();
578 578
     $file = $fs->get_file_by_hash(sha1($fullpath));
579 579
     if (!$file || $file->is_directory()) {
Please login to merge, or discard this patch.
import_view.php 2 patches
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -77,8 +77,8 @@
 block discarded – undo
77 77
     $body .= html_writer::start_tag('br');
78 78
     $body .= html_writer::tag('input', '',
79 79
         array('type' => 'button', 'class' => 'btn btn-secondary',
80
-              'value' => get_string('view_recording_button_return', 'bigbluebuttonbn'),
81
-              'onclick' => 'window.location=\''.$CFG->wwwroot.'/mod/bigbluebuttonbn/view.php?id='.$cm->id.'\''));
80
+                'value' => get_string('view_recording_button_return', 'bigbluebuttonbn'),
81
+                'onclick' => 'window.location=\''.$CFG->wwwroot.'/mod/bigbluebuttonbn/view.php?id='.$cm->id.'\''));
82 82
     // JavaScript for locales.
83 83
     $PAGE->requires->strings_for_js(array_keys(bigbluebuttonbn_get_strings_for_js()), 'bigbluebuttonbn');
84 84
     // Require JavaScript modules.
Please login to merge, or discard this patch.
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -23,8 +23,8 @@  discard block
 block discarded – undo
23 23
  * @author    Jesus Federico  (jesus [at] blindsidenetworks [dt] com)
24 24
  */
25 25
 
26
-require_once(dirname(dirname(dirname(__FILE__))).'/config.php');
27
-require_once(dirname(__FILE__).'/locallib.php');
26
+require_once(dirname(dirname(dirname(__FILE__))) . '/config.php');
27
+require_once(dirname(__FILE__) . '/locallib.php');
28 28
 
29 29
 $bn = required_param('bn', PARAM_INT);
30 30
 $tc = optional_param('tc', 0, PARAM_INT);
@@ -78,7 +78,7 @@  discard block
 block discarded – undo
78 78
     $body .= html_writer::tag('input', '',
79 79
         array('type' => 'button', 'class' => 'btn btn-secondary',
80 80
               'value' => get_string('view_recording_button_return', 'bigbluebuttonbn'),
81
-              'onclick' => 'window.location=\''.$CFG->wwwroot.'/mod/bigbluebuttonbn/view.php?id='.$cm->id.'\''));
81
+              'onclick' => 'window.location=\'' . $CFG->wwwroot . '/mod/bigbluebuttonbn/view.php?id=' . $cm->id . '\''));
82 82
     // JavaScript for locales.
83 83
     $PAGE->requires->strings_for_js(array_keys(bigbluebuttonbn_get_strings_for_js()), 'bigbluebuttonbn');
84 84
     // Require JavaScript modules.
Please login to merge, or discard this patch.
mod_form.php 2 patches
Indentation   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -104,7 +104,7 @@  discard block
 block discarded – undo
104 104
                 'alt' => $contents,
105 105
                 'title' => $contents,
106 106
                 'src' => $jsvars['pix_icon_delete']
107
-              );
107
+                );
108 108
             $jsvars['pix_icon_delete'] = html_writer::tag('img', '', $options);
109 109
         }
110 110
         $PAGE->requires->yui_module('moodle-mod_bigbluebuttonbn-modform',
@@ -224,8 +224,8 @@  discard block
 block discarded – undo
224 224
             $this->bigbluebuttonbn_mform_add_element($mform, $field['type'], $field['name'], $field['data_type'],
225 225
                 $field['description_key'], 0, ['maxlength' => 4, 'size' => 6],
226 226
                 ['message' => get_string('mod_form_field_voicebridge_format_error', 'bigbluebuttonbn'),
227
-                 'type' => 'numeric', 'rule' => '####', 'validator' => 'server']
228
-              );
227
+                    'type' => 'numeric', 'rule' => '####', 'validator' => 'server']
228
+                );
229 229
         } else {
230 230
             $this->bigbluebuttonbn_mform_add_element($mform, $field['type'], $field['name'], $field['data_type'],
231 231
                 $field['description_key'], 0, ['maxlength' => 4, 'size' => 6]);
@@ -263,7 +263,7 @@  discard block
 block discarded – undo
263 263
      */
264 264
     private function bigbluebuttonbn_mform_add_block_room_recordings(&$mform, $cfg) {
265 265
         $field = ['type' => 'hidden', 'name' => 'recordings_html', 'data_type' => PARAM_INT,
266
-                  'description_key' => null];
266
+                    'description_key' => null];
267 267
         if ($cfg['recordings_html_editable']) {
268 268
             $field['type'] = 'checkbox';
269 269
             $field['description_key'] = 'mod_form_field_recordings_html';
@@ -271,7 +271,7 @@  discard block
 block discarded – undo
271 271
         $this->bigbluebuttonbn_mform_add_element($mform, $field['type'], $field['name'], $field['data_type'],
272 272
             $field['description_key'], $cfg['recordings_html_default']);
273 273
         $field = ['type' => 'hidden', 'name' => 'recordings_deleted', 'data_type' => PARAM_INT,
274
-                  'description_key' => null];
274
+                    'description_key' => null];
275 275
         if ($cfg['recordings_deleted_editable']) {
276 276
             $field['type'] = 'checkbox';
277 277
             $field['description_key'] = 'mod_form_field_recordings_deleted';
@@ -279,7 +279,7 @@  discard block
 block discarded – undo
279 279
         $this->bigbluebuttonbn_mform_add_element($mform, $field['type'], $field['name'], $field['data_type'],
280 280
             $field['description_key'], $cfg['recordings_deleted_default']);
281 281
         $field = ['type' => 'hidden', 'name' => 'recordings_imported', 'data_type' => PARAM_INT,
282
-                  'description_key' => null];
282
+                    'description_key' => null];
283 283
         if ($cfg['recordings_imported_editable']) {
284 284
             $field['type'] = 'checkbox';
285 285
             $field['description_key'] = 'mod_form_field_recordings_imported';
@@ -349,7 +349,7 @@  discard block
 block discarded – undo
349 349
         $htmlselectiontype = html_writer::select($participantselection['type_options'],
350 350
             'bigbluebuttonbn_participant_selection_type', $participantselection['type_selected'], array(),
351 351
             array('id' => 'bigbluebuttonbn_participant_selection_type',
352
-                  'onchange' => 'M.mod_bigbluebuttonbn.modform.participantSelectionSet(); return 0;'));
352
+                    'onchange' => 'M.mod_bigbluebuttonbn.modform.participantSelectionSet(); return 0;'));
353 353
         $htmlselectionoptions = html_writer::select($participantselection['options'], 'bigbluebuttonbn_participant_selection',
354 354
             $participantselection['selected'], array(),
355 355
             array('id' => 'bigbluebuttonbn_participant_selection', 'disabled' => 'disabled'));
@@ -357,7 +357,7 @@  discard block
 block discarded – undo
357 357
             'type' => 'button', 'class' => 'btn btn-secondary',
358 358
             'value' => get_string('mod_form_field_participant_list_action_add', 'bigbluebuttonbn'),
359 359
             'onclick' => 'M.mod_bigbluebuttonbn.modform.participantAdd(); return 0;'
360
-          ));
360
+            ));
361 361
         $htmladdparticipant = html_writer::tag('div',
362 362
             $htmlselectiontype . '&nbsp;&nbsp;' . $htmlselectionoptions . '&nbsp;&nbsp;' . $htmlselectioninput, null);
363 363
         $mform->addElement('html', "\n\n");
Please login to merge, or discard this patch.
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -26,8 +26,8 @@  discard block
 block discarded – undo
26 26
 
27 27
 defined('MOODLE_INTERNAL') || die();
28 28
 
29
-require_once(dirname(__FILE__).'/locallib.php');
30
-require_once($CFG->dirroot.'/course/moodleform_mod.php');
29
+require_once(dirname(__FILE__) . '/locallib.php');
30
+require_once($CFG->dirroot . '/course/moodleform_mod.php');
31 31
 
32 32
 /**
33 33
  * Moodle class for mod_form.
@@ -48,7 +48,7 @@  discard block
 block discarded – undo
48 48
         $serverversion = bigbluebuttonbn_get_server_version();
49 49
         if (is_null($serverversion)) {
50 50
             print_error('general_error_unable_connect', 'bigbluebuttonbn',
51
-                $CFG->wwwroot.'/admin/settings.php?section=modsettingbigbluebuttonbn');
51
+                $CFG->wwwroot . '/admin/settings.php?section=modsettingbigbluebuttonbn');
52 52
             return;
53 53
         }
54 54
         // Context.
@@ -127,7 +127,7 @@  discard block
 block discarded – undo
127 127
                 );
128 128
                 $defaultvalues['presentation'] = $draftitemid;
129 129
             } catch (Exception $e) {
130
-                debugging('Presentation could not be loaded: '.$e->getMessage(), DEBUG_DEVELOPER);
130
+                debugging('Presentation could not be loaded: ' . $e->getMessage(), DEBUG_DEVELOPER);
131 131
                 return;
132 132
             }
133 133
         }
@@ -423,7 +423,7 @@  discard block
 block discarded – undo
423 423
             return;
424 424
         }
425 425
         $mform->addElement($type, $name, get_string($descriptionkey, 'bigbluebuttonbn'), $options);
426
-        if (get_string_manager()->string_exists($descriptionkey.'_help', 'bigbluebuttonbn')) {
426
+        if (get_string_manager()->string_exists($descriptionkey . '_help', 'bigbluebuttonbn')) {
427 427
             $mform->addHelpButton($name, $descriptionkey, 'bigbluebuttonbn');
428 428
         }
429 429
         if (!empty($rule)) {
Please login to merge, or discard this patch.
view.php 2 patches
Indentation   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -387,7 +387,7 @@  discard block
 block discarded – undo
387 387
         return $output;
388 388
     }
389 389
     $output .= $OUTPUT->box_start('box boxalignleft adminerror alert alert-' . $type . ' alert-block fade in',
390
-      'bigbluebuttonbn_view_general_warning')."\n";
390
+        'bigbluebuttonbn_view_general_warning')."\n";
391 391
     $output .= '  <button type="button" class="close" data-dismiss="alert">&times;</button>'.$message."\n";
392 392
     $output .= '  <div class="singlebutton">'."\n";
393 393
     if (!empty($href)) {
@@ -497,12 +497,12 @@  discard block
 block discarded – undo
497 497
         $recordings = bigbluebuttonbn_get_recordings(
498 498
             $bbbsession['course']->id, $bigbluebuttonbnid, $showroom,
499 499
             $bbbsession['bigbluebuttonbn']->recordings_deleted
500
-          );
500
+            );
501 501
     }
502 502
     // Get recording links.
503 503
     $recordingsimported = bigbluebuttonbn_get_recordings_imported_array(
504 504
         $bbbsession['course']->id, $bigbluebuttonbnid, $showroom
505
-      );
505
+        );
506 506
     /* Perform aritmetic addition instead of merge so the imported recordings corresponding to existent
507 507
      * recordings are not included. */
508 508
     $recordings += $recordingsimported;
@@ -515,7 +515,7 @@  discard block
 block discarded – undo
515 515
     // JavaScript variables for recordings.
516 516
     $jsvars += array(
517 517
             'recordings_html' => $bbbsession['bigbluebuttonbn']->recordings_html == '1',
518
-          );
518
+            );
519 519
     // If there are meetings with recordings load the data to the table.
520 520
     if ($bbbsession['bigbluebuttonbn']->recordings_html) {
521 521
         // Render a plain html table.
@@ -525,7 +525,7 @@  discard block
 block discarded – undo
525 525
     $jsvars += array(
526 526
             'columns' => bigbluebuttonbn_get_recording_columns($bbbsession),
527 527
             'data' => bigbluebuttonbn_get_recording_data($bbbsession, $recordings),
528
-          );
528
+            );
529 529
     // Render a YUI table.
530 530
     return html_writer::div('', '', array('id' => 'bigbluebuttonbn_yui_table'));
531 531
 }
@@ -540,10 +540,10 @@  discard block
 block discarded – undo
540 540
     global $CFG;
541 541
     $button = html_writer::tag('input', '',
542 542
         array('type' => 'button',
543
-              'value' => get_string('view_recording_button_import', 'bigbluebuttonbn'),
544
-              'class' => 'btn btn-secondary',
545
-              'onclick' => 'window.location=\''.$CFG->wwwroot.'/mod/bigbluebuttonbn/import_view.php?bn='.
546
-                  $bbbsession['bigbluebuttonbn']->id.'\''));
543
+                'value' => get_string('view_recording_button_import', 'bigbluebuttonbn'),
544
+                'class' => 'btn btn-secondary',
545
+                'onclick' => 'window.location=\''.$CFG->wwwroot.'/mod/bigbluebuttonbn/import_view.php?bn='.
546
+                    $bbbsession['bigbluebuttonbn']->id.'\''));
547 547
     $output = html_writer::start_tag('br');
548 548
     $output .= html_writer::tag('span', $button, array('id' => 'import_recording_links_button'));
549 549
     $output .= html_writer::tag('span', '', array('id' => 'import_recording_links_table'));
Please login to merge, or discard this patch.
Spacing   +44 added lines, -44 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;
@@ -152,7 +152,7 @@  discard block
 block discarded – undo
152 152
     $bbbsession['modPW'] = $bbbsession['bigbluebuttonbn']->moderatorpass;
153 153
     $bbbsession['viewerPW'] = $bbbsession['bigbluebuttonbn']->viewerpass;
154 154
     // Database info related to the activity.
155
-    $bbbsession['meetingid'] = $bbbsession['bigbluebuttonbn']->meetingid.'-'.$bbbsession['course']->id.'-'.
155
+    $bbbsession['meetingid'] = $bbbsession['bigbluebuttonbn']->meetingid . '-' . $bbbsession['course']->id . '-' .
156 156
         $bbbsession['bigbluebuttonbn']->id;
157 157
     $bbbsession['meetingname'] = $bbbsession['bigbluebuttonbn']->name;
158 158
     $bbbsession['meetingdescription'] = $bbbsession['bigbluebuttonbn']->intro;
@@ -172,7 +172,7 @@  discard block
 block discarded – undo
172 172
         $bbbsession['welcome'] = get_string('mod_form_field_welcome_default', 'bigbluebuttonbn');
173 173
     }
174 174
     if ($bbbsession['bigbluebuttonbn']->record) {
175
-        $bbbsession['welcome'] .= '<br><br>'.get_string('bbbrecordwarning', 'bigbluebuttonbn');
175
+        $bbbsession['welcome'] .= '<br><br>' . get_string('bbbrecordwarning', 'bigbluebuttonbn');
176 176
     }
177 177
     $bbbsession['openingtime'] = $bbbsession['bigbluebuttonbn']->openingtime;
178 178
     $bbbsession['closingtime'] = $bbbsession['bigbluebuttonbn']->closingtime;
@@ -185,7 +185,7 @@  discard block
 block discarded – undo
185 185
     $bbbsession['originServerName'] = $parsedurl['host'];
186 186
     $bbbsession['originServerUrl'] = $CFG->wwwroot;
187 187
     $bbbsession['originServerCommonName'] = '';
188
-    $bbbsession['originTag'] = 'moodle-mod_bigbluebuttonbn ('.get_config('mod_bigbluebuttonbn', 'version').')';
188
+    $bbbsession['originTag'] = 'moodle-mod_bigbluebuttonbn (' . get_config('mod_bigbluebuttonbn', 'version') . ')';
189 189
 }
190 190
 
191 191
 /**
@@ -256,9 +256,9 @@  discard block
 block discarded – undo
256 256
         $groupname = groups_get_group_name($bbbsession['group']);
257 257
     }
258 258
     // Assign group default values.
259
-    $bbbsession['meetingid'] = $bbbsession['bigbluebuttonbn']->meetingid.'-'.$bbbsession['course']->id.'-'.
260
-        $bbbsession['bigbluebuttonbn']->id.'['.$bbbsession['group'].']';
261
-    $bbbsession['meetingname'] = $bbbsession['bigbluebuttonbn']->name.' ('.$groupname.')';
259
+    $bbbsession['meetingid'] = $bbbsession['bigbluebuttonbn']->meetingid . '-' . $bbbsession['course']->id . '-' .
260
+        $bbbsession['bigbluebuttonbn']->id . '[' . $bbbsession['group'] . ']';
261
+    $bbbsession['meetingname'] = $bbbsession['bigbluebuttonbn']->name . ' (' . $groupname . ')';
262 262
     if (count($groups) == 0) {
263 263
         // Only the All participants group exists.
264 264
         bigbluebuttonbn_view_message_box($bbbsession,
@@ -270,7 +270,7 @@  discard block
 block discarded – undo
270 270
         return;
271 271
     }
272 272
     bigbluebuttonbn_view_message_box($bbbsession, get_string('view_groups_selection_warning', 'bigbluebuttonbn'), 'warning');
273
-    $urltoroot = $CFG->wwwroot.'/mod/bigbluebuttonbn/view.php?id='.$bbbsession['cm']->id;
273
+    $urltoroot = $CFG->wwwroot . '/mod/bigbluebuttonbn/view.php?id=' . $bbbsession['cm']->id;
274 274
     groups_print_activity_menu($bbbsession['cm'], $urltoroot);
275 275
     echo '<br><br>';
276 276
 }
@@ -284,7 +284,7 @@  discard block
 block discarded – undo
284 284
  * @param boolean $onlymoderator
285 285
  * @return void
286 286
  */
287
-function bigbluebuttonbn_view_message_box(&$bbbsession, $message, $type='warning', $onlymoderator=false) {
287
+function bigbluebuttonbn_view_message_box(&$bbbsession, $message, $type = 'warning', $onlymoderator = false) {
288 288
     global $OUTPUT;
289 289
     if ($onlymoderator && !$bbbsession['moderator'] && !$bbbsession['administrator']) {
290 290
         return;
@@ -317,7 +317,7 @@  discard block
 block discarded – undo
317 317
         'locale' => bigbluebuttonbn_get_localcode(), 'profile_features' => $typeprofiles[0]['features']);
318 318
     // Renders general warning when configured.
319 319
     $cfg = \mod_bigbluebuttonbn\locallib\config::get_options();
320
-    $output  = bigbluebuttonbn_view_render_warning(
320
+    $output = bigbluebuttonbn_view_render_warning(
321 321
         (string)$cfg['general_warning_message'],
322 322
         (string)$cfg['general_warning_box_type'],
323 323
         (string)$cfg['general_warning_button_href'],
@@ -335,7 +335,7 @@  discard block
 block discarded – undo
335 335
         $PAGE->requires->yui_module('moodle-mod_bigbluebuttonbn-recordings',
336 336
                 'M.mod_bigbluebuttonbn.recordings.init', array($jsvars));
337 337
     }
338
-    echo $output.html_writer::empty_tag('br').html_writer::empty_tag('br').html_writer::empty_tag('br');
338
+    echo $output . html_writer::empty_tag('br') . html_writer::empty_tag('br') . html_writer::empty_tag('br');
339 339
     $PAGE->requires->yui_module('moodle-mod_bigbluebuttonbn-broker', 'M.mod_bigbluebuttonbn.broker.init', array($jsvars));
340 340
 }
341 341
 
@@ -379,7 +379,7 @@  discard block
 block discarded – undo
379 379
  * @param string $class
380 380
  * @return string
381 381
  */
382
-function bigbluebuttonbn_view_render_warning($message, $type='info', $href='', $text='', $class='') {
382
+function bigbluebuttonbn_view_render_warning($message, $type = 'info', $href = '', $text = '', $class = '') {
383 383
     global $OUTPUT;
384 384
     $output = "\n";
385 385
     // Evaluates if config_warning is enabled.
@@ -387,14 +387,14 @@  discard block
 block discarded – undo
387 387
         return $output;
388 388
     }
389 389
     $output .= $OUTPUT->box_start('box boxalignleft adminerror alert alert-' . $type . ' alert-block fade in',
390
-      'bigbluebuttonbn_view_general_warning')."\n";
391
-    $output .= '  <button type="button" class="close" data-dismiss="alert">&times;</button>'.$message."\n";
392
-    $output .= '  <div class="singlebutton">'."\n";
390
+      'bigbluebuttonbn_view_general_warning') . "\n";
391
+    $output .= '  <button type="button" class="close" data-dismiss="alert">&times;</button>' . $message . "\n";
392
+    $output .= '  <div class="singlebutton">' . "\n";
393 393
     if (!empty($href)) {
394 394
         $output .= bigbluebuttonbn_view_render_warning_button($href, $text, $class);
395 395
     }
396
-    $output .= '  </div>'."\n";
397
-    $output .= $OUTPUT->box_end()."\n";
396
+    $output .= '  </div>' . "\n";
397
+    $output .= $OUTPUT->box_end() . "\n";
398 398
     return $output;
399 399
 }
400 400
 
@@ -413,11 +413,11 @@  discard block
 block discarded – undo
413 413
     if ($class == '') {
414 414
         $class = 'btn btn-secondary';
415 415
     }
416
-    $output  = '  <form method="post" action="' . $href . '" class="form-inline">'."\n";
417
-    $output .= '      <button type="submit" class="' . $class . '"'."\n";
418
-    $output .= '          title=""'."\n";
419
-    $output .= '          >' . $text . '</button>'."\n";
420
-    $output .= '  </form>'."\n";
416
+    $output  = '  <form method="post" action="' . $href . '" class="form-inline">' . "\n";
417
+    $output .= '      <button type="submit" class="' . $class . '"' . "\n";
418
+    $output .= '          title=""' . "\n";
419
+    $output .= '          >' . $text . '</button>' . "\n";
420
+    $output .= '  </form>' . "\n";
421 421
     return $output;
422 422
 }
423 423
 
@@ -434,12 +434,12 @@  discard block
 block discarded – undo
434 434
     // JavaScript variables for room.
435 435
     $openingtime = '';
436 436
     if ($bbbsession['openingtime']) {
437
-        $openingtime = get_string('mod_form_field_openingtime', 'bigbluebuttonbn').': '.
437
+        $openingtime = get_string('mod_form_field_openingtime', 'bigbluebuttonbn') . ': ' .
438 438
             userdate($bbbsession['openingtime']);
439 439
     }
440 440
     $closingtime = '';
441 441
     if ($bbbsession['closingtime']) {
442
-        $closingtime = get_string('mod_form_field_closingtime', 'bigbluebuttonbn').': '.
442
+        $closingtime = get_string('mod_form_field_closingtime', 'bigbluebuttonbn') . ': ' .
443 443
             userdate($bbbsession['closingtime']);
444 444
     }
445 445
     $jsvars += array(
@@ -456,7 +456,7 @@  discard block
 block discarded – undo
456 456
     $output .= $OUTPUT->box_end();
457 457
     // Action button box.
458 458
     $output .= $OUTPUT->box_start('generalbox boxaligncenter', 'bigbluebuttonbn_view_action_button_box');
459
-    $output .= '<br><br><span id="join_button"></span>&nbsp;<span id="end_button"></span>'."\n";
459
+    $output .= '<br><br><span id="join_button"></span>&nbsp;<span id="end_button"></span>' . "\n";
460 460
     $output .= $OUTPUT->box_end();
461 461
     if ($activity == 'ended') {
462 462
         $output .= bigbluebuttonbn_view_ended($bbbsession);
@@ -493,7 +493,7 @@  discard block
 block discarded – undo
493 493
     }
494 494
     // Get recordings.
495 495
     $recordings = array();
496
-    if ( bigbluebuttonbn_view_include_recordings($bbbsession) ) {
496
+    if (bigbluebuttonbn_view_include_recordings($bbbsession)) {
497 497
         $recordings = bigbluebuttonbn_get_recordings(
498 498
             $bbbsession['course']->id, $bigbluebuttonbnid, $showroom,
499 499
             $bbbsession['bigbluebuttonbn']->recordings_deleted
@@ -519,7 +519,7 @@  discard block
 block discarded – undo
519 519
     // If there are meetings with recordings load the data to the table.
520 520
     if ($bbbsession['bigbluebuttonbn']->recordings_html) {
521 521
         // Render a plain html table.
522
-        return bigbluebuttonbn_output_recording_table($bbbsession, $recordings)."\n";
522
+        return bigbluebuttonbn_output_recording_table($bbbsession, $recordings) . "\n";
523 523
     }
524 524
     // JavaScript variables for recordings with YUI.
525 525
     $jsvars += array(
@@ -542,8 +542,8 @@  discard block
 block discarded – undo
542 542
         array('type' => 'button',
543 543
               'value' => get_string('view_recording_button_import', 'bigbluebuttonbn'),
544 544
               'class' => 'btn btn-secondary',
545
-              'onclick' => 'window.location=\''.$CFG->wwwroot.'/mod/bigbluebuttonbn/import_view.php?bn='.
546
-                  $bbbsession['bigbluebuttonbn']->id.'\''));
545
+              'onclick' => 'window.location=\'' . $CFG->wwwroot . '/mod/bigbluebuttonbn/import_view.php?bn=' .
546
+                  $bbbsession['bigbluebuttonbn']->id . '\''));
547 547
     $output = html_writer::start_tag('br');
548 548
     $output .= html_writer::tag('span', $button, array('id' => 'import_recording_links_button'));
549 549
     $output .= html_writer::tag('span', '', array('id' => 'import_recording_links_table'));
@@ -561,10 +561,10 @@  discard block
 block discarded – undo
561 561
     if (!is_null($bbbsession['presentation']['url'])) {
562 562
         $attributes = array('title' => $bbbsession['presentation']['name']);
563 563
         $icon = new pix_icon($bbbsession['presentation']['icon'], $bbbsession['presentation']['mimetype_description']);
564
-        return '<h4>'.get_string('view_section_title_presentation', 'bigbluebuttonbn').'</h4>'.
565
-                $OUTPUT->action_icon($bbbsession['presentation']['url'], $icon, null, array(), false).
564
+        return '<h4>' . get_string('view_section_title_presentation', 'bigbluebuttonbn') . '</h4>' .
565
+                $OUTPUT->action_icon($bbbsession['presentation']['url'], $icon, null, array(), false) .
566 566
                 $OUTPUT->action_link($bbbsession['presentation']['url'],
567
-                $bbbsession['presentation']['name'], null, $attributes).'<br><br>';
567
+                $bbbsession['presentation']['name'], null, $attributes) . '<br><br>';
568 568
     }
569 569
     return '';
570 570
 }
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.' &quot;'.$msg->activity_title.'&quot; '.
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 . ' &quot;' . $msg->activity_title . '&quot; ' .
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_HTML);
Please login to merge, or discard this patch.