Completed
Pull Request — master (#155)
by Jesus
01:57
created
lib.php 2 patches
Spacing   +43 added lines, -43 removed lines patch added patch discarded remove patch
@@ -28,23 +28,23 @@  discard block
 block discarded – undo
28 28
 
29 29
 global $CFG;
30 30
 
31
-require_once($CFG->dirroot.'/calendar/lib.php');
32
-require_once($CFG->dirroot.'/message/lib.php');
33
-require_once($CFG->dirroot.'/mod/lti/OAuth.php');
34
-require_once($CFG->dirroot.'/tag/lib.php');
35
-require_once($CFG->libdir.'/accesslib.php');
36
-require_once($CFG->libdir.'/completionlib.php');
37
-require_once($CFG->libdir.'/datalib.php');
38
-require_once($CFG->libdir.'/enrollib.php');
39
-require_once($CFG->libdir.'/filelib.php');
40
-require_once($CFG->libdir.'/formslib.php');
31
+require_once($CFG->dirroot . '/calendar/lib.php');
32
+require_once($CFG->dirroot . '/message/lib.php');
33
+require_once($CFG->dirroot . '/mod/lti/OAuth.php');
34
+require_once($CFG->dirroot . '/tag/lib.php');
35
+require_once($CFG->libdir . '/accesslib.php');
36
+require_once($CFG->libdir . '/completionlib.php');
37
+require_once($CFG->libdir . '/datalib.php');
38
+require_once($CFG->libdir . '/enrollib.php');
39
+require_once($CFG->libdir . '/filelib.php');
40
+require_once($CFG->libdir . '/formslib.php');
41 41
 
42 42
 // JWT is included in Moodle 3.7 core, but a local package is still needed for backward compatibility.
43 43
 if (!class_exists('\Firebase\JWT\JWT')) {
44
-    if (file_exists($CFG->libdir.'/php-jwt/src/JWT.php')) {
45
-        require_once($CFG->libdir.'/php-jwt/src/JWT.php');
44
+    if (file_exists($CFG->libdir . '/php-jwt/src/JWT.php')) {
45
+        require_once($CFG->libdir . '/php-jwt/src/JWT.php');
46 46
     } else {
47
-        require_once($CFG->dirroot.'/mod/bigbluebuttonbn/vendor/firebase/php-jwt/src/JWT.php');
47
+        require_once($CFG->dirroot . '/mod/bigbluebuttonbn/vendor/firebase/php-jwt/src/JWT.php');
48 48
     }
49 49
 }
50 50
 
@@ -52,8 +52,8 @@  discard block
 block discarded – undo
52 52
     $CFG->bigbluebuttonbn = array();
53 53
 }
54 54
 
55
-if (file_exists(dirname(__FILE__).'/config.php')) {
56
-    require_once(dirname(__FILE__).'/config.php');
55
+if (file_exists(dirname(__FILE__) . '/config.php')) {
56
+    require_once(dirname(__FILE__) . '/config.php');
57 57
 }
58 58
 
59 59
 /*
@@ -110,19 +110,19 @@  discard block
 block discarded – undo
110 110
         return null;
111 111
     }
112 112
     $features = array(
113
-        (string) FEATURE_IDNUMBER => true,
114
-        (string) FEATURE_GROUPS => true,
115
-        (string) FEATURE_GROUPINGS => true,
116
-        (string) FEATURE_GROUPMEMBERSONLY => true,
117
-        (string) FEATURE_MOD_INTRO => true,
118
-        (string) FEATURE_BACKUP_MOODLE2 => true,
119
-        (string) FEATURE_COMPLETION_TRACKS_VIEWS => true,
120
-        (string) FEATURE_COMPLETION_HAS_RULES => true,
121
-        (string) FEATURE_GRADE_HAS_GRADE => false,
122
-        (string) FEATURE_GRADE_OUTCOMES => false,
123
-        (string) FEATURE_SHOW_DESCRIPTION => true,
113
+        (string)FEATURE_IDNUMBER => true,
114
+        (string)FEATURE_GROUPS => true,
115
+        (string)FEATURE_GROUPINGS => true,
116
+        (string)FEATURE_GROUPMEMBERSONLY => true,
117
+        (string)FEATURE_MOD_INTRO => true,
118
+        (string)FEATURE_BACKUP_MOODLE2 => true,
119
+        (string)FEATURE_COMPLETION_TRACKS_VIEWS => true,
120
+        (string)FEATURE_COMPLETION_HAS_RULES => true,
121
+        (string)FEATURE_GRADE_HAS_GRADE => false,
122
+        (string)FEATURE_GRADE_OUTCOMES => false,
123
+        (string)FEATURE_SHOW_DESCRIPTION => true,
124 124
     );
125
-    if (isset($features[(string) $feature])) {
125
+    if (isset($features[(string)$feature])) {
126 126
         return $features[$feature];
127 127
     }
128 128
     return null;
@@ -277,7 +277,7 @@  discard block
 block discarded – undo
277 277
 function bigbluebuttonbn_delete_instance_log($bigbluebuttonbn) {
278 278
     global $DB;
279 279
     $sql  = "SELECT * FROM {bigbluebuttonbn_logs} ";
280
-    $sql .= "WHERE bigbluebuttonbnid = ? AND log = ? AND ". $DB->sql_compare_text('meta') . " = ?";
280
+    $sql .= "WHERE bigbluebuttonbnid = ? AND log = ? AND " . $DB->sql_compare_text('meta') . " = ?";
281 281
     $logs = $DB->get_records_sql($sql, array($bigbluebuttonbn->id, BIGBLUEBUTTONBN_LOG_EVENT_CREATE, "{\"record\":true}"));
282 282
     $meta = "{\"has_recordings\":" . empty($logs) ? "true" : "false" . "}";
283 283
     bigbluebuttonbn_log($bigbluebuttonbn, BIGBLUEBUTTONBN_LOG_EVENT_DELETE, [], $meta);
@@ -298,7 +298,7 @@  discard block
 block discarded – undo
298 298
 function bigbluebuttonbn_user_outline($course, $user, $mod, $bigbluebuttonbn) {
299 299
     if ($completed = bigbluebuttonbn_user_complete($course, $user, $bigbluebuttonbn)) {
300 300
         return fullname($user) . ' ' . get_string('view_message_has_joined', 'bigbluebuttonbn') . ' ' .
301
-            get_string('view_message_session_for', 'bigbluebuttonbn') . ' ' . (string) $completed . ' ' .
301
+            get_string('view_message_session_for', 'bigbluebuttonbn') . ' ' . (string)$completed . ' ' .
302 302
             get_string('view_message_times', 'bigbluebuttonbn');
303 303
     }
304 304
     return '';
@@ -487,7 +487,7 @@  discard block
 block discarded – undo
487 487
  * @return array status array
488 488
  */
489 489
 function bigbluebuttonbn_reset_recordings($courseid) {
490
-    require_once(__DIR__.'/locallib.php');
490
+    require_once(__DIR__ . '/locallib.php');
491 491
     // Criteria for search [courseid | bigbluebuttonbn=null | subset=false | includedeleted=true].
492 492
     $recordings = bigbluebuttonbn_get_recordings($courseid, null, false, true);
493 493
     // Remove all the recordings.
@@ -555,16 +555,16 @@  discard block
 block discarded – undo
555 555
     if ($bigbluebuttonbn->visible) {
556 556
         $classes = 'class="dimmed" ';
557 557
     }
558
-    $str  = '<div class="bigbluebuttonbn overview">'."\n";
559
-    $str .= '  <div class="name">'.get_string('modulename', 'bigbluebuttonbn').':&nbsp;'."\n";
560
-    $str .= '    <a '.$classes.'href="'.$CFG->wwwroot.'/mod/bigbluebuttonbn/view.php?id='.$bigbluebuttonbn->coursemodule.
561
-      '">'.$bigbluebuttonbn->name.'</a>'."\n";
562
-    $str .= '  </div>'."\n";
563
-    $str .= '  <div class="info">'.get_string($start, 'bigbluebuttonbn').': '.userdate($bigbluebuttonbn->openingtime).
564
-        '</div>'."\n";
565
-    $str .= '  <div class="info">'.get_string('ends_at', 'bigbluebuttonbn').': '.userdate($bigbluebuttonbn->closingtime)
566
-      .'</div>'."\n";
567
-    $str .= '</div>'."\n";
558
+    $str  = '<div class="bigbluebuttonbn overview">' . "\n";
559
+    $str .= '  <div class="name">' . get_string('modulename', 'bigbluebuttonbn') . ':&nbsp;' . "\n";
560
+    $str .= '    <a ' . $classes . 'href="' . $CFG->wwwroot . '/mod/bigbluebuttonbn/view.php?id=' . $bigbluebuttonbn->coursemodule .
561
+      '">' . $bigbluebuttonbn->name . '</a>' . "\n";
562
+    $str .= '  </div>' . "\n";
563
+    $str .= '  <div class="info">' . get_string($start, 'bigbluebuttonbn') . ': ' . userdate($bigbluebuttonbn->openingtime) .
564
+        '</div>' . "\n";
565
+    $str .= '  <div class="info">' . get_string('ends_at', 'bigbluebuttonbn') . ': ' . userdate($bigbluebuttonbn->closingtime)
566
+      .'</div>' . "\n";
567
+    $str .= '</div>' . "\n";
568 568
     return $str;
569 569
 }
570 570
 
@@ -651,7 +651,7 @@  discard block
 block discarded – undo
651 651
  * @return void
652 652
  **/
653 653
 function bigbluebuttonbn_process_pre_save_instance(&$bigbluebuttonbn) {
654
-    require_once(__DIR__.'/locallib.php');
654
+    require_once(__DIR__ . '/locallib.php');
655 655
     $bigbluebuttonbn->timemodified = time();
656 656
     if ((integer)$bigbluebuttonbn->instance == 0) {
657 657
         $bigbluebuttonbn->meetingid = 0;
@@ -836,7 +836,7 @@  discard block
 block discarded – undo
836 836
     if (count($files) == 1) {
837 837
         // Get the first (and only) file.
838 838
         $file = reset($files);
839
-        $filesrc = '/'.$file->get_filename();
839
+        $filesrc = '/' . $file->get_filename();
840 840
     }
841 841
     return $filesrc;
842 842
 }
@@ -905,7 +905,7 @@  discard block
 block discarded – undo
905 905
     if (!$filename) {
906 906
         return false;
907 907
     }
908
-    $fullpath = "/$context->id/mod_bigbluebuttonbn/$filearea/0/".$filename;
908
+    $fullpath = "/$context->id/mod_bigbluebuttonbn/$filearea/0/" . $filename;
909 909
     $fs = get_file_storage();
910 910
     $file = $fs->get_file_by_hash(sha1($fullpath));
911 911
     if (!$file || $file->is_directory()) {
Please login to merge, or discard this patch.
Doc Comments   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -103,7 +103,7 @@  discard block
 block discarded – undo
103 103
  * @uses FEATURE_GRADE_OUTCOMES
104 104
  * @uses FEATURE_SHOW_DESCRIPTION
105 105
  * @param string $feature
106
- * @return mixed True if yes (some features may use other values)
106
+ * @return null|boolean True if yes (some features may use other values)
107 107
  */
108 108
 function bigbluebuttonbn_supports($feature) {
109 109
     if (!$feature) {
@@ -272,7 +272,7 @@  discard block
 block discarded – undo
272 272
  *
273 273
  * @param object $bigbluebuttonbn Id of the module instance
274 274
  *
275
- * @return bool Success/Failure
275
+ * @return boolean|null Success/Failure
276 276
  */
277 277
 function bigbluebuttonbn_delete_instance_log($bigbluebuttonbn) {
278 278
     global $DB;
@@ -293,7 +293,7 @@  discard block
 block discarded – undo
293 293
  * @param object $mod
294 294
  * @param object $bigbluebuttonbn
295 295
  *
296
- * @return bool
296
+ * @return string
297 297
  */
298 298
 function bigbluebuttonbn_user_outline($course, $user, $mod, $bigbluebuttonbn) {
299 299
     if ($completed = bigbluebuttonbn_user_complete($course, $user, $bigbluebuttonbn)) {
@@ -869,7 +869,7 @@  discard block
 block discarded – undo
869 869
  * @param stdClass $context       context object
870 870
  * @param string   $filearea      file area
871 871
  *
872
- * @return false|null false if file not valid
872
+ * @return boolean false if file not valid
873 873
  */
874 874
 function bigbluebuttonbn_pluginfile_valid($context, $filearea) {
875 875
 
Please login to merge, or discard this patch.
bbb_view.php 2 patches
Indentation   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -309,10 +309,10 @@  discard block
 block discarded – undo
309 309
  */
310 310
 function bigbluebuttonbn_bbb_view_create_meeting_data(&$bbbsession) {
311 311
     $data = ['meetingID' => $bbbsession['meetingid'],
312
-              'name' => bigbluebuttonbn_html2text($bbbsession['meetingname'], 64),
313
-              'attendeePW' => $bbbsession['viewerPW'],
314
-              'moderatorPW' => $bbbsession['modPW'],
315
-              'logoutURL' => $bbbsession['logoutURL'],
312
+                'name' => bigbluebuttonbn_html2text($bbbsession['meetingname'], 64),
313
+                'attendeePW' => $bbbsession['viewerPW'],
314
+                'moderatorPW' => $bbbsession['modPW'],
315
+                'logoutURL' => $bbbsession['logoutURL'],
316 316
             ];
317 317
     $data['record'] = bigbluebuttonbn_bbb_view_create_meeting_data_record($bbbsession['record']);
318 318
     // Check if auto_start_record is enable.
@@ -334,7 +334,7 @@  discard block
 block discarded – undo
334 334
             '%duration%',
335 335
             (string) $durationtime,
336 336
             get_string('bbbdurationwarning', 'bigbluebuttonbn')
337
-          );
337
+            );
338 338
     }
339 339
     $voicebridge = intval($bbbsession['voicebridge']);
340 340
     if ($voicebridge > 0 && $voicebridge < 79999) {
Please login to merge, or discard this patch.
Spacing   +22 added lines, -22 removed lines patch added patch discarded remove patch
@@ -23,8 +23,8 @@  discard block
 block discarded – undo
23 23
  * @author    Jesus Federico  (jesus [at] blindsidenetworks [dt] com)
24 24
  */
25 25
 
26
-require_once(dirname(dirname(dirname(__FILE__))).'/config.php');
27
-require_once(dirname(__FILE__).'/locallib.php');
26
+require_once(dirname(dirname(dirname(__FILE__))) . '/config.php');
27
+require_once(dirname(__FILE__) . '/locallib.php');
28 28
 
29 29
 global $SESSION;
30 30
 
@@ -70,23 +70,23 @@  discard block
 block discarded – undo
70 70
     if (is_null($serverversion)) {
71 71
         if ($bbbsession['administrator']) {
72 72
             print_error('view_error_unable_join', 'bigbluebuttonbn',
73
-                $CFG->wwwroot.'/admin/settings.php?section=modsettingbigbluebuttonbn');
73
+                $CFG->wwwroot . '/admin/settings.php?section=modsettingbigbluebuttonbn');
74 74
             exit;
75 75
         }
76 76
         if ($bbbsession['moderator']) {
77 77
             print_error('view_error_unable_join_teacher', 'bigbluebuttonbn',
78
-                $CFG->wwwroot.'/course/view.php?id='.$bigbluebuttonbn->course);
78
+                $CFG->wwwroot . '/course/view.php?id=' . $bigbluebuttonbn->course);
79 79
             exit;
80 80
         }
81 81
         print_error('view_error_unable_join_student', 'bigbluebuttonbn',
82
-            $CFG->wwwroot.'/course/view.php?id='.$bigbluebuttonbn->course);
82
+            $CFG->wwwroot . '/course/view.php?id=' . $bigbluebuttonbn->course);
83 83
         exit;
84 84
     }
85
-    $bbbsession['serverversion'] = (string) $serverversion;
85
+    $bbbsession['serverversion'] = (string)$serverversion;
86 86
 
87 87
     // Operation URLs.
88 88
     $bbbsession['bigbluebuttonbnURL'] = $CFG->wwwroot . '/mod/bigbluebuttonbn/view.php?id=' . $bbbsession['cm']->id;
89
-    $bbbsession['logoutURL'] = $CFG->wwwroot . '/mod/bigbluebuttonbn/bbb_view.php?action=logout&id='.$id .
89
+    $bbbsession['logoutURL'] = $CFG->wwwroot . '/mod/bigbluebuttonbn/bbb_view.php?action=logout&id=' . $id .
90 90
         '&bn=' . $bbbsession['bigbluebuttonbn']->id;
91 91
     $bbbsession['recordingReadyURL'] = $CFG->wwwroot . '/mod/bigbluebuttonbn/bbb_broker.php?action=recording_' .
92 92
         'ready&bigbluebuttonbn=' . $bbbsession['bigbluebuttonbn']->id;
@@ -114,8 +114,8 @@  discard block
 block discarded – undo
114 114
         }
115 115
 
116 116
         // Assign group default values.
117
-        $bbbsession['meetingid'] .= '['.$bbbsession['group'].']';
118
-        $bbbsession['meetingname'] .= ' ('.$groupname.')';
117
+        $bbbsession['meetingid'] .= '[' . $bbbsession['group'] . ']';
118
+        $bbbsession['meetingname'] .= ' (' . $groupname . ')';
119 119
     }
120 120
 
121 121
     // Initialize session variable used across views.
@@ -180,7 +180,7 @@  discard block
 block discarded – undo
180 180
         }
181 181
         // If user is not administrator nor moderator (user is steudent) and waiting is required.
182 182
         if (!$bbbsession['administrator'] && !$bbbsession['moderator'] && $bbbsession['wait']) {
183
-            header('Location: '.$bbbsession['logoutURL']);
183
+            header('Location: ' . $bbbsession['logoutURL']);
184 184
             break;
185 185
         }
186 186
         // As the meeting doesn't exist, try to create it.
@@ -194,16 +194,16 @@  discard block
 block discarded – undo
194 194
             // The server is unreachable.
195 195
             if ($bbbsession['administrator']) {
196 196
                 print_error('view_error_unable_join', 'bigbluebuttonbn',
197
-                    $CFG->wwwroot.'/admin/settings.php?section=modsettingbigbluebuttonbn');
197
+                    $CFG->wwwroot . '/admin/settings.php?section=modsettingbigbluebuttonbn');
198 198
                 break;
199 199
             }
200 200
             if ($bbbsession['moderator']) {
201 201
                 print_error('view_error_unable_join_teacher', 'bigbluebuttonbn',
202
-                    $CFG->wwwroot.'/admin/settings.php?section=modsettingbigbluebuttonbn');
202
+                    $CFG->wwwroot . '/admin/settings.php?section=modsettingbigbluebuttonbn');
203 203
                 break;
204 204
             }
205 205
             print_error('view_error_unable_join_student', 'bigbluebuttonbn',
206
-                $CFG->wwwroot.'/admin/settings.php?section=modsettingbigbluebuttonbn');
206
+                $CFG->wwwroot . '/admin/settings.php?section=modsettingbigbluebuttonbn');
207 207
             break;
