@@ -38,7 +38,7 @@ |
||
38 | 38 | * @return string |
39 | 39 | */ |
40 | 40 | public function get_description() { |
41 | - $a = (object) array('userid' => $this->userid, 'bigbluebuttonbnid' => $this->objectid, 'courseid' => $this->contextinstanceid); |
|
41 | + $a = (object)array('userid' => $this->userid, 'bigbluebuttonbnid' => $this->objectid, 'courseid' => $this->contextinstanceid); |
|
42 | 42 | return "The user with id '$a->userid' has joined a bigbluebutton meeting for the bigbluebuttonbn activity with id '$a->bigbluebuttonbnid' for the course id '$a->courseid'."; |
43 | 43 | } |
44 | 44 |
@@ -38,8 +38,8 @@ |
||
38 | 38 | * @return string |
39 | 39 | */ |
40 | 40 | public function get_description() { |
41 | - $rid = isset($this->other['rid'])? $this->other['rid']: ''; |
|
42 | - $a = (object) array('userid' => $this->userid, 'recordingid' => $rid, 'courseid' => $this->contextinstanceid); |
|
41 | + $rid = isset($this->other['rid']) ? $this->other['rid'] : ''; |
|
42 | + $a = (object)array('userid' => $this->userid, 'recordingid' => $rid, 'courseid' => $this->contextinstanceid); |
|
43 | 43 | return "The user with id '$a->userid' has imported a recording with id '$a->recordingid' into the course id '$a->courseid'."; |
44 | 44 | } |
45 | 45 |
@@ -38,7 +38,7 @@ |
||
38 | 38 | * @return string |
39 | 39 | */ |
40 | 40 | public function get_description() { |
41 | - $a = (object) array('userid' => $this->userid, 'bigbluebuttonbnid' => $this->objectid, 'courseid' => $this->contextinstanceid); |
|
41 | + $a = (object)array('userid' => $this->userid, 'bigbluebuttonbnid' => $this->objectid, 'courseid' => $this->contextinstanceid); |
|
42 | 42 | return "The user with id '$a->userid' created a bigbluebutton meeting for the bigbluebuttonbn activity with id '$a->bigbluebuttonbnid' for the course id '$a->courseid'."; |
43 | 43 | } |
44 | 44 |
@@ -38,8 +38,8 @@ |
||
38 | 38 | * @return string |
39 | 39 | */ |
40 | 40 | public function get_description() { |
41 | - $rid = isset($this->other['rid'])? $this->other['rid']: ''; |
|
42 | - $a = (object) array('userid' => $this->userid, 'recordingid' => $rid, 'courseid' => $this->contextinstanceid); |
|
41 | + $rid = isset($this->other['rid']) ? $this->other['rid'] : ''; |
|
42 | + $a = (object)array('userid' => $this->userid, 'recordingid' => $rid, 'courseid' => $this->contextinstanceid); |
|
43 | 43 | return "The user with id '$a->userid' has published a recording with id '$a->recordingid' in the course id '$a->courseid'."; |
44 | 44 | } |
45 | 45 |
@@ -38,7 +38,7 @@ |
||
38 | 38 | * @return string |
39 | 39 | */ |
40 | 40 | public function get_description() { |
41 | - $a = (object) array('userid' => $this->userid, 'bigbluebuttonbnid' => $this->objectid, 'courseid' => $this->contextinstanceid); |
|
41 | + $a = (object)array('userid' => $this->userid, 'bigbluebuttonbnid' => $this->objectid, 'courseid' => $this->contextinstanceid); |
|
42 | 42 | return "A bigbluebutton meeting for the bigbluebuttonbn activity with id '$a->bigbluebuttonbnid' for the course id '$a->courseid' has been forcibly ended by the user with id '$a->userid'."; |
43 | 43 | } |
44 | 44 |
@@ -38,7 +38,7 @@ |
||
38 | 38 | * @return string |
39 | 39 | */ |
40 | 40 | public function get_description() { |
41 | - $a = (object) array('userid' => $this->userid, 'bigbluebuttonbnid' => $this->objectid, 'courseid' => $this->contextinstanceid); |
|
41 | + $a = (object)array('userid' => $this->userid, 'bigbluebuttonbnid' => $this->objectid, 'courseid' => $this->contextinstanceid); |
|
42 | 42 | return "The user with id '$a->userid' has left a bigbluebutton meeting for the bigbluebuttonbn activity with id '$a->bigbluebuttonbnid' for the course id '$a->courseid'."; |
43 | 43 | } |
44 | 44 |
@@ -10,7 +10,7 @@ discard block |
||
10 | 10 | * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v2 or later |
11 | 11 | */ |
12 | 12 | |
13 | -function xmldb_bigbluebuttonbn_upgrade($oldversion=0) { |
|
13 | +function xmldb_bigbluebuttonbn_upgrade($oldversion = 0) { |
|
14 | 14 | |
15 | 15 | global $CFG, $THEME, $DB; |
16 | 16 | $dbman = $DB->get_manager(); // loads ddl manager and xmldb classes |
@@ -20,11 +20,11 @@ discard block |
||
20 | 20 | if ($result && $oldversion < 2012040200) { |
21 | 21 | // Define field intro to be droped from bigbluebuttonbn |
22 | 22 | $table = new xmldb_table('bigbluebuttonbn'); |
23 | - $field = new xmldb_field('intro', XMLDB_TYPE_TEXT, 'medium', null, null, null, null,'name'); |
|
23 | + $field = new xmldb_field('intro', XMLDB_TYPE_TEXT, 'medium', null, null, null, null, 'name'); |
|
24 | 24 | |
25 | 25 | // Drop field intro |
26 | 26 | if ($dbman->field_exists($table, $field)) { |
27 | - $dbman->drop_field($table, $field, $continue=true, $feedback=true); |
|
27 | + $dbman->drop_field($table, $field, $continue = true, $feedback = true); |
|
28 | 28 | } |
29 | 29 | |
30 | 30 | // Define field introformat to be droped from bigbluebuttonbn |
@@ -33,7 +33,7 @@ discard block |
||
33 | 33 | |
34 | 34 | // Drop field introformat |
35 | 35 | if ($dbman->field_exists($table, $field)) { |
36 | - $dbman->drop_field($table, $field, $continue=true, $feedback=true); |
|
36 | + $dbman->drop_field($table, $field, $continue = true, $feedback = true); |
|
37 | 37 | } |
38 | 38 | |
39 | 39 | // Once we reach this point, we can store the new version and consider the module |
@@ -73,7 +73,7 @@ discard block |
||
73 | 73 | $field = new xmldb_field('welcome'); |
74 | 74 | $field->set_attributes(XMLDB_TYPE_TEXT, null, null, XMLDB_NOTNULL, null, null, null, null, 'type'); |
75 | 75 | |
76 | - $dbman->change_field_type($table, $field, $continue=true, $feedback=true); |
|
76 | + $dbman->change_field_type($table, $field, $continue = true, $feedback = true); |
|
77 | 77 | |
78 | 78 | upgrade_mod_savepoint(true, 2012100100, 'bigbluebuttonbn'); |
79 | 79 | } |
@@ -85,7 +85,7 @@ discard block |
||
85 | 85 | $field->set_attributes(XMLDB_TYPE_INTEGER, '1', XMLDB_UNSIGNED, XMLDB_NOTNULL, null, 0); |
86 | 86 | |
87 | 87 | if (!$dbman->field_exists($table, $field)) { |
88 | - $dbman->add_field($table, $field, $continue=true, $feedback=true); |
|
88 | + $dbman->add_field($table, $field, $continue = true, $feedback = true); |
|
89 | 89 | } |
90 | 90 | |
91 | 91 | upgrade_mod_savepoint(true, 2014050100, 'bigbluebuttonbn'); |
@@ -97,7 +97,7 @@ discard block |
||
97 | 97 | $field = new xmldb_field('participants', XMLDB_TYPE_TEXT, 'medium', null, null, null, null); |
98 | 98 | |
99 | 99 | if (!$dbman->field_exists($table, $field)) { |
100 | - $dbman->add_field($table, $field, $continue=true, $feedback=true); |
|
100 | + $dbman->add_field($table, $field, $continue = true, $feedback = true); |
|
101 | 101 | } |
102 | 102 | |
103 | 103 | upgrade_mod_savepoint(true, 2014070420, 'bigbluebuttonbn'); |
@@ -109,7 +109,7 @@ discard block |
||
109 | 109 | $field = new xmldb_field('participants'); |
110 | 110 | $field->set_attributes(XMLDB_TYPE_TEXT, 'medium', null, null, null, null); |
111 | 111 | |
112 | - $dbman->change_field_type($table, $field, $continue=true, $feedback=true); |
|
112 | + $dbman->change_field_type($table, $field, $continue = true, $feedback = true); |
|
113 | 113 | |
114 | 114 | upgrade_mod_savepoint(true, 2014101004, 'bigbluebuttonbn'); |
115 | 115 | } |
@@ -119,67 +119,67 @@ discard block |
||
119 | 119 | $table = new xmldb_table('bigbluebuttonbn'); |
120 | 120 | //// Drop field timeduration |
121 | 121 | $field = new xmldb_field('timeduration'); |
122 | - if( $dbman->field_exists($table, $field) ) { |
|
123 | - $dbman->drop_field($table, $field, $continue=true, $feedback=true); |
|
122 | + if ($dbman->field_exists($table, $field)) { |
|
123 | + $dbman->drop_field($table, $field, $continue = true, $feedback = true); |
|
124 | 124 | } |
125 | 125 | //// Drop field allmoderators |
126 | 126 | $field = new xmldb_field('allmoderators'); |
127 | - if( $dbman->field_exists($table, $field) ) { |
|
128 | - $dbman->drop_field($table, $field, $continue=true, $feedback=true); |
|
127 | + if ($dbman->field_exists($table, $field)) { |
|
128 | + $dbman->drop_field($table, $field, $continue = true, $feedback = true); |
|
129 | 129 | } |
130 | 130 | //// Add field intro |
131 | 131 | $field = new xmldb_field('intro'); |
132 | 132 | $field->set_attributes(XMLDB_TYPE_TEXT, 'medium', null, null, null, null, 'name'); |
133 | - if( !$dbman->field_exists($table, $field) ) { |
|
134 | - $dbman->add_field($table, $field, $continue=true, $feedback=true); |
|
133 | + if (!$dbman->field_exists($table, $field)) { |
|
134 | + $dbman->add_field($table, $field, $continue = true, $feedback = true); |
|
135 | 135 | } |
136 | 136 | //// Add field introformat |
137 | 137 | $field = new xmldb_field('introformat'); |
138 | 138 | $field->set_attributes(XMLDB_TYPE_INTEGER, '4', XMLDB_UNSIGNED, XMLDB_NOTNULL, null, 1, 'intro'); |
139 | - if( !$dbman->field_exists($table, $field) ) { |
|
140 | - $dbman->add_field($table, $field, $continue=true, $feedback=true); |
|
139 | + if (!$dbman->field_exists($table, $field)) { |
|
140 | + $dbman->add_field($table, $field, $continue = true, $feedback = true); |
|
141 | 141 | } |
142 | 142 | //// Add field tagging |
143 | 143 | $field = new xmldb_field('tagging'); |
144 | 144 | $field->set_attributes(XMLDB_TYPE_INTEGER, '1', XMLDB_UNSIGNED, XMLDB_NOTNULL, null, 0, 'record'); |
145 | - if( !$dbman->field_exists($table, $field) ) { |
|
146 | - $dbman->add_field($table, $field, $continue=true, $feedback=true); |
|
145 | + if (!$dbman->field_exists($table, $field)) { |
|
146 | + $dbman->add_field($table, $field, $continue = true, $feedback = true); |
|
147 | 147 | } |
148 | 148 | //// Add field presentation |
149 | 149 | $field = new xmldb_field('presentation'); |
150 | 150 | $field->set_attributes(XMLDB_TYPE_TEXT, 'medium', null, null, null, null, 'timemodified'); |
151 | - if( !$dbman->field_exists($table, $field) ) { |
|
152 | - $dbman->add_field($table, $field, $continue=true, $feedback=true); |
|
151 | + if (!$dbman->field_exists($table, $field)) { |
|
152 | + $dbman->add_field($table, $field, $continue = true, $feedback = true); |
|
153 | 153 | } |
154 | 154 | //// Add field type |
155 | 155 | $field = new xmldb_field('type'); |
156 | 156 | $field->set_attributes(XMLDB_TYPE_INTEGER, '2', XMLDB_UNSIGNED, XMLDB_NOTNULL, null, 0, 'course'); |
157 | - if( !$dbman->field_exists($table, $field) ) { |
|
158 | - $dbman->add_field($table, $field, $continue=true, $feedback=true); |
|
157 | + if (!$dbman->field_exists($table, $field)) { |
|
158 | + $dbman->add_field($table, $field, $continue = true, $feedback = true); |
|
159 | 159 | } |
160 | 160 | //// Rename field timeavailable |
161 | 161 | $field = new xmldb_field('timeavailable'); |
162 | 162 | $field->set_attributes(XMLDB_TYPE_INTEGER, '10', XMLDB_UNSIGNED, XMLDB_NOTNULL, null, 0); |
163 | - if( $dbman->field_exists($table, $field) ) { |
|
164 | - $dbman->rename_field($table, $field, 'openingtime', $continue=true, $feedback=true); |
|
163 | + if ($dbman->field_exists($table, $field)) { |
|
164 | + $dbman->rename_field($table, $field, 'openingtime', $continue = true, $feedback = true); |
|
165 | 165 | } |
166 | 166 | //// Rename field timedue |
167 | 167 | $field = new xmldb_field('timedue'); |
168 | 168 | $field->set_attributes(XMLDB_TYPE_INTEGER, '10', XMLDB_UNSIGNED, XMLDB_NOTNULL, null, 0); |
169 | - if( $dbman->field_exists($table, $field) ) { |
|
170 | - $dbman->rename_field($table, $field, 'closingtime', $continue=true, $feedback=true); |
|
169 | + if ($dbman->field_exists($table, $field)) { |
|
170 | + $dbman->rename_field($table, $field, 'closingtime', $continue = true, $feedback = true); |
|
171 | 171 | } |
172 | 172 | //// Add field timecreated |
173 | 173 | $field = new xmldb_field('timecreated'); |
174 | 174 | $field->set_attributes(XMLDB_TYPE_INTEGER, '10', XMLDB_UNSIGNED, XMLDB_NOTNULL, null, 0, 'closingtime'); |
175 | - if( !$dbman->field_exists($table, $field) ) { |
|
176 | - $dbman->add_field($table, $field, $continue=true, $feedback=true); |
|
175 | + if (!$dbman->field_exists($table, $field)) { |
|
176 | + $dbman->add_field($table, $field, $continue = true, $feedback = true); |
|
177 | 177 | } |
178 | 178 | //// Add field userlimit |
179 | 179 | $field = new xmldb_field('userlimit'); |
180 | 180 | $field->set_attributes(XMLDB_TYPE_INTEGER, '3', XMLDB_UNSIGNED, XMLDB_NOTNULL, null, 0); |
181 | 181 | if (!$dbman->field_exists($table, $field)) { |
182 | - $dbman->add_field($table, $field, $continue=true, $feedback=true); |
|
182 | + $dbman->add_field($table, $field, $continue = true, $feedback = true); |
|
183 | 183 | } |
184 | 184 | |
185 | 185 | // Update the bigbluebuttonbn_log table |
@@ -187,18 +187,18 @@ discard block |
||
187 | 187 | //// Add field userid |
188 | 188 | $field = new xmldb_field('userid'); |
189 | 189 | $field->set_attributes(XMLDB_TYPE_INTEGER, '10', XMLDB_UNSIGNED, XMLDB_NOTNULL, null, 0, 'bigbluebuttonbnid'); |
190 | - if( !$dbman->field_exists($table, $field) ) { |
|
191 | - $dbman->add_field($table, $field, $continue=true, $feedback=true); |
|
190 | + if (!$dbman->field_exists($table, $field)) { |
|
191 | + $dbman->add_field($table, $field, $continue = true, $feedback = true); |
|
192 | 192 | } |
193 | 193 | //// Add field meta |
194 | 194 | $field = new xmldb_field('meta'); |
195 | 195 | $field->set_attributes(XMLDB_TYPE_TEXT, 'medium', null, null, null, null, 'event'); |
196 | - if( !$dbman->field_exists($table, $field) ) { |
|
197 | - $dbman->add_field($table, $field, $continue=true, $feedback=true); |
|
196 | + if (!$dbman->field_exists($table, $field)) { |
|
197 | + $dbman->add_field($table, $field, $continue = true, $feedback = true); |
|
198 | 198 | } |
199 | 199 | //// Drop field recording |
200 | 200 | $field = new xmldb_field('record'); |
201 | - if( $dbman->field_exists($table, $field) ) { |
|
201 | + if ($dbman->field_exists($table, $field)) { |
|
202 | 202 | //// Migrate data in field recording to new format in meta |
203 | 203 | $meta = new \stdClass(); |
204 | 204 | |
@@ -211,7 +211,7 @@ discard block |
||
211 | 211 | $DB->set_field('bigbluebuttonbn_log', 'meta', json_encode($meta), array('event' => 'Create', 'record' => 0)); |
212 | 212 | |
213 | 213 | // Drop field recording |
214 | - $dbman->drop_field($table, $field, $continue=true, $feedback=true); |
|
214 | + $dbman->drop_field($table, $field, $continue = true, $feedback = true); |
|
215 | 215 | } |
216 | 216 | |
217 | 217 | upgrade_mod_savepoint(true, 2015063000, 'bigbluebuttonbn'); |
@@ -222,14 +222,14 @@ discard block |
||
222 | 222 | $table = new xmldb_table('bigbluebuttonbn'); |
223 | 223 | //// Drop field description |
224 | 224 | $field = new xmldb_field('description'); |
225 | - if( $dbman->field_exists($table, $field) ) { |
|
226 | - $dbman->drop_field($table, $field, $continue=true, $feedback=true); |
|
225 | + if ($dbman->field_exists($table, $field)) { |
|
226 | + $dbman->drop_field($table, $field, $continue = true, $feedback = true); |
|
227 | 227 | } |
228 | 228 | //// Change welcome, allow null |
229 | 229 | $field = new xmldb_field('welcome'); |
230 | 230 | $field->set_attributes(XMLDB_TYPE_TEXT, null, null, null, null, null, null, null, 'type'); |
231 | - if( $dbman->field_exists($table, $field) ) { |
|
232 | - $dbman->change_field_notnull($table, $field, $continue=true, $feedback=true); |
|
231 | + if ($dbman->field_exists($table, $field)) { |
|
232 | + $dbman->change_field_notnull($table, $field, $continue = true, $feedback = true); |
|
233 | 233 | } |
234 | 234 | |
235 | 235 | // Update the bigbluebuttonbn_log table |
@@ -237,22 +237,22 @@ discard block |
||
237 | 237 | //// Change welcome, allow null |
238 | 238 | $field = new xmldb_field('userid'); |
239 | 239 | $field->set_attributes(XMLDB_TYPE_INTEGER, '10', XMLDB_UNSIGNED, null, null, null, null, null, 'bigbluebuttonbnid'); |
240 | - if( $dbman->field_exists($table, $field) ) { |
|
241 | - $dbman->change_field_notnull($table, $field, $continue=true, $feedback=true); |
|
240 | + if ($dbman->field_exists($table, $field)) { |
|
241 | + $dbman->change_field_notnull($table, $field, $continue = true, $feedback = true); |
|
242 | 242 | } |
243 | 243 | |
244 | 244 | upgrade_mod_savepoint(true, 2015080605, 'bigbluebuttonbn'); |
245 | 245 | } |
246 | 246 | |
247 | - if ( $result && $oldversion < 2016011305 ) { |
|
247 | + if ($result && $oldversion < 2016011305) { |
|
248 | 248 | // Update the bigbluebuttonbn table |
249 | 249 | $table = new xmldb_table('bigbluebuttonbn'); |
250 | 250 | |
251 | 251 | // Define field type to be droped from bigbluebuttonbn |
252 | 252 | $field = new xmldb_field('type'); |
253 | 253 | $field->set_attributes(XMLDB_TYPE_INTEGER, '2', XMLDB_UNSIGNED, XMLDB_NOTNULL, null, 0, 'course'); |
254 | - if ( $dbman->field_exists($table, $field) ) { |
|
255 | - $dbman->drop_field($table, $field, $continue=true, $feedback=true); |
|
254 | + if ($dbman->field_exists($table, $field)) { |
|
255 | + $dbman->drop_field($table, $field, $continue = true, $feedback = true); |
|
256 | 256 | } |
257 | 257 | |
258 | 258 | // Define field 'event' to be renamed |
@@ -264,17 +264,17 @@ discard block |
||
264 | 264 | // Conditionally rename the table |
265 | 265 | if ($dbman->table_exists($table)) { |
266 | 266 | // Update the bigbluebuttonbn_log table |
267 | - if ( $dbman->field_exists($table, $field) ) { |
|
268 | - $dbman->rename_field($table, $field, 'log', $continue=true, $feedback=true); |
|
267 | + if ($dbman->field_exists($table, $field)) { |
|
268 | + $dbman->rename_field($table, $field, 'log', $continue = true, $feedback = true); |
|
269 | 269 | } |
270 | 270 | // Rename bigbluebuttonbn_log table to bigbluebuttonbn_logs |
271 | - $dbman->rename_table($table, 'bigbluebuttonbn_logs', $continue=true, $feedback=true); |
|
271 | + $dbman->rename_table($table, 'bigbluebuttonbn_logs', $continue = true, $feedback = true); |
|
272 | 272 | } else { |
273 | 273 | // It was already renamed, select it only |
274 | 274 | $table = new xmldb_table('bigbluebuttonbn_logs'); |
275 | 275 | // Update the bigbluebuttonbn_logs table |
276 | - if ( $dbman->field_exists($table, $field) ) { |
|
277 | - $dbman->rename_field($table, $field, 'log', $continue=true, $feedback=true); |
|
276 | + if ($dbman->field_exists($table, $field)) { |
|
277 | + $dbman->rename_field($table, $field, 'log', $continue = true, $feedback = true); |
|
278 | 278 | } |
279 | 279 | } |
280 | 280 | |
@@ -287,7 +287,7 @@ discard block |
||
287 | 287 | //// Drop field newwindow |
288 | 288 | $field = new xmldb_field('newwindow'); |
289 | 289 | if ($dbman->field_exists($table, $field)) { |
290 | - $dbman->drop_field($table, $field, $continue=true, $feedback=true); |
|
290 | + $dbman->drop_field($table, $field, $continue = true, $feedback = true); |
|
291 | 291 | } |
292 | 292 | |
293 | 293 | upgrade_mod_savepoint(true, 2016051910, 'bigbluebuttonbn'); |
@@ -118,8 +118,9 @@ |
||
118 | 118 | //Execute the end command |
119 | 119 | $meeting_info = bigbluebuttonbn_bbb_broker_do_end_meeting($params['id'], $bbbsession['modPW']); |
120 | 120 | // Moodle event logger: Create an event for meeting ended |
121 | - if( isset($bigbluebuttonbn) ) |
|
122 | - bigbluebuttonbn_event_log(BIGBLUEBUTTON_EVENT_MEETING_ENDED, $bigbluebuttonbn, $context, $cm); |
|
121 | + if( isset($bigbluebuttonbn) ) { |
|
122 | + bigbluebuttonbn_event_log(BIGBLUEBUTTON_EVENT_MEETING_ENDED, $bigbluebuttonbn, $context, $cm); |
|
123 | + } |
|
123 | 124 | // Update the cache |
124 | 125 | $meeting_info = bigbluebuttonbn_bbb_broker_get_meeting_info($params['id'], $bbbsession['modPW'], true); |
125 | 126 |
@@ -81,49 +81,49 @@ |
||
81 | 81 | $can_join = false; |
82 | 82 | } |
83 | 83 | |
84 | - if( $bbbsession['administrator'] || $bbbsession['moderator'] ) { |
|
84 | + if ($bbbsession['administrator'] || $bbbsession['moderator']) { |
|
85 | 85 | $end_button_text = get_string('view_conference_action_end', 'bigbluebuttonbn'); |
86 | 86 | $can_end = true; |
87 | - $status_can_end = '"can_end": true, "end_button_text": "'.$end_button_text.'", '; |
|
87 | + $status_can_end = '"can_end": true, "end_button_text": "' . $end_button_text . '", '; |
|
88 | 88 | } |
89 | 89 | |
90 | 90 | } else { |
91 | 91 | // If user is administrator, moderator or if is viewer and no waiting is required |
92 | 92 | $join_button_text = get_string('view_conference_action_join', 'bigbluebuttonbn'); |
93 | - if ( $bbbsession['administrator'] || $bbbsession['moderator'] || !$bbbsession['wait'] ) { |
|
93 | + if ($bbbsession['administrator'] || $bbbsession['moderator'] || !$bbbsession['wait']) { |
|
94 | 94 | $initial_message = get_string('view_message_conference_room_ready', 'bigbluebuttonbn'); |
95 | 95 | $can_join = true; |
96 | 96 | |
97 | 97 | } else { |
98 | 98 | $initial_message = get_string('view_message_conference_not_started', 'bigbluebuttonbn'); |
99 | - if ( $bbbsession['wait'] ) { |
|
100 | - $initial_message .= ' '.get_string('view_message_conference_wait_for_moderator', 'bigbluebuttonbn'); |
|
99 | + if ($bbbsession['wait']) { |
|
100 | + $initial_message .= ' ' . get_string('view_message_conference_wait_for_moderator', 'bigbluebuttonbn'); |
|
101 | 101 | } |
102 | 102 | $can_join = false; |
103 | 103 | } |
104 | 104 | |
105 | - if( $bbbsession['tagging'] && ($bbbsession['administrator'] || $bbbsession['moderator']) ) { |
|
105 | + if ($bbbsession['tagging'] && ($bbbsession['administrator'] || $bbbsession['moderator'])) { |
|
106 | 106 | $can_tag = true; |
107 | 107 | |
108 | 108 | } else { |
109 | 109 | $can_tag = false; |
110 | 110 | } |
111 | - $status_can_end = '"can_tag": '.($can_tag? 'true': 'false').', '; |
|
111 | + $status_can_end = '"can_tag": ' . ($can_tag ? 'true' : 'false') . ', '; |
|
112 | 112 | } |
113 | 113 | |
114 | - echo $params['callback'].'({ "running": '.($meeting_running? 'true':'false').', "info": '.json_encode($meeting_info).', "status": {"can_join": '.($can_join? 'true':'false').',"join_url": "'.$bbbsession['joinURL'].'","join_button_text": "'.$join_button_text.'", '.$status_can_end.$status_can_tag.'"message": "'.$initial_message.'"} });'; |
|
114 | + echo $params['callback'] . '({ "running": ' . ($meeting_running ? 'true' : 'false') . ', "info": ' . json_encode($meeting_info) . ', "status": {"can_join": ' . ($can_join ? 'true' : 'false') . ',"join_url": "' . $bbbsession['joinURL'] . '","join_button_text": "' . $join_button_text . '", ' . $status_can_end . $status_can_tag . '"message": "' . $initial_message . '"} });'; |
|
115 | 115 | break; |
116 | 116 | case 'meeting_end': |
117 | - if( $bbbsession['administrator'] || $bbbsession['moderator'] ) { |
|
117 | + if ($bbbsession['administrator'] || $bbbsession['moderator']) { |
|
118 | 118 | //Execute the end command |
119 | 119 | $meeting_info = bigbluebuttonbn_bbb_broker_do_end_meeting($params['id'], $bbbsession['modPW']); |
120 | 120 | // Moodle event logger: Create an event for meeting ended |
121 | - if( isset($bigbluebuttonbn) ) |
|
121 | + if (isset($bigbluebuttonbn)) |
|
122 | 122 | bigbluebuttonbn_event_log(BIGBLUEBUTTON_EVENT_MEETING_ENDED, $bigbluebuttonbn, $context, $cm); |
123 | 123 | // Update the cache |
124 | 124 | $meeting_info = bigbluebuttonbn_bbb_broker_get_meeting_info($params['id'], $bbbsession['modPW'], true); |
125 | 125 | |
126 | - echo $params['callback'].'({ "status": true });'; |
|
126 | + echo $params['callback'] . '({ "status": true });'; |
|
127 | 127 | } else { |
128 | 128 | // ERROR: User not authorized to execute end command. |
129 | 129 | header("HTTP/1.0 401 Unauthorized. User not authorized to execute end command"); |
@@ -70,7 +70,7 @@ |
||
70 | 70 | 'class' => 'btn btn-default', |
71 | 71 | 'value' => get_string('view_recording_button_return', 'bigbluebuttonbn'), |
72 | 72 | 'onclick' => 'window.location=\'' . $CFG->wwwroot . '/mod/bigbluebuttonbn/view.php?id=' . $cm->id . '\'' |
73 | - ); |
|
73 | + ); |
|
74 | 74 | $output .= html_writer::tag('input', '', $buttonoptions); |
75 | 75 | |
76 | 76 | $jsvars = array( |