Completed
Push — master ( 31f885...de0e82 )
by Jesus
01:58
created
classes/locallib/mobileview.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -58,7 +58,7 @@  discard block
 block discarded – undo
58 58
         $session['importrecordings'] = ($session['managerecordings']);
59 59
         $session['modPW'] = $session['bigbluebuttonbn']->moderatorpass;
60 60
         $session['viewerPW'] = $session['bigbluebuttonbn']->viewerpass;
61
-        $session['meetingid'] = $session['bigbluebuttonbn']->meetingid.'-'.$session['course']->id.'-'.
61
+        $session['meetingid'] = $session['bigbluebuttonbn']->meetingid . '-' . $session['course']->id . '-' .
62 62
             $session['bigbluebuttonbn']->id;
63 63
         $session['meetingname'] = $session['bigbluebuttonbn']->name;
64 64
         $session['meetingdescription'] = $session['bigbluebuttonbn']->intro;
@@ -90,10 +90,10 @@  discard block
 block discarded – undo
90 90
         if ($session['bigbluebuttonbn']->record) {
91 91
             // Check if is enable record all from start.
92 92
             if ($session['recordallfromstart']) {
93
-                $session['welcome'] .= '<br><br>'.get_string('bbbrecordallfromstartwarning',
93
+                $session['welcome'] .= '<br><br>' . get_string('bbbrecordallfromstartwarning',
94 94
                         'bigbluebuttonbn');
95 95
             } else {
96
-                $session['welcome'] .= '<br><br>'.get_string('bbbrecordwarning', 'bigbluebuttonbn');
96
+                $session['welcome'] .= '<br><br>' . get_string('bbbrecordwarning', 'bigbluebuttonbn');
97 97
             }
98 98
         }
99 99
         $session['openingtime'] = $session['bigbluebuttonbn']->openingtime;
@@ -106,7 +106,7 @@  discard block
 block discarded – undo
106 106
         $session['originServerName'] = $parsedurl['host'];
107 107
         $session['originServerUrl'] = $CFG->wwwroot;
108 108
         $session['originServerCommonName'] = '';
109
-        $session['originTag'] = 'moodle-mod_bigbluebuttonbn ('.get_config('mod_bigbluebuttonbn', 'version').')';
109
+        $session['originTag'] = 'moodle-mod_bigbluebuttonbn (' . get_config('mod_bigbluebuttonbn', 'version') . ')';
110 110
         $session['bnserver'] = bigbluebuttonbn_is_bn_server();
111 111
         $session['clienttype'] = \mod_bigbluebuttonbn\locallib\config::get('clienttype_default');
112 112
 
@@ -228,7 +228,7 @@  discard block
 block discarded – undo
228 228
             $data['welcome'] .= '<br><br>';
229 229
             $data['welcome'] .= str_replace(
230 230
                 '%duration%',
231
-                (string) $durationtime,
231
+                (string)$durationtime,
232 232
                 get_string('bbbdurationwarning', 'bigbluebuttonbn')
233 233
             );
234 234
         }
Please login to merge, or discard this patch.
classes/search/tags.php 1 patch
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -24,7 +24,6 @@
 block discarded – undo
24 24
  */
25 25
 
26 26
 namespace mod_bigbluebuttonbn\search;
27
-use core_tag\output\tag;
28 27
 
29 28
 defined('MOODLE_INTERNAL') || die();
30 29
 
Please login to merge, or discard this patch.
classes/output/mobile.php 2 patches
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -28,7 +28,6 @@
 block discarded – undo
28 28
 defined('MOODLE_INTERNAL') || die();
29 29
 
30 30
 use context_module;
31
-use mod_bigbluebuttonbn_external;
32 31
 require_once($CFG->dirroot . '/mod/bigbluebuttonbn/locallib.php');
33 32
 require_once($CFG->dirroot . '/lib/grouplib.php');
34 33
 
Please login to merge, or discard this patch.
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -55,7 +55,7 @@  discard block
 block discarded – undo
55 55
 
56 56
         global $OUTPUT, $SESSION, $CFG;
57 57
 
58
-        $args = (object) $args;
58
+        $args = (object)$args;
59 59
         $viewinstance = bigbluebuttonbn_view_validator($args->cmid, null);