208 208
         }
209 209
         if ($response['returncode'] == 'FAILED') {
@@ -224,7 +224,7 @@  discard block
 block discarded – undo
224 224
         bigbluebuttonbn_event_log(\mod_bigbluebuttonbn\event\events::$events['meeting_create'], $bigbluebuttonbn);
225 225
         // Internal logger: Insert a record with the meeting created.
226 226
         $overrides = array('meetingid' => $bbbsession['meetingid']);
227
-        $meta = '{"record":'.($bbbsession['record'] ? 'true' : 'false').'}';
227
+        $meta = '{"record":' . ($bbbsession['record'] ? 'true' : 'false') . '}';
228 228
         bigbluebuttonbn_log($bbbsession['bigbluebuttonbn'], BIGBLUEBUTTONBN_LOG_EVENT_CREATE, $overrides, $meta);
229 229
         // Since the meeting is already running, we just join the session.
230 230
         bigbluebuttonbn_bbb_view_join_meeting($bbbsession, $bigbluebuttonbn, $origin);
@@ -238,7 +238,7 @@  discard block
 block discarded – undo
238 238
         $overrides = array('meetingid' => $bbbsession['meetingid']);
239 239
         bigbluebuttonbn_log($bbbsession['bigbluebuttonbn'], BIGBLUEBUTTONBN_LOG_EVENT_PLAYED, $overrides);
240 240
         // Execute the redirect.
241
-        header('Location: '.urldecode($href));
241
+        header('Location: ' . urldecode($href));
242 242
         break;
243 243
     default:
244 244
         bigbluebuttonbn_bbb_view_close_window();
@@ -332,7 +332,7 @@  discard block
 block discarded – undo
332 332
         $data['welcome'] .= '<br><br>';
333 333
         $data['welcome'] .= str_replace(
334 334
             '%duration%',
335
-            (string) $durationtime,
335
+            (string)$durationtime,
336 336
             get_string('bbbdurationwarning', 'bigbluebuttonbn')
337 337
           );
338 338
     }
@@ -398,7 +398,7 @@  discard block
 block discarded – undo
