Completed
Push — master ( 2cf02e...c7d8b1 )
by Jesus
33:46 queued 27:08
created
lib.php 2 patches
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';
@@ -367,7 +367,7 @@  discard block
 block discarded – undo
367 367
     $sql = "SELECT COUNT(*) FROM {bigbluebuttonbn_logs} ";
368 368
     $sql .= "WHERE courseid = ? AND bigbluebuttonbnid = ? AND userid = ? AND (log = ? OR log = ?)";
369 369
     $result = $DB->count_records_sql($sql, array($course->id, $bigbluebuttonbn->id, $user->id,
370
-                                              BIGBLUEBUTTONBN_LOG_EVENT_JOIN, BIGBLUEBUTTONBN_LOG_EVENT_PLAYED));
370
+                                                BIGBLUEBUTTONBN_LOG_EVENT_JOIN, BIGBLUEBUTTONBN_LOG_EVENT_PLAYED));
371 371
     return $result;
372 372
 }
373 373
 
@@ -598,12 +598,12 @@  discard block
 block discarded – undo
598 598
     $str  = '<div class="bigbluebuttonbn overview">'."\n";
599 599
     $str .= '  <div class="name">'.get_string('modulename', 'bigbluebuttonbn').':&nbsp;'."\n";
600 600
     $str .= '    <a '.$classes.'href="'.$CFG->wwwroot.'/mod/bigbluebuttonbn/view.php?id='.$bigbluebuttonbn->coursemodule.
601
-      '">'.$bigbluebuttonbn->name.'</a>'."\n";
601
+        '">'.$bigbluebuttonbn->name.'</a>'."\n";
602 602
     $str .= '  </div>'."\n";
603 603
     $str .= '  <div class="info">'.get_string($start, 'bigbluebuttonbn').': '.userdate($bigbluebuttonbn->openingtime).
604 604
         '</div>'."\n";
605 605
     $str .= '  <div class="info">'.get_string('ends_at', 'bigbluebuttonbn').': '.userdate($bigbluebuttonbn->closingtime)
606
-      .'</div>'."\n";
606
+        .'</div>'."\n";
607 607
     $str .= '</div>'."\n";
608 608
     return $str;
609 609
 }
@@ -845,7 +845,7 @@  discard block
 block discarded – undo
845 845
             'bigbluebuttonbn',
846 846
             $bigbluebuttonbn->id,
847 847
             $bigbluebuttonbn->completionexpected
848
-          );
848
+            );
849 849
     }
850 850
 }
851 851
 
Please login to merge, or discard this patch.
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.
classes/locallib/notifier.php 1 patch
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
 
@@ -159,7 +159,7 @@  discard block
 block discarded – undo
159 159
                     // Queue it.
160 160
                     \core\task\manager::queue_adhoc_task($task);
161 161
                 } catch (Exception $e) {
162
-                    mtrace("Error while enqueuing completion_uopdate_state task. " . (string)$e);
162
+                    mtrace("Error while enqueuing completion_uopdate_state task. ".(string) $e);
163 163
                 }
164 164
             }
165 165
         }
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.
locallib.php 1 patch
Spacing   +78 added lines, -78 removed lines patch added patch discarded remove patch
@@ -31,7 +31,7 @@  discard block
 block discarded – undo
31 31
 
32 32
 global $CFG;
33 33
 
34
-require_once(__DIR__ . '/lib.php');
34
+require_once(__DIR__.'/lib.php');
35 35
 
36 36
 /** @var BIGBLUEBUTTONBN_UPDATE_CACHE boolean set to true indicates that cache has to be updated */
37 37
 const BIGBLUEBUTTONBN_UPDATE_CACHE = true;
@@ -144,8 +144,8 @@  discard block
 block discarded – undo
144 144
     $data = null;
145 145
     if (!is_null($pname) && !is_null($purl)) {
146 146
         $method = 'POST';
147
-        $data = "<?xml version='1.0' encoding='UTF-8'?><modules><module name='presentation'><document url='" .
148
-            $purl . "' /></module></modules>";
147
+        $data = "<?xml version='1.0' encoding='UTF-8'?><modules><module name='presentation'><document url='".
148
+            $purl."' /></module></modules>";
149 149
     }
150 150
     $xml = bigbluebuttonbn_wrap_xml_load_file($createmeetingurl, $method, $data);
151 151
     if ($xml) {
@@ -405,7 +405,7 @@  discard block
 block discarded – undo
405 405
         if (is_object($value)) {
406 406
             $value = '';
407 407
         }
408
-        $metadataarray['meta_' . $key] = $value;
408
+        $metadataarray['meta_'.$key] = $value;
409 409
     }
