Completed
Pull Request — master (#170)
by
unknown
01:47
created
lib.php 3 patches
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.
Indentation   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -64,7 +64,7 @@  discard block
 block discarded – undo
64 64
  * Remove this block when restored
65 65
  */
66 66
 
67
- /** @var BIGBLUEBUTTONBN_DEFAULT_SERVER_URL string of default bigbluebutton server url */
67
+    /** @var BIGBLUEBUTTONBN_DEFAULT_SERVER_URL string of default bigbluebutton server url */
68 68
 const BIGBLUEBUTTONBN_DEFAULT_SERVER_URL = 'http://test-install.blindsidenetworks.com/bigbluebutton/';
69 69
 /** @var BIGBLUEBUTTONBN_DEFAULT_SHARED_SECRET string of default bigbluebutton server shared secret */
70 70
 const BIGBLUEBUTTONBN_DEFAULT_SHARED_SECRET = '8cd8ef52e8e101574e400365b55e11a6';
@@ -375,7 +375,7 @@  discard block
 block discarded – undo
375 375
     $sql = "SELECT COUNT(*) FROM {bigbluebuttonbn_logs} ";
376 376
     $sql .= "WHERE courseid = ? AND bigbluebuttonbnid = ? AND userid = ? AND (log = ? OR log = ?)";
377 377
     $result = $DB->count_records_sql($sql, array($course->id, $bigbluebuttonbn->id, $user->id,
378
-                                              BIGBLUEBUTTONBN_LOG_EVENT_JOIN, BIGBLUEBUTTONBN_LOG_EVENT_PLAYED));
378
+                                                BIGBLUEBUTTONBN_LOG_EVENT_JOIN, BIGBLUEBUTTONBN_LOG_EVENT_PLAYED));
379 379
     return $result;
380 380
 }
381 381
 
@@ -620,12 +620,12 @@  discard block
 block discarded – undo
620 620
     $str  = '<div class="bigbluebuttonbn overview">'."\n";
621 621
     $str .= '  <div class="name">'.get_string('modulename', 'bigbluebuttonbn').':&nbsp;'."\n";
622 622
     $str .= '    <a '.$classes.'href="'.$CFG->wwwroot.'/mod/bigbluebuttonbn/view.php?id='.$bigbluebuttonbn->coursemodule.
623
-      '">'.$bigbluebuttonbn->name.'</a>'."\n";
623
+        '">'.$bigbluebuttonbn->name.'</a>'."\n";
624 624
     $str .= '  </div>'."\n";
625 625
     $str .= '  <div class="info">'.get_string($start, 'bigbluebuttonbn').': '.userdate($bigbluebuttonbn->openingtime).
626 626
         '</div>'."\n";
627 627
     $str .= '  <div class="info">'.get_string('ends_at', 'bigbluebuttonbn').': '.userdate($bigbluebuttonbn->closingtime)
628
-      .'</div>'."\n";
628
+        .'</div>'."\n";
629 629
     $str .= '</div>'."\n";
630 630
     return $str;
631 631
 }
@@ -877,7 +877,7 @@  discard block
 block discarded – undo
877 877
             'bigbluebuttonbn',
878 878
             $bigbluebuttonbn->id,
879 879
             $bigbluebuttonbn->completionexpected
880
-          );
880
+            );
881 881
     }
882 882
 }
883 883
 
Please login to merge, or discard this patch.
Spacing   +42 added lines, -42 removed lines patch added patch discarded remove patch
@@ -28,22 +28,22 @@  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.'/tag/lib.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.'/enrollib.php');
38
-require_once($CFG->libdir.'/filelib.php');
39
-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 . '/tag/lib.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 . '/enrollib.php');
38
+require_once($CFG->libdir . '/filelib.php');
39
+require_once($CFG->libdir . '/formslib.php');
40 40
 
41 41
 // JWT is included in Moodle 3.7 core, but a local package is still needed for backward compatibility.
42 42
 if (!class_exists('\Firebase\JWT\JWT')) {
43
-    if (file_exists($CFG->libdir.'/php-jwt/src/JWT.php')) {
44
-        require_once($CFG->libdir.'/php-jwt/src/JWT.php');
43
+    if (file_exists($CFG->libdir . '/php-jwt/src/JWT.php')) {
44
+        require_once($CFG->libdir . '/php-jwt/src/JWT.php');
45 45
     } else {
46
-        require_once($CFG->dirroot.'/mod/bigbluebuttonbn/vendor/firebase/php-jwt/src/JWT.php');
46
+        require_once($CFG->dirroot . '/mod/bigbluebuttonbn/vendor/firebase/php-jwt/src/JWT.php');
47 47
     }
48 48
 }
49 49
 
@@ -51,8 +51,8 @@  discard block
 block discarded – undo
51 51
     $CFG->bigbluebuttonbn = array();
52 52
 }
53 53
 