398 398
     $meetinginfo = bigbluebuttonbn_get_meeting_info($bbbsession['meetingid'], BIGBLUEBUTTONBN_UPDATE_CACHE);
399 399
     if ($bbbsession['userlimit'] > 0 && intval($meetinginfo['participantCount']) >= $bbbsession['userlimit']) {
400 400
         // No more users allowed to join.
401
-        header('Location: '.$bbbsession['logoutURL']);
401
+        header('Location: ' . $bbbsession['logoutURL']);
402 402
         return;
403 403
     }
404 404
     // Build the URL.
@@ -412,13 +412,13 @@  discard block
 block discarded – undo
412 412
     bigbluebuttonbn_event_log(\mod_bigbluebuttonbn\event\events::$events['meeting_join'], $bigbluebuttonbn);
413 413
     // Internal logger: Instert a record with the meeting created.
414 414
     $overrides = array('meetingid' => $bbbsession['meetingid']);
415
-    $meta = '{"origin":'.$origin.'}';
415
+    $meta = '{"origin":' . $origin . '}';
416 416
     bigbluebuttonbn_log($bbbsession['bigbluebuttonbn'], BIGBLUEBUTTONBN_LOG_EVENT_JOIN, $overrides, $meta);
417 417
     // Before executing the redirect, increment the number of participants.
418 418
     bigbluebuttonbn_participant_joined($bbbsession['meetingid'],
419 419
         ($bbbsession['administrator'] || $bbbsession['moderator']));
420 420
     // Execute the redirect.
421
-    header('Location: '.$joinurl);
421
+    header('Location: ' . $joinurl);
422 422
 }
423 423
 
424 424
 /**
@@ -430,13 +430,13 @@  discard block
 block discarded – undo
430 430
  */
431 431
 function bigbluebuttonbn_bbb_view_errors($serrors, $id) {
432 432
     global $CFG, $OUTPUT;
433
-    $errors = (array) json_decode(urldecode($serrors));
433
+    $errors = (array)json_decode(urldecode($serrors));
434 434
     $msgerrors = '';
435 435
     foreach ($errors as $error) {
436
-        $msgerrors .= html_writer::tag('p', $error->{'message'}, array('class' => 'alert alert-danger'))."\n";
436
+        $msgerrors .= html_writer::tag('p', $error->{'message'}, array('class' => 'alert alert-danger')) . "\n";
437 437
     }
438 438
     echo $OUTPUT->header();
439 439
     print_error('view_error_bigbluebutton', 'bigbluebuttonbn',
440
-        $CFG->wwwroot.'/mod/bigbluebuttonbn/view.php?id='.$id, $msgerrors, $serrors);
440
+        $CFG->wwwroot . '/mod/bigbluebuttonbn/view.php?id=' . $id, $msgerrors, $serrors);
441 441
     echo $OUTPUT->footer();
442 442
 }
Please login to merge, or discard this patch.
bbb_broker.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -24,9 +24,9 @@  discard block
 block discarded – undo
24 24
  * @author    Darko Miletic  (darko.miletic [at] gmail [dt] com)
25 25
  */
26 26
 
27
-require(__DIR__.'/../../config.php');
28
-require_once(__DIR__.'/locallib.php');
29
-require_once(__DIR__.'/brokerlib.php');
27
+require(__DIR__ . '/../../config.php');
28
+require_once(__DIR__ . '/locallib.php');
29
+require_once(__DIR__ . '/brokerlib.php');
30 30
 
31 31
 use \Firebase\JWT\JWT;
32 32
 
@@ -35,7 +35,7 @@  discard block
 block discarded – undo
35 35
 $params = $_REQUEST;
36 36
 
37 37
 if (!isset($params['action']) || empty($params['action'])) {
38
-    header('HTTP/1.0 400 Bad Request. Parameter ['.$params['action'].'] was not included');
38
+    header('HTTP/1.0 400 Bad Request. Parameter [' . $params['action'] . '] was not included');
39 39
     return;
40 40
 }
41 41
 
@@ -50,7 +50,7 @@  discard block
 block discarded – undo
50 50
 
51 51
 $error = bigbluebuttonbn_broker_validate_parameters($params);
52 52
 if (!empty($error)) {
53
-    header('HTTP/1.0 400 Bad Request. '.$error);
53
+    header('HTTP/1.0 400 Bad Request. ' . $error);
54 54
     return;
55 55
 }
56 56
 
@@ -71,7 +71,7 @@  discard block
 block discarded – undo
71 71
         bigbluebuttonbn_broker_meeting_events($bigbluebuttonbn);
72 72
         return;
73 73
     }
74
-    header('HTTP/1.0 400 Bad request. The action '. $a . ' doesn\'t exist');
74
+    header('HTTP/1.0 400 Bad request. The action ' . $a . ' doesn\'t exist');
75 75
 } catch (Exception $e) {
76
-    header('HTTP/1.0 500 Internal Server Error. '.$e->getMessage());
76
+    header('HTTP/1.0 500 Internal Server Error. ' . $e->getMessage());
77 77
 }
Please login to merge, or discard this patch.
mod_form.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -26,8 +26,8 @@  discard block
 block discarded – undo
26 26
 
27 27
 defined('MOODLE_INTERNAL') || die();
28 28
 
29
-require_once(dirname(__FILE__).'/locallib.php');
30
-require_once($CFG->dirroot.'/course/moodleform_mod.php');
29
+require_once(dirname(__FILE__) . '/locallib.php');
30
+require_once($CFG->dirroot . '/course/moodleform_mod.php');
31 31
 
32 32
 /**
33 33
  * Moodle class for mod_form.
@@ -48,7 +48,7 @@  discard block
 block discarded – undo
48 48
         $serverversion = bigbluebuttonbn_get_server_version();
49 49
         if (is_null($serverversion)) {
50 50
             print_error('general_error_unable_connect', 'bigbluebuttonbn',
51
-                $CFG->wwwroot.'/admin/settings.php?section=modsettingbigbluebuttonbn');
51
+                $CFG->wwwroot . '/admin/settings.php?section=modsettingbigbluebuttonbn');
52 52
             return;
53 53
         }
54 54
         // Context.
@@ -80,7 +80,7 @@  discard block
 block discarded – undo
80 80
         // If none is allowed, fail and return.
81 81
         if (empty($jsvars['instanceTypeProfiles'])) {
82 82
             print_error('general_error_not_allowed_to_create_instances)', 'bigbluebuttonbn',
83
-                $CFG->wwwroot.'/admin/settings.php?section=modsettingbigbluebuttonbn');
83
+                $CFG->wwwroot . '/admin/settings.php?section=modsettingbigbluebuttonbn');
84 84
             return;
85 85
         }
86 86
         $this->bigbluebuttonbn_mform_add_block_profiles($mform, $jsvars['instanceTypeProfiles']);
@@ -136,7 +136,7 @@  discard block
 block discarded – undo
136 136
                 );
137 137
                 $defaultvalues['presentation'] = $draftitemid;
138 138
             } catch (Exception $e) {
139
-                debugging('Presentation could not be loaded: '.$e->getMessage(), DEBUG_DEVELOPER);
139
+                debugging('Presentation could not be loaded: ' . $e->getMessage(), DEBUG_DEVELOPER);
140 140
                 return;
141 141
             }
142 142
             // Completion: tick if completion attendance settings is set to 1 or more.
@@ -564,7 +564,7 @@  discard block
 block discarded – undo
564 564
             return;
565 565
         }
566 566
         $mform->addElement($type, $name, get_string($descriptionkey, 'bigbluebuttonbn'), $options);
567
-        if (get_string_manager()->string_exists($descriptionkey.'_help', 'bigbluebuttonbn')) {
567
+        if (get_string_manager()->string_exists($descriptionkey . '_help', 'bigbluebuttonbn')) {
568 568
             $mform->addHelpButton($name, $descriptionkey, 'bigbluebuttonbn');
569 569
         }
570 570
         if (!empty($rule)) {
Please login to merge, or discard this patch.
locallib.php 2 patches
Spacing   +64 added lines, -64 removed lines patch added patch discarded remove patch
@@ -31,7 +31,7 @@  discard block
 block discarded – undo
31 31
 
32 32
 global $CFG;
33 33
 
34
-require_once(__DIR__.'/lib.php');
34
+require_once(__DIR__ . '/lib.php');
35 35
 
36 36
 /** @var BIGBLUEBUTTONBN_UPDATE_CACHE boolean set to true indicates that cache has to be updated */
37 37
 const BIGBLUEBUTTONBN_UPDATE_CACHE = true;
@@ -109,7 +109,7 @@  discard block
 block discarded – undo
109 109
               'logoutURL' => $logouturl,
110 110
             ];
111 111
     // Choose between Adobe Flash or HTML5 Client.