410 410
     return $metadataarray;
411 411
 }
@@ -545,7 +545,7 @@  discard block
 block discarded – undo
545 545
             return $xml;
546 546
         } catch (Exception $e) {
547 547
             libxml_use_internal_errors($previous);
548
-            $error = 'Caught exception: ' . $e->getMessage();
548
+            $error = 'Caught exception: '.$e->getMessage();
549 549
             debugging($error, DEBUG_DEVELOPER);
550 550
             return null;
551 551
         }
@@ -556,7 +556,7 @@  discard block
 block discarded – undo
556 556
         $response = simplexml_load_file($url, 'SimpleXMLElement', LIBXML_NOCDATA | LIBXML_NOBLANKS);
557 557
         return $response;
558 558
     } catch (Exception $e) {
559
-        $error = 'Caught exception: ' . $e->getMessage();
559
+        $error = 'Caught exception: '.$e->getMessage();
560 560
         debugging($error, DEBUG_DEVELOPER);
561 561
         libxml_use_internal_errors($previous);
562 562
         return null;
@@ -582,8 +582,8 @@  discard block
 block discarded – undo
582 582
         }
583 583
         $options = array();
584 584
         $options['CURLOPT_HTTPHEADER'] = array(
585
-            'Content-Type: ' . $contenttype,
586
-            'Content-Length: ' . strlen($data),
585
+            'Content-Type: '.$contenttype,
586
+            'Content-Length: '.strlen($data),
587 587
             'Content-Language: en-US',
588 588
         );
589 589
 
@@ -604,7 +604,7 @@  discard block
 block discarded – undo
604 604
  * @return void
605 605
  */
606 606
 function bigbluebuttonbn_end_meeting_if_running($bigbluebuttonbn) {
607
-    $meetingid = $bigbluebuttonbn->meetingid . '-' . $bigbluebuttonbn->course . '-' . $bigbluebuttonbn->id;
607
+    $meetingid = $bigbluebuttonbn->meetingid.'-'.$bigbluebuttonbn->course.'-'.$bigbluebuttonbn->id;
608 608
     if (bigbluebuttonbn_is_meeting_running($meetingid)) {
609 609
         bigbluebuttonbn_end_meeting($meetingid, $bigbluebuttonbn->moderatorpass);
610 610
     }
@@ -624,9 +624,9 @@  discard block
 block discarded – undo
624 624
     if ($userroles) {
625 625
         $where = '';
626 626
         foreach ($userroles as $userrole) {
627
-            $where .= (empty($where) ? ' WHERE' : ' OR') . ' id=' . $userrole->roleid;
627
+            $where .= (empty($where) ? ' WHERE' : ' OR').' id='.$userrole->roleid;
628 628
         }
629
-        $userroles = $DB->get_records_sql('SELECT * FROM {role}' . $where);
629
+        $userroles = $DB->get_records_sql('SELECT * FROM {role}'.$where);
630 630
     }
631 631
     return $userroles;
632 632
 }
@@ -951,9 +951,9 @@  discard block
 block discarded – undo
951 951
     if ($voicebridge == 0) {
952 952
         return true;
953 953
     }
954
-    $select = 'voicebridge = ' . $voicebridge;
954
+    $select = 'voicebridge = '.$voicebridge;
955 955
     if ($instance != 0) {
956
-        $select .= ' AND id <>' . $instance;
956
+        $select .= ' AND id <>'.$instance;
957 957
     }