54
-if (file_exists(dirname(__FILE__).'/config.php')) {
55
-    require_once(dirname(__FILE__).'/config.php');
54
+if (file_exists(dirname(__FILE__) . '/config.php')) {
55
+    require_once(dirname(__FILE__) . '/config.php');
56 56
 }
57 57
 
58 58
 /*
@@ -109,19 +109,19 @@  discard block
 block discarded – undo
109 109
         return null;
110 110
     }
111 111
     $features = array(
112
-        (string) FEATURE_IDNUMBER => true,
113
-        (string) FEATURE_GROUPS => true,
114
-        (string) FEATURE_GROUPINGS => true,
115
-        (string) FEATURE_GROUPMEMBERSONLY => true,
116
-        (string) FEATURE_MOD_INTRO => true,
117
-        (string) FEATURE_BACKUP_MOODLE2 => true,
118
-        (string) FEATURE_COMPLETION_TRACKS_VIEWS => true,
119
-        (string) FEATURE_COMPLETION_HAS_RULES => true,
120
-        (string) FEATURE_GRADE_HAS_GRADE => false,
121
-        (string) FEATURE_GRADE_OUTCOMES => false,
122
-        (string) FEATURE_SHOW_DESCRIPTION => true,
112
+        (string)FEATURE_IDNUMBER => true,
113
+        (string)FEATURE_GROUPS => true,
114
+        (string)FEATURE_GROUPINGS => true,
115
+        (string)FEATURE_GROUPMEMBERSONLY => true,
116
+        (string)FEATURE_MOD_INTRO => true,
117
+        (string)FEATURE_BACKUP_MOODLE2 => true,
118
+        (string)FEATURE_COMPLETION_TRACKS_VIEWS => true,
119
+        (string)FEATURE_COMPLETION_HAS_RULES => true,
120
+        (string)FEATURE_GRADE_HAS_GRADE => false,
121
+        (string)FEATURE_GRADE_OUTCOMES => false,
122
+        (string)FEATURE_SHOW_DESCRIPTION => true,
123 123
     );
124
-    if (isset($features[(string) $feature])) {
124
+    if (isset($features[(string)$feature])) {
125 125
         return $features[$feature];
126 126
     }
127 127
     return null;
@@ -314,7 +314,7 @@  discard block
 block discarded – undo
314 314
 function bigbluebuttonbn_delete_instance_log($bigbluebuttonbn) {
315 315
     global $DB;
316 316
     $sql  = "SELECT * FROM {bigbluebuttonbn_logs} ";
317
-    $sql .= "WHERE bigbluebuttonbnid = ? AND log = ? AND ". $DB->sql_compare_text('meta') . " = ?";
317
+    $sql .= "WHERE bigbluebuttonbnid = ? AND log = ? AND " . $DB->sql_compare_text('meta') . " = ?";
318 318
     $logs = $DB->get_records_sql($sql, array($bigbluebuttonbn->id, BIGBLUEBUTTONBN_LOG_EVENT_CREATE, "{\"record\":true}"));
319 319
     $meta = "{\"has_recordings\":" . empty($logs) ? "true" : "false" . "}";
320 320
     bigbluebuttonbn_log($bigbluebuttonbn, BIGBLUEBUTTONBN_LOG_EVENT_DELETE, [], $meta);
@@ -335,7 +335,7 @@  discard block
 block discarded – undo
335 335
 function bigbluebuttonbn_user_outline($course, $user, $mod, $bigbluebuttonbn) {
336 336
     if ($completed = bigbluebuttonbn_user_complete($course, $user, $bigbluebuttonbn)) {
337 337
         return fullname($user) . ' ' . get_string('view_message_has_joined', 'bigbluebuttonbn') . ' ' .
338
-            get_string('view_message_session_for', 'bigbluebuttonbn') . ' ' . (string) $completed . ' ' .
338
+            get_string('view_message_session_for', 'bigbluebuttonbn') . ' ' . (string)$completed . ' ' .
339 339
             get_string('view_message_times', 'bigbluebuttonbn');
340 340
     }
341 341
     return '';
@@ -526,7 +526,7 @@  discard block
 block discarded – undo
526 526
  * @return array status array
527 527
  */
528 528
 function bigbluebuttonbn_reset_recordings($courseid) {
529
-    require_once(__DIR__.'/locallib.php');
529
+    require_once(__DIR__ . '/locallib.php');
530 530
     // Criteria for search [courseid | bigbluebuttonbn=null | subset=false | includedeleted=true].
531 531
     $recordings = bigbluebuttonbn_get_recordings($courseid, null, false, true);
532 532
     // Remove all the recordings.
@@ -594,16 +594,16 @@  discard block
 block discarded – undo
594 594
     if ($bigbluebuttonbn->visible) {
595 595
         $classes = 'class="dimmed" ';
596 596
     }
597
-    $str  = '<div class="bigbluebuttonbn overview">'."\n";
598
-    $str .= '  <div class="name">'.get_string('modulename', 'bigbluebuttonbn').':&nbsp;'."\n";
599
-    $str .= '    <a '.$classes.'href="'.$CFG->wwwroot.'/mod/bigbluebuttonbn/view.php?id='.$bigbluebuttonbn->coursemodule.
600
-      '">'.$bigbluebuttonbn->name.'</a>'."\n";
601
-    $str .= '  </div>'."\n";
602
-    $str .= '  <div class="info">'.get_string($start, 'bigbluebuttonbn').': '.userdate($bigbluebuttonbn->openingtime).
603
-        '</div>'."\n";
604
-    $str .= '  <div class="info">'.get_string('ends_at', 'bigbluebuttonbn').': '.userdate($bigbluebuttonbn->closingtime)
605
-      .'</div>'."\n";
606
-    $str .= '</div>'."\n";
597
+    $str  = '<div class="bigbluebuttonbn overview">' . "\n";
598
+    $str .= '  <div class="name">' . get_string('modulename', 'bigbluebuttonbn') . ':&nbsp;' . "\n";
599
+    $str .= '    <a ' . $classes . 'href="' . $CFG->wwwroot . '/mod/bigbluebuttonbn/view.php?id=' . $bigbluebuttonbn->coursemodule .
600
+      '">' . $bigbluebuttonbn->name . '</a>' . "\n";
601
+    $str .= '  </div>' . "\n";
602
+    $str .= '  <div class="info">' . get_string($start, 'bigbluebuttonbn') . ': ' . userdate($bigbluebuttonbn->openingtime) .
603
+        '</div>' . "\n";
604
+    $str .= '  <div class="info">' . get_string('ends_at', 'bigbluebuttonbn') . ': ' . userdate($bigbluebuttonbn->closingtime)
605
+      .'</div>' . "\n";
606
+    $str .= '</div>' . "\n";
607 607
     return $str;
608 608
 }
609 609
 
@@ -691,7 +691,7 @@  discard block
 block discarded – undo
691 691
  * @return void
692 692
  **/
693 693
 function bigbluebuttonbn_process_pre_save_instance(&$bigbluebuttonbn) {
694
-    require_once(__DIR__.'/locallib.php');
694
+    require_once(__DIR__ . '/locallib.php');
695 695
     $bigbluebuttonbn->timemodified = time();
696 696
     if ((integer)$bigbluebuttonbn->instance == 0) {
697 697
         $bigbluebuttonbn->meetingid = 0;
@@ -879,7 +879,7 @@  discard block
 block discarded – undo
879 879
     if (count($files) == 1) {
880 880
         // Get the first (and only) file.
881 881
         $file = reset($files);
882
-        $filesrc = '/'.$file->get_filename();
882
+        $filesrc = '/' . $file->get_filename();
883 883
     }
884 884
     return $filesrc;
885 885
 }
@@ -948,7 +948,7 @@  discard block
 block discarded – undo
948 948
     if (!$filename) {
949 949
         return false;
950 950
     }
951
-    $fullpath = "/$context->id/mod_bigbluebuttonbn/$filearea/0/".$filename;
951
+    $fullpath = "/$context->id/mod_bigbluebuttonbn/$filearea/0/" . $filename;
952 952
     $fs = get_file_storage();
953 953
     $file = $fs->get_file_by_hash(sha1($fullpath));
954 954
     if (!$file || $file->is_directory()) {
Please login to merge, or discard this patch.
bbb_ajax.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -23,9 +23,9 @@  discard block
 block discarded – undo
23 23
  * @author    Jesus Federico  (jesus [at] blindsidenetworks [dt] com)
24 24
  */
25 25
 
26
-require(__DIR__.'/../../config.php');
27
-require_once(__DIR__.'/locallib.php');
28
-require_once(__DIR__.'/brokerlib.php');
26
+require(__DIR__ . '/../../config.php');
27
+require_once(__DIR__ . '/locallib.php');
28
+require_once(__DIR__ . '/brokerlib.php');
29 29
 
30 30
 global $PAGE, $USER, $CFG, $SESSION, $DB;
31 31
 
@@ -41,13 +41,13 @@  discard block
 block discarded – undo
41 41
 require_login(null, true);
42 42
 
43 43
 if (empty($params['action'])) {
44
-    header('HTTP/1.0 400 Bad Request. Parameter ['.$params['action'].'] was not included');
44
+    header('HTTP/1.0 400 Bad Request. Parameter [' . $params['action'] . '] was not included');
45 45
     return;
46 46
 }
47 47
 
48 48
 $error = bigbluebuttonbn_broker_validate_parameters($params);
49 49
 if (!empty($error)) {
50
-    header('HTTP/1.0 400 Bad Request. '.$error);
50
+    header('HTTP/1.0 400 Bad Request. ' . $error);
51 51
     return;
52 52
 }
53 53
 
@@ -126,7 +126,7 @@  discard block
 block discarded – undo
126 126
         echo $completionvalidate;
127 127
         return;
128 128
     }
129
-    header('HTTP/1.0 400 Bad request. The action '. $a . ' doesn\'t exist');
129
+    header('HTTP/1.0 400 Bad request. The action ' . $a . ' doesn\'t exist');
130 130
 } catch (Exception $e) {
131
-    header('HTTP/1.0 500 Internal Server Error. '.$e->getMessage());
131
+    header('HTTP/1.0 500 Internal Server Error. ' . $e->getMessage());
132 132
 }
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
     }