112
-    if ( $clienttype == BIGBLUEBUTTON_CLIENTTYPE_HTML5 ) {
112
+    if ($clienttype == BIGBLUEBUTTON_CLIENTTYPE_HTML5) {
113 113
         $data['joinViaHtml5'] = 'true';
114 114
     }
115 115
     if (!is_null($configtoken)) {
@@ -137,8 +137,8 @@  discard block
 block discarded – undo
137 137
     $data = null;
138 138
     if (!is_null($pname) && !is_null($purl)) {
139 139
         $method = 'POST';
140
-        $data = "<?xml version='1.0' encoding='UTF-8'?><modules><module name='presentation'><document url='".
141
-            $purl."' /></module></modules>";
140
+        $data = "<?xml version='1.0' encoding='UTF-8'?><modules><module name='presentation'><document url='" .
141
+            $purl . "' /></module></modules>";
142 142
     }
143 143
     $xml = bigbluebuttonbn_wrap_xml_load_file($createmeetingurl, $method, $data);
144 144
     if ($xml) {
@@ -260,7 +260,7 @@  discard block
 block discarded – undo
260 260
             if (isset($recordingxml->breakoutRooms->breakoutRoom)) {
261 261
                 foreach ($recordingxml->breakoutRooms->breakoutRoom as $breakoutroom) {
262 262
                     $url = \mod_bigbluebuttonbn\locallib\bigbluebutton::action_url('getRecordings',
263
-                        ['recordID' => implode(',', (array) $breakoutroom)]);
263
+                        ['recordID' => implode(',', (array)$breakoutroom)]);
264 264
                     $xml = bigbluebuttonbn_wrap_xml_load_file($url);
265 265
                     if ($xml && $xml->returncode == 'SUCCESS' && isset($xml->recordings)) {
266 266
                         // If there were meetings already created.
@@ -315,7 +315,7 @@  discard block
 block discarded – undo
315 315
         // Override imported flag with actual ID.
316 316
         $recording['imported'] = $recordimported->id;
317 317
         if (isset($recordimported->protected)) {
318
-            $recording['protected'] = (string) $recordimported->protected;
318
+            $recording['protected'] = (string)$recordimported->protected;
319 319
         }
320 320
         $recordsimportedarray[$recording['recordID']] = $recording;
321 321
     }
@@ -345,21 +345,21 @@  discard block
 block discarded – undo
345 345
     // Add formats.
346 346
     $playbackarray = array();
347 347
     foreach ($recording->playback->format as $format) {
348
-        $playbackarray[(string) $format->type] = array('type' => (string) $format->type,
349
-            'url' => trim((string) $format->url), 'length' => (string) $format->length);
348
+        $playbackarray[(string)$format->type] = array('type' => (string)$format->type,
349
+            'url' => trim((string)$format->url), 'length' => (string)$format->length);
350 350
         // Add preview per format when existing.
351 351
         if ($format->preview) {
352
-            $playbackarray[(string) $format->type]['preview'] = bigbluebuttonbn_get_recording_preview_images($format->preview);
352
+            $playbackarray[(string)$format->type]['preview'] = bigbluebuttonbn_get_recording_preview_images($format->preview);
353 353
         }
354 354
     }
355 355
     // Add the metadata to the recordings array.
356 356
     $metadataarray = bigbluebuttonbn_get_recording_array_meta(get_object_vars($recording->metadata));
357
-    $recordingarray = array('recordID' => (string) $recording->recordID,
358
-        'meetingID' => (string) $recording->meetingID, 'meetingName' => (string) $recording->name,
359
-        'published' => (string) $recording->published, 'startTime' => (string) $recording->startTime,
360
-        'endTime' => (string) $recording->endTime, 'playbacks' => $playbackarray);
357
+    $recordingarray = array('recordID' => (string)$recording->recordID,
358
+        'meetingID' => (string)$recording->meetingID, 'meetingName' => (string)$recording->name,
359
+        'published' => (string)$recording->published, 'startTime' => (string)$recording->startTime,
360
+        'endTime' => (string)$recording->endTime, 'playbacks' => $playbackarray);
361 361
     if (isset($recording->protected)) {
362
-        $recordingarray['protected'] = (string) $recording->protected;
362
+        $recordingarray['protected'] = (string)$recording->protected;
363 363
     }
364 364
     return $recordingarray + $metadataarray;
365 365
 }
@@ -374,9 +374,9 @@  discard block
 block discarded – undo
374 374
 function bigbluebuttonbn_get_recording_preview_images($preview) {
375 375
     $imagesarray = array();
376 376
     foreach ($preview->images->image as $image) {
377
-        $imagearray = array('url' => trim((string) $image));
377
+        $imagearray = array('url' => trim((string)$image));
378 378
         foreach ($image->attributes() as $attkey => $attvalue) {
379
-            $imagearray[$attkey] = (string) $attvalue;
379
+            $imagearray[$attkey] = (string)$attvalue;
380 380
         }
381 381
         array_push($imagesarray, $imagearray);
382 382
     }
@@ -396,7 +396,7 @@  discard block
 block discarded – undo
396 396
         if (is_object($value)) {
397 397
             $value = '';
398 398
         }
399
-        $metadataarray['meta_'.$key] = $value;
399
+        $metadataarray['meta_' . $key] = $value;
400 400
     }
401 401
     return $metadataarray;
402 402
 }
@@ -471,7 +471,7 @@  discard block
 block discarded – undo
471 471
     $ids = explode(',', $recordids);
472 472
     foreach ($ids as $id) {
473 473
         $xml = bigbluebuttonbn_wrap_xml_load_file(
474
-            \mod_bigbluebuttonbn\locallib\bigbluebutton::action_url('updateRecordings', ['recordID' => $id] + (array) $params)
474
+            \mod_bigbluebuttonbn\locallib\bigbluebutton::action_url('updateRecordings', ['recordID' => $id] + (array)$params)
475 475
           );
476 476
         if ($xml && $xml->returncode != 'SUCCESS') {
477 477
             return false;
@@ -536,7 +536,7 @@  discard block
 block discarded – undo
536 536
             return $xml;
537 537
         } catch (Exception $e) {
538 538
             libxml_use_internal_errors($previous);
539
-            $error = 'Caught exception: '.$e->getMessage();
539
+            $error = 'Caught exception: ' . $e->getMessage();
540 540
             debugging($error, DEBUG_DEVELOPER);
541 541
             return null;
542 542
         }
@@ -547,7 +547,7 @@  discard block
 block discarded – undo
547 547
         $response = simplexml_load_file($url, 'SimpleXMLElement', LIBXML_NOCDATA | LIBXML_NOBLANKS);
548 548
         return $response;
549 549
     } catch (Exception $e) {
550
-        $error = 'Caught exception: '.$e->getMessage();
550
+        $error = 'Caught exception: ' . $e->getMessage();
551 551
         debugging($error, DEBUG_DEVELOPER);
552 552
         libxml_use_internal_errors($previous);
553 553
         return null;
@@ -573,8 +573,8 @@  discard block
 block discarded – undo
573 573
         }
574 574
         $options = array();
575 575
         $options['CURLOPT_HTTPHEADER'] = array(
576
-                 'Content-Type: '.$contenttype,
577
-                 'Content-Length: '.strlen($data),
576
+                 'Content-Type: ' . $contenttype,
577
+                 'Content-Length: ' . strlen($data),
578 578
                  'Content-Language: en-US',
579 579
                );
580 580
 
@@ -595,7 +595,7 @@  discard block
 block discarded – undo
595 595
  * @return void
596 596
  */
597 597
 function bigbluebuttonbn_end_meeting_if_running($bigbluebuttonbn) {
598
-    $meetingid = $bigbluebuttonbn->meetingid.'-'.$bigbluebuttonbn->course.'-'.$bigbluebuttonbn->id;
598
+    $meetingid = $bigbluebuttonbn->meetingid . '-' . $bigbluebuttonbn->course . '-' . $bigbluebuttonbn->id;
599 599
     if (bigbluebuttonbn_is_meeting_running($meetingid)) {
600 600
         bigbluebuttonbn_end_meeting($meetingid, $bigbluebuttonbn->moderatorpass);
601 601
     }
@@ -615,9 +615,9 @@  discard block
 block discarded – undo
615 615
     if ($userroles) {
616 616
         $where = '';
617 617
         foreach ($userroles as $userrole) {
618
-            $where .= (empty($where) ? ' WHERE' : ' OR').' id=' . $userrole->roleid;
618
+            $where .= (empty($where) ? ' WHERE' : ' OR') . ' id=' . $userrole->roleid;
619 619
         }
620
-        $userroles = $DB->get_records_sql('SELECT * FROM {role}'.$where);
620
+        $userroles = $DB->get_records_sql('SELECT * FROM {role}' . $where);
621 621
     }
622 622
     return $userroles;
623 623
 }
@@ -640,7 +640,7 @@  discard block
 block discarded – undo
640 640
  * @return array $users
641 641
  */
642 642
 function bigbluebuttonbn_get_users(context $context = null) {
643
-    $users = (array) get_enrolled_users($context, '', 0, 'u.*', null, 0, 0, true);
643
+    $users = (array)get_enrolled_users($context, '', 0, 'u.*', null, 0, 0, true);
644 644
     foreach ($users as $key => $value) {
645 645
         $users[$key] = fullname($value);
646 646
     }
@@ -655,7 +655,7 @@  discard block
 block discarded – undo
655 655
  * @return array $users
656 656
  */
657 657
 function bigbluebuttonbn_get_users_select(context $context = null) {
658
-    $users = (array) get_enrolled_users($context, '', 0, 'u.*', null, 0, 0, true);
658
+    $users = (array)get_enrolled_users($context, '', 0, 'u.*', null, 0, 0, true);
659 659
     foreach ($users as $key => $value) {
660 660
         $users[$key] = array('id' => $value->id, 'name' => fullname($value));
661 661
     }
@@ -670,7 +670,7 @@  discard block
 block discarded – undo
670 670
  * @return array $roles
671 671
  */
672 672
 function bigbluebuttonbn_get_roles(context $context = null) {
673
-    $roles = (array) role_get_names($context);
673
+    $roles = (array)role_get_names($context);
674 674
     foreach ($roles as $key => $value) {
675 675
         $roles[$key] = $value->localname;
676 676
     }
@@ -685,7 +685,7 @@  discard block
 block discarded – undo
685 685
  * @return array $users
686 686
  */
687 687
 function bigbluebuttonbn_get_roles_select(context $context = null) {
688
-    $roles = (array) role_get_names($context);
688
+    $roles = (array)role_get_names($context);
689 689
     foreach ($roles as $key => $value) {
690 690
         $roles[$key] = array('id' => $value->id, 'name' => $value->localname);
691 691
     }
@@ -700,7 +700,7 @@  discard block
 block discarded – undo
700 700
  * @return object $role
701 701
  */
702 702
 function bigbluebuttonbn_get_role($id) {
703
-    $roles = (array) role_get_names();
703
+    $roles = (array)role_get_names();
704 704
     if (is_numeric($id) && isset($roles[$id])) {
705 705
         return (object)$roles[$id];
706 706
     }
@@ -857,7 +857,7 @@  discard block
 block discarded – undo
857 857
     if (!isguestuser()) {
858 858
         $userroles = bigbluebuttonbn_get_user_roles($context, $userid);
859 859
     }
860
-    return bigbluebuttonbn_is_moderator_validator($participantlist, $userid , $userroles);
860
+    return bigbluebuttonbn_is_moderator_validator($participantlist, $userid, $userroles);
861 861
 }
862 862
 
863 863
 /**
@@ -1057,7 +1057,7 @@  discard block
 block discarded – undo
1057 1057
 function bigbluebuttonbn_generate_nonce() {
1058 1058
     $mt = microtime();
1059 1059
     $rand = mt_rand();
1060
-    return md5($mt.$rand);
1060
+    return md5($mt . $rand);
1061 1061
 }
1062 1062
 
1063 1063
 /**
@@ -1147,10 +1147,10 @@  discard block
 block discarded – undo
1147 1147
     $now = time();
1148 1148
     if (!$updatecache && isset($result) && $now < ($result['creation_time'] + $cachettl)) {
1149 1149
         // Use the value in the cache.
1150
-        return (array) json_decode($result['meeting_info']);
1150
+        return (array)json_decode($result['meeting_info']);
1151 1151
     }
1152 1152
     // Ping again and refresh the cache.
1153
-    $meetinginfo = (array) bigbluebuttonbn_wrap_xml_load_file(
1153
+    $meetinginfo = (array)bigbluebuttonbn_wrap_xml_load_file(
1154 1154
         \mod_bigbluebuttonbn\locallib\bigbluebutton::action_url('getMeetingInfo', ['meetingID' => $meetingid])
1155 1155
       );
1156 1156
     $cache->set($meetingid, array('creation_time' => time(), 'meeting_info' => json_encode($meetinginfo)));
@@ -1261,7 +1261,7 @@  discard block
 block discarded – undo
1261 1261
  * @return object
1262 1262
  */
1263 1263
 function bigbluebuttonbn_set_config_xml($meetingid, $configxml) {
1264
-    $urldefaultconfig = \mod_bigbluebuttonbn\locallib\config::get('server_url').'api/setConfigXML?';
1264
+    $urldefaultconfig = \mod_bigbluebuttonbn\locallib\config::get('server_url') . 'api/setConfigXML?';
1265 1265
     $configxmlparams = bigbluebuttonbn_set_config_xml_params($meetingid, $configxml);
1266 1266
     $xml = bigbluebuttonbn_wrap_xml_load_file($urldefaultconfig, 'POST',
1267 1267
         $configxmlparams, 'application/x-www-form-urlencoded');
@@ -1277,8 +1277,8 @@  discard block
 block discarded – undo
1277 1277
  * @return string
1278 1278
  */
1279 1279
 function bigbluebuttonbn_set_config_xml_params($meetingid, $configxml) {
1280
-    $params = 'configXML='.urlencode($configxml).'&meetingID='.urlencode($meetingid);
1281
-    $configxmlparams = $params.'&checksum='.sha1('setConfigXML'.$params.\mod_bigbluebuttonbn\locallib\config::get('shared_secret'));
1280
+    $params = 'configXML=' . urlencode($configxml) . '&meetingID=' . urlencode($meetingid);
1281
+    $configxmlparams = $params . '&checksum=' . sha1('setConfigXML' . $params . \mod_bigbluebuttonbn\locallib\config::get('shared_secret'));
1282 1282
     return $configxmlparams;
1283 1283
 }
1284 1284
 
@@ -1292,7 +1292,7 @@  discard block
 block discarded – undo
1292 1292
  */
1293 1293
 function bigbluebuttonbn_set_config_xml_array($meetingid, $configxml) {
1294 1294
     $configxml = bigbluebuttonbn_setConfigXML($meetingid, $configxml);
1295
-    $configxmlarray = (array) $configxml;
1295
+    $configxmlarray = (array)$configxml;
1296 1296
     if ($configxmlarray['returncode'] != 'SUCCESS') {
1297 1297
         debugging('BigBlueButton was not able to set the custom config.xml file', DEBUG_DEVELOPER);
1298 1298
         return '';
@@ -1386,7 +1386,7 @@  discard block
 block discarded – undo
1386 1386
     global $USER;
1387 1387
     $starttime = $starttime - ($starttime % 1000);
1388 1388
     // Set formatted date.
1389
-    $dateformat = get_string('strftimerecentfull', 'langconfig').' %Z';
1389
+    $dateformat = get_string('strftimerecentfull', 'langconfig') . ' %Z';
1390 1390
     return userdate($starttime / 1000, $dateformat, usertimezone($USER->timezone));
1391 1391
 }
1392 1392
 
@@ -1502,7 +1502,7 @@  discard block
 block discarded – undo
1502 1502
  * @return string
1503 1503
  */
1504 1504
 function bigbluebuttonbn_get_recording_data_row_preview($recording) {
1505
-    $options = array('id' => 'preview-'.$recording['recordID']);
1505
+    $options = array('id' => 'preview-' . $recording['recordID']);
1506 1506
     if ($recording['published'] === 'false') {
1507 1507
         $options['hidden'] = 'hidden';
1508 1508
     }
@@ -1564,7 +1564,7 @@  discard block
 block discarded – undo
1564 1564
     if ($recording['published'] === 'false') {
1565 1565
         $visibility = 'hidden ';
1566 1566
     }
1567
-    $id = 'playbacks-'.$recording['recordID'];
1567
+    $id = 'playbacks-' . $recording['recordID'];
1568 1568
     $recordingtypes = html_writer::start_tag('div', array('id' => $id, 'data-imported' => $dataimported,
1569 1569
           'data-meetingid' => $recording['meetingID'], 'data-recordingid' => $recording['recordID'],
1570 1570
           'title' => $title, $visibility => $visibility));
@@ -1589,11 +1589,11 @@  discard block
 block discarded – undo
1589 1589
     if (!bigbluebuttonbn_include_recording_data_row_type($recording, $bbbsession, $playback)) {
1590 1590
         return '';
1591 1591
     }
1592
-    $text = get_string('view_recording_format_'.$playback['type'], 'bigbluebuttonbn');
1592
+    $text = get_string('view_recording_format_' . $playback['type'], 'bigbluebuttonbn');
1593 1593
     $href = $CFG->wwwroot . '/mod/bigbluebuttonbn/bbb_view.php?action=play&bn=' . $bbbsession['bigbluebuttonbn']->id .
1594
-      '&mid='.$recording['meetingID'] . '&rid=' . $recording['recordID'] . '&rtype=' . $playback['type'];
1594
+      '&mid=' . $recording['meetingID'] . '&rid=' . $recording['recordID'] . '&rtype=' . $playback['type'];
1595 1595
     if (!isset($recording['imported']) || !isset($recording['protected']) || $recording['protected'] === 'false') {
1596
-        $href .= '&href='.urlencode(trim($playback['url']));
1596
+        $href .= '&href=' . urlencode(trim($playback['url']));
1597 1597
     }
1598 1598
     $linkattributes = array(
1599 1599
         'id' => 'recording-play-' . $playback['type'] . '-' . $recording['recordID'],
@@ -1777,7 +1777,7 @@  discard block
 block discarded – undo
1777 1777
             $linkattributes['class'] = 'disabled';
1778 1778
             unset($linkattributes['onclick']);
1779 1779
         }
1780
-        $icon = new pix_icon('i/'.$data['tag'],
1780
+        $icon = new pix_icon('i/' . $data['tag'],
1781 1781
             get_string('view_recording_list_actionbar_' . $data['action'], 'bigbluebuttonbn'),
1782 1782
             'moodle', $iconattributes);
1783 1783
         return $OUTPUT->action_icon('#', $icon, null, $linkattributes, false);
@@ -1940,7 +1940,7 @@  discard block
 block discarded – undo
1940 1940
  */
1941 1941
 function bigbluebuttonbn_get_recording_table_row($bbbsession, $recording, $rowdata) {
1942 1942
     $row = new html_table_row();
1943
-    $row->id = 'recording-tr-'.$recording['recordID'];
1943
+    $row->id = 'recording-tr-' . $recording['recordID'];
1944 1944
     $row->attributes['data-imported'] = 'false';
1945 1945
     $texthead = '';
1946 1946
     $texttail = '';
@@ -1953,7 +1953,7 @@  discard block
 block discarded – undo
1953 1953
     $rowdata->date_formatted = str_replace(' ', '&nbsp;', $rowdata->date_formatted);
1954 1954
     $row->cells = array();
1955 1955
     $row->cells[] = $texthead . $rowdata->recording . $texttail;
1956
-    $row->cells[] = $texthead . $rowdata->meeting . $texttail;;
1956
+    $row->cells[] = $texthead . $rowdata->meeting . $texttail; ;
1957 1957
     $row->cells[] = $texthead . $rowdata->activity . $texttail;
1958 1958
     $row->cells[] = $texthead . $rowdata->description . $texttail;
1959 1959
     if (bigbluebuttonbn_get_recording_data_preview_enabled($bbbsession)) {
@@ -2001,9 +2001,9 @@  discard block
 block discarded – undo
2001 2001
 function bigbluebuttonbn_send_notification_recording_ready($bigbluebuttonbn) {
2002 2002
     $sender = get_admin();
2003 2003
     // Prepare message.
2004
-    $messagetext = '<p>'.get_string('email_body_recording_ready_for', 'bigbluebuttonbn').
2005
-        ' &quot;' . $bigbluebuttonbn->name . '&quot; '.
2006
-        get_string('email_body_recording_ready_is_ready', 'bigbluebuttonbn').'.</p>';
2004
+    $messagetext = '<p>' . get_string('email_body_recording_ready_for', 'bigbluebuttonbn') .
2005
+        ' &quot;' . $bigbluebuttonbn->name . '&quot; ' .
2006
+        get_string('email_body_recording_ready_is_ready', 'bigbluebuttonbn') . '.</p>';
2007 2007
     \mod_bigbluebuttonbn\locallib\notifier::notification_send($sender, $bigbluebuttonbn, $messagetext);
2008 2008
 }
2009 2009
 
@@ -2287,7 +2287,7 @@  discard block
 block discarded – undo
2287 2287
     }
2288 2288
     // Prepare select for loading records based on existent bigbluebuttonbns.
2289 2289
     $sql = 'SELECT DISTINCT meetingid, bigbluebuttonbnid FROM {bigbluebuttonbn_logs} WHERE ';
2290
-    $sql .= '(bigbluebuttonbnid='.implode(' OR bigbluebuttonbnid=', array_keys($bigbluebuttonbns)).')';
2290
+    $sql .= '(bigbluebuttonbnid=' . implode(' OR bigbluebuttonbnid=', array_keys($bigbluebuttonbns)) . ')';
2291 2291
     // Include only Create events and exclude those with record not true.
2292 2292
     $sql .= ' AND log = ? AND meta LIKE ? AND meta LIKE ?';
2293 2293
     // Execute select for loading records based on existent bigbluebuttonbns.
@@ -2471,8 +2471,8 @@  discard block
 block discarded – undo
2471 2471
 function bigbluebuttonbn_format_activity_time($time) {
2472 2472
     $activitytime = '';
2473 2473
     if ($time) {
2474
-        $activitytime = calendar_day_representation($time).' '.
2475
-          get_string('mod_form_field_notification_msg_at', 'bigbluebuttonbn').' '.
2474
+        $activitytime = calendar_day_representation($time) . ' ' .
2475
+          get_string('mod_form_field_notification_msg_at', 'bigbluebuttonbn') . ' ' .
2476 2476
           calendar_time_representation($time);
2477 2477
     }
2478 2478
     return $activitytime;
@@ -2931,7 +2931,7 @@  discard block
 block discarded – undo
2931 2931
  *
2932 2932
  * @return string
2933 2933
  */
2934
-function bigbluebuttonbn_render_warning($message, $type='info', $href='', $text='', $class='') {
2934
+function bigbluebuttonbn_render_warning($message, $type = 'info', $href = '', $text = '', $class = '') {
2935 2935
     global $OUTPUT;
2936 2936
     $output = "\n";
2937 2937
     // Evaluates if config_warning is enabled.
@@ -2970,11 +2970,11 @@  discard block
 block discarded – undo
2970 2970
     if ($class == '') {
2971 2971
         $class = 'btn btn-secondary';
2972 2972
     }
2973
-    $output  = '  <form method="post" action="' . $href . '" class="form-inline">'."\n";
2974
-    $output .= '      <button type="submit" class="' . $class . '"'."\n";
2975
-    $output .= '          title="' . $title . '"'."\n";
2976
-    $output .= '          >' . $text . '</button>'."\n";
2977
-    $output .= '  </form>'."\n";
2973
+    $output  = '  <form method="post" action="' . $href . '" class="form-inline">' . "\n";
2974
+    $output .= '      <button type="submit" class="' . $class . '"' . "\n";
2975
+    $output .= '          title="' . $title . '"' . "\n";
2976
+    $output .= '          >' . $text . '</button>' . "\n";
2977
+    $output .= '  </form>' . "\n";
2978 2978
     return $output;
2979 2979
 }
2980 2980
 
@@ -3139,7 +3139,7 @@  discard block
 block discarded – undo
3139 3139
     $bbbsession['modPW'] = $bbbsession['bigbluebuttonbn']->moderatorpass;
3140 3140
     $bbbsession['viewerPW'] = $bbbsession['bigbluebuttonbn']->viewerpass;
3141 3141
     // Database info related to the activity.
3142
-    $bbbsession['meetingid'] = $bbbsession['bigbluebuttonbn']->meetingid.'-'.$bbbsession['course']->id.'-'.
3142
+    $bbbsession['meetingid'] = $bbbsession['bigbluebuttonbn']->meetingid . '-' . $bbbsession['course']->id . '-' .
3143 3143
         $bbbsession['bigbluebuttonbn']->id;
3144 3144
     $bbbsession['meetingname'] = $bbbsession['bigbluebuttonbn']->name;
3145 3145
     $bbbsession['meetingdescription'] = $bbbsession['bigbluebuttonbn']->intro;
@@ -3171,10 +3171,10 @@  discard block
 block discarded – undo
3171 3171
     if ($bbbsession['bigbluebuttonbn']->record) {
3172 3172
         // Check if is enable record all from start.
3173 3173
         if ($bbbsession['recordallfromstart']) {
3174
-            $bbbsession['welcome'] .= '<br><br>'.get_string('bbbrecordallfromstartwarning',
3174
+            $bbbsession['welcome'] .= '<br><br>' . get_string('bbbrecordallfromstartwarning',
3175 3175
                     'bigbluebuttonbn');
3176 3176
         } else {
3177
-            $bbbsession['welcome'] .= '<br><br>'.get_string('bbbrecordwarning', 'bigbluebuttonbn');
3177
+            $bbbsession['welcome'] .= '<br><br>' . get_string('bbbrecordwarning', 'bigbluebuttonbn');
3178 3178
         }
3179 3179
     }
3180 3180
     $bbbsession['openingtime'] = $bbbsession['bigbluebuttonbn']->openingtime;
@@ -3189,7 +3189,7 @@  discard block
 block discarded – undo
3189 3189
     $bbbsession['originServerName'] = $parsedurl['host'];
3190 3190
     $bbbsession['originServerUrl'] = $CFG->wwwroot;
3191 3191
     $bbbsession['originServerCommonName'] = '';
3192
-    $bbbsession['originTag'] = 'moodle-mod_bigbluebuttonbn ('.get_config('mod_bigbluebuttonbn', 'version').')';
3192
+    $bbbsession['originTag'] = 'moodle-mod_bigbluebuttonbn (' . get_config('mod_bigbluebuttonbn', 'version') . ')';
3193 3193
     $bbbsession['bnserver'] = bigbluebuttonbn_is_bn_server();
3194 3194
     // Setting for clienttype, assign flash if not enabled, or default if not editable.
3195 3195
     $bbbsession['clienttype'] = BIGBLUEBUTTON_CLIENTTYPE_FLASH;
@@ -3251,7 +3251,7 @@  discard block
 block discarded – undo
3251 3251
     );
3252 3252
 
3253 3253
     // Check status and set extra values.
3254
-    $activitystatus = bigbluebuttonbn_view_get_activity_status($bbbsession);  // In locallib.
3254
+    $activitystatus = bigbluebuttonbn_view_get_activity_status($bbbsession); // In locallib.
3255 3255
     if ($activitystatus == 'ended') {
3256 3256
         $bbbsession['presentation'] = bigbluebuttonbn_get_presentation_array(
3257 3257
             $bbbsession['context'], $bbbsession['bigbluebuttonbn']->presentation);
Please login to merge, or discard this patch.
Indentation   +60 added lines, -60 removed lines patch added patch discarded remove patch
@@ -104,9 +104,9 @@  discard block
 block discarded – undo
104 104
 function bigbluebuttonbn_get_join_url($meetingid, $username, $pw, $logouturl, $configtoken = null,
105 105
         $userid = null, $clienttype = BIGBLUEBUTTON_CLIENTTYPE_FLASH) {
106 106
     $data = ['meetingID' => $meetingid,
107
-              'fullName' => $username,
108
-              'password' => $pw,
109
-              'logoutURL' => $logouturl,
107
+                'fullName' => $username,
108
+                'password' => $pw,
109
+                'logoutURL' => $logouturl,
110 110
             ];
111 111
     // Choose between Adobe Flash or HTML5 Client.
112 112
     if ( $clienttype == BIGBLUEBUTTON_CLIENTTYPE_HTML5 ) {
@@ -162,23 +162,23 @@  discard block
 block discarded – undo
162 162
 function bigbluebuttonbn_get_meeting_info_array($meetingid) {
163 163
     $xml = bigbluebuttonbn_wrap_xml_load_file(
164 164
         \mod_bigbluebuttonbn\locallib\bigbluebutton::action_url('getMeetingInfo', ['meetingID' => $meetingid])
165
-      );
165
+        );
166 166
     if ($xml && $xml->returncode == 'SUCCESS' && empty($xml->messageKey)) {
167 167
         // Meeting info was returned.
168 168
         return array('returncode' => $xml->returncode,
169
-                     'meetingID' => $xml->meetingID,
170
-                     'moderatorPW' => $xml->moderatorPW,
171
-                     'attendeePW' => $xml->attendeePW,
172
-                     'hasBeenForciblyEnded' => $xml->hasBeenForciblyEnded,
173
-                     'running' => $xml->running,
174
-                     'recording' => $xml->recording,
175
-                     'startTime' => $xml->startTime,
176
-                     'endTime' => $xml->endTime,
177
-                     'participantCount' => $xml->participantCount,
178
-                     'moderatorCount' => $xml->moderatorCount,
179
-                     'attendees' => $xml->attendees,
180
-                     'metadata' => $xml->metadata,
181
-                   );
169
+                        'meetingID' => $xml->meetingID,
170
+                        'moderatorPW' => $xml->moderatorPW,
171
+                        'attendeePW' => $xml->attendeePW,
172
+                        'hasBeenForciblyEnded' => $xml->hasBeenForciblyEnded,
173
+                        'running' => $xml->running,
174
+                        'recording' => $xml->recording,
175
+                        'startTime' => $xml->startTime,
176
+                        'endTime' => $xml->endTime,
177
+                        'participantCount' => $xml->participantCount,
178
+                        'moderatorCount' => $xml->moderatorCount,
179
+                        'attendees' => $xml->attendees,
180
+                        'metadata' => $xml->metadata,
181
+                    );
182 182
     }
183 183
     if ($xml) {
184 184
         // Either failure or success without meeting info.
@@ -330,7 +330,7 @@  discard block
 block discarded – undo
330 330
 function bigbluebuttonbn_get_default_config_xml() {
331 331
     $xml = bigbluebuttonbn_wrap_xml_load_file(
332 332
         \mod_bigbluebuttonbn\locallib\bigbluebutton::action_url('getDefaultConfigXML')
333
-      );
333
+        );
334 334
     return $xml;
335 335
 }
336 336
 
@@ -434,7 +434,7 @@  discard block
 block discarded – undo
434 434
     foreach ($ids as $id) {
435 435
         $xml = bigbluebuttonbn_wrap_xml_load_file(
436 436
             \mod_bigbluebuttonbn\locallib\bigbluebutton::action_url('deleteRecordings', ['recordID' => $id])
437
-          );
437
+            );
438 438
         if ($xml && $xml->returncode != 'SUCCESS') {
439 439
             return false;
440 440
         }
@@ -453,7 +453,7 @@  discard block
 block discarded – undo
453 453
     foreach ($ids as $id) {
454 454
         $xml = bigbluebuttonbn_wrap_xml_load_file(
455 455
             \mod_bigbluebuttonbn\locallib\bigbluebutton::action_url('publishRecordings', ['recordID' => $id, 'publish' => $publish])
456
-          );
456
+            );
457 457
         if ($xml && $xml->returncode != 'SUCCESS') {
458 458
             return false;
459 459
         }
@@ -472,7 +472,7 @@  discard block
 block discarded – undo
472 472
     foreach ($ids as $id) {
473 473
         $xml = bigbluebuttonbn_wrap_xml_load_file(
474 474
             \mod_bigbluebuttonbn\locallib\bigbluebutton::action_url('updateRecordings', ['recordID' => $id] + (array) $params)
475
-          );
475
+            );
476 476
         if ($xml && $xml->returncode != 'SUCCESS') {
477 477
             return false;
478 478
         }
@@ -489,7 +489,7 @@  discard block
 block discarded – undo
489 489
 function bigbluebuttonbn_end_meeting($meetingid, $modpw) {
490 490
     $xml = bigbluebuttonbn_wrap_xml_load_file(
491 491
         \mod_bigbluebuttonbn\locallib\bigbluebutton::action_url('end', ['meetingID' => $meetingid, 'password' => $modpw])
492
-      );
492
+        );
493 493
     if ($xml) {
494 494
         // If the xml packet returned failure it displays the message to the user.
495 495
         return array('returncode' => $xml->returncode, 'message' => $xml->message, 'messageKey' => $xml->messageKey);
@@ -506,7 +506,7 @@  discard block
 block discarded – undo
506 506
 function bigbluebuttonbn_get_server_version() {
507 507
     $xml = bigbluebuttonbn_wrap_xml_load_file(
508 508
         \mod_bigbluebuttonbn\locallib\bigbluebutton::action_url()
509
-      );
509
+        );
510 510
     if ($xml && $xml->returncode == 'SUCCESS') {
511 511
         return $xml->version;
512 512
     }
@@ -573,10 +573,10 @@  discard block
 block discarded – undo
573 573
         }
574 574
         $options = array();
575 575
         $options['CURLOPT_HTTPHEADER'] = array(
576
-                 'Content-Type: '.$contenttype,
577
-                 'Content-Length: '.strlen($data),
578
-                 'Content-Language: en-US',
579
-               );
576
+                    'Content-Type: '.$contenttype,
577
+                    'Content-Length: '.strlen($data),
578
+                    'Content-Language: en-US',
579
+                );
580 580
 
581 581
         return $c->post($url, $data, $options);
582 582
     }
@@ -723,16 +723,16 @@  discard block
 block discarded – undo
723 723
         'all' => array(
724 724
             'name' => get_string('mod_form_field_participant_list_type_all', 'bigbluebuttonbn'),
725 725
             'children' => []
726
-          )
727
-      );
726
+            )
727
+        );
728 728
     $data['role'] = array(
729 729
         'name' => get_string('mod_form_field_participant_list_type_role', 'bigbluebuttonbn'),
730 730
         'children' => bigbluebuttonbn_get_roles_select($context)
731
-      );
731
+        );
732 732
     $data['user'] = array(
733 733
         'name' => get_string('mod_form_field_participant_list_type_user', 'bigbluebuttonbn'),
734 734
         'children' => bigbluebuttonbn_get_users_select($context)
735
-      );
735
+        );
736 736
     return $data;
737 737
 }
738 738
 
@@ -775,7 +775,7 @@  discard block
 block discarded – undo
775 775
         'selectiontype' => 'all',
776 776
         'selectionid' => 'all',
777 777
         'role' => BIGBLUEBUTTONBN_ROLE_VIEWER
778
-      );
778
+        );
779 779
     $defaultrules = explode(',', \mod_bigbluebuttonbn\locallib\config::get('participant_moderator_default'));
780 780
     foreach ($defaultrules as $defaultrule) {
781 781
         if ($defaultrule == '0') {
@@ -788,9 +788,9 @@  discard block
 block discarded – undo
788 788
             continue;
789 789
         }
790 790
         $participantlist[] = array(
791
-              'selectiontype' => 'role',
792
-              'selectionid' => $defaultrule,
793
-              'role' => BIGBLUEBUTTONBN_ROLE_MODERATOR);
791
+                'selectiontype' => 'role',
792
+                'selectionid' => $defaultrule,
793
+                'role' => BIGBLUEBUTTONBN_ROLE_MODERATOR);
794 794
     }
795 795
     return $participantlist;
796 796
 }
@@ -829,11 +829,11 @@  discard block
 block discarded – undo
829 829
             'all' => get_string('mod_form_field_participant_list_type_all', 'bigbluebuttonbn'),
830 830
             'role' => get_string('mod_form_field_participant_list_type_role', 'bigbluebuttonbn'),
831 831
             'user' => get_string('mod_form_field_participant_list_type_user', 'bigbluebuttonbn'),
832
-          ],
832
+            ],
833 833
         'type_selected' => 'all',
834 834
         'options' => ['all' => '---------------'],
835 835
         'selected' => 'all',
836
-      ];
836
+        ];
837 837
 }
