Completed
Pull Request — v2.2-stable (#108)
by Jesus
01:49
created
settings.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -27,7 +27,7 @@
 block discarded – undo
27 27
 
28 28
 global $CFG;
29 29
 
30
-require_once(dirname(__FILE__).'/locallib.php');
30
+require_once(dirname(__FILE__) . '/locallib.php');
31 31
 
32 32
 if ($ADMIN->fulltree) {
33 33
     // Configuration for BigBlueButton.
Please login to merge, or discard this patch.
backup/moodle2/backup_bigbluebuttonbn_activity_task.class.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -25,7 +25,7 @@  discard block
 block discarded – undo
25 25
 
26 26
 defined('MOODLE_INTERNAL') || die;
27 27
 
28
-require_once($CFG->dirroot.'/mod/bigbluebuttonbn/backup/moodle2/backup_bigbluebuttonbn_stepslib.php');
28
+require_once($CFG->dirroot . '/mod/bigbluebuttonbn/backup/moodle2/backup_bigbluebuttonbn_stepslib.php');
29 29
 
30 30
 /**
31 31
  * Backup task that provides all the settings and steps to perform one complete backup of the activity.
@@ -62,14 +62,14 @@  discard block
 block discarded – undo
62 62
     public static function encode_content_links($content) {
63 63
         global $CFG;
64 64
 
65
-        $base = preg_quote($CFG->wwwroot.'/mod/bigbluebuttonbn', '#');
65
+        $base = preg_quote($CFG->wwwroot . '/mod/bigbluebuttonbn', '#');
66 66
 
67 67
         // Link to the list of bigbluebuttonbns.
68
-        $pattern = '#('.$base."\/index.php\?id\=)([0-9]+)#";
68
+        $pattern = '#(' . $base . "\/index.php\?id\=)([0-9]+)#";
69 69
         $content = preg_replace($pattern, '$@BIGBLUEBUTTONBNINDEX*$2@$', $content);
70 70
 
71 71
         // Link to bigbluebuttonbn view by moduleid.
72
-        $pattern = '#('.$base."\/view.php\?id\=)([0-9]+)#";
72
+        $pattern = '#(' . $base . "\/view.php\?id\=)([0-9]+)#";
73 73
         $content = preg_replace($pattern, '$@BIGBLUEBUTTONBNVIEWBYID*$2@$', $content);
74 74
 
75 75
         return $content;
Please login to merge, or discard this patch.
backup/moodle2/backup_bigbluebuttonbn_stepslib.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -48,7 +48,7 @@
 block discarded – undo
48 48
         $logs = new backup_nested_element('logs');
49 49
 
50 50
         $log = new backup_nested_element('log', array('id'), array(
51
-                'courseid', 'bigbluebuttonbnid', 'userid', 'timecreated', 'meetingid', 'log', 'meta', ));
51
+                'courseid', 'bigbluebuttonbnid', 'userid', 'timecreated', 'meetingid', 'log', 'meta',));
52 52
 
53 53
         // Build the tree.
54 54
         $bigbluebuttonbn->add_child($logs);
Please login to merge, or discard this patch.
backup/moodle2/restore_bigbluebuttonbn_stepslib.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -49,7 +49,7 @@  discard block
 block discarded – undo
49 49
      */
50 50
     protected function process_bigbluebuttonbn($data) {
51 51
         global $DB;
52
-        $data = (object) $data;
52
+        $data = (object)$data;
53 53
         $data->course = $this->get_courseid();
54 54
         $data->timemodified = $this->apply_date_offset($data->timemodified);
55 55
         // Insert the bigbluebuttonbn record.
@@ -65,7 +65,7 @@  discard block
 block discarded – undo
65 65
      */
66 66
     protected function process_bigbluebuttonbn_logs($data) {
67 67
         global $DB;
68
-        $data = (object) $data;
68
+        $data = (object)$data;
69 69
         // Apply modifications.
70 70
         $data->courseid = $this->get_mappingid('course', $data->courseid);
71 71
         $data->bigbluebuttonbnid = $this->get_new_parentid('bigbluebuttonbn');
Please login to merge, or discard this patch.
backup/moodle2/restore_bigbluebuttonbn_activity_task.class.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -25,7 +25,7 @@
 block discarded – undo
25 25
 
26 26
 defined('MOODLE_INTERNAL') || die();
27 27
 
28
-require_once($CFG->dirroot.'/mod/bigbluebuttonbn/backup/moodle2/restore_bigbluebuttonbn_stepslib.php');
28
+require_once($CFG->dirroot . '/mod/bigbluebuttonbn/backup/moodle2/restore_bigbluebuttonbn_stepslib.php');
29 29
 
30 30
 /**
31 31
  * Restore task that provides all the settings and steps to perform one complete restore of the activity.
Please login to merge, or discard this patch.
import_view.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -23,8 +23,8 @@  discard block
 block discarded – undo
23 23
  * @author    Jesus Federico  (jesus [at] blindsidenetworks [dt] com)
24 24
  */
25 25
 
26
-require_once(dirname(dirname(dirname(__FILE__))).'/config.php');
27
-require_once(dirname(__FILE__).'/locallib.php');
26
+require_once(dirname(dirname(dirname(__FILE__))) . '/config.php');
27
+require_once(dirname(__FILE__) . '/locallib.php');
28 28
 
29 29
 $bn = required_param('bn', PARAM_INT);
30 30
 $tc = optional_param('tc', 0, PARAM_INT);
@@ -78,7 +78,7 @@  discard block
 block discarded – undo
78 78
     $body .= html_writer::tag('input', '',
79 79
         array('type' => 'button', 'class' => 'btn btn-secondary',
80 80
               'value' => get_string('view_recording_button_return', 'bigbluebuttonbn'),
81
-              'onclick' => 'window.location=\''.$CFG->wwwroot.'/mod/bigbluebuttonbn/view.php?id='.$cm->id.'\''));
81
+              'onclick' => 'window.location=\'' . $CFG->wwwroot . '/mod/bigbluebuttonbn/view.php?id=' . $cm->id . '\''));
82 82
     // JavaScript for locales.
83 83
     $PAGE->requires->strings_for_js(array_keys(bigbluebuttonbn_get_strings_for_js()), 'bigbluebuttonbn');
84 84
     // Require JavaScript modules.
Please login to merge, or discard this patch.
mod_form.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -26,8 +26,8 @@  discard block
 block discarded – undo
26 26
 
27 27
 defined('MOODLE_INTERNAL') || die();
28 28
 
29
-require_once(dirname(__FILE__).'/locallib.php');
30
-require_once($CFG->dirroot.'/course/moodleform_mod.php');
29
+require_once(dirname(__FILE__) . '/locallib.php');
30
+require_once($CFG->dirroot . '/course/moodleform_mod.php');
31 31
 
32 32
 /**
33 33
  * Moodle class for mod_form.
@@ -48,7 +48,7 @@  discard block
 block discarded – undo
48 48
         $serverversion = bigbluebuttonbn_get_server_version();
49 49
         if (is_null($serverversion)) {
50 50
             print_error('general_error_unable_connect', 'bigbluebuttonbn',
51
-                $CFG->wwwroot.'/admin/settings.php?section=modsettingbigbluebuttonbn');
51
+                $CFG->wwwroot . '/admin/settings.php?section=modsettingbigbluebuttonbn');
52 52
             return;
53 53
         }
54 54
         // Context.
@@ -127,7 +127,7 @@  discard block
 block discarded – undo
127 127
                 );
128 128
                 $defaultvalues['presentation'] = $draftitemid;
129 129
             } catch (Exception $e) {
130
-                debugging('Presentation could not be loaded: '.$e->getMessage(), DEBUG_DEVELOPER);
130
+                debugging('Presentation could not be loaded: ' . $e->getMessage(), DEBUG_DEVELOPER);
131 131
                 return;
132 132
             }
133 133
         }
@@ -423,7 +423,7 @@  discard block
 block discarded – undo
423 423
             return;
424 424
         }
425 425
         $mform->addElement($type, $name, get_string($descriptionkey, 'bigbluebuttonbn'), $options);
426
-        if (get_string_manager()->string_exists($descriptionkey.'_help', 'bigbluebuttonbn')) {
426
+        if (get_string_manager()->string_exists($descriptionkey . '_help', 'bigbluebuttonbn')) {
427 427
             $mform->addHelpButton($name, $descriptionkey, 'bigbluebuttonbn');
428 428
         }
429 429
         if (!empty($rule)) {
Please login to merge, or discard this patch.
classes/settings/renderer.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -28,7 +28,7 @@  discard block
 block discarded – undo
28 28
 defined('MOODLE_INTERNAL') || die();
29 29
 
30 30
 require_once($CFG->dirroot . '/mod/bigbluebuttonbn/locallib.php');
31
-require_once($CFG->libdir.'/adminlib.php');
31
+require_once($CFG->libdir . '/adminlib.php');
32 32
 
33 33
 /**
34 34
  * Helper class for rendering HTML for settings.php.
@@ -66,7 +66,7 @@  discard block
 block discarded – undo
66 66
             $itemname = get_string('config_' . $name, 'bigbluebuttonbn');
67 67
         }
68 68
         if ($itemdescription === null) {
69
-            $itemdescription = get_string('config_' .$name . '_description', 'bigbluebuttonbn');
69
+            $itemdescription = get_string('config_' . $name . '_description', 'bigbluebuttonbn');
70 70
         }
71 71
         $item = new \admin_setting_heading('bigbluebuttonbn_config_' . $name, $itemname, $itemdescription);
72 72
         $this->settings->add($item);
@@ -148,7 +148,7 @@  discard block
 block discarded – undo
148 148
     public function render_warning_message($name, $message, $type = 'warning', $closable = true) {
149 149
         global $OUTPUT;
150 150
         $output = $OUTPUT->box_start('box boxalignleft adminerror alert alert-' . $type . ' alert-block fade in',
151
-            'bigbluebuttonbn_' . $name)."\n";
151
+            'bigbluebuttonbn_' . $name) . "\n";
152 152
         if ($closable) {
153 153
             $output .= '  <button type="button" class="close" data-dismiss="alert">&times;</button>' . "\n";
154 154
         }
Please login to merge, or discard this patch.
index.php 1 patch
Spacing   +16 added lines, -16 removed lines patch added patch discarded remove patch
@@ -24,8 +24,8 @@  discard block
 block discarded – undo
24 24
  * @author    Fred Dixon  (ffdixon [at] blindsidenetworks [dt] com)
25 25
  */
26 26
 
27
-require_once(dirname(dirname(dirname(__FILE__))).'/config.php');
28
-require_once(dirname(__FILE__).'/locallib.php');
27
+require_once(dirname(dirname(dirname(__FILE__))) . '/config.php');
28
+require_once(dirname(__FILE__) . '/locallib.php');
29 29
 
30 30
 $id = required_param('id', PARAM_INT);
31 31
 $a = optional_param('a', 0, PARAM_INT);
@@ -89,13 +89,13 @@  discard block
 block discarded – undo
89 89
     if ($moderator || $administrator) {
90 90
         bigbluebuttonbn_event_log(BIGBLUEBUTTON_EVENT_MEETING_ENDED, $bigbluebuttonbn, $cm);
91 91
         echo get_string('index_ending', 'bigbluebuttonbn');
92
-        $meetingid = $bigbluebuttonbn->meetingid.'-'.$course->id.'-'.$bigbluebuttonbn->id;
92
+        $meetingid = $bigbluebuttonbn->meetingid . '-' . $course->id . '-' . $bigbluebuttonbn->id;
93 93
         if ($g != '0') {
94
-            $meetingid .= '['.$g.']';
94
+            $meetingid .= '[' . $g . ']';
95 95
         }
96 96
 
97 97
         bigbluebuttonbn_end_meeting($meetingid, $bigbluebuttonbn->moderatorpass);
98
-        redirect('index.php?id='.$id);
98
+        redirect('index.php?id=' . $id);
99 99
     }
100 100
 }
101 101
 
@@ -110,7 +110,7 @@  discard block
 block discarded – undo
110 110
         // Add a the data for the bigbluebuttonbn instance.
111 111
         $groupobj = null;
112 112
         if (groups_get_activity_groupmode($cm) > 0) {
113
-            $groupobj = (object) array('id' => 0, 'name' => get_string('allparticipants'));
113
+            $groupobj = (object)array('id' => 0, 'name' => get_string('allparticipants'));
114 114
         }
115 115
         $table->data[] = bigbluebuttonbn_index_display_room($canmoderate, $course, $bigbluebuttonbn, $groupobj);
116 116
         // Add a the data for the groups belonging to the bigbluebuttonbn instance, if any.
@@ -136,12 +136,12 @@  discard block
 block discarded – undo
136 136
  * @return array
137 137
  */
138 138
 function bigbluebuttonbn_index_display_room($moderator, $course, $bigbluebuttonbn, $groupobj = null) {
139
-    $meetingid = $bigbluebuttonbn->meetingid.'-'.$course->id.'-'.$bigbluebuttonbn->id;
139
+    $meetingid = $bigbluebuttonbn->meetingid . '-' . $course->id . '-' . $bigbluebuttonbn->id;
140 140
     $paramgroup = '';
141 141
     $groupname = '';
142 142
     if ($groupobj) {
143
-        $meetingid .= '['.$groupobj->id.']';
144
-        $paramgroup = '&group='.$groupobj->id;
143
+        $meetingid .= '[' . $groupobj->id . ']';
144
+        $paramgroup = '&group=' . $groupobj->id;
145 145
         $groupname = $groupobj->name;
146 146
     }
147 147
     $meetinginfo = bigbluebuttonbn_get_meeting_info_array($meetingid);
@@ -156,7 +156,7 @@  discard block
 block discarded – undo
156 156
         return;
157 157
     }
158 158
     // Output Users in the meeting.
159
-    $joinurl = '<a href="view.php?id='.$bigbluebuttonbn->coursemodule.$paramgroup.'">'.format_string($bigbluebuttonbn->name).'</a>';
159
+    $joinurl = '<a href="view.php?id=' . $bigbluebuttonbn->coursemodule . $paramgroup . '">' . format_string($bigbluebuttonbn->name) . '</a>';
160 160
     $group = $groupname;
161 161
     $users = '';
162 162
     $viewerlist = '';
@@ -201,7 +201,7 @@  discard block
 block discarded – undo
201 201
         $attendeecount = 0;
202 202
         foreach ($meetinginfo['attendees']->attendee as $attendee) {
203 203
             if ($attendee->role == $role) {
204
-                $attendeelist .= ($attendeecount++ > 0 ? ', ' : '').$attendee->fullName;
204
+                $attendeelist .= ($attendeecount++ > 0 ? ', ' : '') . $attendee->fullName;
205 205
             }
206 206
         }
207 207
     }
