Completed
Push — master ( cf5fa2...ac21b7 )
by Jesus
08:41
created
locallib.php 1 patch
Doc Comments   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -292,7 +292,7 @@  discard block
 block discarded – undo
292 292
  * Helper function to retrieve imported recordings from the Moodle database.
293 293
  * The references are stored as events in bigbluebuttonbn_logs.
294 294
  *
295
- * @param string $courseid
295
+ * @param integer $courseid
296 296
  * @param string $bigbluebuttonbnid
297 297
  * @param bool   $subset
298 298
  *
@@ -320,7 +320,7 @@  discard block
 block discarded – undo
320 320
 /**
321 321
  * Helper function to retrive the default config.xml file.
322 322
  *
323
- * @return string
323
+ * @return null|SimpleXMLElement
324 324
  */
325 325
 function bigbluebuttonbn_get_default_config_xml() {
326 326
     $xml = bigbluebuttonbn_wrap_xml_load_file(
@@ -402,7 +402,7 @@  discard block
 block discarded – undo
402 402
  * @param object $a
403 403
  * @param object $b
404 404
  *
405
- * @return array
405
+ * @return integer
406 406
  */
407 407
 function bigbluebuttonbn_recording_build_sorter($a, $b) {
408 408
     if ($a['startTime'] < $b['startTime']) {
@@ -528,7 +528,7 @@  discard block
 block discarded – undo
528 528
  * @param string $data
529 529
  * @param string $contenttype
530 530
  *
531
- * @return object
531
+ * @return null|SimpleXMLElement
532 532
  */
533 533
 function bigbluebuttonbn_wrap_xml_load_file($url, $method = 'GET', $data = null, $contenttype = 'text/xml') {
534 534
     if (extension_loaded('curl')) {
@@ -569,7 +569,7 @@  discard block
 block discarded – undo
569 569
  * @param string $data
570 570
  * @param string $contenttype
571 571
  *
572
- * @return object
572
+ * @return string
573 573
  */
574 574
 function bigbluebuttonbn_wrap_xml_load_file_curl_request($url, $method = 'GET', $data = null, $contenttype = 'text/xml') {
575 575
     $c = new curl();
@@ -934,7 +934,7 @@  discard block
 block discarded – undo
934 934
  * @param integer $instance
935 935
  * @param integer $voicebridge
936 936
  *
937
- * @return string
937
+ * @return boolean
938 938
  */
939 939
 function bigbluebuttonbn_voicebridge_unique($instance, $voicebridge) {
940 940
     global $DB;
@@ -1037,7 +1037,7 @@  discard block
 block discarded – undo
1037 1037
 /**
1038 1038
  * Helper returns an array with all possible bigbluebuttonbn events.
1039 1039
  *
1040
- * @return array
1040
+ * @return string[]
1041 1041
  */
1042 1042
 function bigbluebuttonbn_events() {
1043 1043
     return array(
@@ -1246,7 +1246,7 @@  discard block
 block discarded – undo
1246 1246
  * @param string $meetingid
1247 1247
  * @param string $configxml
1248 1248
  *
1249
- * @return object
1249
+ * @return null|SimpleXMLElement
1250 1250
  */
1251 1251
 function bigbluebuttonbn_set_config_xml($meetingid, $configxml) {
1252 1252
     $urldefaultconfig = \mod_bigbluebuttonbn\locallib\config::get('server_url').'api/setConfigXML?';
@@ -1295,7 +1295,7 @@  discard block
 block discarded – undo
1295 1295
  * @param array $recording
1296 1296
  * @param array $tools
1297 1297
  *
1298
- * @return array
1298
+ * @return null|stdClass
1299 1299
  */
1300 1300
 function bigbluebuttonbn_get_recording_data_row($bbbsession, $recording, $tools = ['protect', 'publish', 'delete']) {
1301 1301
     if (!bigbluebuttonbn_include_recording_table_row($bbbsession, $recording)) {
@@ -1799,7 +1799,7 @@  discard block
 block discarded – undo
1799 1799
  *
1800 1800
  * @param array $bbbsession
1801 1801
  * @param array $recording
1802
- * @param object $rowdata
1802
+ * @param stdClass $rowdata
1803 1803
  *
1804 1804
  * @return object
1805 1805
  */
@@ -1998,7 +1998,7 @@  discard block
 block discarded – undo
1998 1998
  * Helper function to define the sql used for gattering the bigbluebuttonbnids whose meetingids should be included
1999 1999
  * in the getRecordings request considering only those that belong to deleted activities.
2000 2000
  *
2001
- * @param string $courseid
2001
+ * @param integer $courseid
2002 2002
  * @param string $bigbluebuttonbnid
2003 2003
  * @param bool   $subset
2004 2004
  *
@@ -2022,7 +2022,7 @@  discard block
 block discarded – undo
2022 2022
  * Helper function to define the sql used for gattering the bigbluebuttonbnids whose meetingids should be included
2023 2023
  * in the getRecordings request considering only those that belong to imported recordings.
2024 2024
  *
2025
- * @param string $courseid
2025
+ * @param integer $courseid
2026 2026
  * @param string $bigbluebuttonbnid
2027 2027
  * @param bool   $subset
2028 2028
  *
@@ -2045,7 +2045,7 @@  discard block
 block discarded – undo
2045 2045
 /**
2046 2046
  * Helper function to get recordings  and imported recordings together.
2047 2047
  *
2048
- * @param string $courseid
2048
+ * @param integer $courseid
2049 2049
  * @param string $bigbluebuttonbnid
2050 2050
  * @param bool   $subset
2051 2051
  * @param bool   $includedeleted
@@ -2063,7 +2063,7 @@  discard block
 block discarded – undo
2063 2063
  * Helper function to retrieve recordings from the BigBlueButton. The references are stored as events
2064 2064
  * in bigbluebuttonbn_logs.
2065 2065
  *
2066
- * @param string $courseid
2066
+ * @param integer $courseid
2067 2067
  * @param string $bigbluebuttonbnid
2068 2068
  * @param bool   $subset
2069 2069
  * @param bool   $includedeleted
Please login to merge, or discard this patch.
index.php 1 patch
Spacing   +16 added lines, -16 removed lines patch added patch discarded remove patch
@@ -24,8 +24,8 @@  discard block
 block discarded – undo
24 24
  * @author    Fred Dixon  (ffdixon [at] blindsidenetworks [dt] com)
25 25
  */
26 26
 
27
-require_once(dirname(dirname(dirname(__FILE__))).'/config.php');
28
-require_once(dirname(__FILE__).'/locallib.php');
27
+require_once(dirname(dirname(dirname(__FILE__))) . '/config.php');
28
+require_once(dirname(__FILE__) . '/locallib.php');
29 29
 
30 30
 $id = required_param('id', PARAM_INT);
31 31
 $a = optional_param('a', 0, PARAM_INT);
@@ -89,13 +89,13 @@  discard block
 block discarded – undo
89 89
     if ($moderator || $administrator) {
90 90
         bigbluebuttonbn_event_log(BIGBLUEBUTTON_EVENT_MEETING_ENDED, $bigbluebuttonbn, $cm);
91 91
         echo get_string('index_ending', 'bigbluebuttonbn');
92
-        $meetingid = $bigbluebuttonbn->meetingid.'-'.$course->id.'-'.$bigbluebuttonbn->id;
92
+        $meetingid = $bigbluebuttonbn->meetingid . '-' . $course->id . '-' . $bigbluebuttonbn->id;
93 93
         if ($g != '0') {
94
-            $meetingid .= '['.$g.']';
94
+            $meetingid .= '[' . $g . ']';
95 95
         }
96 96
 
97 97
         bigbluebuttonbn_end_meeting($meetingid, $bigbluebuttonbn->moderatorpass);
98
-        redirect('index.php?id='.$id);
98
+        redirect('index.php?id=' . $id);
99 99
     }
100 100
 }
101 101
 
@@ -110,7 +110,7 @@  discard block
 block discarded – undo
110 110
         // Add a the data for the bigbluebuttonbn instance.
111 111
         $groupobj = null;
112 112
         if (groups_get_activity_groupmode($cm) > 0) {
113
-            $groupobj = (object) array('id' => 0, 'name' => get_string('allparticipants'));
113
+            $groupobj = (object)array('id' => 0, 'name' => get_string('allparticipants'));
114 114
         }
115 115
         $table->data[] = bigbluebuttonbn_index_display_room($canmoderate, $course, $bigbluebuttonbn, $groupobj);
116 116
         // Add a the data for the groups belonging to the bigbluebuttonbn instance, if any.
@@ -136,12 +136,12 @@  discard block
 block discarded – undo
136 136
  * @return array
137 137
  */
138 138
 function bigbluebuttonbn_index_display_room($moderator, $course, $bigbluebuttonbn, $groupobj = null) {
139
-    $meetingid = $bigbluebuttonbn->meetingid.'-'.$course->id.'-'.$bigbluebuttonbn->id;
139
+    $meetingid = $bigbluebuttonbn->meetingid . '-' . $course->id . '-' . $bigbluebuttonbn->id;
140 140
     $paramgroup = '';
141 141
     $groupname = '';
142 142
     if ($groupobj) {
143
-        $meetingid .= '['.$groupobj->id.']';
144
-        $paramgroup = '&group='.$groupobj->id;
143
+        $meetingid .= '[' . $groupobj->id . ']';
144
+        $paramgroup = '&group=' . $groupobj->id;
145 145
         $groupname = $groupobj->name;
146 146
     }
147 147
     $meetinginfo = bigbluebuttonbn_get_meeting_info_array($meetingid);
@@ -156,7 +156,7 @@  discard block
 block discarded – undo
156 156
         return;
157 157
     }
158 158
     // Output Users in the meeting.
159
-    $joinurl = '<a href="view.php?id='.$bigbluebuttonbn->coursemodule.$paramgroup.'">'.format_string($bigbluebuttonbn->name).'</a>';
159
+    $joinurl = '<a href="view.php?id=' . $bigbluebuttonbn->coursemodule . $paramgroup . '">' . format_string($bigbluebuttonbn->name) . '</a>';
160 160
     $group = $groupname;
161 161
     $users = '';
162 162
     $viewerlist = '';
@@ -201,7 +201,7 @@  discard block
 block discarded – undo
201 201
         $attendeecount = 0;
202 202
         foreach ($meetinginfo['attendees']->attendee as $attendee) {
203 203
             if ($attendee->role == $role) {
204
-                $attendeelist .= ($attendeecount++ > 0 ? ', ' : '').$attendee->fullName;
204
+                $attendeelist .= ($attendeecount++ > 0 ? ', ' : '') . $attendee->fullName;
205 205
             }
206 206
         }
207 207
     }
@@ -235,17 +235,17 @@  discard block
 block discarded – undo
235 235
 function bigbluebuttonbn_index_display_room_actions($moderator, $course, $bigbluebuttonbn, $groupobj = null) {
236 236
     $actions = '';
237 237
     if ($moderator) {
238
-        $actions .= '<form name="form1" method="post" action="">'."\n";
239
-        $actions .= '  <INPUT type="hidden" name="id" value="'.$course->id.'">'."\n";
240
-        $actions .= '  <INPUT type="hidden" name="a" value="'.$bigbluebuttonbn->id.'">'."\n";
238
+        $actions .= '<form name="form1" method="post" action="">' . "\n";
239
+        $actions .= '  <INPUT type="hidden" name="id" value="' . $course->id . '">' . "\n";
240
+        $actions .= '  <INPUT type="hidden" name="a" value="' . $bigbluebuttonbn->id . '">' . "\n";
241 241
         if ($groupobj != null) {
242
-            $actions .= '  <INPUT type="hidden" name="g" value="'.$groupobj->id.'">'."\n";
242
+            $actions .= '  <INPUT type="hidden" name="g" value="' . $groupobj->id . '">' . "\n";
243 243
         }
244 244
         $actions .= '  <INPUT type="submit" name="submit" value="' .
245 245
             get_string('view_conference_action_end', 'bigbluebuttonbn') .
246 246
             '" class="btn btn-primary btn-sm" onclick="return confirm(\'' .
247 247
             get_string('index_confirm_end', 'bigbluebuttonbn') . '\')">' . "\n";
248
-        $actions .= '</form>'."\n";
248
+        $actions .= '</form>' . "\n";
249 249
     }
250 250
     return $actions;
251 251
 }
Please login to merge, or discard this patch.
classes/locallib/bigbluebutton.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -52,7 +52,7 @@
 block discarded – undo
52 52
             $params .= '&' . $key . '=' . urlencode($value);
53 53
         }
54 54
         foreach ($metadata as $key => $value) {
55
-            $params .= '&' . 'meta_' . $key.'=' . urlencode($value);
55
+            $params .= '&' . 'meta_' . $key . '=' . urlencode($value);
56 56
         }
57 57
         return $baseurl . $params . '&checksum=' . sha1($action . $params . self::sanitized_secret());
58 58
     }
Please login to merge, or discard this patch.