838 838
 
839 839
 /**
@@ -1152,7 +1152,7 @@  discard block
 block discarded – undo
1152 1152
     // Ping again and refresh the cache.
1153 1153
     $meetinginfo = (array) bigbluebuttonbn_wrap_xml_load_file(
1154 1154
         \mod_bigbluebuttonbn\locallib\bigbluebutton::action_url('getMeetingInfo', ['meetingID' => $meetingid])
1155
-      );
1155
+        );
1156 1156
     $cache->set($meetingid, array('creation_time' => time(), 'meeting_info' => json_encode($meetinginfo)));
1157 1157
     return $meetinginfo;
1158 1158
 }
@@ -1566,8 +1566,8 @@  discard block
 block discarded – undo
1566 1566
     }
1567 1567
     $id = 'playbacks-'.$recording['recordID'];
1568 1568
     $recordingtypes = html_writer::start_tag('div', array('id' => $id, 'data-imported' => $dataimported,
1569
-          'data-meetingid' => $recording['meetingID'], 'data-recordingid' => $recording['recordID'],
1570
-          'title' => $title, $visibility => $visibility));
1569
+            'data-meetingid' => $recording['meetingID'], 'data-recordingid' => $recording['recordID'],
1570
+            'title' => $title, $visibility => $visibility));
1571 1571
     foreach ($recording['playbacks'] as $playback) {
1572 1572
         $recordingtypes .= bigbluebuttonbn_get_recording_data_row_type($recording, $bbbsession, $playback);
1573 1573
     }
@@ -1591,7 +1591,7 @@  discard block
 block discarded – undo
1591 1591
     }
1592 1592
     $text = get_string('view_recording_format_'.$playback['type'], 'bigbluebuttonbn');
1593 1593
     $href = $CFG->wwwroot . '/mod/bigbluebuttonbn/bbb_view.php?action=play&bn=' . $bbbsession['bigbluebuttonbn']->id .
1594
-      '&mid='.$recording['meetingID'] . '&rid=' . $recording['recordID'] . '&rtype=' . $playback['type'];
1594
+        '&mid='.$recording['meetingID'] . '&rid=' . $recording['recordID'] . '&rtype=' . $playback['type'];
1595 1595
     if (!isset($recording['imported']) || !isset($recording['protected']) || $recording['protected'] === 'false') {
1596 1596
         $href .= '&href='.urlencode(trim($playback['url']));
1597 1597
     }
@@ -1602,7 +1602,7 @@  discard block
 block discarded – undo
1602 1602
         'data-action' => 'play',
1603 1603
         'data-target' => $playback['type'],
1604 1604
         'data-href' => $href,
1605
-      );
1605
+        );
1606 1606
     if (!bigbluebuttonbn_is_bn_server() && !bigbluebuttonbn_is_valid_resource(trim($playback['url']))) {
1607 1607
         $linkattributes['class'] = 'btn btn-sm btn-warning';
1608 1608
         $linkattributes['title'] = get_string('view_recording_format_errror_unreachable', 'bigbluebuttonbn');
@@ -1767,10 +1767,10 @@  discard block
 block discarded – undo
1767 1767
             'id' => $id,
1768 1768
             'onclick' => $onclick,
1769 1769
             'data-action' => $data['action']
1770
-          );
1770
+            );
1771 1771
         if (!isset($recording['imported'])) {
1772 1772
             $linkattributes['data-links'] = bigbluebuttonbn_count_recording_imported_instances(
1773
-              $recording['recordID']);
1773
+                $recording['recordID']);
1774 1774
         }
1775 1775
         if (isset($data['disabled'])) {
1776 1776
             $iconattributes['class'] .= ' fa-' . $data['disabled'];
@@ -2377,17 +2377,17 @@  discard block
 block discarded – undo
2377 2377
 function bigbluebuttonbn_get_instance_type_profiles() {
2378 2378
     $instanceprofiles = array(
2379 2379
         BIGBLUEBUTTONBN_TYPE_ALL => array('id' => BIGBLUEBUTTONBN_TYPE_ALL,
2380
-                  'name' => get_string('instance_type_default', 'bigbluebuttonbn'),
2381
-                  'features' => array('all')),
2380
+                    'name' => get_string('instance_type_default', 'bigbluebuttonbn'),
2381
+                    'features' => array('all')),
2382 2382
         BIGBLUEBUTTONBN_TYPE_ROOM_ONLY => array('id' => BIGBLUEBUTTONBN_TYPE_ROOM_ONLY,
2383
-                  'name' => get_string('instance_type_room_only', 'bigbluebuttonbn'),
2384
-                  'features' => array('showroom', 'welcomemessage', 'voicebridge', 'waitformoderator', 'userlimit',
2385
-                      'recording', 'sendnotifications', 'preuploadpresentation', 'permissions', 'schedule', 'groups',
2386
-                      'modstandardelshdr', 'availabilityconditionsheader', 'tagshdr', 'competenciessection',
2387
-                      'clienttype', 'completionattendance')),
2383
+                    'name' => get_string('instance_type_room_only', 'bigbluebuttonbn'),
2384
+                    'features' => array('showroom', 'welcomemessage', 'voicebridge', 'waitformoderator', 'userlimit',
2385
+                        'recording', 'sendnotifications', 'preuploadpresentation', 'permissions', 'schedule', 'groups',
2386
+                        'modstandardelshdr', 'availabilityconditionsheader', 'tagshdr', 'competenciessection',
2387
+                        'clienttype', 'completionattendance')),
2388 2388
         BIGBLUEBUTTONBN_TYPE_RECORDING_ONLY => array('id' => BIGBLUEBUTTONBN_TYPE_RECORDING_ONLY,
2389
-                  'name' => get_string('instance_type_recording_only', 'bigbluebuttonbn'),
2390
-                  'features' => array('showrecordings', 'importrecordings'))
2389
+                    'name' => get_string('instance_type_recording_only', 'bigbluebuttonbn'),
2390
+                    'features' => array('showrecordings', 'importrecordings'))
2391 2391
     );
2392 2392
     return $instanceprofiles;
2393 2393
 }
@@ -2474,8 +2474,8 @@  discard block
 block discarded – undo
2474 2474
     $activitytime = '';
2475 2475
     if ($time) {
2476 2476
         $activitytime = calendar_day_representation($time).' '.
2477
-          get_string('mod_form_field_notification_msg_at', 'bigbluebuttonbn').' '.
2478
-          calendar_time_representation($time);
2477
+            get_string('mod_form_field_notification_msg_at', 'bigbluebuttonbn').' '.
2478
+            calendar_time_representation($time);
2479 2479
     }
2480 2480
     return $activitytime;
2481 2481
 }
@@ -2794,7 +2794,7 @@  discard block
 block discarded – undo
2794 2794
         $renderer->render_group_element('participant_moderator_default',
2795 2795
             $renderer->render_group_element_configmultiselect('participant_moderator_default',
2796 2796
                 array_keys($owner), array_merge($owner, $roles))
2797
-          );
2797
+            );
2798 2798
     }
2799 2799
 }
2800 2800
 
@@ -2830,7 +2830,7 @@  discard block
 block discarded – undo
2830 2830
         // Web Client default.
2831 2831
         $default = intval((int)\mod_bigbluebuttonbn\locallib\config::get('clienttype_default'));
2832 2832
         $choices = array(BIGBLUEBUTTON_CLIENTTYPE_FLASH => get_string('mod_form_block_clienttype_flash', 'bigbluebuttonbn'),
2833
-                         BIGBLUEBUTTON_CLIENTTYPE_HTML5 => get_string('mod_form_block_clienttype_html5', 'bigbluebuttonbn'));
2833
+                            BIGBLUEBUTTON_CLIENTTYPE_HTML5 => get_string('mod_form_block_clienttype_html5', 'bigbluebuttonbn'));
2834 2834
         $renderer->render_group_element('clienttype_default',
2835 2835
             $renderer->render_group_element_configselect('clienttype_default',
2836 2836
                 $default, $choices));
@@ -2941,7 +2941,7 @@  discard block
 block discarded – undo
2941 2941
         return $output;
2942 2942
     }
2943 2943
     $output .= $OUTPUT->box_start('box boxalignleft adminerror alert alert-' . $type . ' alert-block fade in',
2944
-      'bigbluebuttonbn_view_general_warning') . "\n";
2944
+        'bigbluebuttonbn_view_general_warning') . "\n";
2945 2945
     $output .= '    ' . $message . "\n";
2946 2946
     $output .= '  <div class="singlebutton pull-right">' . "\n";
2947 2947
     if (!empty($href)) {
@@ -3294,8 +3294,8 @@  discard block
 block discarded – undo
3294 3294
             array(
3295 3295
                 'email' => array('"' . fullname($USER) . '" <' . $USER->email . '>'),
3296 3296
                 'context' => $bbbsession['bigbluebuttonbnURL']
3297
-              )
3298
-          );
3297
+                )
3298
+            );
3299 3299
     }
3300 3300
     if ((boolean)\mod_bigbluebuttonbn\locallib\config::get('recordingready_enabled')) {
3301 3301
         $metadata['bn-recording-ready-url'] = $bbbsession['recordingReadyURL'];
Please login to merge, or discard this patch.
brokerlib.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -208,7 +208,7 @@  discard block
 block discarded – undo
208 208
 function bigbluebuttonbn_broker_recording_info_current($recording, $params) {
209 209
     $callbackresponse['status'] = true;
210 210
     $callbackresponse['found'] = true;
211
-    $callbackresponse['published'] = (string) $recording['published'];
211
+    $callbackresponse['published'] = (string)$recording['published'];
212 212
     if (!isset($params['meta']) || empty($params['meta'])) {
213 213
         return $callbackresponse;
214 214
     }
@@ -535,8 +535,8 @@  discard block
 block discarded – undo
535 535
         $decodedparameters = \Firebase\JWT\JWT::decode($params['signed_parameters'],
536 536
             \mod_bigbluebuttonbn\locallib\config::get('shared_secret'), array('HS256'));
537 537
     } catch (Exception $e) {
538
-        $error = 'Caught exception: '.$e->getMessage();
539
-        header('HTTP/1.0 400 Bad Request. '.$error);
538
+        $error = 'Caught exception: ' . $e->getMessage();
539
+        header('HTTP/1.0 400 Bad Request. ' . $error);
540 540
         return;
541 541
     }
542 542
     // Validate that the bigbluebuttonbn activity corresponds to the meeting_id received.
@@ -566,8 +566,8 @@  discard block
 block discarded – undo
566 566
         bigbluebuttonbn_log($bigbluebuttonbn, BIGBLUEBUTTON_LOG_EVENT_CALLBACK, $overrides, json_encode($meta));
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
 
@@ -588,13 +588,13 @@  discard block
 block discarded – undo
588 588
     $importrecordings = $SESSION->bigbluebuttonbn_importrecordings;
589 589
     if (!isset($importrecordings[$params['id']])) {
590 590
         $error = "Recording {$params['id']} could not be found. It can not be imported";
591
-        header('HTTP/1.0 404 Not found. '.$error);
591
+        header('HTTP/1.0 404 Not found. ' . $error);
592 592
         return;
593 593
     }
594 594
     $callbackresponse = array('status' => true);
595 595
     $importrecordings[$params['id']]['imported'] = true;
596 596
     $overrides = array('meetingid' => $importrecordings[$params['id']]['meetingID']);
597
-    $meta = '{"recording":'.json_encode($importrecordings[$params['id']]).'}';
597
+    $meta = '{"recording":' . json_encode($importrecordings[$params['id']]) . '}';
598 598
     bigbluebuttonbn_log($bbbsession['bigbluebuttonbn'], BIGBLUEBUTTONBN_LOG_EVENT_IMPORT, $overrides, $meta);
599 599
     // Moodle event logger: Create an event for recording imported.
600 600
     if (isset($bbbsession['bigbluebutton']) && isset($bbbsession['cm'])) {
@@ -682,7 +682,7 @@  discard block
 block discarded – undo
682 682
     $action = strtolower($params['action']);
683 683
     $requiredparams = bigbluebuttonbn_broker_required_parameters();
684 684
     if (!array_key_exists($action, $requiredparams)) {
685
-        return 'Action '.$params['action'].' can not be performed.';
685
+        return 'Action ' . $params['action'] . ' can not be performed.';
686 686
     }
687 687
     return bigbluebuttonbn_broker_validate_parameters_message($params, $requiredparams[$action]);
688 688
 }
Please login to merge, or discard this patch.
classes/locallib/config.php 1 patch
Indentation   +38 added lines, -38 removed lines patch added patch discarded remove patch
@@ -170,43 +170,43 @@
 block discarded – undo
170 170
      */
