Completed
Push — master ( 58fd9d...bef6e4 )
by Jesus
01:58
created
classes/external.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -61,7 +61,7 @@  discard block
 block discarded – undo
61 61
      */
62 62
     public static function view_bigbluebuttonbn($bigbluebuttonbnid) {
63 63
         global $DB, $CFG;
64
-        require_once($CFG->dirroot . "/mod/bigbluebuttonbn/lib.php");
64
+        require_once($CFG->dirroot."/mod/bigbluebuttonbn/lib.php");
65 65
 
66 66
         $params = self::validate_parameters(self::view_bigbluebuttonbn_parameters(),
67 67
                                             array(
@@ -109,7 +109,7 @@  discard block
 block discarded – undo
109 109
      * @since Moodle 3.3
110 110
      */
111 111
     public static function get_bigbluebuttonbns_by_courses_parameters() {
112
-        return new external_function_parameters (
112
+        return new external_function_parameters(
113 113
             array(
114 114
                 'courseids' => new external_multiple_structure(
115 115
                     new external_value(PARAM_INT, 'Course id'), 'Array of course ids', VALUE_DEFAULT, array()
Please login to merge, or discard this patch.
classes/settings/validator.php 2 patches
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -27,7 +27,7 @@  discard block
 block discarded – undo
27 27
 
28 28
 defined('MOODLE_INTERNAL') || die();
29 29
 
30
-require_once($CFG->dirroot . '/mod/bigbluebuttonbn/locallib.php');
30
+require_once($CFG->dirroot.'/mod/bigbluebuttonbn/locallib.php');
31 31
 require_once($CFG->libdir.'/adminlib.php');
32 32
 
33 33
 /**
@@ -62,7 +62,7 @@  discard block
 block discarded – undo
62 62
                 !isset($CFG->bigbluebuttonbn['recording_all_from_start_default']) ||
63 63
                 !isset($CFG->bigbluebuttonbn['recording_all_from_start_editable']) ||
64 64
                 !isset($CFG->bigbluebuttonbn['recording_hide_button_default']) ||
65
-                !isset($CFG->bigbluebuttonbn['recording_hide_button_editable']) );
65
+                !isset($CFG->bigbluebuttonbn['recording_hide_button_editable']));
66 66
     }
67 67
 
68 68
     /**
Please login to merge, or discard this patch.
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -92,7 +92,7 @@
 block discarded – undo
92 92
                 !isset($CFG->bigbluebuttonbn['recordings_preview_default']) ||
93 93
                 !isset($CFG->bigbluebuttonbn['recordings_preview_editable']) ||
94 94
                 !isset($CFG->bigbluebuttonbn['recordings_validate_url'])
95
-              );
95
+                );
96 96
     }
97 97
 
98 98
     /**
Please login to merge, or discard this patch.
viewlib.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -85,7 +85,7 @@  discard block
 block discarded – undo
85 85
         return;
86 86
     }
87 87
     echo $OUTPUT->box_start('generalbox boxaligncenter');
88
-    echo '<br><div class="alert alert-' . $type . '">' . $message . '</div>';
88
+    echo '<br><div class="alert alert-'.$type.'">'.$message.'</div>';
89 89
     echo $OUTPUT->box_end();
90 90
 }
91 91
 
@@ -104,7 +104,7 @@  discard block
 block discarded – undo
104 104
     }
105 105
     $typeprofiles = bigbluebuttonbn_get_instance_type_profiles();
106 106
     $enabledfeatures = bigbluebuttonbn_get_enabled_features($typeprofiles, $type);
107
-    $pinginterval = (int)\mod_bigbluebuttonbn\locallib\config::get('waitformoderator_ping_interval') * 1000;
107
+    $pinginterval = (int) \mod_bigbluebuttonbn\locallib\config::get('waitformoderator_ping_interval') * 1000;
108 108
     // JavaScript for locales.
109 109
     $PAGE->requires->strings_for_js(array_keys(bigbluebuttonbn_get_strings_for_js()), 'bigbluebuttonbn');
110 110
     // JavaScript variables.
@@ -375,10 +375,10 @@  discard block
 block discarded – undo
375 375
         return '';
376 376
     }
377 377
     return bigbluebuttonbn_render_warning(
378
-        (string)\mod_bigbluebuttonbn\locallib\config::get('general_warning_message'),
379
-        (string)\mod_bigbluebuttonbn\locallib\config::get('general_warning_box_type'),
380
-        (string)\mod_bigbluebuttonbn\locallib\config::get('general_warning_button_href'),
381
-        (string)\mod_bigbluebuttonbn\locallib\config::get('general_warning_button_text'),
382
-        (string)\mod_bigbluebuttonbn\locallib\config::get('general_warning_button_class')
378
+        (string) \mod_bigbluebuttonbn\locallib\config::get('general_warning_message'),
379
+        (string) \mod_bigbluebuttonbn\locallib\config::get('general_warning_box_type'),
380
+        (string) \mod_bigbluebuttonbn\locallib\config::get('general_warning_button_href'),
381
+        (string) \mod_bigbluebuttonbn\locallib\config::get('general_warning_button_text'),
382
+        (string) \mod_bigbluebuttonbn\locallib\config::get('general_warning_button_class')
383 383
     );
384 384
 }
Please login to merge, or discard this patch.
lib.php 3 patches
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -261,7 +261,7 @@  discard block
 block discarded – undo
261 261
     // Update a record.
262 262
     $DB->update_record('bigbluebuttonbn', $bigbluebuttonbn);
263 263
     // Get the meetingid column in the bigbluebuttonbn table.
264
-    $bigbluebuttonbn->meetingid = (string)$DB->get_field('bigbluebuttonbn', 'meetingid', array('id' => $bigbluebuttonbn->id));
264
+    $bigbluebuttonbn->meetingid = (string) $DB->get_field('bigbluebuttonbn', 'meetingid', array('id' => $bigbluebuttonbn->id));
265 265
     // Log update action.
266 266
     bigbluebuttonbn_log($bigbluebuttonbn, BIGBLUEBUTTONBN_LOG_EVENT_EDIT);
267 267
     // Complete the process.
@@ -315,9 +315,9 @@  discard block
 block discarded – undo
315 315
 function bigbluebuttonbn_delete_instance_log($bigbluebuttonbn) {
316 316
     global $DB;
317 317
     $sql  = "SELECT * FROM {bigbluebuttonbn_logs} ";
318
-    $sql .= "WHERE bigbluebuttonbnid = ? AND log = ? AND ". $DB->sql_compare_text('meta') . " = ?";
318
+    $sql .= "WHERE bigbluebuttonbnid = ? AND log = ? AND ".$DB->sql_compare_text('meta')." = ?";
319 319
     $logs = $DB->get_records_sql($sql, array($bigbluebuttonbn->id, BIGBLUEBUTTONBN_LOG_EVENT_CREATE, "{\"record\":true}"));
320
-    $meta = "{\"has_recordings\":" . empty($logs) ? "true" : "false" . "}";
320
+    $meta = "{\"has_recordings\":".empty($logs) ? "true" : "false"."}";
321 321
     bigbluebuttonbn_log($bigbluebuttonbn, BIGBLUEBUTTONBN_LOG_EVENT_DELETE, [], $meta);
322 322
 }
323 323
 
@@ -335,8 +335,8 @@  discard block
 block discarded – undo
335 335
  */
336 336
 function bigbluebuttonbn_user_outline($course, $user, $mod, $bigbluebuttonbn) {
337 337
     if ($completed = bigbluebuttonbn_user_complete($course, $user, $bigbluebuttonbn)) {
338
-        return fullname($user) . ' ' . get_string('view_message_has_joined', 'bigbluebuttonbn') . ' ' .
339
-            get_string('view_message_session_for', 'bigbluebuttonbn') . ' ' . (string) $completed . ' ' .
338
+        return fullname($user).' '.get_string('view_message_has_joined', 'bigbluebuttonbn').' '.
339
+            get_string('view_message_session_for', 'bigbluebuttonbn').' '.(string) $completed.' '.
340 340
             get_string('view_message_times', 'bigbluebuttonbn');
341 341
     }
342 342
     return '';
@@ -357,12 +357,12 @@  discard block
 block discarded – undo
357 357
     if (is_object($courseorid)) {
358 358
         $course = $courseorid;
359 359
     } else {
360
-        $course = (object)array('id' => $courseorid);
360
+        $course = (object) array('id' => $courseorid);
361 361
     }
362 362
     if (is_object($userorid)) {
363 363
         $user = $userorid;
364 364
     } else {
365
-        $user = (object)array('id' => $userorid);
365
+        $user = (object) array('id' => $userorid);
366 366
     }
367 367
     $sql = "SELECT COUNT(*) FROM {bigbluebuttonbn_logs} ";
368 368
     $sql .= "WHERE courseid = ? AND bigbluebuttonbnid = ? AND userid = ? AND (log = ? OR log = ?)";
@@ -388,7 +388,7 @@  discard block
 block discarded – undo
388 388
 function bigbluebuttonbn_reset_course_items() {
389 389
     $items = array("events" => 0, "tags" => 0, "logs" => 0);
390 390
     // Include recordings only if enabled.
391
-    if ((boolean)\mod_bigbluebuttonbn\locallib\config::recordings_enabled()) {
391
+    if ((boolean) \mod_bigbluebuttonbn\locallib\config::recordings_enabled()) {
392 392
         $items["recordings"] = 0;
393 393
     }
394 394
     return $items;
@@ -694,7 +694,7 @@  discard block
 block discarded – undo
694 694
 function bigbluebuttonbn_process_pre_save_instance(&$bigbluebuttonbn) {
695 695
     require_once(__DIR__.'/locallib.php');
696 696
     $bigbluebuttonbn->timemodified = time();
697
-    if ((integer)$bigbluebuttonbn->instance == 0) {
697
+    if ((integer) $bigbluebuttonbn->instance == 0) {
698 698
         $bigbluebuttonbn->meetingid = 0;
699 699
         $bigbluebuttonbn->timecreated = time();
700 700
         $bigbluebuttonbn->timemodified = 0;
@@ -1130,7 +1130,7 @@  discard block
 block discarded – undo
1130 1130
 ) {
1131 1131
     global $CFG, $DB;
1132 1132
 
1133
-    require_once($CFG->dirroot . '/mod/bigbluebuttonbn/locallib.php');
1133
+    require_once($CFG->dirroot.'/mod/bigbluebuttonbn/locallib.php');
1134 1134
 
1135 1135
     // Get mod info.
1136 1136
     $cm = get_fast_modinfo($event->courseid)->instances['bigbluebuttonbn'][$event->instance];
@@ -1208,7 +1208,7 @@  discard block
 block discarded – undo
1208 1208
 function bigbluebuttonbn_extend_settings_navigation(settings_navigation $settingsnav, navigation_node $nodenav) {
1209 1209
     global $PAGE, $USER;
1210 1210
     // Don't add validate completion if the callback for meetingevents is NOT enabled.
1211
-    if (!(boolean)\mod_bigbluebuttonbn\locallib\config::get('meetingevents_enabled')) {
1211
+    if (!(boolean) \mod_bigbluebuttonbn\locallib\config::get('meetingevents_enabled')) {
1212 1212
         return;
1213 1213
     }
1214 1214
     // Don't add validate completion if user is not allowed to edit the activity.
@@ -1216,7 +1216,7 @@  discard block
 block discarded – undo
1216 1216
     if (!has_capability('moodle/course:manageactivities', $context, $USER->id)) {
1217 1217
         return;
1218 1218
     }
1219
-    $completionvalidate = '#action=completion_validate&bigbluebuttonbn=' . $PAGE->cm->instance;
1219
+    $completionvalidate = '#action=completion_validate&bigbluebuttonbn='.$PAGE->cm->instance;
1220 1220
     $nodenav->add(get_string('completionvalidatestate', 'bigbluebuttonbn'),
1221 1221
         $completionvalidate, navigation_node::TYPE_CONTAINER);
1222 1222
 }
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) {
@@ -310,7 +310,7 @@  discard block
 block discarded – undo
310 310
  *
311 311
  * @param object $bigbluebuttonbn Id of the module instance
312 312
  *
313
- * @return bool Success/Failure
313
+ * @return boolean|null Success/Failure
314 314
  */
315 315
 function bigbluebuttonbn_delete_instance_log($bigbluebuttonbn) {
316 316
     global $DB;
@@ -331,7 +331,7 @@  discard block
 block discarded – undo
331 331
  * @param object $mod
332 332
  * @param object $bigbluebuttonbn
333 333
  *
334
- * @return bool
334
+ * @return string
335 335
  */
336 336
 function bigbluebuttonbn_user_outline($course, $user, $mod, $bigbluebuttonbn) {
337 337
     if ($completed = bigbluebuttonbn_user_complete($course, $user, $bigbluebuttonbn)) {
@@ -917,7 +917,7 @@  discard block
 block discarded – undo
917 917
  * @param stdClass $context       context object
918 918
  * @param string   $filearea      file area
919 919
  *
920
- * @return false|null false if file not valid
920
+ * @return boolean false if file not valid
921 921
  */
922 922
 function bigbluebuttonbn_pluginfile_valid($context, $filearea) {
923 923
 
Please login to merge, or discard this patch.
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -360,7 +360,7 @@  discard block
 block discarded – undo
360 360
     $sql = "SELECT COUNT(*) FROM {bigbluebuttonbn_logs} ";
361 361
     $sql .= "WHERE courseid = ? AND bigbluebuttonbnid = ? AND userid = ? AND (log = ? OR log = ?)";
362 362
     $result = $DB->count_records_sql($sql, array($course->id, $bigbluebuttonbn->id, $user->id,
363
-                                              BIGBLUEBUTTONBN_LOG_EVENT_JOIN, BIGBLUEBUTTONBN_LOG_EVENT_PLAYED));
363
+                                                BIGBLUEBUTTONBN_LOG_EVENT_JOIN, BIGBLUEBUTTONBN_LOG_EVENT_PLAYED));
364 364
     return $result;
365 365
 }
366 366
 
@@ -593,7 +593,7 @@  discard block
 block discarded – undo
593 593
     $str  = '<div class="bigbluebuttonbn overview">'."\n";
594 594
     $str .= '  <div class="name">'.get_string('modulename', 'bigbluebuttonbn').':&nbsp;'."\n";
595 595
     $str .= '    <a '.$classes.'href="'.$CFG->wwwroot.'/mod/bigbluebuttonbn/view.php?id='.$bigbluebuttonbn->coursemodule.
596
-      '">'.$bigbluebuttonbn->name.'</a>'."\n";
596
+        '">'.$bigbluebuttonbn->name.'</a>'."\n";
597 597
     $str .= '  </div>'."\n";
598 598
     $str .= '  <div class="info">'.get_string($start, 'bigbluebuttonbn').': '.userdate($bigbluebuttonbn->openingtime).
599 599
         '</div>'."\n";
@@ -846,7 +846,7 @@  discard block
 block discarded – undo
846 846
             'bigbluebuttonbn',
847 847
             $bigbluebuttonbn->id,
848 848
             $bigbluebuttonbn->completionexpected
849
-          );
849
+            );
850 850
     }
851 851
 }
852 852
 
Please login to merge, or discard this patch.
classes/task/send_notification.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -28,7 +28,7 @@
 block discarded – undo
28 28
 
29 29
 defined('MOODLE_INTERNAL') || die();
30 30
 
31
-require_once($CFG->dirroot . '/mod/bigbluebuttonbn/locallib.php');
31
+require_once($CFG->dirroot.'/mod/bigbluebuttonbn/locallib.php');
32 32
 
33 33
 /**
34 34
  * Class containing the scheduled task for lti module.
Please login to merge, or discard this patch.
classes/locallib/notifier.php 2 patches
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -27,7 +27,7 @@  discard block
 block discarded – undo
27 27
 
28 28
 defined('MOODLE_INTERNAL') || die();
29 29
 
30
-require_once($CFG->dirroot . '/mod/bigbluebuttonbn/locallib.php');
30
+require_once($CFG->dirroot.'/mod/bigbluebuttonbn/locallib.php');
31 31
 
32 32
 /**
33 33
  * Helper class for sending notifications.
@@ -115,7 +115,7 @@  discard block
 block discarded – undo
115 115
      */
116 116
     public static function htmlmsg_recording_ready($bigbluebuttonbn) {
117 117
         return '<p>'.get_string('email_body_recording_ready_for', 'bigbluebuttonbn').
118
-            ' &quot;' . $bigbluebuttonbn->name . '&quot; '.
118
+            ' &quot;'.$bigbluebuttonbn->name.'&quot; '.
119 119
             get_string('email_body_recording_ready_is_ready', 'bigbluebuttonbn').'.</p>';
120 120
     }
121 121
 
@@ -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.
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.
locallib.php 3 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;
@@ -541,7 +541,7 @@  discard block
 block discarded – undo
541 541
  * @param string $data
542 542
  * @param string $contenttype
543 543
  *
544
- * @return object
544
+ * @return null|SimpleXMLElement
545 545
  */
546 546
 function bigbluebuttonbn_wrap_xml_load_file($url, $method = 'GET', $data = null, $contenttype = 'text/xml') {
547 547
     if (extension_loaded('curl')) {
@@ -582,7 +582,7 @@  discard block
 block discarded – undo
582 582
  * @param string $data
583 583
  * @param string $contenttype
584 584
  *
585
- * @return object
585
+ * @return string
586 586
  */
587 587
 function bigbluebuttonbn_wrap_xml_load_file_curl_request($url, $method = 'GET', $data = null, $contenttype = 'text/xml') {
588 588
     global $CFG;
@@ -977,7 +977,7 @@  discard block
 block discarded – undo
977 977
  * @param integer $instance
978 978
  * @param integer $voicebridge
979 979
  *
980
- * @return string
980
+ * @return boolean
981 981
  */
982 982
 function bigbluebuttonbn_voicebridge_unique($instance, $voicebridge) {
983 983
     global $DB;
@@ -1325,7 +1325,7 @@  discard block
 block discarded – undo
1325 1325
  * @param string $meetingid
1326 1326
  * @param string $configxml
1327 1327
  *
1328
- * @return object
1328
+ * @return null|SimpleXMLElement
1329 1329
  */
1330 1330
 function bigbluebuttonbn_set_config_xml($meetingid, $configxml) {
1331 1331
     $urldefaultconfig = \mod_bigbluebuttonbn\locallib\config::get('server_url') . 'api/setConfigXML?';
@@ -1379,7 +1379,7 @@  discard block
 block discarded – undo
1379 1379
  * @param array $recording
1380 1380
  * @param array $tools
1381 1381
  *
1382
- * @return array
1382
+ * @return null|stdClass
1383 1383
  */
1384 1384
 function bigbluebuttonbn_get_recording_data_row($bbbsession, $recording, $tools = ['protect', 'publish', 'delete']) {
1385 1385
     if (!bigbluebuttonbn_include_recording_table_row($bbbsession, $recording)) {
@@ -2016,7 +2016,7 @@  discard block
 block discarded – undo
2016 2016
  *
2017 2017
  * @param array $bbbsession
2018 2018
  * @param array $recording
2019
- * @param object $rowdata
2019
+ * @param stdClass $rowdata
2020 2020
  *
2021 2021
  * @return object
2022 2022
  */
@@ -2211,7 +2211,7 @@  discard block
 block discarded – undo
2211 2211
  *
2212 2212
  * @param array $bbbsession
2213 2213
  * @param array $recordings
2214
- * @param array $tools
2214
+ * @param string[] $tools
2215 2215
  *
2216 2216
  * @return array
2217 2217
  */
@@ -2292,7 +2292,7 @@  discard block
 block discarded – undo
2292 2292
  * Helper function to define the sql used for gattering the bigbluebuttonbnids whose meetingids should be included
2293 2293
  * in the getRecordings request considering only those that belong to deleted activities.
2294 2294
  *
2295
- * @param string $courseid
2295
+ * @param integer $courseid
2296 2296
  * @param string $bigbluebuttonbnid
2297 2297
  * @param bool   $subset
2298 2298
  *
@@ -2316,7 +2316,7 @@  discard block
 block discarded – undo
2316 2316
  * Helper function to define the sql used for gattering the bigbluebuttonbnids whose meetingids should be included
2317 2317
  * in the getRecordings request considering only those that belong to imported recordings.
2318 2318
  *
2319
- * @param string $courseid
2319
+ * @param integer $courseid
2320 2320
  * @param string $bigbluebuttonbnid
2321 2321
  * @param bool   $subset
2322 2322
  *
@@ -2339,7 +2339,7 @@  discard block
 block discarded – undo
2339 2339
 /**
2340 2340
  * Helper function to get recordings and imported recordings together.
2341 2341
  *
2342
- * @param string $courseid
2342
+ * @param integer $courseid
2343 2343
  * @param string $bigbluebuttonbnid
2344 2344
  * @param bool   $subset
2345 2345
  * @param bool   $includedeleted
@@ -2357,7 +2357,7 @@  discard block
 block discarded – undo
2357 2357
  * Helper function to retrieve recordings from the BigBlueButton. The references are stored as events
2358 2358
  * in bigbluebuttonbn_logs.
2359 2359
  *
2360
- * @param string $courseid
2360
+ * @param integer $courseid
2361 2361
  * @param string $bigbluebuttonbnid
2362 2362
  * @param bool   $subset
2363 2363
  * @param bool   $includedeleted
Please login to merge, or discard this patch.
Spacing   +81 added lines, -81 removed lines patch added patch discarded remove patch
@@ -32,7 +32,7 @@  discard block
 block discarded – undo
32 32
 
33 33
 global $CFG;
34 34
 
35
-require_once(__DIR__ . '/lib.php');
35
+require_once(__DIR__.'/lib.php');
36 36
 
37 37
 /** @var BIGBLUEBUTTONBN_UPDATE_CACHE boolean set to true indicates that cache has to be updated */
38 38
 const BIGBLUEBUTTONBN_UPDATE_CACHE = true;
@@ -145,8 +145,8 @@  discard block
 block discarded – undo
145 145
     $data = null;
146 146
     if (!is_null($pname) && !is_null($purl)) {
147 147
         $method = 'POST';
148
-        $data = "<?xml version='1.0' encoding='UTF-8'?><modules><module name='presentation'><document url='" .
149
-            $purl . "' /></module></modules>";
148
+        $data = "<?xml version='1.0' encoding='UTF-8'?><modules><module name='presentation'><document url='".
149
+            $purl."' /></module></modules>";
150 150
     }
151 151
     $xml = bigbluebuttonbn_wrap_xml_load_file($createmeetingurl, $method, $data);
152 152
     if ($xml) {
@@ -242,8 +242,8 @@  discard block
 block discarded – undo
242 242
             || defined('BEHAT_UTIL')) {
243 243
         // Just return the fake recording.
244 244
         global $CFG;
245
-        require_once($CFG->libdir . '/testing/generator/lib.php');
246
-        require_once(__DIR__ . '/tests/generator/lib.php');
245
+        require_once($CFG->libdir.'/testing/generator/lib.php');
246
+        require_once(__DIR__.'/tests/generator/lib.php');
247 247
         return mod_bigbluebuttonbn_generator::bigbluebuttonbn_get_recordings_array_fetch($meetingidsarray);
248 248
     }
249 249
     $recordings = array();
@@ -420,7 +420,7 @@  discard block
 block discarded – undo
420 420
         if (is_object($value)) {
421 421
             $value = '';
422 422
         }
423
-        $metadataarray['meta_' . $key] = $value;
423
+        $metadataarray['meta_'.$key] = $value;
424 424
     }
425 425
     return $metadataarray;
426 426
 }
@@ -560,7 +560,7 @@  discard block
 block discarded – undo
560 560
             return $xml;
561 561
         } catch (Exception $e) {
562 562
             libxml_use_internal_errors($previous);
563
-            $error = 'Caught exception: ' . $e->getMessage();
563
+            $error = 'Caught exception: '.$e->getMessage();
564 564
             debugging($error, DEBUG_DEVELOPER);
565 565
             return null;
566 566
         }
@@ -571,7 +571,7 @@  discard block
 block discarded – undo
571 571
         $response = simplexml_load_file($url, 'SimpleXMLElement', LIBXML_NOCDATA | LIBXML_NOBLANKS);
572 572
         return $response;
573 573
     } catch (Exception $e) {
574
-        $error = 'Caught exception: ' . $e->getMessage();
574
+        $error = 'Caught exception: '.$e->getMessage();
575 575
         debugging($error, DEBUG_DEVELOPER);
576 576
         libxml_use_internal_errors($previous);
577 577
         return null;
@@ -590,7 +590,7 @@  discard block
 block discarded – undo
590 590
  */
591 591
 function bigbluebuttonbn_wrap_xml_load_file_curl_request($url, $method = 'GET', $data = null, $contenttype = 'text/xml') {
592 592
     global $CFG;
593
-    require_once($CFG->libdir . '/filelib.php');
593
+    require_once($CFG->libdir.'/filelib.php');
594 594
     $c = new curl();
595 595
     $c->setopt(array('SSL_VERIFYPEER' => true));
596 596
     if ($method == 'POST') {
@@ -599,8 +599,8 @@  discard block
 block discarded – undo
599 599
         }
600 600
         $options = array();
601 601
         $options['CURLOPT_HTTPHEADER'] = array(
602
-            'Content-Type: ' . $contenttype,
603
-            'Content-Length: ' . strlen($data),
602
+            'Content-Type: '.$contenttype,
603
+            'Content-Length: '.strlen($data),
604 604
             'Content-Language: en-US',
605 605
         );
606 606
 
@@ -621,7 +621,7 @@  discard block
 block discarded – undo
621 621
  * @return void
622 622
  */
623 623
 function bigbluebuttonbn_end_meeting_if_running($bigbluebuttonbn) {
624
-    $meetingid = $bigbluebuttonbn->meetingid . '-' . $bigbluebuttonbn->course . '-' . $bigbluebuttonbn->id;
624
+    $meetingid = $bigbluebuttonbn->meetingid.'-'.$bigbluebuttonbn->course.'-'.$bigbluebuttonbn->id;
625 625
     if (bigbluebuttonbn_is_meeting_running($meetingid)) {
626 626
         bigbluebuttonbn_end_meeting($meetingid, $bigbluebuttonbn->moderatorpass);
627 627
     }
@@ -641,9 +641,9 @@  discard block
 block discarded – undo
641 641
     if ($userroles) {
642 642
         $where = '';
643 643
         foreach ($userroles as $userrole) {
644
-            $where .= (empty($where) ? ' WHERE' : ' OR') . ' id=' . $userrole->roleid;
644
+            $where .= (empty($where) ? ' WHERE' : ' OR').' id='.$userrole->roleid;
645 645
         }
646
-        $userroles = $DB->get_records_sql('SELECT * FROM {role}' . $where);
646
+        $userroles = $DB->get_records_sql('SELECT * FROM {role}'.$where);
647 647
     }
648 648
     return $userroles;
649 649
 }
@@ -988,9 +988,9 @@  discard block
 block discarded – undo
988 988
     if ($voicebridge == 0) {
989 989
         return true;
990 990
     }
991
-    $select = 'voicebridge = ' . $voicebridge;
991
+    $select = 'voicebridge = '.$voicebridge;
992 992
     if ($instance != 0) {
993
-        $select .= ' AND id <>' . $instance;
993
+        $select .= ' AND id <>'.$instance;
994 994
     }
995 995
     if (!$DB->get_records_select('bigbluebuttonbn', $select)) {
996 996
         return true;
@@ -1126,7 +1126,7 @@  discard block
 block discarded – undo
1126 1126
 function bigbluebuttonbn_generate_nonce() {
1127 1127
     $mt = microtime();
1128 1128
     $rand = mt_rand();
1129
-    return md5($mt . $rand);
1129
+    return md5($mt.$rand);
1130 1130
 }
1131 1131
 
1132 1132
 /**
@@ -1174,7 +1174,7 @@  discard block
 block discarded – undo
1174 1174
         $params['other'] = $options['other'];
1175 1175
     }
1176 1176
     $event = call_user_func_array(
1177
-        '\mod_bigbluebuttonbn\event\\' . $type . '::create',
1177
+        '\mod_bigbluebuttonbn\event\\'.$type.'::create',
1178 1178
         array($params)
1179 1179
     );
1180 1180
     $event->add_record_snapshot('course_modules', $cm);
@@ -1332,7 +1332,7 @@  discard block
 block discarded – undo
1332 1332
  * @return object
1333 1333
  */
1334 1334
 function bigbluebuttonbn_set_config_xml($meetingid, $configxml) {
1335
-    $urldefaultconfig = \mod_bigbluebuttonbn\locallib\config::get('server_url') . 'api/setConfigXML?';
1335
+    $urldefaultconfig = \mod_bigbluebuttonbn\locallib\config::get('server_url').'api/setConfigXML?';
1336 1336
     $configxmlparams = bigbluebuttonbn_set_config_xml_params($meetingid, $configxml);
1337 1337
     $xml = bigbluebuttonbn_wrap_xml_load_file(
1338 1338
         $urldefaultconfig,
@@ -1352,9 +1352,9 @@  discard block
 block discarded – undo
1352 1352
  * @return string
1353 1353
  */
1354 1354
 function bigbluebuttonbn_set_config_xml_params($meetingid, $configxml) {
1355
-    $params = 'configXML=' . urlencode($configxml) . '&meetingID=' . urlencode($meetingid);
1355
+    $params = 'configXML='.urlencode($configxml).'&meetingID='.urlencode($meetingid);
1356 1356
     $sharedsecret = \mod_bigbluebuttonbn\locallib\config::get('shared_secret');
1357
-    $configxmlparams = $params . '&checksum=' . sha1('setConfigXML' . $params . $sharedsecret);
1357
+    $configxmlparams = $params.'&checksum='.sha1('setConfigXML'.$params.$sharedsecret);
1358 1358
     return $configxmlparams;
1359 1359
 }
1360 1360
 
@@ -1460,7 +1460,7 @@  discard block
 block discarded – undo
1460 1460
     global $USER;
1461 1461
     $starttime = $starttime - ($starttime % 1000);
1462 1462
     // Set formatted date.
1463
-    $dateformat = get_string('strftimerecentfull', 'langconfig') . ' %Z';
1463
+    $dateformat = get_string('strftimerecentfull', 'langconfig').' %Z';
1464 1464
     return userdate($starttime / 1000, $dateformat, usertimezone($USER->timezone));
1465 1465
 }
1466 1466
 
@@ -1508,11 +1508,11 @@  discard block
 block discarded – undo
1508 1508
         $actionbar .= bigbluebuttonbn_actionbar_render_button($recording, $buttonpayload);
1509 1509
     }
1510 1510
     $head = html_writer::start_tag('div', array(
1511
-        'id' => 'recording-actionbar-' . $recording['recordID'],
1511
+        'id' => 'recording-actionbar-'.$recording['recordID'],
1512 1512
         'data-recordingid' => $recording['recordID'],
1513 1513
         'data-meetingid' => $recording['meetingID']));
1514 1514
     $tail = html_writer::end_tag('div');
1515
-    return $head . $actionbar . $tail;
1515
+    return $head.$actionbar.$tail;
1516 1516
 }
1517 1517
 
1518 1518
 /**
@@ -1576,7 +1576,7 @@  discard block
 block discarded – undo
1576 1576
  * @return string
1577 1577
  */
1578 1578
 function bigbluebuttonbn_get_recording_data_row_preview($recording) {
1579
-    $options = array('id' => 'preview-' . $recording['recordID']);
1579
+    $options = array('id' => 'preview-'.$recording['recordID']);
1580 1580
     if ($recording['published'] === 'false') {
1581 1581
         $options['hidden'] = 'hidden';
1582 1582
     }
@@ -1609,7 +1609,7 @@  discard block
 block discarded – undo
1609 1609
         $recordingpreview .= html_writer::start_tag('div', array('class' => ''));
1610 1610
         $recordingpreview .= html_writer::empty_tag(
1611 1611
             'img',
1612
-            array('src' => trim($image['url']) . '?' . time(), 'class' => 'recording-thumbnail pull-left')
1612
+            array('src' => trim($image['url']).'?'.time(), 'class' => 'recording-thumbnail pull-left')
1613 1613
         );
1614 1614
         $recordingpreview .= html_writer::end_tag('div');
1615 1615
     }
@@ -1644,7 +1644,7 @@  discard block
 block discarded – undo
1644 1644
     if ($recording['published'] === 'false') {
1645 1645
         $visibility = 'hidden ';
1646 1646
     }
1647
-    $id = 'playbacks-' . $recording['recordID'];
1647
+    $id = 'playbacks-'.$recording['recordID'];
1648 1648
     $recordingtypes = html_writer::start_tag('div', array('id' => $id, 'data-imported' => $dataimported,
1649 1649
         'data-meetingid' => $recording['meetingID'], 'data-recordingid' => $recording['recordID'],
1650 1650
         'title' => $title, $visibility => $visibility));
@@ -1670,13 +1670,13 @@  discard block
 block discarded – undo
1670 1670
         return '';
1671 1671
     }
1672 1672
     $text = bigbluebuttonbn_get_recording_type_text($playback['type']);
1673
-    $href = $CFG->wwwroot . '/mod/bigbluebuttonbn/bbb_view.php?action=play&bn=' . $bbbsession['bigbluebuttonbn']->id .
1674
-        '&mid=' . $recording['meetingID'] . '&rid=' . $recording['recordID'] . '&rtype=' . $playback['type'];
1673
+    $href = $CFG->wwwroot.'/mod/bigbluebuttonbn/bbb_view.php?action=play&bn='.$bbbsession['bigbluebuttonbn']->id.
1674
+        '&mid='.$recording['meetingID'].'&rid='.$recording['recordID'].'&rtype='.$playback['type'];
1675 1675
     if (!isset($recording['imported']) || !isset($recording['protected']) || $recording['protected'] === 'false') {
1676
-        $href .= '&href=' . urlencode(trim($playback['url']));
1676
+        $href .= '&href='.urlencode(trim($playback['url']));
1677 1677
     }
1678 1678
     $linkattributes = array(
1679
-        'id' => 'recording-play-' . $playback['type'] . '-' . $recording['recordID'],
1679
+        'id' => 'recording-play-'.$playback['type'].'-'.$recording['recordID'],
1680 1680
         'class' => 'btn btn-sm btn-default',
1681 1681
         'onclick' => 'M.mod_bigbluebuttonbn.recordings.recordingPlay(this);',
1682 1682
         'data-action' => 'play',
@@ -1688,7 +1688,7 @@  discard block
 block discarded – undo
1688 1688
         $linkattributes['title'] = get_string('view_recording_format_errror_unreachable', 'bigbluebuttonbn');
1689 1689
         unset($linkattributes['data-href']);
1690 1690
     }
1691
-    return $OUTPUT->action_link('#', $text, null, $linkattributes) . '&#32;';
1691
+    return $OUTPUT->action_link('#', $text, null, $linkattributes).'&#32;';
1692 1692
 }
1693 1693
 
1694 1694
 /**
@@ -1701,7 +1701,7 @@  discard block
 block discarded – undo
1701 1701
 function bigbluebuttonbn_get_recording_type_text($playbacktype) {
1702 1702
     // Check first if string exists, and if it does'nt just default to the capitalised version of the string.
1703 1703
     $text = ucwords($playbacktype);
1704
-    $typestringid = 'view_recording_format_' . $playbacktype;
1704
+    $typestringid = 'view_recording_format_'.$playbacktype;
1705 1705
     if (get_string_manager()->string_exists($typestringid, 'bigbluebuttonbn')) {
1706 1706
         $text = get_string($typestringid, 'bigbluebuttonbn');
1707 1707
     }
@@ -1731,7 +1731,7 @@  discard block
 block discarded – undo
1731 1731
     $validatedurls[$urlhost] = true;
1732 1732
     $curlinfo = bigbluebuttonbn_wrap_xml_load_file_curl_request($url, 'HEAD');
1733 1733
     if (!isset($curlinfo['http_code']) || $curlinfo['http_code'] != 200) {
1734
-        $error = "Resources hosted by " . $urlhost . " are unreachable. Server responded with code " . $curlinfo['http_code'];
1734
+        $error = "Resources hosted by ".$urlhost." are unreachable. Server responded with code ".$curlinfo['http_code'];
1735 1735
         debugging($error, DEBUG_DEVELOPER);
1736 1736
         $validatedurls[$urlhost] = false;
1737 1737
     }
@@ -1822,12 +1822,12 @@  discard block
 block discarded – undo
1822 1822
  * @return string
1823 1823
  */
1824 1824
 function bigbluebuttonbn_get_recording_data_row_text($recording, $text, $source, $data) {
1825
-    $htmltext = '<span>' . htmlentities($text) . '</span>';
1825
+    $htmltext = '<span>'.htmlentities($text).'</span>';
1826 1826
     if (empty($data)) {
1827 1827
         return $htmltext;
1828 1828
     }
1829
-    $target = $data['action'] . '-' . $data['target'];
1830
-    $id = 'recording-' . $target . '-' . $data['recordingid'];
1829
+    $target = $data['action'].'-'.$data['target'];
1830
+    $id = 'recording-'.$target.'-'.$data['recordingid'];
1831 1831
     $attributes = array('id' => $id, 'class' => 'quickeditlink col-md-20',
1832 1832
         'data-recordingid' => $data['recordingid'], 'data-meetingid' => $data['meetingid'],
1833 1833
         'data-target' => $data['target'], 'data-source' => $source);
@@ -1835,7 +1835,7 @@  discard block
 block discarded – undo
1835 1835
     $tail = html_writer::end_tag('div');
1836 1836
     $payload = array('action' => $data['action'], 'tag' => $data['tag'], 'target' => $data['target']);
1837 1837
     $htmllink = bigbluebuttonbn_actionbar_render_button($recording, $payload);
1838
-    return $head . $htmltext . $htmllink . $tail;
1838
+    return $head.$htmltext.$htmllink.$tail;
1839 1839
 }
1840 1840
 
1841 1841
 /**
@@ -1853,10 +1853,10 @@  discard block
 block discarded – undo
1853 1853
     }
1854 1854
     $target = $data['action'];
1855 1855
     if (isset($data['target'])) {
1856
-        $target .= '-' . $data['target'];
1856
+        $target .= '-'.$data['target'];
1857 1857
     }
1858
-    $id = 'recording-' . $target . '-' . $recording['recordID'];
1859
-    $onclick = 'M.mod_bigbluebuttonbn.recordings.recording' . ucfirst($data['action']) . '(this); return false;';
1858
+    $id = 'recording-'.$target.'-'.$recording['recordID'];
1859
+    $onclick = 'M.mod_bigbluebuttonbn.recordings.recording'.ucfirst($data['action']).'(this); return false;';
1860 1860
     if ((boolean) \mod_bigbluebuttonbn\locallib\config::get('recording_icons_enabled')) {
1861 1861
         // With icon for $manageaction.
1862 1862
         $iconattributes = array('id' => $id, 'class' => 'iconsmall');
@@ -1871,13 +1871,13 @@  discard block
 block discarded – undo
1871 1871
             );
1872 1872
         }
1873 1873
         if (isset($data['disabled'])) {
1874
-            $iconattributes['class'] .= ' fa-' . $data['disabled'];
1874
+            $iconattributes['class'] .= ' fa-'.$data['disabled'];
1875 1875
             $linkattributes['class'] = 'disabled';
1876 1876
             unset($linkattributes['onclick']);
1877 1877
         }
1878 1878
         $icon = new pix_icon(
1879
-            'i/' . $data['tag'],
1880
-            get_string('view_recording_list_actionbar_' . $data['action'], 'bigbluebuttonbn'),
1879
+            'i/'.$data['tag'],
1880
+            get_string('view_recording_list_actionbar_'.$data['action'], 'bigbluebuttonbn'),
1881 1881
             'moodle',
1882 1882
             $iconattributes
1883 1883
         );
@@ -1917,7 +1917,7 @@  discard block
 block discarded – undo
1917 1917
     if ($bbbsession['managerecordings']) {
1918 1918
         $table->head[] = get_string('view_recording_actionbar', 'bigbluebuttonbn');
1919 1919
         $table->align[] = 'left';
1920
-        $table->size[] = (count($tools) * 40) . 'px';
1920
+        $table->size[] = (count($tools) * 40).'px';
1921 1921
     }
1922 1922
     // Get the groups of the user.
1923 1923
     $usergroups = groups_get_all_groups($bbbsession['course']->id, $bbbsession['userID']);
@@ -1972,7 +1972,7 @@  discard block
 block discarded – undo
1972 1972
  */
1973 1973
 function bigbluebuttonbn_get_recording_table_row($bbbsession, $recording, $rowdata) {
1974 1974
     $row = new html_table_row();
1975
-    $row->id = 'recording-tr-' . $recording['recordID'];
1975
+    $row->id = 'recording-tr-'.$recording['recordID'];
1976 1976
     $row->attributes['data-imported'] = 'false';
1977 1977
     $texthead = '';
1978 1978
     $texttail = '';
@@ -1984,13 +1984,13 @@  discard block
 block discarded – undo
1984 1984
     }
1985 1985
     $rowdata->date_formatted = str_replace(' ', '&nbsp;', $rowdata->date_formatted);
1986 1986
     $row->cells = array();
1987
-    $row->cells[] = $texthead . $rowdata->playback . $texttail;
1988
-    $row->cells[] = $texthead . $rowdata->recording . $texttail;
1989
-    $row->cells[] = $texthead . $rowdata->description . $texttail;
1987
+    $row->cells[] = $texthead.$rowdata->playback.$texttail;
1988
+    $row->cells[] = $texthead.$rowdata->recording.$texttail;
1989
+    $row->cells[] = $texthead.$rowdata->description.$texttail;
1990 1990
     if (bigbluebuttonbn_get_recording_data_preview_enabled($bbbsession)) {
1991 1991
         $row->cells[] = $rowdata->preview;
1992 1992
     }
1993
-    $row->cells[] = $texthead . $rowdata->date_formatted . $texttail;
1993
+    $row->cells[] = $texthead.$rowdata->date_formatted.$texttail;
1994 1994
     $row->cells[] = $rowdata->duration_formatted;
1995 1995
     if ($bbbsession['managerecordings']) {
1996 1996
         $row->cells[] = $rowdata->actionbar;
@@ -2116,7 +2116,7 @@  discard block
 block discarded – undo
2116 2116
         // Enqueue it.
2117 2117
         \core\task\manager::queue_adhoc_task($task);
2118 2118
     } catch (Exception $e) {
2119
-        mtrace("Error while enqueuing completion_update_state task. " . (string) $e);
2119
+        mtrace("Error while enqueuing completion_update_state task. ".(string) $e);
2120 2120
     }
2121 2121
 }
2122 2122
 
@@ -2186,7 +2186,7 @@  discard block
 block discarded – undo
2186 2186
     }
2187 2187
     $coursesforselect = [];
2188 2188
     foreach ($courses as $course) {
2189
-        $coursesforselect[$course->id] = $course->fullname . " (" . $course->shortname . ")";
2189
+        $coursesforselect[$course->id] = $course->fullname." (".$course->shortname.")";
2190 2190
     }
2191 2191
     return $coursesforselect;
2192 2192
 }
@@ -2284,17 +2284,17 @@  discard block
 block discarded – undo
2284 2284
  * @return string containing the sql used for getting the target bigbluebuttonbn instances
2285 2285
  */
2286 2286
 function bigbluebuttonbn_get_recordings_deleted_sql_select($courseid = 0, $bigbluebuttonbnid = null, $subset = true) {
2287
-    $sql = "log = '" . BIGBLUEBUTTONBN_LOG_EVENT_DELETE . "' AND meta like '%has_recordings%' AND meta like '%true%'";
2287
+    $sql = "log = '".BIGBLUEBUTTONBN_LOG_EVENT_DELETE."' AND meta like '%has_recordings%' AND meta like '%true%'";
2288 2288
     if (empty($courseid)) {
2289 2289
         $courseid = 0;
2290 2290
     }
2291 2291
     if (empty($bigbluebuttonbnid)) {
2292
-        return $sql . " AND courseid = {$courseid}";
2292
+        return $sql." AND courseid = {$courseid}";
2293 2293
     }
2294 2294
     if ($subset) {
2295
-        return $sql . " AND bigbluebuttonbnid = '{$bigbluebuttonbnid}'";
2295
+        return $sql." AND bigbluebuttonbnid = '{$bigbluebuttonbnid}'";
2296 2296
     }
2297
-    return $sql . " AND courseid = {$courseid} AND bigbluebuttonbnid <> '{$bigbluebuttonbnid}'";
2297
+    return $sql." AND courseid = {$courseid} AND bigbluebuttonbnid <> '{$bigbluebuttonbnid}'";
2298 2298
 }
2299 2299
 
2300 2300
 /**
@@ -2308,17 +2308,17 @@  discard block
 block discarded – undo
2308 2308
  * @return string containing the sql used for getting the target bigbluebuttonbn instances
2309 2309
  */
2310 2310
 function bigbluebuttonbn_get_recordings_imported_sql_select($courseid = 0, $bigbluebuttonbnid = null, $subset = true) {
2311
-    $sql = "log = '" . BIGBLUEBUTTONBN_LOG_EVENT_IMPORT . "'";
2311
+    $sql = "log = '".BIGBLUEBUTTONBN_LOG_EVENT_IMPORT."'";
2312 2312
     if (empty($courseid)) {
2313 2313
         $courseid = 0;
2314 2314
     }
2315 2315
     if (empty($bigbluebuttonbnid)) {
2316
-        return $sql . " AND courseid = '{$courseid}'";
2316
+        return $sql." AND courseid = '{$courseid}'";
2317 2317
     }
2318 2318
     if ($subset) {
2319
-        return $sql . " AND bigbluebuttonbnid = '{$bigbluebuttonbnid}'";
2319
+        return $sql." AND bigbluebuttonbnid = '{$bigbluebuttonbnid}'";
2320 2320
     }
2321
-    return $sql . " AND courseid = '{$courseid}' AND bigbluebuttonbnid <> '{$bigbluebuttonbnid}'";
2321
+    return $sql." AND courseid = '{$courseid}' AND bigbluebuttonbnid <> '{$bigbluebuttonbnid}'";
2322 2322
 }
2323 2323
 
2324 2324
 /**
@@ -2377,7 +2377,7 @@  discard block
 block discarded – undo
2377 2377
     }
2378 2378
     // Prepare select for loading records based on existent bigbluebuttonbns.
2379 2379
     $sql = 'SELECT DISTINCT meetingid, bigbluebuttonbnid FROM {bigbluebuttonbn_logs} WHERE ';
2380
-    $sql .= '(bigbluebuttonbnid=' . implode(' OR bigbluebuttonbnid=', array_keys($bigbluebuttonbns)) . ')';
2380
+    $sql .= '(bigbluebuttonbnid='.implode(' OR bigbluebuttonbnid=', array_keys($bigbluebuttonbns)).')';
2381 2381
     // Include only Create events and exclude those with record not true.
2382 2382
     $sql .= ' AND log = ? AND meta LIKE ? AND meta LIKE ?';
2383 2383
     // Execute select for loading records based on existent bigbluebuttonbns.
@@ -2562,8 +2562,8 @@  discard block
 block discarded – undo
2562 2562
     require_once($CFG->dirroot.'/calendar/lib.php');
2563 2563
     $activitytime = '';
2564 2564
     if ($time) {
2565
-        $activitytime = calendar_day_representation($time) . ' ' .
2566
-        get_string('mod_form_field_notification_msg_at', 'bigbluebuttonbn') . ' ' .
2565
+        $activitytime = calendar_day_representation($time).' '.
2566
+        get_string('mod_form_field_notification_msg_at', 'bigbluebuttonbn').' '.
2567 2567
         calendar_time_representation($time);
2568 2568
     }
2569 2569
     return $activitytime;
@@ -3116,16 +3116,16 @@  discard block
 block discarded – undo
3116 3116
         return $output;
3117 3117
     }
3118 3118
     $output .= $OUTPUT->box_start(
3119
-        'box boxalignleft adminerror alert alert-' . $type . ' alert-block fade in',
3119
+        'box boxalignleft adminerror alert alert-'.$type.' alert-block fade in',
3120 3120
         'bigbluebuttonbn_view_general_warning'
3121
-    ) . "\n";
3122
-    $output .= '    ' . $message . "\n";
3123
-    $output .= '  <div class="singlebutton pull-right">' . "\n";
3121
+    )."\n";
3122
+    $output .= '    '.$message."\n";
3123
+    $output .= '  <div class="singlebutton pull-right">'."\n";
3124 3124
     if (!empty($href)) {
3125 3125
         $output .= bigbluebuttonbn_render_warning_button($href, $text, $class);
3126 3126
     }
3127
-    $output .= '  </div>' . "\n";
3128
-    $output .= $OUTPUT->box_end() . "\n";
3127
+    $output .= '  </div>'."\n";
3128
+    $output .= $OUTPUT->box_end()."\n";
3129 3129
     return $output;
3130 3130
 }
3131 3131
 
@@ -3149,11 +3149,11 @@  discard block
 block discarded – undo
3149 3149
     if ($class == '') {
3150 3150
         $class = 'btn btn-secondary';
3151 3151
     }
3152
-    $output = '  <form method="post" action="' . $href . '" class="form-inline">' . "\n";
3153
-    $output .= '      <button type="submit" class="' . $class . '"' . "\n";
3154
-    $output .= '          title="' . $title . '"' . "\n";
3155
-    $output .= '          >' . $text . '</button>' . "\n";
3156
-    $output .= '  </form>' . "\n";
3152
+    $output = '  <form method="post" action="'.$href.'" class="form-inline">'."\n";
3153
+    $output .= '      <button type="submit" class="'.$class.'"'."\n";
3154
+    $output .= '          title="'.$title.'"'."\n";
3155
+    $output .= '          >'.$text.'</button>'."\n";
3156
+    $output .= '  </form>'."\n";
3157 3157
     return $output;
3158 3158
 }
3159 3159
 
@@ -3217,7 +3217,7 @@  discard block
 block discarded – undo
3217 3217
 function bigbluebuttonbn_user_can_join_meeting($bigbluebuttonbn, $mid = null, $userid = null) {
3218 3218
     // By default, use a meetingid without groups.
3219 3219
     if (empty($mid)) {
3220
-        $mid = $bigbluebuttonbn->meetingid . '-' . $bigbluebuttonbn->course . '-' . $bigbluebuttonbn->id;
3220
+        $mid = $bigbluebuttonbn->meetingid.'-'.$bigbluebuttonbn->course.'-'.$bigbluebuttonbn->id;
3221 3221
     }
3222 3222
     // When meeting is running, all authorized users can join right in.
3223 3223
     if (bigbluebuttonbn_is_meeting_running($mid)) {
@@ -3286,7 +3286,7 @@  discard block
 block discarded – undo
3286 3286
  * @return boolean
3287 3287
  */
3288 3288
 function bigbluebuttonbn_has_html5_client() {
3289
-    $checkurl = \mod_bigbluebuttonbn\locallib\bigbluebutton::root() . "html5client/check";
3289
+    $checkurl = \mod_bigbluebuttonbn\locallib\bigbluebutton::root()."html5client/check";
3290 3290
     $curlinfo = bigbluebuttonbn_wrap_xml_load_file_curl_request($checkurl, 'HEAD');
3291 3291
     return (isset($curlinfo['http_code']) && $curlinfo['http_code'] == 200);
3292 3292
 }
@@ -3314,7 +3314,7 @@  discard block
 block discarded – undo
3314 3314
     $bbbsession['modPW'] = $bbbsession['bigbluebuttonbn']->moderatorpass;
3315 3315
     $bbbsession['viewerPW'] = $bbbsession['bigbluebuttonbn']->viewerpass;
3316 3316
     // Database info related to the activity.
3317
-    $bbbsession['meetingid'] = $bbbsession['bigbluebuttonbn']->meetingid . '-' . $bbbsession['course']->id . '-' .
3317
+    $bbbsession['meetingid'] = $bbbsession['bigbluebuttonbn']->meetingid.'-'.$bbbsession['course']->id.'-'.
3318 3318
     $bbbsession['bigbluebuttonbn']->id;
3319 3319
     $bbbsession['meetingname'] = $bbbsession['bigbluebuttonbn']->name;
3320 3320
     $bbbsession['meetingdescription'] = $bbbsession['bigbluebuttonbn']->intro;
@@ -3346,12 +3346,12 @@  discard block
 block discarded – undo
3346 3346
     if ($bbbsession['bigbluebuttonbn']->record) {
3347 3347
         // Check if is enable record all from start.
3348 3348
         if ($bbbsession['recordallfromstart']) {
3349
-            $bbbsession['welcome'] .= '<br><br>' . get_string(
3349
+            $bbbsession['welcome'] .= '<br><br>'.get_string(
3350 3350
                 'bbbrecordallfromstartwarning',
3351 3351
                 'bigbluebuttonbn'
3352 3352
             );
3353 3353
         } else {
3354
-            $bbbsession['welcome'] .= '<br><br>' . get_string('bbbrecordwarning', 'bigbluebuttonbn');
3354
+            $bbbsession['welcome'] .= '<br><br>'.get_string('bbbrecordwarning', 'bigbluebuttonbn');
3355 3355
         }
3356 3356
     }
3357 3357
     $bbbsession['openingtime'] = $bbbsession['bigbluebuttonbn']->openingtime;
@@ -3366,7 +3366,7 @@  discard block
 block discarded – undo
3366 3366
     $bbbsession['originServerName'] = $parsedurl['host'];
3367 3367
     $bbbsession['originServerUrl'] = $CFG->wwwroot;
3368 3368
     $bbbsession['originServerCommonName'] = '';
3369
-    $bbbsession['originTag'] = 'moodle-mod_bigbluebuttonbn (' . get_config('mod_bigbluebuttonbn', 'version') . ')';
3369
+    $bbbsession['originTag'] = 'moodle-mod_bigbluebuttonbn ('.get_config('mod_bigbluebuttonbn', 'version').')';
3370 3370
     $bbbsession['bnserver'] = bigbluebuttonbn_is_bn_server();
3371 3371
     // Setting for clienttype, assign flash if not enabled, or default if not editable.
3372 3372
     $bbbsession['clienttype'] = BIGBLUEBUTTON_CLIENTTYPE_FLASH;
@@ -3473,7 +3473,7 @@  discard block
 block discarded – undo
3473 3473
     if ((boolean) \mod_bigbluebuttonbn\locallib\config::get('recordingstatus_enabled')) {
3474 3474
         $metadata["bn-recording-status"] = json_encode(
3475 3475
             array(
3476
-                'email' => array('"' . fullname($USER) . '" <' . $USER->email . '>'),
3476
+                'email' => array('"'.fullname($USER).'" <'.$USER->email.'>'),
3477 3477
                 'context' => $bbbsession['bigbluebuttonbnURL'],
3478 3478
             )
3479 3479
         );
Please login to merge, or discard this patch.
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -796,7 +796,7 @@  discard block
 block discarded – undo
796 796
     $data['role'] = array(
797 797
         'name' => get_string('mod_form_field_participant_list_type_role', 'bigbluebuttonbn'),
798 798
         'children' => bigbluebuttonbn_get_roles_select($context, true)
799
-      );
799
+        );
800 800
     $data['user'] = array(
801 801
         'name' => get_string('mod_form_field_participant_list_type_user', 'bigbluebuttonbn'),
802 802
         'children' => bigbluebuttonbn_get_users_select($context, $bbactivity),
@@ -1704,7 +1704,7 @@  discard block
 block discarded – undo
1704 1704
         'data-action' => 'play',
1705 1705
         'data-target' => $playback['type'],
1706 1706
         'data-href' => $href,
1707
-      );
1707
+        );
1708 1708
     if ($CFG->bigbluebuttonbn_recordings_validate_url && !bigbluebuttonbn_is_bn_server() && !bigbluebuttonbn_is_valid_resource(trim($playback['url']))) {
1709 1709
         $linkattributes['class'] = 'btn btn-sm btn-warning';
1710 1710
         $linkattributes['title'] = get_string('view_recording_format_errror_unreachable', 'bigbluebuttonbn');
Please login to merge, or discard this patch.
classes/locallib/bigbluebutton.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -27,7 +27,7 @@  discard block
 block discarded – undo
27 27
 
28 28
 defined('MOODLE_INTERNAL') || die();
29 29
 
30
-require_once($CFG->dirroot . '/mod/bigbluebuttonbn/locallib.php');
30
+require_once($CFG->dirroot.'/mod/bigbluebuttonbn/locallib.php');
31 31
 
32 32
 /**
33 33
  * Wrapper for executing http requests on a BigBlueButton server.
@@ -46,18 +46,18 @@  discard block
 block discarded – undo
46 46
      * @return string
47 47
      */
48 48
     public static function action_url($action = '', $data = array(), $metadata = array()) {
49
-        $baseurl = self::sanitized_url() . $action . '?';
49
+        $baseurl = self::sanitized_url().$action.'?';
50 50
         $metadata = array_combine(
51 51
             array_map(
52 52
                 function($k) {
53
-                    return 'meta_' . $k;
53
+                    return 'meta_'.$k;
54 54
                 }
55 55
                 , array_keys($metadata)
56 56
             ),
57 57
             $metadata
58 58
         );
59 59
         $params = http_build_query($data + $metadata, '', '&');
60
-        return $baseurl . $params . '&checksum=' . sha1($action . $params . self::sanitized_secret());
60
+        return $baseurl.$params.'&checksum='.sha1($action.$params.self::sanitized_secret());
61 61
     }
62 62
 
63 63
     /**
@@ -73,7 +73,7 @@  discard block
 block discarded – undo
73 73
         if (substr($serverurl, -4) == '/api') {
74 74
             $serverurl = rtrim($serverurl, '/api');
75 75
         }
76
-        return $serverurl . '/api/';
76
+        return $serverurl.'/api/';
77 77
     }
78 78
 
79 79
     /**
@@ -94,8 +94,8 @@  discard block
 block discarded – undo
94 94
         $pserverurl = parse_url(trim(\mod_bigbluebuttonbn\locallib\config::get('server_url')));
95 95
         $pserverurlport = "";
96 96
         if (isset($pserverurl['port'])) {
97
-            $pserverurlport = ":" . $pserverurl['port'];
97
+            $pserverurlport = ":".$pserverurl['port'];
98 98
         }
99
-        return $pserverurl['scheme'] . "://" . $pserverurl['host'] . $pserverurlport . "/";
99
+        return $pserverurl['scheme']."://".$pserverurl['host'].$pserverurlport."/";
100 100
     }
101 101
 }
Please login to merge, or discard this patch.
config-dist.php 1 patch
Indentation   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -103,7 +103,7 @@  discard block
 block discarded – undo
103 103
  * recordings from a different activity even from a different course.
104 104
  **/
105 105
 
106
- /*
106
+    /*
107 107
  * When the value is set to 1 (checked) the bigbluebuttonbn rooms or
108 108
  * activities will have the 'import recordings' capability enabled.
109 109
  * $CFG->bigbluebuttonbn['importrecordings_enabled'] = 0;
@@ -124,7 +124,7 @@  discard block
 block discarded – undo
124 124
  * 'Join session' button enabled
125 125
  **/
126 126
 
127
- /*
127
+    /*
128 128
  * When the value is set to 1 (checked) the bigbluebuttonbn rooms or
129 129
  * activities will have the 'wait for moderator' capability enabled by
130 130
  * default.
@@ -276,7 +276,7 @@  discard block
 block discarded – undo
276 276
  * $CFG->bigbluebuttonbn['recordings_preview_editable'] = 0;
277 277
  */
278 278
 
279
- /* When the value is set to 1 (checked) the playback URLs will be validated
279
+    /* When the value is set to 1 (checked) the playback URLs will be validated
280 280
   * before the user access it.
281 281
   * $CFG->bigbluebuttonbn['recordings_validate_url'] = 1;
282 282
   */
@@ -366,27 +366,27 @@  discard block
 block discarded – undo
366 366
  * $CFG->bigbluebuttonbn['general_warning_message'] = "Would you like to record your BigBlueButton sessions for later viewing? ";
367 367
  */
368 368
 
369
- /*
369
+    /*
370 370
  * The warning box is always shown to administrators, but it is also possible to define other roles
371 371
  * to whom the it will be shown. The roles are based on the shortnames defined by Moodle:
372 372
  *     'manager,coursecreator,editingteacher,teacher,student,guest,user,frontpage'
373 373
  * $CFG->bigbluebuttonbn['general_warning_roles'] = 'editingteacher,teacher';
374 374
  */
375 375
 
376
- /*
376
+    /*
377 377
  * As the general_warning_message is shown in a box, its type can be defined with general_warning_type
378 378
  * The default type is 'info' which is normaly rendered in blue when using a bootstrap theme.
379 379
  * All the modifiers for boxed in bootstrap can be used [info|success|warning|danger].
380 380
  * $CFG->bigbluebuttonbn['general_warning_box_type'] = 'info';
381 381
  */
382 382
 
383
- /*
383
+    /*
384 384
  * Additionally, when general_warning_button_href value is different than "", a button
385 385
  * can also be shown right after the message.
386 386
  * $CFG->bigbluebuttonbn['general_warning_button_href'] = "http://blindsidenetworks.com/";
387 387
  */
388 388
 
389
- /*
389
+    /*
390 390
  * Finally, the text and class for the button can be modified
391 391
  * $CFG->bigbluebuttonbn['general_warning_button_text'] = "Upgrade your site";
392 392
  * $CFG->bigbluebuttonbn['general_warning_button_class'] = "btn btn-primary";
Please login to merge, or discard this patch.