958 958
     if (!$DB->get_records_select('bigbluebuttonbn', $select)) {
959 959
         return true;
@@ -1089,7 +1089,7 @@  discard block
 block discarded – undo
1089 1089
 function bigbluebuttonbn_generate_nonce() {
1090 1090
     $mt = microtime();
1091 1091
     $rand = mt_rand();
1092
-    return md5($mt . $rand);
1092
+    return md5($mt.$rand);
1093 1093
 }
1094 1094
 
1095 1095
 /**
@@ -1137,7 +1137,7 @@  discard block
 block discarded – undo
1137 1137
         $params['other'] = $options['other'];
1138 1138
     }
1139 1139
     $event = call_user_func_array(
1140
-        '\mod_bigbluebuttonbn\event\\' . $type . '::create',
1140
+        '\mod_bigbluebuttonbn\event\\'.$type.'::create',
1141 1141
         array($params)
1142 1142
     );
1143 1143
     $event->add_record_snapshot('course_modules', $cm);
@@ -1295,7 +1295,7 @@  discard block
 block discarded – undo
1295 1295
  * @return object
1296 1296
  */
1297 1297
 function bigbluebuttonbn_set_config_xml($meetingid, $configxml) {
1298
-    $urldefaultconfig = \mod_bigbluebuttonbn\locallib\config::get('server_url') . 'api/setConfigXML?';
1298
+    $urldefaultconfig = \mod_bigbluebuttonbn\locallib\config::get('server_url').'api/setConfigXML?';
1299 1299
     $configxmlparams = bigbluebuttonbn_set_config_xml_params($meetingid, $configxml);
1300 1300
     $xml = bigbluebuttonbn_wrap_xml_load_file(
1301 1301
         $urldefaultconfig,
@@ -1315,9 +1315,9 @@  discard block
 block discarded – undo
1315 1315
  * @return string
1316 1316
  */
1317 1317
 function bigbluebuttonbn_set_config_xml_params($meetingid, $configxml) {
1318
-    $params = 'configXML=' . urlencode($configxml) . '&meetingID=' . urlencode($meetingid);
1318
+    $params = 'configXML='.urlencode($configxml).'&meetingID='.urlencode($meetingid);
1319 1319
     $sharedsecret = \mod_bigbluebuttonbn\locallib\config::get('shared_secret');
1320
-    $configxmlparams = $params . '&checksum=' . sha1('setConfigXML' . $params . $sharedsecret);
1320
+    $configxmlparams = $params.'&checksum='.sha1('setConfigXML'.$params.$sharedsecret);
1321 1321
     return $configxmlparams;
1322 1322
 }
1323 1323
 
@@ -1425,7 +1425,7 @@  discard block
 block discarded – undo
1425 1425
     global $USER;
1426 1426
     $starttime = $starttime - ($starttime % 1000);
1427 1427
     // Set formatted date.
1428
-    $dateformat = get_string('strftimerecentfull', 'langconfig') . ' %Z';
1428
+    $dateformat = get_string('strftimerecentfull', 'langconfig').' %Z';
1429 1429
     return userdate($starttime / 1000, $dateformat, usertimezone($USER->timezone));
1430 1430
 }
1431 1431
 
@@ -1473,11 +1473,11 @@  discard block
 block discarded – undo
1473 1473
         $actionbar .= bigbluebuttonbn_actionbar_render_button($recording, $buttonpayload);
1474 1474
     }
1475 1475
     $head = html_writer::start_tag('div', array(
1476
-        'id' => 'recording-actionbar-' . $recording['recordID'],
1476
+        'id' => 'recording-actionbar-'.$recording['recordID'],
1477 1477
         'data-recordingid' => $recording['recordID'],
1478 1478
         'data-meetingid' => $recording['meetingID']));
1479 1479
     $tail = html_writer::end_tag('div');
1480
-    return $head . $actionbar . $tail;
1480
+    return $head.$actionbar.$tail;
1481 1481
 }
1482 1482
 
1483 1483
 /**
@@ -1541,7 +1541,7 @@  discard block
 block discarded – undo
1541 1541
  * @return string
1542 1542
  */
1543 1543
 function bigbluebuttonbn_get_recording_data_row_preview($recording) {
1544
-    $options = array('id' => 'preview-' . $recording['recordID']);
1544
+    $options = array('id' => 'preview-'.$recording['recordID']);
1545 1545
     if ($recording['published'] === 'false') {
1546 1546
         $options['hidden'] = 'hidden';
1547 1547
     }
@@ -1573,7 +1573,7 @@  discard block
 block discarded – undo
1573 1573
         $recordingpreview .= html_writer::start_tag('div', array('class' => ''));
1574 1574
         $recordingpreview .= html_writer::empty_tag(
1575 1575
             'img',
1576
-            array('src' => trim($image['url']) . '?' . time(), 'class' => 'recording-thumbnail pull-left')
1576
+            array('src' => trim($image['url']).'?'.time(), 'class' => 'recording-thumbnail pull-left')
1577 1577
         );
1578 1578
         $recordingpreview .= html_writer::end_tag('div');
1579 1579
     }
@@ -1608,7 +1608,7 @@  discard block
 block discarded – undo
1608 1608
     if ($recording['published'] === 'false') {
1609 1609
         $visibility = 'hidden ';
1610 1610
     }