171 171
     public static function get_options() {
172 172
         return array(
173
-               'version_major' => self::get_moodle_version_major(),
174
-               'voicebridge_editable' => self::get('voicebridge_editable'),
175
-               'importrecordings_enabled' => self::get('importrecordings_enabled'),
176
-               'importrecordings_from_deleted_enabled' => self::get('importrecordings_from_deleted_enabled'),
177
-               'waitformoderator_default' => self::get('waitformoderator_default'),
178
-               'waitformoderator_editable' => self::get('waitformoderator_editable'),
179
-               'userlimit_default' => self::get('userlimit_default'),
180
-               'userlimit_editable' => self::get('userlimit_editable'),
181
-               'preuploadpresentation_enabled' => self::get('preuploadpresentation_enabled'),
182
-               'sendnotifications_enabled' => self::get('sendnotifications_enabled'),
183
-               'recordings_enabled' => self::get('recordings_enabled'),
184
-               'meetingevents_enabled' => self::get('meetingevents_enabled'),
185
-               'recordings_html_default' => self::get('recordings_html_default'),
186
-               'recordings_html_editable' => self::get('recordings_html_editable'),
187
-               'recordings_deleted_default' => self::get('recordings_deleted_default'),
188
-               'recordings_deleted_editable' => self::get('recordings_deleted_editable'),
189
-               'recordings_imported_default' => self::get('recordings_imported_default'),
190
-               'recordings_imported_editable' => self::get('recordings_imported_editable'),
191
-               'recordings_preview_default' => self::get('recordings_preview_default'),
192
-               'recordings_preview_editable' => self::get('recordings_preview_editable'),
193
-               'recording_default' => self::get('recording_default'),
194
-               'recording_editable' => self::get('recording_editable'),
195
-               'recording_icons_enabled' => self::get('recording_icons_enabled'),
196
-               'recording_all_from_start_default' => self::get('recording_all_from_start_default'),
197
-               'recording_all_from_start_editable' => self::get('recording_all_from_start_editable'),
198
-               'recording_hide_button_default' => self::get('recording_hide_button_default'),
199
-               'recording_hide_button_editable' => self::get('recording_hide_button_editable'),
200
-               'general_warning_message' => self::get('general_warning_message'),
201
-               'general_warning_box_type' => self::get('general_warning_box_type'),
202
-               'general_warning_button_text' => self::get('general_warning_button_text'),
203
-               'general_warning_button_href' => self::get('general_warning_button_href'),
204
-               'general_warning_button_class' => self::get('general_warning_button_class'),
205
-               'clienttype_enabled' => self::get('clienttype_enabled'),
206
-               'clienttype_editable' => self::get('clienttype_editable'),
207
-               'clienttype_default' => self::get('clienttype_default'),
208
-               'muteonstart_editable' => self::get('muteonstart_editable'),
209
-               'muteonstart_default' => self::get('muteonstart_default'),
210
-          );
173
+                'version_major' => self::get_moodle_version_major(),
174
+                'voicebridge_editable' => self::get('voicebridge_editable'),
175
+                'importrecordings_enabled' => self::get('importrecordings_enabled'),
176
+                'importrecordings_from_deleted_enabled' => self::get('importrecordings_from_deleted_enabled'),
177
+                'waitformoderator_default' => self::get('waitformoderator_default'),
178
+                'waitformoderator_editable' => self::get('waitformoderator_editable'),
179
+                'userlimit_default' => self::get('userlimit_default'),
180
+                'userlimit_editable' => self::get('userlimit_editable'),
181
+                'preuploadpresentation_enabled' => self::get('preuploadpresentation_enabled'),
182
+                'sendnotifications_enabled' => self::get('sendnotifications_enabled'),
183
+                'recordings_enabled' => self::get('recordings_enabled'),
184
+                'meetingevents_enabled' => self::get('meetingevents_enabled'),
185
+                'recordings_html_default' => self::get('recordings_html_default'),
186
+                'recordings_html_editable' => self::get('recordings_html_editable'),
187
+                'recordings_deleted_default' => self::get('recordings_deleted_default'),
188
+                'recordings_deleted_editable' => self::get('recordings_deleted_editable'),
189
+                'recordings_imported_default' => self::get('recordings_imported_default'),
190
+                'recordings_imported_editable' => self::get('recordings_imported_editable'),
191
+                'recordings_preview_default' => self::get('recordings_preview_default'),
192
+                'recordings_preview_editable' => self::get('recordings_preview_editable'),
193
+                'recording_default' => self::get('recording_default'),
194
+                'recording_editable' => self::get('recording_editable'),
195
+                'recording_icons_enabled' => self::get('recording_icons_enabled'),
196
+                'recording_all_from_start_default' => self::get('recording_all_from_start_default'),
197
+                'recording_all_from_start_editable' => self::get('recording_all_from_start_editable'),
198
+                'recording_hide_button_default' => self::get('recording_hide_button_default'),
199
+                'recording_hide_button_editable' => self::get('recording_hide_button_editable'),
200
+                'general_warning_message' => self::get('general_warning_message'),
201
+                'general_warning_box_type' => self::get('general_warning_box_type'),
202
+                'general_warning_button_text' => self::get('general_warning_button_text'),
203
+                'general_warning_button_href' => self::get('general_warning_button_href'),
204
+                'general_warning_button_class' => self::get('general_warning_button_class'),
205
+                'clienttype_enabled' => self::get('clienttype_enabled'),
206
+                'clienttype_editable' => self::get('clienttype_editable'),
207
+                'clienttype_default' => self::get('clienttype_default'),
208
+                'muteonstart_editable' => self::get('muteonstart_editable'),
209
+                'muteonstart_default' => self::get('muteonstart_default'),
210
+            );
211 211
     }
212 212
 }
Please login to merge, or discard this patch.