@@ -235,17 +235,17 @@  discard block
 block discarded – undo
235 235
 function bigbluebuttonbn_index_display_room_actions($moderator, $course, $bigbluebuttonbn, $groupobj = null) {
236 236
     $actions = '';
237 237
     if ($moderator) {
238
-        $actions .= '<form name="form1" method="post" action="">'."\n";
239
-        $actions .= '  <INPUT type="hidden" name="id" value="'.$course->id.'">'."\n";
240
-        $actions .= '  <INPUT type="hidden" name="a" value="'.$bigbluebuttonbn->id.'">'."\n";
238
+        $actions .= '<form name="form1" method="post" action="">' . "\n";
239
+        $actions .= '  <INPUT type="hidden" name="id" value="' . $course->id . '">' . "\n";
240
+        $actions .= '  <INPUT type="hidden" name="a" value="' . $bigbluebuttonbn->id . '">' . "\n";
241 241
         if ($groupobj != null) {
242
-            $actions .= '  <INPUT type="hidden" name="g" value="'.$groupobj->id.'">'."\n";
242
+            $actions .= '  <INPUT type="hidden" name="g" value="' . $groupobj->id . '">' . "\n";
243 243
         }
244 244
         $actions .= '  <INPUT type="submit" name="submit" value="' .
245 245
             get_string('view_conference_action_end', 'bigbluebuttonbn') .
246 246
             '" class="btn btn-primary btn-sm" onclick="return confirm(\'' .
247 247
             get_string('index_confirm_end', 'bigbluebuttonbn') . '\')">' . "\n";
248
-        $actions .= '</form>'."\n";
248
+        $actions .= '</form>' . "\n";
249 249
     }
250 250
     return $actions;
251 251
 }
Please login to merge, or discard this patch.