@@ -559,8 +559,8 @@  discard block
 block discarded – undo
559 559
             array('HS256')
560 560
         );
561 561
     } catch (Exception $e) {
562
-        $error = 'Caught exception: '.$e->getMessage();
563
-        header('HTTP/1.0 400 Bad Request. '.$error);
562
+        $error = 'Caught exception: ' . $e->getMessage();
563
+        header('HTTP/1.0 400 Bad Request. ' . $error);
564 564
         return;
565 565
     }
566 566
     // Validate that the bigbluebuttonbn activity corresponds to the meeting_id received.
@@ -590,8 +590,8 @@  discard block
 block discarded – undo
590 590
         bigbluebuttonbn_log($bigbluebuttonbn, BIGBLUEBUTTON_LOG_EVENT_CALLBACK, $overrides, json_encode($meta));
591 591
         header('HTTP/1.0 202 Accepted');
592 592
     } catch (Exception $e) {
593
-        $error = 'Caught exception: '.$e->getMessage();
594
-        header('HTTP/1.0 503 Service Unavailable. '.$error);
593
+        $error = 'Caught exception: ' . $e->getMessage();
594
+        header('HTTP/1.0 503 Service Unavailable. ' . $error);
595 595
     }
596 596
 }
597 597
 
@@ -612,13 +612,13 @@  discard block
 block discarded – undo
612 612
     $importrecordings = $SESSION->bigbluebuttonbn_importrecordings;
613 613
     if (!isset($importrecordings[$params['id']])) {
614 614
         $error = "Recording {$params['id']} could not be found. It can not be imported";
615
-        header('HTTP/1.0 404 Not found. '.$error);
615
+        header('HTTP/1.0 404 Not found. ' . $error);
616 616
         return;
617 617
     }
618 618
     $callbackresponse = array('status' => true);
619 619
     $importrecordings[$params['id']]['imported'] = true;
620 620
     $overrides = array('meetingid' => $importrecordings[$params['id']]['meetingID']);
621
-    $meta = '{"recording":'.json_encode($importrecordings[$params['id']]).'}';
621
+    $meta = '{"recording":' . json_encode($importrecordings[$params['id']]) . '}';
622 622
     bigbluebuttonbn_log($bbbsession['bigbluebuttonbn'], BIGBLUEBUTTONBN_LOG_EVENT_IMPORT, $overrides, $meta);
623 623
     // Moodle event logger: Create an event for recording imported.
624 624
     if (isset($bbbsession['bigbluebutton']) && isset($bbbsession['cm'])) {
@@ -712,7 +712,7 @@  discard block
 block discarded – undo
712 712
     $action = strtolower($params['action']);
713 713
     $requiredparams = bigbluebuttonbn_broker_required_parameters();
714 714
     if (!array_key_exists($action, $requiredparams)) {
715
-        return 'Action '.$params['action'].' can not be performed.';
715
+        return 'Action ' . $params['action'] . ' can not be performed.';
716 716
     }
717 717
     return bigbluebuttonbn_broker_validate_parameters_message($params, $requiredparams[$action]);
718 718
 }
Please login to merge, or discard this patch.
classes/locallib/notifier.php 2 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -111,7 +111,7 @@
 block discarded – undo
111 111
      *
112 112
      * @param object $bigbluebuttonbn
113 113
      *
114
-     * @return void
114
+     * @return string
115 115
      */