1611
-    $id = 'playbacks-' . $recording['recordID'];
1611
+    $id = 'playbacks-'.$recording['recordID'];
1612 1612
     $recordingtypes = html_writer::start_tag('div', array('id' => $id, 'data-imported' => $dataimported,
1613 1613
         'data-meetingid' => $recording['meetingID'], 'data-recordingid' => $recording['recordID'],
1614 1614
         'title' => $title, $visibility => $visibility));
@@ -1633,14 +1633,14 @@  discard block
 block discarded – undo
1633 1633
     if (!bigbluebuttonbn_include_recording_data_row_type($recording, $bbbsession, $playback)) {
1634 1634
         return '';
1635 1635
     }
1636
-    $text = get_string('view_recording_format_' . $playback['type'], 'bigbluebuttonbn');
1637
-    $href = $CFG->wwwroot . '/mod/bigbluebuttonbn/bbb_view.php?action=play&bn=' . $bbbsession['bigbluebuttonbn']->id .
1638
-        '&mid=' . $recording['meetingID'] . '&rid=' . $recording['recordID'] . '&rtype=' . $playback['type'];
1636
+    $text = get_string('view_recording_format_'.$playback['type'], 'bigbluebuttonbn');
1637
+    $href = $CFG->wwwroot.'/mod/bigbluebuttonbn/bbb_view.php?action=play&bn='.$bbbsession['bigbluebuttonbn']->id.
1638
+        '&mid='.$recording['meetingID'].'&rid='.$recording['recordID'].'&rtype='.$playback['type'];
1639 1639
     if (!isset($recording['imported']) || !isset($recording['protected']) || $recording['protected'] === 'false') {
1640
-        $href .= '&href=' . urlencode(trim($playback['url']));
1640
+        $href .= '&href='.urlencode(trim($playback['url']));
1641 1641
     }
1642 1642
     $linkattributes = array(
1643
-        'id' => 'recording-play-' . $playback['type'] . '-' . $recording['recordID'],
1643
+        'id' => 'recording-play-'.$playback['type'].'-'.$recording['recordID'],
1644 1644
         'class' => 'btn btn-sm btn-default',
1645 1645
         'onclick' => 'M.mod_bigbluebuttonbn.recordings.recordingPlay(this);',
1646 1646
         'data-action' => 'play',
@@ -1652,7 +1652,7 @@  discard block
 block discarded – undo
1652 1652
         $linkattributes['title'] = get_string('view_recording_format_errror_unreachable', 'bigbluebuttonbn');
1653 1653
         unset($linkattributes['data-href']);
1654 1654
     }
1655
-    return $OUTPUT->action_link('#', $text, null, $linkattributes) . '&#32;';
1655
+    return $OUTPUT->action_link('#', $text, null, $linkattributes).'&#32;';
1656 1656
 }
1657 1657
 
1658 1658
 /**
@@ -1678,7 +1678,7 @@  discard block
 block discarded – undo
1678 1678
     $validatedurls[$urlhost] = true;
1679 1679
     $curlinfo = bigbluebuttonbn_wrap_xml_load_file_curl_request($url, 'HEAD');
1680 1680
     if (!isset($curlinfo['http_code']) || $curlinfo['http_code'] != 200) {
1681
-        $error = "Resources hosted by " . $urlhost . " are unreachable. Server responded with code " . $curlinfo['http_code'];
1681
+        $error = "Resources hosted by ".$urlhost." are unreachable. Server responded with code ".$curlinfo['http_code'];
1682 1682
         debugging($error, DEBUG_DEVELOPER);
1683 1683
         $validatedurls[$urlhost] = false;
1684 1684
     }
@@ -1769,12 +1769,12 @@  discard block
 block discarded – undo
1769 1769
  * @return string
1770 1770
  */
1771 1771
 function bigbluebuttonbn_get_recording_data_row_text($recording, $text, $source, $data) {
1772
-    $htmltext = '<span>' . htmlentities($text) . '</span>';
1772
+    $htmltext = '<span>'.htmlentities($text).'</span>';
1773 1773
     if (empty($data)) {
1774 1774
         return $htmltext;
1775 1775
     }
1776
-    $target = $data['action'] . '-' . $data['target'];
1777
-    $id = 'recording-' . $target . '-' . $data['recordingid'];
1776
+    $target = $data['action'].'-'.$data['target'];
1777
+    $id = 'recording-'.$target.'-'.$data['recordingid'];
1778 1778
     $attributes = array('id' => $id, 'class' => 'quickeditlink col-md-20',
1779 1779
         'data-recordingid' => $data['recordingid'], 'data-meetingid' => $data['meetingid'],
1780 1780
         'data-target' => $data['target'], 'data-source' => $source);
@@ -1782,7 +1782,7 @@  discard block
 block discarded – undo
1782 1782
     $tail = html_writer::end_tag('div');
1783 1783
     $payload = array('action' => $data['action'], 'tag' => $data['tag'], 'target' => $data['target']);
1784 1784
     $htmllink = bigbluebuttonbn_actionbar_render_button($recording, $payload);
1785
-    return $head . $htmltext . $htmllink . $tail;
1785
+    return $head.$htmltext.$htmllink.$tail;
1786 1786
 }