60 60
         if (!$viewinstance) {
61 61
             $error = get_string('view_error_url_missing_parameters', 'bigbluebuttonbn');
@@ -67,7 +67,7 @@  discard block
 block discarded – undo
67 67
         $bigbluebuttonbn = $viewinstance['bigbluebuttonbn'];
68 68
         $context = context_module::instance($cm->id);
69 69
 
70
-        require_login($course->id, false , $cm, true, true);
70
+        require_login($course->id, false, $cm, true, true);
71 71
         require_capability('mod/bigbluebuttonbn:join', $context);
72 72
 
73 73
         // Add view event.
@@ -112,7 +112,7 @@  discard block
 block discarded – undo
112 112
 
113 113
         // Check if the BBB server is working.
114 114
         $serverversion = bigbluebuttonbn_get_server_version();
115
-        $bbbsession['serverversion'] = (string) $serverversion;
115
+        $bbbsession['serverversion'] = (string)$serverversion;
116 116
         if (is_null($serverversion)) {
117 117
 
118 118
             if ($bbbsession['administrator']) {
@@ -139,7 +139,7 @@  discard block
 block discarded – undo
139 139
 
140 140
         // Operation URLs.
141 141
         $bbbsession['bigbluebuttonbnURL'] = $CFG->wwwroot . '/mod/bigbluebuttonbn/view.php?id=' . $bbbsession['cm']->id;
142
-        $bbbsession['logoutURL'] = $CFG->wwwroot . '/mod/bigbluebuttonbn/bbb_view.php?action=logout&id='.$args->cmid .
142
+        $bbbsession['logoutURL'] = $CFG->wwwroot . '/mod/bigbluebuttonbn/bbb_view.php?action=logout&id=' . $args->cmid .
143 143
             '&bn=' . $bbbsession['bigbluebuttonbn']->id;
144 144
         $bbbsession['recordingReadyURL'] = $CFG->wwwroot . '/mod/bigbluebuttonbn/bbb_broker.php?action=recording_' .
145 145
             'ready&bigbluebuttonbn=' . $bbbsession['bigbluebuttonbn']->id;
@@ -182,7 +182,7 @@  discard block
 block discarded – undo
182 182
             }
183 183
             if ($response['returncode'] == 'FAILED') {
184 184
                 // The meeting could not be created.
185
-                $errorkey = bigbluebuttonbn_get_error_key($response['messageKey'],  'view_error_create');
185
+                $errorkey = bigbluebuttonbn_get_error_key($response['messageKey'], 'view_error_create');
186 186
                 $e = get_string($errorkey, 'bigbluebuttonbn');
187 187
                 return(self::mobile_print_error($e));
188 188
             }
@@ -195,7 +195,7 @@  discard block
 block discarded – undo
195 195
             bigbluebuttonbn_event_log(\mod_bigbluebuttonbn\event\events::$events['meeting_create'], $bigbluebuttonbn);
196 196
             // Insert a record that meeting was created.
197 197
             $overrides = array('meetingid' => $bbbsession['meetingid']);
198
-            $meta = '{"record":'.($bbbsession['record'] ? 'true' : 'false').'}';
198
+            $meta = '{"record":' . ($bbbsession['record'] ? 'true' : 'false') . '}';
199 199
             bigbluebuttonbn_log($bbbsession['bigbluebuttonbn'], BIGBLUEBUTTONBN_LOG_EVENT_CREATE, $overrides, $meta);
200 200
         }
201 201
 
@@ -221,7 +221,7 @@  discard block
 block discarded – undo
221 221
 
222 222
         $data = array(
223 223
             'bigbluebuttonbn' => $bigbluebuttonbn,
224
-            'bbbsession' => (object) $bbbsession,
224
+            'bbbsession' => (object)$bbbsession,
225 225
             'msjgroup' => $msjgroup,
226 226
             'urltojoin' => $urltojoin,
227 227
             'cmid' => $cm->id,
Please login to merge, or discard this patch.
import_view.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -27,8 +27,8 @@
 block discarded – undo
27 27
 use mod_bigbluebuttonbn\output\import_view;
28 28
 use mod_bigbluebuttonbn\output\renderer;
29 29
 
30
-require(__DIR__.'/../../config.php');
31
-require_once(__DIR__.'/locallib.php');
30
+require(__DIR__ . '/../../config.php');
31
+require_once(__DIR__ . '/locallib.php');
32 32
 
33 33
 $bn = required_param('bn', PARAM_INT);
34 34
 $tc = optional_param('tc', 0, PARAM_INT);
Please login to merge, or discard this patch.
settings.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
 global $CFG;
30 30
 
31
-require_once(__DIR__.'/locallib.php');
31
+require_once(__DIR__ . '/locallib.php');
32 32
 
33 33
 if ($hassiteconfig) {
34 34
     // Configuration for BigBlueButton.
Please login to merge, or discard this patch.
view.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -27,9 +27,9 @@  discard block
 block discarded – undo
27 27
 
28 28
 use mod_bigbluebuttonbn\plugin;
29 29
 
30
-require(__DIR__.'/../../config.php');
31
-require_once(__DIR__.'/locallib.php');
32
-require_once(__DIR__.'/viewlib.php');
30
+require(__DIR__ . '/../../config.php');
31
+require_once(__DIR__ . '/locallib.php');
32
+require_once(__DIR__ . '/viewlib.php');
33 33
 
34 34
 $id = required_param('id', PARAM_INT);
35 35
 $bn = optional_param('bn', 0, PARAM_INT);
@@ -58,7 +58,7 @@  discard block
 block discarded – undo
58 58
 bigbluebuttonbn_view_bbbsession_set($PAGE->context, $bbbsession);
59 59
 
60 60
 // Validates if the BigBlueButton server is working.
61
-$serverversion = bigbluebuttonbn_get_server_version();  // In locallib.
61
+$serverversion = bigbluebuttonbn_get_server_version(); // In locallib.
62 62
 if ($serverversion === null) {
63 63
     $errmsg = 'view_error_unable_join_student';
64 64
     $errurl = '/course/view.php';
@@ -72,7 +72,7 @@  discard block
 block discarded – undo
72 72
     }
73 73
     print_error($errmsg, plugin::COMPONENT, new moodle_url($errurl, $errurlparams));
74 74
 }
75
-$bbbsession['serverversion'] = (string) $serverversion;
75
+$bbbsession['serverversion'] = (string)$serverversion;
76 76
 
77 77
 // Mark viewed by user (if required).
78 78
 $completion = new completion_info($course);
@@ -116,7 +116,7 @@  discard block
 block discarded – undo
116 116
 echo $OUTPUT->footer();
117 117
 
118 118
 // Shows version as a comment.
119
-echo '<!-- '.$bbbsession['originTag'].' -->'."\n";
119
+echo '<!-- ' . $bbbsession['originTag'] . ' -->' . "\n";
120 120
 
121 121
 // Initialize session variable used across views.
122 122
 $SESSION->bigbluebuttonbn_bbbsession = $bbbsession;
123 123
\ No newline at end of file
Please login to merge, or discard this patch.
classes/output/import_view.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -36,7 +36,7 @@
 block discarded – undo
36 36
 
37 37
 defined('MOODLE_INTERNAL') || die();
38 38
 
39
-require_once($CFG->dirroot.'/mod/bigbluebuttonbn/locallib.php');
39
+require_once($CFG->dirroot . '/mod/bigbluebuttonbn/locallib.php');
40 40
 
41 41
 /**
42 42
  * Class import_view
Please login to merge, or discard this patch.
classes/output/index.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -34,7 +34,7 @@  discard block
 block discarded – undo
34 34
 
35 35
 defined('MOODLE_INTERNAL') || die();
36 36
 
37
-require_once($CFG->dirroot.'/mod/bigbluebuttonbn/locallib.php');
37
+require_once($CFG->dirroot . '/mod/bigbluebuttonbn/locallib.php');
38 38
 
39 39
 /**
40 40
  * Class index
@@ -92,7 +92,7 @@  discard block
 block discarded – undo
92 92
                 // Add a the data for the bigbluebuttonbn instance.
93 93
                 $groupobj = null;
94 94
                 if (groups_get_activity_groupmode($cm) > 0) {
95
-                    $groupobj = (object) array('id' => 0, 'name' => get_string('allparticipants'));
95
+                    $groupobj = (object)array('id' => 0, 'name' => get_string('allparticipants'));
96 96
                 }
97 97
                 $table->data[] = self::bigbluebuttonbn_index_display_room($canmoderate, $course, $bigbluebuttonbn, $groupobj);
98 98
                 // Add a the data for the groups belonging to the bigbluebuttonbn instance, if any.
@@ -182,7 +182,7 @@  discard block
 block discarded – undo
182 182
             $attendeecount = 0;
183 183
             foreach ($meetinginfo['attendees']->attendee as $attendee) {
184 184
                 if ($attendee->role == $role) {
185
-                    $attendeelist .= ($attendeecount++ > 0 ? ', ' : '').$attendee->fullName;
185
+                    $attendeelist .= ($attendeecount++ > 0 ? ', ' : '') . $attendee->fullName;
186 186
                 }
187 187
             }
188 188
         }
@@ -216,17 +216,17 @@  discard block
 block discarded – undo
216 216
     public static function bigbluebuttonbn_index_display_room_actions($moderator, $course, $bigbluebuttonbn, $groupobj = null) {
217 217
         $actions = '';
218 218
         if ($moderator) {
219
-            $actions .= '<form name="form1" method="post" action="">'."\n";
220
-            $actions .= '  <INPUT type="hidden" name="id" value="'.$course->id.'">'."\n";
221
-            $actions .= '  <INPUT type="hidden" name="a" value="'.$bigbluebuttonbn->id.'">'."\n";
219
+            $actions .= '<form name="form1" method="post" action="">' . "\n";
220
+            $actions .= '  <INPUT type="hidden" name="id" value="' . $course->id . '">' . "\n";
221
+            $actions .= '  <INPUT type="hidden" name="a" value="' . $bigbluebuttonbn->id . '">' . "\n";
222 222
             if ($groupobj != null) {
223
-                $actions .= '  <INPUT type="hidden" name="g" value="'.$groupobj->id.'">'."\n";
223
+                $actions .= '  <INPUT type="hidden" name="g" value="' . $groupobj->id . '">' . "\n";
224 224
             }
225 225
             $actions .= '  <INPUT type="submit" name="submit" value="' .
226 226
                 get_string('view_conference_action_end', 'bigbluebuttonbn') .
227 227
                 '" class="btn btn-primary btn-sm" onclick="return confirm(\'' .
228 228
                 get_string('index_confirm_end', 'bigbluebuttonbn') . '\')">' . "\n";
229
-            $actions .= '</form>'."\n";
229
+            $actions .= '</form>' . "\n";
230 230
         }
231 231
         return $actions;
232 232
     }
Please login to merge, or discard this patch.
viewlib.php 1 patch
Spacing   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -54,8 +54,8 @@  discard block
 block discarded – undo
54 54
         $groupname = groups_get_group_name($bbbsession['group']);
55 55
     }
56 56
     // Assign group default values.
57
-    $bbbsession['meetingid'] .= '['.$bbbsession['group'].']';
58
-    $bbbsession['meetingname'] .= ' ('.$groupname.')';
57
+    $bbbsession['meetingid'] .= '[' . $bbbsession['group'] . ']';
58
+    $bbbsession['meetingname'] .= ' (' . $groupname . ')';
59 59
     if (count($groups) == 0) {
60 60
         // Only the All participants group exists.
61 61
         bigbluebuttonbn_view_message_box($bbbsession, get_string('view_groups_notenrolled_warning', 'bigbluebuttonbn'), 'info');
@@ -65,7 +65,7 @@  discard block
 block discarded – undo
65 65
     if (has_capability('moodle/site:accessallgroups', $context)) {
66 66
         bigbluebuttonbn_view_message_box($bbbsession, get_string('view_groups_selection_warning', 'bigbluebuttonbn'));
67 67
     }
68
-    $urltoroot = $CFG->wwwroot.'/mod/bigbluebuttonbn/view.php?id='.$bbbsession['cm']->id;
68
+    $urltoroot = $CFG->wwwroot . '/mod/bigbluebuttonbn/view.php?id=' . $bbbsession['cm']->id;
69 69
     groups_print_activity_menu($bbbsession['cm'], $urltoroot);
70 70
     echo '<br><br>';
71 71
 }
@@ -137,7 +137,7 @@  discard block
 block discarded – undo
137 137
         $recordingsdisabled = get_string('view_message_recordings_disabled', 'bigbluebuttonbn');
138 138
         $output .= bigbluebuttonbn_render_warning($recordingsdisabled, 'danger');
139 139
     }
140
-    echo $output.html_writer::empty_tag('br').html_writer::empty_tag('br').html_writer::empty_tag('br');
140
+    echo $output . html_writer::empty_tag('br') . html_writer::empty_tag('br') . html_writer::empty_tag('br');
141 141
     $PAGE->requires->yui_module('moodle-mod_bigbluebuttonbn-broker', 'M.mod_bigbluebuttonbn.broker.init', array($jsvars));
142 142
 }
143 143
 
@@ -206,12 +206,12 @@  discard block
 block discarded – undo
206 206
     // JavaScript variables for room.
207 207
     $openingtime = '';
208 208
     if ($bbbsession['openingtime']) {
209
-        $openingtime = get_string('mod_form_field_openingtime', 'bigbluebuttonbn').': '.
209
+        $openingtime = get_string('mod_form_field_openingtime', 'bigbluebuttonbn') . ': ' .
210 210
             userdate($bbbsession['openingtime']);
211 211
     }
212 212
     $closingtime = '';
213 213
     if ($bbbsession['closingtime']) {
214
-        $closingtime = get_string('mod_form_field_closingtime', 'bigbluebuttonbn').': '.
214
+        $closingtime = get_string('mod_form_field_closingtime', 'bigbluebuttonbn') . ': ' .
215 215
             userdate($bbbsession['closingtime']);
216 216
     }
217 217
     $jsvars += array(
@@ -228,7 +228,7 @@  discard block
 block discarded – undo
228 228
     $output .= $OUTPUT->box_end();
229 229
     // Action button box.
230 230
     $output .= $OUTPUT->box_start('generalbox boxaligncenter', 'bigbluebuttonbn_view_action_button_box');
231
-    $output .= '<br><br><span id="join_button"></span>&nbsp;<span id="end_button"></span>'."\n";
231
+    $output .= '<br><br><span id="join_button"></span>&nbsp;<span id="end_button"></span>' . "\n";
232 232
     $output .= $OUTPUT->box_end();
233 233
     if ($activity == 'ended') {
234 234
         $output .= bigbluebuttonbn_view_ended($bbbsession);
@@ -281,7 +281,7 @@  discard block
 block discarded – undo
281 281
     // If there are meetings with recordings load the data to the table.
282 282
     if ($bbbsession['bigbluebuttonbn']->recordings_html) {
283 283
         // Render a plain html table.
284
-        return bigbluebuttonbn_output_recording_table($bbbsession, $recordings)."\n";
284
+        return bigbluebuttonbn_output_recording_table($bbbsession, $recordings) . "\n";
285 285
     }
286 286
     // JavaScript variables for recordings with YUI.
287 287
     $jsvars += array(
@@ -318,8 +318,8 @@  discard block
 block discarded – undo
318 318
         array('type' => 'button',
319 319
             'value' => get_string('view_recording_button_import', 'bigbluebuttonbn'),
320 320
             'class' => 'btn btn-secondary',
321
-            'onclick' => 'window.location=\''.$CFG->wwwroot.'/mod/bigbluebuttonbn/import_view.php?bn='.
322
-                $bbbsession['bigbluebuttonbn']->id.'\''));
321
+            'onclick' => 'window.location=\'' . $CFG->wwwroot . '/mod/bigbluebuttonbn/import_view.php?bn=' .
322
+                $bbbsession['bigbluebuttonbn']->id . '\''));
323 323
     $output  = html_writer::empty_tag('br');
324 324
     $output .= html_writer::tag('span', $button, array('id' => 'import_recording_links_button'));
325 325
     $output .= html_writer::tag('span', '', array('id' => 'import_recording_links_table'));
@@ -338,10 +338,10 @@  discard block
 block discarded – undo
338 338
     if (!is_null($bbbsession['presentation']['url'])) {
339 339
         $attributes = array('title' => $bbbsession['presentation']['name']);
340 340
         $icon = new pix_icon($bbbsession['presentation']['icon'], $bbbsession['presentation']['mimetype_description']);
341
-        return '<h4>'.get_string('view_section_title_presentation', 'bigbluebuttonbn').'</h4>'.
342
-            $OUTPUT->action_icon($bbbsession['presentation']['url'], $icon, null, array(), false).
341
+        return '<h4>' . get_string('view_section_title_presentation', 'bigbluebuttonbn') . '</h4>' .
342
+            $OUTPUT->action_icon($bbbsession['presentation']['url'], $icon, null, array(), false) .
343 343
             $OUTPUT->action_link($bbbsession['presentation']['url'],
344
-                $bbbsession['presentation']['name'], null, $attributes).'<br><br>';
344
+                $bbbsession['presentation']['name'], null, $attributes) . '<br><br>';
345 345
     }
346 346
     return '';
347 347
 }
Please login to merge, or discard this patch.