116 116
     public static function htmlmsg_recording_ready($bigbluebuttonbn) {
117 117
         return '<p>'.get_string('email_body_recording_ready_for', 'bigbluebuttonbn').
Please login to merge, or discard this patch.
Spacing   +28 added lines, -28 removed lines patch added patch discarded remove patch
@@ -44,29 +44,29 @@  discard block
 block discarded – undo
44 44
      * @return string
45 45
      */
46 46
     public static function htmlmsg_instance_updated($msg) {
47
-        $messagetext = '<p>'.$msg->activity_type.' "'.$msg->activity_title.'" '.
48
-            get_string('email_body_notification_meeting_has_been', 'bigbluebuttonbn').' '.$msg->action.'.</p>'."\n";
49
-        $messagetext .= '<p><b>'.$msg->activity_title.'</b> '.
50
-            get_string('email_body_notification_meeting_details', 'bigbluebuttonbn').':'."\n";
51
-        $messagetext .= '<table border="0" style="margin: 5px 0 0 20px"><tbody>'."\n";
52
-        $messagetext .= '<tr><td style="font-weight:bold;color:#555;">'.
53
-            get_string('email_body_notification_meeting_title', 'bigbluebuttonbn').': </td><td>'."\n";
54
-        $messagetext .= $msg->activity_title.'</td></tr>'."\n";
55
-        $messagetext .= '<tr><td style="font-weight:bold;color:#555;">'.
56
-            get_string('email_body_notification_meeting_description', 'bigbluebuttonbn').': </td><td>'."\n";
57
-        $messagetext .= $msg->activity_description.'</td></tr>'."\n";
58
-        $messagetext .= '<tr><td style="font-weight:bold;color:#555;">'.
59
-            get_string('email_body_notification_meeting_start_date', 'bigbluebuttonbn').': </td><td>'."\n";
60
-        $messagetext .= $msg->activity_openingtime.'</td></tr>'."\n";
61
-        $messagetext .= '<tr><td style="font-weight:bold;color:#555;">'.
62
-            get_string('email_body_notification_meeting_end_date', 'bigbluebuttonbn').': </td><td>'."\n";
63
-        $messagetext .= $msg->activity_closingtime.'</td></tr>'."\n";
64
-        $messagetext .= '<tr><td style="font-weight:bold;color:#555;">'.$msg->action.' '.
65
-            get_string('email_body_notification_meeting_by', 'bigbluebuttonbn').': </td><td>'."\n";
66
-        $messagetext .= $msg->activity_owner.'</td></tr></tbody></table></p>'."\n";
67
-        $messagetext .= '<p><hr/><br/>'.get_string('email_footer_sent_by', 'bigbluebuttonbn').' '.
68
-            $msg->user_name.'('.$msg->user_email.') ';
69
-        $messagetext .= get_string('email_footer_sent_from', 'bigbluebuttonbn').' '.$msg->course_name.'.</p>';
47
+        $messagetext = '<p>' . $msg->activity_type . ' "' . $msg->activity_title . '" ' .
48
+            get_string('email_body_notification_meeting_has_been', 'bigbluebuttonbn') . ' ' . $msg->action . '.</p>' . "\n";
49
+        $messagetext .= '<p><b>' . $msg->activity_title . '</b> ' .
50
+            get_string('email_body_notification_meeting_details', 'bigbluebuttonbn') . ':' . "\n";
51
+        $messagetext .= '<table border="0" style="margin: 5px 0 0 20px"><tbody>' . "\n";
52
+        $messagetext .= '<tr><td style="font-weight:bold;color:#555;">' .
53
+            get_string('email_body_notification_meeting_title', 'bigbluebuttonbn') . ': </td><td>' . "\n";
54
+        $messagetext .= $msg->activity_title . '</td></tr>' . "\n";
55
+        $messagetext .= '<tr><td style="font-weight:bold;color:#555;">' .
56
+            get_string('email_body_notification_meeting_description', 'bigbluebuttonbn') . ': </td><td>' . "\n";
57
+        $messagetext .= $msg->activity_description . '</td></tr>' . "\n";
58
+        $messagetext .= '<tr><td style="font-weight:bold;color:#555;">' .
59
+            get_string('email_body_notification_meeting_start_date', 'bigbluebuttonbn') . ': </td><td>' . "\n";
60
+        $messagetext .= $msg->activity_openingtime . '</td></tr>' . "\n";
61
+        $messagetext .= '<tr><td style="font-weight:bold;color:#555;">' .
62
+            get_string('email_body_notification_meeting_end_date', 'bigbluebuttonbn') . ': </td><td>' . "\n";
63
+        $messagetext .= $msg->activity_closingtime . '</td></tr>' . "\n";
64
+        $messagetext .= '<tr><td style="font-weight:bold;color:#555;">' . $msg->action . ' ' .
65
+            get_string('email_body_notification_meeting_by', 'bigbluebuttonbn') . ': </td><td>' . "\n";
66
+        $messagetext .= $msg->activity_owner . '</td></tr></tbody></table></p>' . "\n";
67
+        $messagetext .= '<p><hr/><br/>' . get_string('email_footer_sent_by', 'bigbluebuttonbn') . ' ' .
68
+            $msg->user_name . '(' . $msg->user_email . ') ';
69
+        $messagetext .= get_string('email_footer_sent_from', 'bigbluebuttonbn') . ' ' . $msg->course_name . '.</p>';
70 70
         return $messagetext;
71 71
     }
72 72
 
@@ -83,7 +83,7 @@  discard block
 block discarded – undo
83 83
         $course = $coursemodinfo->get_course($bigbluebuttonbn->course);
84 84
         $sender = $USER;
85 85
         // Prepare message.
86
-        $msg = (object) array();
86
+        $msg = (object)array();
87 87
         // Build the message_body.
88 88
         $msg->action = $action;
89 89
         $msg->activity_type = '';
@@ -114,9 +114,9 @@  discard block
 block discarded – undo
114 114
      * @return void
115 115
      */
116 116
     public static function htmlmsg_recording_ready($bigbluebuttonbn) {
117
-        return '<p>'.get_string('email_body_recording_ready_for', 'bigbluebuttonbn').
118
-            ' &quot;' . $bigbluebuttonbn->name . '&quot; '.
119
-            get_string('email_body_recording_ready_is_ready', 'bigbluebuttonbn').'.</p>';
117
+        return '<p>' . get_string('email_body_recording_ready_for', 'bigbluebuttonbn') .
118
+            ' &quot;' . $bigbluebuttonbn->name . '&quot; ' .
119
+            get_string('email_body_recording_ready_is_ready', 'bigbluebuttonbn') . '.</p>';
120 120
     }
121 121
 
122 122
     /**
@@ -158,7 +158,7 @@  discard block
 block discarded – undo
158 158
                     // Enqueue it.
159 159
                     \core\task\manager::queue_adhoc_task($task);
160 160
                 } catch (Exception $e) {
161
-                    mtrace("Error while enqueuing completion_uopdate_state task. " . (string) $e);
161
+                    mtrace("Error while enqueuing completion_uopdate_state task. " . (string)$e);
162 162
                 }
163 163
             }
164 164
         }
Please login to merge, or discard this patch.
locallib.php 2 patches
Doc Comments   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -317,7 +317,7 @@  discard block
 block discarded – undo
317 317
  * Helper function to retrieve imported recordings from the Moodle database.
318 318
  * The references are stored as events in bigbluebuttonbn_logs.
319 319
  *
320
- * @param string $courseid
320
+ * @param integer $courseid
321 321
  * @param string $bigbluebuttonbnid
322 322
  * @param bool $subset
323 323
  *
@@ -345,7 +345,7 @@  discard block
 block discarded – undo
345 345
 /**
346 346
  * Helper function to retrive the default config.xml file.
347 347
  *
348
- * @return string
348
+ * @return null|SimpleXMLElement
349 349
  */
350 350
 function bigbluebuttonbn_get_default_config_xml() {
351 351
     $xml = bigbluebuttonbn_wrap_xml_load_file(
@@ -427,7 +427,7 @@  discard block
 block discarded – undo
427 427
  * @param object $a
428 428
  * @param object $b
429 429
  *
430
- * @return array
430
+ * @return integer
431 431
  */
432 432
 function bigbluebuttonbn_recording_build_sorter($a, $b) {
433 433
     global $CFG;
@@ -542,7 +542,7 @@  discard block
 block discarded – undo
542 542
  * @param string $data
543 543
  * @param string $contenttype
544 544
  *
545
- * @return object
545
+ * @return null|SimpleXMLElement
546 546
  */
547 547
 function bigbluebuttonbn_wrap_xml_load_file($url, $method = 'GET', $data = null, $contenttype = 'text/xml') {
548 548
     if (extension_loaded('curl')) {
@@ -583,7 +583,7 @@  discard block
 block discarded – undo
583 583
  * @param string $data
584 584
  * @param string $contenttype
585 585
  *
586
- * @return object
586
+ * @return string
587 587
  */
588 588
 function bigbluebuttonbn_wrap_xml_load_file_curl_request($url, $method = 'GET', $data = null, $contenttype = 'text/xml') {
589 589
     $c = new curl();
@@ -956,7 +956,7 @@  discard block
 block discarded – undo
956 956
  * @param integer $instance
957 957
  * @param integer $voicebridge
958 958
  *
959
- * @return string
959
+ * @return boolean
960 960
  */
961 961
 function bigbluebuttonbn_voicebridge_unique($instance, $voicebridge) {
962 962
     global $DB;
@@ -1304,7 +1304,7 @@  discard block
 block discarded – undo
1304 1304
  * @param string $meetingid
1305 1305
  * @param string $configxml
1306 1306
  *
1307
- * @return object
1307
+ * @return null|SimpleXMLElement
1308 1308
  */
1309 1309
 function bigbluebuttonbn_set_config_xml($meetingid, $configxml) {
1310 1310
     $urldefaultconfig = \mod_bigbluebuttonbn\locallib\config::get('server_url') . 'api/setConfigXML?';
@@ -1358,7 +1358,7 @@  discard block
 block discarded – undo
1358 1358
  * @param array $recording
1359 1359
  * @param array $tools
1360 1360
  *
1361
- * @return array
1361
+ * @return null|stdClass
1362 1362
  */
1363 1363
 function bigbluebuttonbn_get_recording_data_row($bbbsession, $recording, $tools = ['protect', 'publish', 'delete']) {
1364 1364
     if (!bigbluebuttonbn_include_recording_table_row($bbbsession, $recording)) {
@@ -2010,7 +2010,7 @@  discard block
 block discarded – undo
2010 2010
  *
2011 2011
  * @param array $bbbsession
2012 2012
  * @param array $recording
2013
- * @param object $rowdata
2013
+ * @param stdClass $rowdata
2014 2014
  *
2015 2015
  * @return object
2016 2016
  */
@@ -2205,7 +2205,7 @@  discard block
 block discarded – undo
2205 2205
  *
2206 2206
  * @param array $bbbsession
2207 2207
  * @param array $recordings
2208
- * @param array $tools
2208
+ * @param string[] $tools
2209 2209
  *
2210 2210
  * @return array
2211 2211
  */
@@ -2286,7 +2286,7 @@  discard block
 block discarded – undo
2286 2286
  * Helper function to define the sql used for gattering the bigbluebuttonbnids whose meetingids should be included
2287 2287
  * in the getRecordings request considering only those that belong to deleted activities.
2288 2288
  *
2289
- * @param string $courseid
2289
+ * @param integer $courseid
2290 2290
  * @param string $bigbluebuttonbnid
2291 2291
  * @param bool $subset
2292 2292
  *
@@ -2310,7 +2310,7 @@  discard block
 block discarded – undo
2310 2310
  * Helper function to define the sql used for gattering the bigbluebuttonbnids whose meetingids should be included
2311 2311
  * in the getRecordings request considering only those that belong to imported recordings.
2312 2312
  *
2313
- * @param string $courseid
2313
+ * @param integer $courseid
2314 2314
  * @param string $bigbluebuttonbnid
2315 2315
  * @param bool $subset
2316 2316
  *
@@ -2333,7 +2333,7 @@  discard block
 block discarded – undo
2333 2333
 /**
2334 2334
  * Helper function to get recordings and imported recordings together.
2335 2335
  *
2336
- * @param string $courseid
2336
+ * @param integer $courseid
2337 2337
  * @param string $bigbluebuttonbnid
2338 2338
  * @param bool $subset
2339 2339
  * @param bool $includedeleted
@@ -2351,7 +2351,7 @@  discard block
 block discarded – undo
2351 2351
  * Helper function to retrieve recordings from the BigBlueButton. The references are stored as events
2352 2352
  * in bigbluebuttonbn_logs.
2353 2353
  *
2354
- * @param string $courseid
2354
+ * @param integer $courseid
2355 2355
  * @param string $bigbluebuttonbnid
2356 2356
  * @param bool $subset
2357 2357
  * @param bool $includedeleted
Please login to merge, or discard this patch.
Spacing   +54 added lines, -54 removed lines patch added patch discarded remove patch
@@ -190,7 +190,7 @@  discard block
 block discarded – undo
190 190
     }
191 191
     if ($xml) {
192 192
         // Either failure or success without meeting info.
193
-        return (array) $xml;
193
+        return (array)$xml;
194 194
     }
195 195
     // If the server is unreachable, then prompts the user of the necessary action.
196 196
     return array('returncode' => 'FAILED', 'message' => 'unreachable', 'messageKey' => 'Server is unreachable');
@@ -279,7 +279,7 @@  discard block
 block discarded – undo
279 279
                 foreach ($recordingxml->breakoutRooms->breakoutRoom as $breakoutroom) {
280 280
                     $url = \mod_bigbluebuttonbn\locallib\bigbluebutton::action_url(
281 281
                             'getRecordings',
282
-                            ['recordID' => implode(',', (array) $breakoutroom)]
282
+                            ['recordID' => implode(',', (array)$breakoutroom)]
283 283
                     );
284 284
                     $xml = bigbluebuttonbn_wrap_xml_load_file($url);
285 285
                     if ($xml && $xml->returncode == 'SUCCESS' && isset($xml->recordings)) {
@@ -335,7 +335,7 @@  discard block
 block discarded – undo
335 335
         // Override imported flag with actual ID.
336 336
         $recording['imported'] = $recordimported->id;
337 337
         if (isset($recordimported->protected)) {
338
-            $recording['protected'] = (string) $recordimported->protected;
338
+            $recording['protected'] = (string)$recordimported->protected;
339 339
         }
340 340
         $recordsimportedarray[$recording['recordID']] = $recording;
341 341
     }
@@ -365,21 +365,21 @@  discard block
 block discarded – undo
365 365
     // Add formats.
366 366
     $playbackarray = array();
367 367
     foreach ($recording->playback->format as $format) {
368
-        $playbackarray[(string) $format->type] = array('type' => (string) $format->type,
369
-                'url' => trim((string) $format->url), 'length' => (string) $format->length);
368
+        $playbackarray[(string)$format->type] = array('type' => (string)$format->type,
369
+                'url' => trim((string)$format->url), 'length' => (string)$format->length);
370 370
         // Add preview per format when existing.
371 371
         if ($format->preview) {
372
-            $playbackarray[(string) $format->type]['preview'] = bigbluebuttonbn_get_recording_preview_images($format->preview);
372
+            $playbackarray[(string)$format->type]['preview'] = bigbluebuttonbn_get_recording_preview_images($format->preview);
373 373
         }
374 374
     }
375 375
     // Add the metadata to the recordings array.
376 376
     $metadataarray = bigbluebuttonbn_get_recording_array_meta(get_object_vars($recording->metadata));
377
-    $recordingarray = array('recordID' => (string) $recording->recordID,
378
-            'meetingID' => (string) $recording->meetingID, 'meetingName' => (string) $recording->name,
379
-            'published' => (string) $recording->published, 'startTime' => (string) $recording->startTime,
380
-            'endTime' => (string) $recording->endTime, 'playbacks' => $playbackarray);
377
+    $recordingarray = array('recordID' => (string)$recording->recordID,
378
+            'meetingID' => (string)$recording->meetingID, 'meetingName' => (string)$recording->name,
379
+            'published' => (string)$recording->published, 'startTime' => (string)$recording->startTime,
380
+            'endTime' => (string)$recording->endTime, 'playbacks' => $playbackarray);
381 381
     if (isset($recording->protected)) {
382
-        $recordingarray['protected'] = (string) $recording->protected;
382
+        $recordingarray['protected'] = (string)$recording->protected;
383 383
     }
384 384
     return $recordingarray + $metadataarray;
385 385
 }
@@ -394,9 +394,9 @@  discard block
 block discarded – undo
394 394
 function bigbluebuttonbn_get_recording_preview_images($preview) {
395 395
     $imagesarray = array();
396 396
     foreach ($preview->images->image as $image) {
397
-        $imagearray = array('url' => trim((string) $image));
397
+        $imagearray = array('url' => trim((string)$image));
398 398
         foreach ($image->attributes() as $attkey => $attvalue) {
399
-            $imagearray[$attkey] = (string) $attvalue;
399
+            $imagearray[$attkey] = (string)$attvalue;
400 400
         }
401 401
         array_push($imagesarray, $imagearray);
402 402
     }
@@ -492,7 +492,7 @@  discard block
 block discarded – undo
492 492
     $ids = explode(',', $recordids);
493 493
     foreach ($ids as $id) {
494 494
         $xml = bigbluebuttonbn_wrap_xml_load_file(
495
-                \mod_bigbluebuttonbn\locallib\bigbluebutton::action_url('updateRecordings', ['recordID' => $id] + (array) $params)
495
+                \mod_bigbluebuttonbn\locallib\bigbluebutton::action_url('updateRecordings', ['recordID' => $id] + (array)$params)
496 496
         );
497 497
         if ($xml && $xml->returncode != 'SUCCESS') {
498 498
             return false;
@@ -661,7 +661,7 @@  discard block
 block discarded – undo
661 661
  * @return array $users
662 662
  */
663 663
 function bigbluebuttonbn_get_users(context $context = null) {
664
-    $users = (array) get_enrolled_users($context, '', 0, 'u.*', null, 0, 0, true);
664
+    $users = (array)get_enrolled_users($context, '', 0, 'u.*', null, 0, 0, true);
665 665
     foreach ($users as $key => $value) {
666 666
         $users[$key] = fullname($value);
667 667
     }
@@ -676,7 +676,7 @@  discard block
 block discarded – undo
676 676
  * @return array $users
677 677
  */
678 678
 function bigbluebuttonbn_get_users_select(context $context = null) {
679
-    $users = (array) get_enrolled_users($context, '', 0, 'u.*', null, 0, 0, true);
679
+    $users = (array)get_enrolled_users($context, '', 0, 'u.*', null, 0, 0, true);
680 680
     foreach ($users as $key => $value) {
681 681
         $users[$key] = array('id' => $value->id, 'name' => fullname($value));
682 682
     }
@@ -691,7 +691,7 @@  discard block
 block discarded – undo
691 691
  * @return array $roles
692 692
  */
693 693
 function bigbluebuttonbn_get_roles(context $context = null) {
694
-    $roles = (array) role_get_names($context);
694
+    $roles = (array)role_get_names($context);
695 695
     foreach ($roles as $key => $value) {
696 696
         $roles[$key] = $value->localname;
697 697
     }
@@ -706,7 +706,7 @@  discard block
 block discarded – undo
706 706
  * @return array $users
707 707
  */
708 708
 function bigbluebuttonbn_get_roles_select(context $context = null) {
709
-    $roles = (array) role_get_names($context);
709
+    $roles = (array)role_get_names($context);
710 710
     foreach ($roles as $key => $value) {
711 711
         $roles[$key] = array('id' => $value->id, 'name' => $value->localname);
712 712
     }
@@ -721,9 +721,9 @@  discard block
 block discarded – undo
721 721
  * @return object $role
722 722
  */
723 723
 function bigbluebuttonbn_get_role($id) {
724
-    $roles = (array) role_get_names();
724
+    $roles = (array)role_get_names();
725 725
     if (is_numeric($id) && isset($roles[$id])) {
726
-        return (object) $roles[$id];
726
+        return (object)$roles[$id];
727 727
     }
728 728
     foreach ($roles as $role) {
729 729
         if ($role->shortname == $id) {
@@ -803,7 +803,7 @@  discard block
 block discarded – undo
803 803
             if (!empty($ownerid) && is_enrolled($context, $ownerid)) {
804 804
                 $participantlist[] = array(
805 805
                         'selectiontype' => 'user',
806
-                        'selectionid' => (string) $ownerid,
806
+                        'selectionid' => (string)$ownerid,
807 807
                         'role' => BIGBLUEBUTTONBN_ROLE_MODERATOR);
808 808
             }
809 809
             continue;
@@ -985,7 +985,7 @@  discard block
 block discarded – undo
985 985
     $now = time();
986 986
     if ($closingtime > 0 && $now < $closingtime) {
987 987
         $duration = ceil(($closingtime - $now) / 60);
988
-        $compensationtime = intval((int) \mod_bigbluebuttonbn\locallib\config::get('scheduled_duration_compensation'));
988
+        $compensationtime = intval((int)\mod_bigbluebuttonbn\locallib\config::get('scheduled_duration_compensation'));
989 989
         $duration = intval($duration) + $compensationtime;
990 990
     }
991 991
     return $duration;
@@ -1187,16 +1187,16 @@  discard block
 block discarded – undo
1187 1187
  * @return array
1188 1188
  */
1189 1189
 function bigbluebuttonbn_get_meeting_info($meetingid, $updatecache = false) {
1190
-    $cachettl = (int) \mod_bigbluebuttonbn\locallib\config::get('waitformoderator_cache_ttl');
1190
+    $cachettl = (int)\mod_bigbluebuttonbn\locallib\config::get('waitformoderator_cache_ttl');
1191 1191
     $cache = cache::make_from_params(cache_store::MODE_APPLICATION, 'mod_bigbluebuttonbn', 'meetings_cache');
1192 1192
     $result = $cache->get($meetingid);
1193 1193
     $now = time();
1194 1194
     if (!$updatecache && isset($result) && $now < ($result['creation_time'] + $cachettl)) {
1195 1195
         // Use the value in the cache.
1196
-        return (array) json_decode($result['meeting_info']);
1196
+        return (array)json_decode($result['meeting_info']);
1197 1197
     }
1198 1198
     // Ping again and refresh the cache.
1199
-    $meetinginfo = (array) bigbluebuttonbn_wrap_xml_load_file(
1199
+    $meetinginfo = (array)bigbluebuttonbn_wrap_xml_load_file(
1200 1200
             \mod_bigbluebuttonbn\locallib\bigbluebutton::action_url('getMeetingInfo', ['meetingID' => $meetingid])
1201 1201
     );
1202 1202
     $cache->set($meetingid, array('creation_time' => time(), 'meeting_info' => json_encode($meetinginfo)));
@@ -1343,7 +1343,7 @@  discard block
 block discarded – undo
1343 1343
  */
1344 1344
 function bigbluebuttonbn_set_config_xml_array($meetingid, $configxml) {
1345 1345
     $configxml = bigbluebuttonbn_setConfigXML($meetingid, $configxml);
1346
-    $configxmlarray = (array) $configxml;
1346
+    $configxmlarray = (array)$configxml;
1347 1347
     if ($configxmlarray['returncode'] != 'SUCCESS') {
1348 1348
         debugging('BigBlueButton was not able to set the custom config.xml file', DEBUG_DEVELOPER);
1349 1349
         return '';
@@ -1398,7 +1398,7 @@  discard block
 block discarded – undo
1398 1398
  * @return boolean
1399 1399
  */
1400 1400
 function bigbluebuttonbn_get_recording_data_row_editable($bbbsession) {
1401
-    return ($bbbsession['managerecordings'] && ((double) $bbbsession['serverversion'] >= 1.0 || $bbbsession['bnserver']));
1401
+    return ($bbbsession['managerecordings'] && ((double)$bbbsession['serverversion'] >= 1.0 || $bbbsession['bnserver']));
1402 1402
 }
1403 1403
 
1404 1404
 /**
@@ -1409,7 +1409,7 @@  discard block
 block discarded – undo
1409 1409
  * @return boolean
1410 1410
  */
1411 1411
 function bigbluebuttonbn_get_recording_data_preview_enabled($bbbsession) {
1412
-    return ((double) $bbbsession['serverversion'] >= 1.0 && $bbbsession['bigbluebuttonbn']->recordings_preview == '1');
1412
+    return ((double)$bbbsession['serverversion'] >= 1.0 && $bbbsession['bigbluebuttonbn']->recordings_preview == '1');
1413 1413
 }
1414 1414
 
1415 1415
 /**
@@ -1833,7 +1833,7 @@  discard block
 block discarded – undo
1833 1833
     }
1834 1834
     $id = 'recording-' . $target . '-' . $recording['recordID'];
1835 1835
     $onclick = 'M.mod_bigbluebuttonbn.recordings.recording' . ucfirst($data['action']) . '(this);';
1836
-    if ((boolean) \mod_bigbluebuttonbn\locallib\config::get('recording_icons_enabled')) {
1836
+    if ((boolean)\mod_bigbluebuttonbn\locallib\config::get('recording_icons_enabled')) {
1837 1837
         // With icon for $manageaction.
1838 1838
         $iconattributes = array('id' => $id, 'class' => 'iconsmall');
1839 1839
         $linkattributes = array(
@@ -1977,7 +1977,7 @@  discard block
 block discarded – undo
1977 1977
         $groupmode = $DB->get_record_sql($sql, $params, IGNORE_MULTIPLE);
1978 1978
 
1979 1979
         $displayrow = true;
1980
-        if ((isset($groupmode->groupmode) && (int) $groupmode->groupmode != VISIBLEGROUPS)
1980
+        if ((isset($groupmode->groupmode) && (int)$groupmode->groupmode != VISIBLEGROUPS)
1981 1981
                 && !$bbbsession['administrator'] && !$bbbsession['moderator']) {
1982 1982
             $groupid = explode('[', $recording['meetingID']);
1983 1983
             if (isset($groupid[1])) {
@@ -2127,7 +2127,7 @@  discard block
 block discarded – undo
2127 2127
         // Enqueue it.
2128 2128
         \core\task\manager::queue_adhoc_task($task);
2129 2129
     } catch (Exception $e) {
2130
-        mtrace("Error while enqueuing completion_update_state task. " . (string) $e);
2130
+        mtrace("Error while enqueuing completion_update_state task. " . (string)$e);
2131 2131
     }
2132 2132
 }
2133 2133
 
@@ -2664,7 +2664,7 @@  discard block
 block discarded – undo
2664 2664
  */
2665 2665
 function bigbluebuttonbn_settings_general(&$renderer) {
2666 2666
     // Configuration for BigBlueButton.
2667
-    if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_general_shown()) {
2667
+    if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_general_shown()) {
2668 2668
         $renderer->render_group_header('general');
2669 2669
         $renderer->render_group_element(
2670 2670
                 'server_url',
@@ -2686,7 +2686,7 @@  discard block
 block discarded – undo
2686 2686
  */
2687 2687
 function bigbluebuttonbn_settings_record(&$renderer) {
2688 2688
     // Configuration for 'recording' feature.
2689
-    if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_record_meeting_shown()) {
2689
+    if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_record_meeting_shown()) {
2690 2690
         $renderer->render_group_header('recording');
2691 2691
         $renderer->render_group_element(
2692 2692
                 'recording_default',
@@ -2730,7 +2730,7 @@  discard block
 block discarded – undo
2730 2730
  */
2731 2731
 function bigbluebuttonbn_settings_importrecordings(&$renderer) {
2732 2732
     // Configuration for 'import recordings' feature.
2733
-    if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_import_recordings_shown()) {
2733
+    if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_import_recordings_shown()) {
2734 2734
         $renderer->render_group_header('importrecordings');
2735 2735
         $renderer->render_group_element(
2736 2736
                 'importrecordings_enabled',
@@ -2752,7 +2752,7 @@  discard block
 block discarded – undo
2752 2752
  */
2753 2753
 function bigbluebuttonbn_settings_showrecordings(&$renderer) {
2754 2754
     // Configuration for 'show recordings' feature.
2755
-    if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_show_recordings_shown()) {
2755
+    if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_show_recordings_shown()) {
2756 2756
         $renderer->render_group_header('recordings');
2757 2757
         $renderer->render_group_element(
2758 2758
                 'recordings_html_default',
@@ -2802,7 +2802,7 @@  discard block
 block discarded – undo
2802 2802
  */
2803 2803
 function bigbluebuttonbn_settings_waitmoderator(&$renderer) {
2804 2804
     // Configuration for wait for moderator feature.
2805
-    if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_wait_moderator_shown()) {
2805
+    if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_wait_moderator_shown()) {
2806 2806
         $renderer->render_group_header('waitformoderator');
2807 2807
         $renderer->render_group_element(
2808 2808
                 'waitformoderator_default',
@@ -2832,7 +2832,7 @@  discard block
 block discarded – undo
2832 2832
  */
2833 2833
 function bigbluebuttonbn_settings_voicebridge(&$renderer) {
2834 2834
     // Configuration for "static voice bridge" feature.
2835
-    if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_static_voice_bridge_shown()) {
2835
+    if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_static_voice_bridge_shown()) {
2836 2836
         $renderer->render_group_header('voicebridge');
2837 2837
         $renderer->render_group_element(
2838 2838
                 'voicebridge_editable',
@@ -2850,7 +2850,7 @@  discard block
 block discarded – undo
2850 2850
  */
2851 2851
 function bigbluebuttonbn_settings_preupload(&$renderer) {
2852 2852
     // Configuration for "preupload presentation" feature.
2853
-    if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_preupload_presentation_shown()) {
2853
+    if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_preupload_presentation_shown()) {
2854 2854
         // This feature only works if curl is installed.
2855 2855
         $preuploaddescripion = get_string('config_preuploadpresentation_description', 'bigbluebuttonbn');
2856 2856
         if (!extension_loaded('curl')) {
@@ -2878,7 +2878,7 @@  discard block
 block discarded – undo
2878 2878
  */
2879 2879
 function bigbluebuttonbn_settings_preupload_manage_default_file(&$renderer) {
2880 2880
     // Configuration for "preupload presentation" feature.
2881
-    if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_preupload_presentation_shown()) {
2881
+    if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_preupload_presentation_shown()) {
2882 2882
         if (extension_loaded('curl')) {
2883 2883
             // This feature only works if curl is installed.
2884 2884
             $renderer->render_filemanager_default_file_presentation("presentation_default");
@@ -2895,7 +2895,7 @@  discard block
 block discarded – undo
2895 2895
  */
2896 2896
 function bigbluebuttonbn_settings_userlimit(&$renderer) {
2897 2897
     // Configuration for "user limit" feature.
2898
-    if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_user_limit_shown()) {
2898
+    if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_user_limit_shown()) {
2899 2899
         $renderer->render_group_header('userlimit');
2900 2900
         $renderer->render_group_element(
2901 2901
                 'userlimit_default',
@@ -2917,7 +2917,7 @@  discard block
 block discarded – undo
2917 2917
  */
2918 2918
 function bigbluebuttonbn_settings_duration(&$renderer) {
2919 2919
     // Configuration for "scheduled duration" feature.
2920
-    if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_scheduled_duration_shown()) {
2920
+    if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_scheduled_duration_shown()) {
2921 2921
         $renderer->render_group_header('scheduled');
2922 2922
         $renderer->render_group_element(
2923 2923
                 'scheduled_duration_enabled',
@@ -2943,7 +2943,7 @@  discard block
 block discarded – undo
2943 2943
  */
2944 2944
 function bigbluebuttonbn_settings_participants(&$renderer) {
2945 2945
     // Configuration for defining the default role/user that will be moderator on new activities.
2946
-    if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_moderator_default_shown()) {
2946
+    if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_moderator_default_shown()) {
2947 2947
         $renderer->render_group_header('participant');
2948 2948
         // UI for 'participants' feature.
2949 2949
         $roles = bigbluebuttonbn_get_roles();
@@ -2968,7 +2968,7 @@  discard block
 block discarded – undo
2968 2968
  */
2969 2969
 function bigbluebuttonbn_settings_notifications(&$renderer) {
2970 2970
     // Configuration for "send notifications" feature.
2971
-    if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_send_notifications_shown()) {
2971
+    if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_send_notifications_shown()) {
2972 2972
         $renderer->render_group_header('sendnotifications');
2973 2973
         $renderer->render_group_element(
2974 2974
                 'sendnotifications_enabled',
@@ -2986,14 +2986,14 @@  discard block
 block discarded – undo
2986 2986
  */
2987 2987
 function bigbluebuttonbn_settings_clienttype(&$renderer) {
2988 2988
     // Configuration for "clienttype" feature.
2989
-    if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_clienttype_shown()) {
2989
+    if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_clienttype_shown()) {
2990 2990
         $renderer->render_group_header('clienttype');
2991 2991
         $renderer->render_group_element(
2992 2992
                 'clienttype_editable',
2993 2993
                 $renderer->render_group_element_checkbox('clienttype_editable', 0)
2994 2994
         );
2995 2995
         // Web Client default.
2996
-        $default = intval((int) \mod_bigbluebuttonbn\locallib\config::get('clienttype_default'));
2996
+        $default = intval((int)\mod_bigbluebuttonbn\locallib\config::get('clienttype_default'));
2997 2997
         $choices = array(BIGBLUEBUTTON_CLIENTTYPE_FLASH => get_string('mod_form_block_clienttype_flash', 'bigbluebuttonbn'),
2998 2998
                 BIGBLUEBUTTON_CLIENTTYPE_HTML5 => get_string('mod_form_block_clienttype_html5', 'bigbluebuttonbn'));
2999 2999
         $renderer->render_group_element(
@@ -3016,7 +3016,7 @@  discard block
 block discarded – undo
3016 3016
  */
3017 3017
 function bigbluebuttonbn_settings_muteonstart(&$renderer) {
3018 3018
     // Configuration for BigBlueButton.
3019
-    if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_muteonstart_shown()) {
3019
+    if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_muteonstart_shown()) {
3020 3020
         $renderer->render_group_header('muteonstart');
3021 3021
         $renderer->render_group_element(
3022 3022
                 'muteonstart_default',
@@ -3038,7 +3038,7 @@  discard block
 block discarded – undo
3038 3038
  */
3039 3039
 function bigbluebuttonbn_settings_extended(&$renderer) {
3040 3040
     // Configuration for 'notify users when recording ready' feature.
3041
-    if (!(boolean) \mod_bigbluebuttonbn\settings\validator::section_settings_extended_shown()) {
3041
+    if (!(boolean)\mod_bigbluebuttonbn\settings\validator::section_settings_extended_shown()) {
3042 3042
         return;
3043 3043
     }
3044 3044
     $renderer->render_group_header('extended_capabilities');
@@ -3066,7 +3066,7 @@  discard block
 block discarded – undo
3066 3066
     global $DB;
3067 3067
     do {
3068 3068
         $encodedseed = sha1(bigbluebuttonbn_random_password(12));
3069
-        $meetingid = (string) $DB->get_field('bigbluebuttonbn', 'meetingid', array('meetingid' => $encodedseed));
3069
+        $meetingid = (string)$DB->get_field('bigbluebuttonbn', 'meetingid', array('meetingid' => $encodedseed));
3070 3070
     } while ($meetingid == $encodedseed);
3071 3071
     return $encodedseed;
3072 3072
 }
@@ -3279,7 +3279,7 @@  discard block
 block discarded – undo
3279 3279
 function bigbluebuttonbn_instance_ownerid($bigbluebuttonbn) {
3280 3280
     global $DB;
3281 3281
     $filters = array('bigbluebuttonbnid' => $bigbluebuttonbn->id, 'log' => 'Add');
3282
-    $ownerid = (integer) $DB->get_field('bigbluebuttonbn_logs', 'userid', $filters);
3282
+    $ownerid = (integer)$DB->get_field('bigbluebuttonbn_logs', 'userid', $filters);
3283 3283
     return $ownerid;
3284 3284
 }
3285 3285
 
@@ -3322,8 +3322,8 @@  discard block
 block discarded – undo
3322 3322
     $bbbsession['meetingname'] = $bbbsession['bigbluebuttonbn']->name;
3323 3323
     $bbbsession['meetingdescription'] = $bbbsession['bigbluebuttonbn']->intro;
3324 3324
     // Extra data for setting up the Meeting.
3325
-    $bbbsession['userlimit'] = intval((int) \mod_bigbluebuttonbn\locallib\config::get('userlimit_default'));
3326
-    if ((boolean) \mod_bigbluebuttonbn\locallib\config::get('userlimit_editable')) {
3325
+    $bbbsession['userlimit'] = intval((int)\mod_bigbluebuttonbn\locallib\config::get('userlimit_default'));
3326
+    if ((boolean)\mod_bigbluebuttonbn\locallib\config::get('userlimit_editable')) {
3327 3327
         $bbbsession['userlimit'] = intval($bbbsession['bigbluebuttonbn']->userlimit);
3328 3328
     }
3329 3329
     $bbbsession['voicebridge'] = $bbbsession['bigbluebuttonbn']->voicebridge;
@@ -3473,7 +3473,7 @@  discard block
 block discarded – undo
3473 3473
             'bbb-recording-tags' => bigbluebuttonbn_get_tags($bbbsession['cm']->id), // Same as $id.
3474 3474
     ];
3475 3475
     // Special metadata for recording processing.
3476
-    if ((boolean) \mod_bigbluebuttonbn\locallib\config::get('recordingstatus_enabled')) {
3476
+    if ((boolean)\mod_bigbluebuttonbn\locallib\config::get('recordingstatus_enabled')) {
3477 3477
         $metadata["bn-recording-status"] = json_encode(
3478 3478
                 array(
3479 3479
                         'email' => array('"' . fullname($USER) . '" <' . $USER->email . '>'),
@@ -3481,10 +3481,10 @@  discard block
 block discarded – undo
3481 3481
                 )
3482 3482
         );
3483 3483
     }
3484
-    if ((boolean) \mod_bigbluebuttonbn\locallib\config::get('recordingready_enabled')) {
3484
+    if ((boolean)\mod_bigbluebuttonbn\locallib\config::get('recordingready_enabled')) {
3485 3485
         $metadata['bn-recording-ready-url'] = $bbbsession['recordingReadyURL'];
3486 3486
     }
3487
-    if ((boolean) \mod_bigbluebuttonbn\locallib\config::get('meetingevents_enabled')) {
3487
+    if ((boolean)\mod_bigbluebuttonbn\locallib\config::get('meetingevents_enabled')) {
3488 3488
         $metadata['analytics-callback-url'] = $bbbsession['meetingEventsURL'];
3489 3489
     }
3490 3490
     return $metadata;
Please login to merge, or discard this patch.