1787 1787
 
1788 1788
 /**
@@ -1800,10 +1800,10 @@  discard block
 block discarded – undo
1800 1800
     }
1801 1801
     $target = $data['action'];
1802 1802
     if (isset($data['target'])) {
1803
-        $target .= '-' . $data['target'];
1803
+        $target .= '-'.$data['target'];
1804 1804
     }
1805
-    $id = 'recording-' . $target . '-' . $recording['recordID'];
1806
-    $onclick = 'M.mod_bigbluebuttonbn.recordings.recording' . ucfirst($data['action']) . '(this);';
1805
+    $id = 'recording-'.$target.'-'.$recording['recordID'];
1806
+    $onclick = 'M.mod_bigbluebuttonbn.recordings.recording'.ucfirst($data['action']).'(this);';
1807 1807
     if ((boolean) \mod_bigbluebuttonbn\locallib\config::get('recording_icons_enabled')) {
1808 1808
         // With icon for $manageaction.
1809 1809
         $iconattributes = array('id' => $id, 'class' => 'iconsmall');
@@ -1818,13 +1818,13 @@  discard block
 block discarded – undo
1818 1818
             );
1819 1819
         }
1820 1820
         if (isset($data['disabled'])) {
1821
-            $iconattributes['class'] .= ' fa-' . $data['disabled'];
1821
+            $iconattributes['class'] .= ' fa-'.$data['disabled'];
1822 1822
             $linkattributes['class'] = 'disabled';
1823 1823
             unset($linkattributes['onclick']);
1824 1824
         }
1825 1825
         $icon = new pix_icon(
1826
-            'i/' . $data['tag'],
1827
-            get_string('view_recording_list_actionbar_' . $data['action'], 'bigbluebuttonbn'),
1826
+            'i/'.$data['tag'],
1827
+            get_string('view_recording_list_actionbar_'.$data['action'], 'bigbluebuttonbn'),
1828 1828
             'moodle',
1829 1829
             $iconattributes
1830 1830
         );
@@ -1922,7 +1922,7 @@  discard block
 block discarded – undo
1922 1922
     if ($bbbsession['managerecordings']) {
1923 1923
         $table->head[] = get_string('view_recording_actionbar', 'bigbluebuttonbn');
1924 1924
         $table->align[] = 'left';
1925
-        $table->size[] = (count($tools) * 40) . 'px';
1925
+        $table->size[] = (count($tools) * 40).'px';
1926 1926
     }
1927 1927
     // Get the groups of the user.
1928 1928
     $usergroups = groups_get_all_groups($bbbsession['course']->id, $bbbsession['userID']);
@@ -1987,7 +1987,7 @@  discard block
 block discarded – undo
1987 1987
  */
1988 1988
 function bigbluebuttonbn_get_recording_table_row($bbbsession, $recording, $rowdata) {
1989 1989
     $row = new html_table_row();
1990
-    $row->id = 'recording-tr-' . $recording['recordID'];
1990
+    $row->id = 'recording-tr-'.$recording['recordID'];
1991 1991
     $row->attributes['data-imported'] = 'false';
1992 1992
     $texthead = '';
1993 1993
     $texttail = '';
@@ -1999,15 +1999,15 @@  discard block
 block discarded – undo
1999 1999
     }
2000 2000
     $rowdata->date_formatted = str_replace(' ', '&nbsp;', $rowdata->date_formatted);
2001 2001
     $row->cells = array();
2002
-    $row->cells[] = $texthead . $rowdata->recording . $texttail;
2003
-    $row->cells[] = $texthead . $rowdata->meeting . $texttail;
2002
+    $row->cells[] = $texthead.$rowdata->recording.$texttail;
2003
+    $row->cells[] = $texthead.$rowdata->meeting.$texttail;
2004 2004
 
2005
-    $row->cells[] = $texthead . $rowdata->activity . $texttail;
2006
-    $row->cells[] = $texthead . $rowdata->description . $texttail;
2005
+    $row->cells[] = $texthead.$rowdata->activity.$texttail;
2006
+    $row->cells[] = $texthead.$rowdata->description.$texttail;
2007 2007
     if (bigbluebuttonbn_get_recording_data_preview_enabled($bbbsession)) {
2008 2008
         $row->cells[] = $rowdata->preview;
2009 2009
     }
2010
-    $row->cells[] = $texthead . $rowdata->date_formatted . $texttail;
2010
+    $row->cells[] = $texthead.$rowdata->date_formatted.$texttail;
2011 2011
     $row->cells[] = $rowdata->duration_formatted;
2012 2012
     if ($bbbsession['managerecordings']) {
2013 2013
         $row->cells[] = $rowdata->actionbar;
@@ -2098,7 +2098,7 @@  discard block
 block discarded – undo
2098 2098
         // Enqueue it.
2099 2099
         \core\task\manager::queue_adhoc_task($task);
2100 2100
     } catch (Exception $e) {
2101
-        mtrace("Error while enqueuing completion_update_state task. " . (string) $e);
2101
+        mtrace("Error while enqueuing completion_update_state task. ".(string) $e);
2102 2102
     }
2103 2103
 }
2104 2104
 
@@ -2264,17 +2264,17 @@  discard block
 block discarded – undo
2264 2264
  * @return string containing the sql used for getting the target bigbluebuttonbn instances
2265 2265
  */
2266 2266
 function bigbluebuttonbn_get_recordings_deleted_sql_select($courseid = 0, $bigbluebuttonbnid = null, $subset = true) {
2267
-    $sql = "log = '" . BIGBLUEBUTTONBN_LOG_EVENT_DELETE . "' AND meta like '%has_recordings%' AND meta like '%true%'";
2267
+    $sql = "log = '".BIGBLUEBUTTONBN_LOG_EVENT_DELETE."' AND meta like '%has_recordings%' AND meta like '%true%'";
2268 2268
     if (empty($courseid)) {
2269 2269
         $courseid = 0;
2270 2270
     }
2271 2271
     if (empty($bigbluebuttonbnid)) {
2272
-        return $sql . " AND courseid = {$courseid}";
2272
+        return $sql." AND courseid = {$courseid}";
2273 2273
     }
2274 2274
     if ($subset) {
2275
-        return $sql . " AND bigbluebuttonbnid = '{$bigbluebuttonbnid}'";
2275
+        return $sql." AND bigbluebuttonbnid = '{$bigbluebuttonbnid}'";
2276 2276
     }
2277
-    return $sql . " AND courseid = {$courseid} AND bigbluebuttonbnid <> '{$bigbluebuttonbnid}'";
2277
+    return $sql." AND courseid = {$courseid} AND bigbluebuttonbnid <> '{$bigbluebuttonbnid}'";
2278 2278
 }
2279 2279
 
2280 2280
 /**
@@ -2288,17 +2288,17 @@  discard block
 block discarded – undo
2288 2288
  * @return string containing the sql used for getting the target bigbluebuttonbn instances
2289 2289
  */
2290 2290
 function bigbluebuttonbn_get_recordings_imported_sql_select($courseid = 0, $bigbluebuttonbnid = null, $subset = true) {
2291
-    $sql = "log = '" . BIGBLUEBUTTONBN_LOG_EVENT_IMPORT . "'";
2291
+    $sql = "log = '".BIGBLUEBUTTONBN_LOG_EVENT_IMPORT."'";
2292 2292
     if (empty($courseid)) {
2293 2293
         $courseid = 0;
2294 2294
     }
2295 2295
     if (empty($bigbluebuttonbnid)) {
2296
-        return $sql . " AND courseid = '{$courseid}'";
2296
+        return $sql." AND courseid = '{$courseid}'";
2297 2297
     }
2298 2298
     if ($subset) {
2299
-        return $sql . " AND bigbluebuttonbnid = '{$bigbluebuttonbnid}'";
2299
+        return $sql." AND bigbluebuttonbnid = '{$bigbluebuttonbnid}'";
2300 2300
     }
2301
-    return $sql . " AND courseid = '{$courseid}' AND bigbluebuttonbnid <> '{$bigbluebuttonbnid}'";
2301
+    return $sql." AND courseid = '{$courseid}' AND bigbluebuttonbnid <> '{$bigbluebuttonbnid}'";
2302 2302
 }
2303 2303
 
2304 2304
 /**
@@ -2357,7 +2357,7 @@  discard block
 block discarded – undo
2357 2357
     }
2358 2358
     // Prepare select for loading records based on existent bigbluebuttonbns.
2359 2359
     $sql = 'SELECT DISTINCT meetingid, bigbluebuttonbnid FROM {bigbluebuttonbn_logs} WHERE ';
2360
-    $sql .= '(bigbluebuttonbnid=' . implode(' OR bigbluebuttonbnid=', array_keys($bigbluebuttonbns)) . ')';
2360
+    $sql .= '(bigbluebuttonbnid='.implode(' OR bigbluebuttonbnid=', array_keys($bigbluebuttonbns)).')';
2361 2361
     // Include only Create events and exclude those with record not true.
2362 2362
     $sql .= ' AND log = ? AND meta LIKE ? AND meta LIKE ?';
2363 2363
     // Execute select for loading records based on existent bigbluebuttonbns.
@@ -2540,8 +2540,8 @@  discard block
 block discarded – undo
2540 2540
 function bigbluebuttonbn_format_activity_time($time) {
2541 2541
     $activitytime = '';
2542 2542
     if ($time) {
2543
-        $activitytime = calendar_day_representation($time) . ' ' .
2544
-        get_string('mod_form_field_notification_msg_at', 'bigbluebuttonbn') . ' ' .
2543
+        $activitytime = calendar_day_representation($time).' '.
2544
+        get_string('mod_form_field_notification_msg_at', 'bigbluebuttonbn').' '.
2545 2545
         calendar_time_representation($time);
2546 2546
     }
2547 2547
     return $activitytime;
@@ -3090,16 +3090,16 @@  discard block
 block discarded – undo
3090 3090
         return $output;
3091 3091
     }
3092 3092
     $output .= $OUTPUT->box_start(
3093
-        'box boxalignleft adminerror alert alert-' . $type . ' alert-block fade in',
3093
+        'box boxalignleft adminerror alert alert-'.$type.' alert-block fade in',
3094 3094
         'bigbluebuttonbn_view_general_warning'
3095
-    ) . "\n";
3096
-    $output .= '    ' . $message . "\n";
3097
-    $output .= '  <div class="singlebutton pull-right">' . "\n";
3095
+    )."\n";
3096
+    $output .= '    '.$message."\n";
3097
+    $output .= '  <div class="singlebutton pull-right">'."\n";
3098 3098
     if (!empty($href)) {
3099 3099
         $output .= bigbluebuttonbn_render_warning_button($href, $text, $class);
3100 3100
     }
3101
-    $output .= '  </div>' . "\n";
3102
-    $output .= $OUTPUT->box_end() . "\n";
3101
+    $output .= '  </div>'."\n";
3102
+    $output .= $OUTPUT->box_end()."\n";
3103 3103
     return $output;
3104 3104
 }
3105 3105
 
@@ -3123,11 +3123,11 @@  discard block
 block discarded – undo
3123 3123
     if ($class == '') {
3124 3124
         $class = 'btn btn-secondary';
3125 3125
     }
3126
-    $output = '  <form method="post" action="' . $href . '" class="form-inline">' . "\n";
3127
-    $output .= '      <button type="submit" class="' . $class . '"' . "\n";
3128
-    $output .= '          title="' . $title . '"' . "\n";
3129
-    $output .= '          >' . $text . '</button>' . "\n";
3130
-    $output .= '  </form>' . "\n";
3126
+    $output = '  <form method="post" action="'.$href.'" class="form-inline">'."\n";
3127
+    $output .= '      <button type="submit" class="'.$class.'"'."\n";
3128
+    $output .= '          title="'.$title.'"'."\n";
3129
+    $output .= '          >'.$text.'</button>'."\n";
3130
+    $output .= '  </form>'."\n";
3131 3131
     return $output;
3132 3132
 }
3133 3133
 
@@ -3191,7 +3191,7 @@  discard block
 block discarded – undo
3191 3191
 function bigbluebuttonbn_user_can_join_meeting($bigbluebuttonbn, $mid = null, $userid = null) {
3192 3192
     // By default, use a meetingid without groups.
3193 3193
     if (empty($mid)) {
3194
-        $mid = $bigbluebuttonbn->meetingid . '-' . $bigbluebuttonbn->course . '-' . $bigbluebuttonbn->id;
3194
+        $mid = $bigbluebuttonbn->meetingid.'-'.$bigbluebuttonbn->course.'-'.$bigbluebuttonbn->id;
3195 3195
     }
3196 3196
     // When meeting is running, all authorized users can join right in.
3197 3197
     if (bigbluebuttonbn_is_meeting_running($mid)) {
@@ -3260,7 +3260,7 @@  discard block
 block discarded – undo
3260 3260
  * @return boolean
3261 3261
  */
3262 3262
 function bigbluebuttonbn_has_html5_client() {
3263
-    $checkurl = \mod_bigbluebuttonbn\locallib\bigbluebutton::root() . "html5client/check";
3263
+    $checkurl = \mod_bigbluebuttonbn\locallib\bigbluebutton::root()."html5client/check";
3264 3264
     $curlinfo = bigbluebuttonbn_wrap_xml_load_file_curl_request($checkurl, 'HEAD');
3265 3265
     return (isset($curlinfo['http_code']) && $curlinfo['http_code'] == 200);
3266 3266
 }
@@ -3288,7 +3288,7 @@  discard block
 block discarded – undo
3288 3288
     $bbbsession['modPW'] = $bbbsession['bigbluebuttonbn']->moderatorpass;
3289 3289
     $bbbsession['viewerPW'] = $bbbsession['bigbluebuttonbn']->viewerpass;
3290 3290
     // Database info related to the activity.
3291
-    $bbbsession['meetingid'] = $bbbsession['bigbluebuttonbn']->meetingid . '-' . $bbbsession['course']->id . '-' .
3291
+    $bbbsession['meetingid'] = $bbbsession['bigbluebuttonbn']->meetingid.'-'.$bbbsession['course']->id.'-'.
3292 3292
     $bbbsession['bigbluebuttonbn']->id;
3293 3293
     $bbbsession['meetingname'] = $bbbsession['bigbluebuttonbn']->name;
3294 3294
     $bbbsession['meetingdescription'] = $bbbsession['bigbluebuttonbn']->intro;
@@ -3320,12 +3320,12 @@  discard block
 block discarded – undo
3320 3320
     if ($bbbsession['bigbluebuttonbn']->record) {
3321 3321
         // Check if is enable record all from start.
3322 3322
         if ($bbbsession['recordallfromstart']) {
3323
-            $bbbsession['welcome'] .= '<br><br>' . get_string(
3323
+            $bbbsession['welcome'] .= '<br><br>'.get_string(
3324 3324
                 'bbbrecordallfromstartwarning',
3325 3325
                 'bigbluebuttonbn'
3326 3326
             );
3327 3327
         } else {
3328
-            $bbbsession['welcome'] .= '<br><br>' . get_string('bbbrecordwarning', 'bigbluebuttonbn');
3328
+            $bbbsession['welcome'] .= '<br><br>'.get_string('bbbrecordwarning', 'bigbluebuttonbn');
3329 3329
         }
3330 3330
     }
3331 3331
     $bbbsession['openingtime'] = $bbbsession['bigbluebuttonbn']->openingtime;
@@ -3340,7 +3340,7 @@  discard block
 block discarded – undo
3340 3340
     $bbbsession['originServerName'] = $parsedurl['host'];
3341 3341
     $bbbsession['originServerUrl'] = $CFG->wwwroot;
3342 3342
     $bbbsession['originServerCommonName'] = '';
3343
-    $bbbsession['originTag'] = 'moodle-mod_bigbluebuttonbn (' . get_config('mod_bigbluebuttonbn', 'version') . ')';
3343
+    $bbbsession['originTag'] = 'moodle-mod_bigbluebuttonbn ('.get_config('mod_bigbluebuttonbn', 'version').')';
3344 3344
     $bbbsession['bnserver'] = bigbluebuttonbn_is_bn_server();
3345 3345
     // Setting for clienttype, assign flash if not enabled, or default if not editable.
3346 3346
     $bbbsession['clienttype'] = BIGBLUEBUTTON_CLIENTTYPE_FLASH;
@@ -3447,7 +3447,7 @@  discard block
 block discarded – undo
3447 3447
     if ((boolean) \mod_bigbluebuttonbn\locallib\config::get('recordingstatus_enabled')) {
3448 3448
         $metadata["bn-recording-status"] = json_encode(
3449 3449
             array(
3450
-                'email' => array('"' . fullname($USER) . '" <' . $USER->email . '>'),
3450
+                'email' => array('"'.fullname($USER).'" <'.$USER->email.'>'),
3451 3451
                 'context' => $bbbsession['bigbluebuttonbnURL'],
3452 3452
             )
3453 3453
         );
Please login to merge, or discard this patch.