@@ -216,8 +216,8 @@ discard block |
||
216 | 216 | $this->bigbluebuttonbn_mform_add_element($mform, $field['type'], $field['name'], $field['data_type'], |
217 | 217 | $field['description_key'], 0, ['maxlength' => 4, 'size' => 6], |
218 | 218 | ['message' => get_string('mod_form_field_voicebridge_format_error', 'bigbluebuttonbn'), |
219 | - 'type' => 'numeric', 'rule' => '####', 'validator' => 'server'] |
|
220 | - ); |
|
219 | + 'type' => 'numeric', 'rule' => '####', 'validator' => 'server'] |
|
220 | + ); |
|
221 | 221 | } else { |
222 | 222 | $this->bigbluebuttonbn_mform_add_element($mform, $field['type'], $field['name'], $field['data_type'], |
223 | 223 | $field['description_key'], 0, ['maxlength' => 4, 'size' => 6]); |
@@ -255,7 +255,7 @@ discard block |
||
255 | 255 | */ |
256 | 256 | private function bigbluebuttonbn_mform_add_block_room_recordings(&$mform, $cfg) { |
257 | 257 | $field = ['type' => 'hidden', 'name' => 'recordings_html', 'data_type' => PARAM_INT, |
258 | - 'description_key' => null]; |
|
258 | + 'description_key' => null]; |
|
259 | 259 | if ($cfg['recordings_html_editable']) { |
260 | 260 | $field['type'] = 'checkbox'; |
261 | 261 | $field['description_key'] = 'mod_form_field_recordings_html'; |
@@ -263,7 +263,7 @@ discard block |
||
263 | 263 | $this->bigbluebuttonbn_mform_add_element($mform, $field['type'], $field['name'], $field['data_type'], |
264 | 264 | $field['description_key'], $cfg['recordings_html_default']); |
265 | 265 | $field = ['type' => 'hidden', 'name' => 'recordings_deleted', 'data_type' => PARAM_INT, |
266 | - 'description_key' => null]; |
|
266 | + 'description_key' => null]; |
|
267 | 267 | if ($cfg['recordings_deleted_editable']) { |
268 | 268 | $field['type'] = 'checkbox'; |
269 | 269 | $field['description_key'] = 'mod_form_field_recordings_deleted'; |
@@ -271,7 +271,7 @@ discard block |
||
271 | 271 | $this->bigbluebuttonbn_mform_add_element($mform, $field['type'], $field['name'], $field['data_type'], |
272 | 272 | $field['description_key'], $cfg['recordings_deleted_default']); |
273 | 273 | $field = ['type' => 'hidden', 'name' => 'recordings_imported', 'data_type' => PARAM_INT, |
274 | - 'description_key' => null]; |
|
274 | + 'description_key' => null]; |
|
275 | 275 | if ($cfg['importrecordings_enabled'] && $cfg['recordings_imported_editable']) { |
276 | 276 | $field['type'] = 'checkbox'; |
277 | 277 | $field['description_key'] = 'mod_form_field_recordings_imported'; |
@@ -279,7 +279,7 @@ discard block |
||
279 | 279 | $this->bigbluebuttonbn_mform_add_element($mform, $field['type'], $field['name'], $field['data_type'], |
280 | 280 | $field['description_key'], $cfg['recordings_imported_default']); |
281 | 281 | $field = ['type' => 'hidden', 'name' => 'recordings_preview', 'data_type' => PARAM_INT, |
282 | - 'description_key' => null]; |
|
282 | + 'description_key' => null]; |
|
283 | 283 | if ($cfg['recordings_preview_editable']) { |
284 | 284 | $field['type'] = 'checkbox'; |
285 | 285 | $field['description_key'] = 'mod_form_field_recordings_preview'; |
@@ -350,7 +350,7 @@ discard block |
||
350 | 350 | $htmlselectiontype = html_writer::select($participantselection['type_options'], |
351 | 351 | 'bigbluebuttonbn_participant_selection_type', $participantselection['type_selected'], array(), |
352 | 352 | array('id' => 'bigbluebuttonbn_participant_selection_type', |
353 | - 'onchange' => 'M.mod_bigbluebuttonbn.modform.participantSelectionSet(); return 0;')); |
|
353 | + 'onchange' => 'M.mod_bigbluebuttonbn.modform.participantSelectionSet(); return 0;')); |
|
354 | 354 | $htmlselectionoptions = html_writer::select($participantselection['options'], 'bigbluebuttonbn_participant_selection', |
355 | 355 | $participantselection['selected'], array(), |
356 | 356 | array('id' => 'bigbluebuttonbn_participant_selection', 'disabled' => 'disabled')); |
@@ -358,7 +358,7 @@ discard block |
||
358 | 358 | 'type' => 'button', 'class' => 'btn btn-secondary', |
359 | 359 | 'value' => get_string('mod_form_field_participant_list_action_add', 'bigbluebuttonbn'), |
360 | 360 | 'onclick' => 'M.mod_bigbluebuttonbn.modform.participantAdd(); return 0;' |
361 | - )); |
|
361 | + )); |
|
362 | 362 | $htmladdparticipant = html_writer::tag('div', |
363 | 363 | $htmlselectiontype . ' ' . $htmlselectionoptions . ' ' . $htmlselectioninput, null); |
364 | 364 | $mform->addElement('html', "\n\n"); |
@@ -401,7 +401,7 @@ discard block |
||
401 | 401 | $field['description_key'], $cfg['clienttype_default'] ,$clienttype_select_choices); |
402 | 402 | } else { |
403 | 403 | $this->bigbluebuttonbn_mform_add_element($mform, $field['type'], $field['name'], $field['data_type'], null,$cfg['clienttype_default']); |
404 | - } |
|
404 | + } |
|
405 | 405 | |
406 | 406 | } |
407 | 407 |
@@ -26,8 +26,8 @@ discard block |
||
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 |
||
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. |
@@ -118,7 +118,7 @@ discard block |
||
118 | 118 | ); |
119 | 119 | $defaultvalues['presentation'] = $draftitemid; |
120 | 120 | } catch (Exception $e) { |
121 | - debugging('Presentation could not be loaded: '.$e->getMessage(), DEBUG_DEVELOPER); |
|
121 | + debugging('Presentation could not be loaded: ' . $e->getMessage(), DEBUG_DEVELOPER); |
|
122 | 122 | return; |
123 | 123 | } |
124 | 124 | } |
@@ -397,9 +397,9 @@ discard block |
||
397 | 397 | |
398 | 398 | $mform->addElement('header', 'clienttypeselection', get_string('mod_form_block_clienttype', 'bigbluebuttonbn')); |
399 | 399 | $this->bigbluebuttonbn_mform_add_element($mform, $field['type'], $field['name'], $field['data_type'], |
400 | - $field['description_key'], $cfg['clienttype_default'] ,$clienttype_select_choices); |
|
400 | + $field['description_key'], $cfg['clienttype_default'], $clienttype_select_choices); |
|
401 | 401 | } else { |
402 | - $this->bigbluebuttonbn_mform_add_element($mform, $field['type'], $field['name'], $field['data_type'], null,$cfg['clienttype_default']); |
|
402 | + $this->bigbluebuttonbn_mform_add_element($mform, $field['type'], $field['name'], $field['data_type'], null, $cfg['clienttype_default']); |
|
403 | 403 | } |
404 | 404 | |
405 | 405 | } |
@@ -446,7 +446,7 @@ discard block |
||
446 | 446 | return; |
447 | 447 | } |
448 | 448 | $mform->addElement($type, $name, get_string($descriptionkey, 'bigbluebuttonbn'), $options); |
449 | - if (get_string_manager()->string_exists($descriptionkey.'_help', 'bigbluebuttonbn')) { |
|
449 | + if (get_string_manager()->string_exists($descriptionkey . '_help', 'bigbluebuttonbn')) { |
|
450 | 450 | $mform->addHelpButton($name, $descriptionkey, 'bigbluebuttonbn'); |
451 | 451 | } |
452 | 452 | if (!empty($rule)) { |
@@ -154,35 +154,35 @@ |
||
154 | 154 | */ |
155 | 155 | public static function get_options() { |
156 | 156 | return array( |
157 | - 'version_major' => self::get_moodle_version_major(), |
|
158 | - 'voicebridge_editable' => self::get('voicebridge_editable'), |
|
159 | - 'importrecordings_enabled' => self::get('importrecordings_enabled'), |
|
160 | - 'importrecordings_from_deleted_enabled' => self::get('importrecordings_from_deleted_enabled'), |
|
161 | - 'waitformoderator_default' => self::get('waitformoderator_default'), |
|
162 | - 'waitformoderator_editable' => self::get('waitformoderator_editable'), |
|
163 | - 'userlimit_default' => self::get('userlimit_default'), |
|
164 | - 'userlimit_editable' => self::get('userlimit_editable'), |
|
165 | - 'preuploadpresentation_enabled' => self::get('preuploadpresentation_enabled'), |
|
166 | - 'sendnotifications_enabled' => self::get('sendnotifications_enabled'), |
|
167 | - 'recordings_enabled' => self::get('recordings_enabled'), |
|
168 | - 'recordings_html_default' => self::get('recordings_html_default'), |
|
169 | - 'recordings_html_editable' => self::get('recordings_html_editable'), |
|
170 | - 'recordings_deleted_default' => self::get('recordings_deleted_default'), |
|
171 | - 'recordings_deleted_editable' => self::get('recordings_deleted_editable'), |
|
172 | - 'recordings_imported_default' => self::get('recordings_imported_default'), |
|
173 | - 'recordings_imported_editable' => self::get('recordings_imported_editable'), |
|
174 | - 'recordings_preview_default' => self::get('recordings_preview_default'), |
|
175 | - 'recordings_preview_editable' => self::get('recordings_preview_editable'), |
|
176 | - 'recording_default' => self::get('recording_default'), |
|
177 | - 'recording_editable' => self::get('recording_editable'), |
|
178 | - 'recording_icons_enabled' => self::get('recording_icons_enabled'), |
|
179 | - 'general_warning_message' => self::get('general_warning_message'), |
|
180 | - 'general_warning_box_type' => self::get('general_warning_box_type'), |
|
181 | - 'general_warning_button_text' => self::get('general_warning_button_text'), |
|
182 | - 'general_warning_button_href' => self::get('general_warning_button_href'), |
|
183 | - 'general_warning_button_class' => self::get('general_warning_button_class'), |
|
184 | - 'clienttype_editable' => self::get('clienttype_editable'), |
|
185 | - 'clienttype_default' => self::get('clienttype_default'), |
|
186 | - ); |
|
157 | + 'version_major' => self::get_moodle_version_major(), |
|
158 | + 'voicebridge_editable' => self::get('voicebridge_editable'), |
|
159 | + 'importrecordings_enabled' => self::get('importrecordings_enabled'), |
|
160 | + 'importrecordings_from_deleted_enabled' => self::get('importrecordings_from_deleted_enabled'), |
|
161 | + 'waitformoderator_default' => self::get('waitformoderator_default'), |
|
162 | + 'waitformoderator_editable' => self::get('waitformoderator_editable'), |
|
163 | + 'userlimit_default' => self::get('userlimit_default'), |
|
164 | + 'userlimit_editable' => self::get('userlimit_editable'), |
|
165 | + 'preuploadpresentation_enabled' => self::get('preuploadpresentation_enabled'), |
|
166 | + 'sendnotifications_enabled' => self::get('sendnotifications_enabled'), |
|
167 | + 'recordings_enabled' => self::get('recordings_enabled'), |
|
168 | + 'recordings_html_default' => self::get('recordings_html_default'), |
|
169 | + 'recordings_html_editable' => self::get('recordings_html_editable'), |
|
170 | + 'recordings_deleted_default' => self::get('recordings_deleted_default'), |
|
171 | + 'recordings_deleted_editable' => self::get('recordings_deleted_editable'), |
|
172 | + 'recordings_imported_default' => self::get('recordings_imported_default'), |
|
173 | + 'recordings_imported_editable' => self::get('recordings_imported_editable'), |
|
174 | + 'recordings_preview_default' => self::get('recordings_preview_default'), |
|
175 | + 'recordings_preview_editable' => self::get('recordings_preview_editable'), |
|
176 | + 'recording_default' => self::get('recording_default'), |
|
177 | + 'recording_editable' => self::get('recording_editable'), |
|
178 | + 'recording_icons_enabled' => self::get('recording_icons_enabled'), |
|
179 | + 'general_warning_message' => self::get('general_warning_message'), |
|
180 | + 'general_warning_box_type' => self::get('general_warning_box_type'), |
|
181 | + 'general_warning_button_text' => self::get('general_warning_button_text'), |
|
182 | + 'general_warning_button_href' => self::get('general_warning_button_href'), |
|
183 | + 'general_warning_button_class' => self::get('general_warning_button_class'), |
|
184 | + 'clienttype_editable' => self::get('clienttype_editable'), |
|
185 | + 'clienttype_default' => self::get('clienttype_default'), |
|
186 | + ); |
|
187 | 187 | } |
188 | 188 | } |
@@ -98,7 +98,7 @@ discard block |
||
98 | 98 | * recordings from a different activity even from a different course. |
99 | 99 | **/ |
100 | 100 | |
101 | - /* |
|
101 | + /* |
|
102 | 102 | * When the value is set to 1 (checked) the bigbluebuttonbn rooms or |
103 | 103 | * activities will have the 'import recordings' capability enabled. |
104 | 104 | * $CFG->bigbluebuttonbn['importrecordings_enabled'] = 0; |
@@ -119,7 +119,7 @@ discard block |
||
119 | 119 | * 'Join session' button enabled |
120 | 120 | **/ |
121 | 121 | |
122 | - /* |
|
122 | + /* |
|
123 | 123 | * When the value is set to 1 (checked) the bigbluebuttonbn rooms or |
124 | 124 | * activities will have the 'wait for moderator' capability enabled by |
125 | 125 | * default. |
@@ -259,32 +259,32 @@ discard block |
||
259 | 259 | * $CFG->bigbluebuttonbn['recordings_imported_editable'] = 1; |
260 | 260 | */ |
261 | 261 | |
262 | - /* |
|
262 | + /* |
|
263 | 263 | * When the value is set to 1 (checked) the bigbluebuttonbn resources |
264 | 264 | * will show the recodings with thumbnails. |
265 | 265 | * $CFG->bigbluebuttonbn['recordings_preview_default'] = 1; |
266 | 266 | */ |
267 | 267 | |
268 | - /* |
|
268 | + /* |
|
269 | 269 | * When the value is set to 1 (checked) the 'preview ui' capability can be |
270 | 270 | * enabled/disabled by the user creating or editing the resource. |
271 | 271 | * $CFG->bigbluebuttonbn['recordings_preview_editable'] = 0; |
272 | 272 | */ |
273 | 273 | |
274 | - /* |
|
274 | + /* |
|
275 | 275 | * The WebClient by default is the Flash one (value = 0) or |
276 | 276 | * the HTML5 one (value = 1) |
277 | 277 | * $CFG->bigbluebuttonbn['clienttype_default'] = 0; |
278 | 278 | */ |
279 | 279 | |
280 | - /* |
|
280 | + /* |
|
281 | 281 | * When the value is set to 1 (checked) the 'clienttype' |
282 | 282 | * capability is enabled, meaning that the administrator can choose the default web client type |
283 | 283 | * and if can be editable in each room through the plugin configuration |
284 | 284 | * $CFG->bigbluebuttonbn['clienttype_enabled'] = 0; |
285 | 285 | */ |
286 | 286 | |
287 | - /* |
|
287 | + /* |
|
288 | 288 | * When the value is set to 1 (checked) the WebClient can be chosen |
289 | 289 | * the user creating or editing the resource. |
290 | 290 | * $CFG->bigbluebuttonbn['clienttype_editable'] = 0; |
@@ -330,27 +330,27 @@ discard block |
||
330 | 330 | * $CFG->bigbluebuttonbn['general_warning_message'] = "Would you like to record your BigBlueButton sessions for later viewing? "; |
331 | 331 | */ |
332 | 332 | |
333 | - /* |
|
333 | + /* |
|
334 | 334 | * The warning box is always shown to administrators, but it is also possible to define other roles |
335 | 335 | * to whom the it will be shown. The roles are based on the shortnames defined by Moodle: |
336 | 336 | * 'manager,coursecreator,editingteacher,teacher,student,guest,user,frontpage' |
337 | 337 | * $CFG->bigbluebuttonbn['general_warning_roles'] = 'editingteacher,teacher'; |
338 | 338 | */ |
339 | 339 | |
340 | - /* |
|
340 | + /* |
|
341 | 341 | * As the general_warning_message is shown in a box, its type can be defined with general_warning_type |
342 | 342 | * The default type is 'info' which is normaly rendered in blue when using a bootstrap theme. |
343 | 343 | * All the modifiers for boxed in bootstrap can be used [info|success|warning|danger]. |
344 | 344 | * $CFG->bigbluebuttonbn['general_warning_box_type'] = 'info'; |
345 | 345 | */ |
346 | 346 | |
347 | - /* |
|
347 | + /* |
|
348 | 348 | * Additionally, when general_warning_button_href value is different than "", a button |
349 | 349 | * can also be shown right after the message. |
350 | 350 | * $CFG->bigbluebuttonbn['general_warning_button_href'] = "http://blindsidenetworks.com/"; |
351 | 351 | */ |
352 | 352 | |
353 | - /* |
|
353 | + /* |
|
354 | 354 | * Finally, the text and class for the button can be modified |
355 | 355 | * $CFG->bigbluebuttonbn['general_warning_button_text'] = "Upgrade your site"; |
356 | 356 | * $CFG->bigbluebuttonbn['general_warning_button_class'] = "btn btn-primary"; |
@@ -24,8 +24,8 @@ discard block |
||
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 | $bn = optional_param('n', 0, PARAM_INT); |
@@ -60,19 +60,19 @@ discard block |
||
60 | 60 | if (is_null($serverversion)) { |
61 | 61 | if ($bbbsession['administrator']) { |
62 | 62 | print_error('view_error_unable_join', 'bigbluebuttonbn', |
63 | - $CFG->wwwroot.'/admin/settings.php?section=modsettingbigbluebuttonbn'); |
|
63 | + $CFG->wwwroot . '/admin/settings.php?section=modsettingbigbluebuttonbn'); |
|
64 | 64 | exit; |
65 | 65 | } |
66 | 66 | if ($bbbsession['moderator']) { |
67 | 67 | print_error('view_error_unable_join_teacher', 'bigbluebuttonbn', |
68 | - $CFG->wwwroot.'/course/view.php?id='.$bigbluebuttonbn->course); |
|
68 | + $CFG->wwwroot . '/course/view.php?id=' . $bigbluebuttonbn->course); |
|
69 | 69 | exit; |
70 | 70 | } |
71 | 71 | print_error('view_error_unable_join_student', 'bigbluebuttonbn', |
72 | - $CFG->wwwroot.'/course/view.php?id='.$bigbluebuttonbn->course); |
|
72 | + $CFG->wwwroot . '/course/view.php?id=' . $bigbluebuttonbn->course); |
|
73 | 73 | exit; |
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); |
@@ -80,7 +80,7 @@ discard block |
||
80 | 80 | |
81 | 81 | // Print the page header. |
82 | 82 | $PAGE->set_context($context); |
83 | -$PAGE->set_url($CFG->wwwroot.'/mod/bigbluebuttonbn/view.php', array('id' => $cm->id)); |
|
83 | +$PAGE->set_url($CFG->wwwroot . '/mod/bigbluebuttonbn/view.php', array('id' => $cm->id)); |
|
84 | 84 | $PAGE->set_title(format_string($bigbluebuttonbn->name)); |
85 | 85 | $PAGE->set_cacheable(false); |
86 | 86 | $PAGE->set_heading($course->fullname); |
@@ -90,11 +90,11 @@ discard block |
||
90 | 90 | if (!has_capability('moodle/category:manage', $context) && !has_capability('mod/bigbluebuttonbn:join', $context)) { |
91 | 91 | echo $OUTPUT->header(); |
92 | 92 | if (isguestuser()) { |
93 | - echo $OUTPUT->confirm('<p>'.get_string('view_noguests', 'bigbluebuttonbn').'</p>'.get_string('liketologin'), |
|
94 | - get_login_url(), $CFG->wwwroot.'/course/view.php?id='.$course->id); |
|
93 | + echo $OUTPUT->confirm('<p>' . get_string('view_noguests', 'bigbluebuttonbn') . '</p>' . get_string('liketologin'), |
|
94 | + get_login_url(), $CFG->wwwroot . '/course/view.php?id=' . $course->id); |
|
95 | 95 | } else { |
96 | - echo $OUTPUT->confirm('<p>'.get_string('view_nojoin', 'bigbluebuttonbn').'</p>'.get_string('liketologin'), |
|
97 | - get_login_url(), $CFG->wwwroot.'/course/view.php?id='.$course->id); |
|
96 | + echo $OUTPUT->confirm('<p>' . get_string('view_nojoin', 'bigbluebuttonbn') . '</p>' . get_string('liketologin'), |
|
97 | + get_login_url(), $CFG->wwwroot . '/course/view.php?id=' . $course->id); |
|
98 | 98 | } |
99 | 99 | echo $OUTPUT->footer(); |
100 | 100 | exit; |
@@ -102,7 +102,7 @@ discard block |
||
102 | 102 | |
103 | 103 | // Operation URLs. |
104 | 104 | $bbbsession['bigbluebuttonbnURL'] = $CFG->wwwroot . '/mod/bigbluebuttonbn/view.php?id=' . $bbbsession['cm']->id; |
105 | -$bbbsession['logoutURL'] = $CFG->wwwroot . '/mod/bigbluebuttonbn/bbb_view.php?action=logout&id='.$id . |
|
105 | +$bbbsession['logoutURL'] = $CFG->wwwroot . '/mod/bigbluebuttonbn/bbb_view.php?action=logout&id=' . $id . |
|
106 | 106 | '&bn=' . $bbbsession['bigbluebuttonbn']->id; |
107 | 107 | $bbbsession['recordingReadyURL'] = $CFG->wwwroot . '/mod/bigbluebuttonbn/bbb_broker.php?action=recording_' . |
108 | 108 | 'ready&bigbluebuttonbn=' . $bbbsession['bigbluebuttonbn']->id; |
@@ -122,7 +122,7 @@ discard block |
||
122 | 122 | echo $OUTPUT->footer(); |
123 | 123 | |
124 | 124 | // Shows version as a comment. |
125 | -echo '<!-- '.$bbbsession['originTag'].' -->'."\n"; |
|
125 | +echo '<!-- ' . $bbbsession['originTag'] . ' -->' . "\n"; |
|
126 | 126 | |
127 | 127 | // Initialize session variable used across views. |
128 | 128 | $SESSION->bigbluebuttonbn_bbbsession = $bbbsession; |
@@ -150,7 +150,7 @@ discard block |
||
150 | 150 | $bbbsession['modPW'] = $bbbsession['bigbluebuttonbn']->moderatorpass; |
151 | 151 | $bbbsession['viewerPW'] = $bbbsession['bigbluebuttonbn']->viewerpass; |
152 | 152 | // Database info related to the activity. |
153 | - $bbbsession['meetingid'] = $bbbsession['bigbluebuttonbn']->meetingid.'-'.$bbbsession['course']->id.'-'. |
|
153 | + $bbbsession['meetingid'] = $bbbsession['bigbluebuttonbn']->meetingid . '-' . $bbbsession['course']->id . '-' . |
|
154 | 154 | $bbbsession['bigbluebuttonbn']->id; |
155 | 155 | $bbbsession['meetingname'] = $bbbsession['bigbluebuttonbn']->name; |
156 | 156 | $bbbsession['meetingdescription'] = $bbbsession['bigbluebuttonbn']->intro; |
@@ -170,7 +170,7 @@ discard block |
||
170 | 170 | $bbbsession['welcome'] = get_string('mod_form_field_welcome_default', 'bigbluebuttonbn'); |
171 | 171 | } |
172 | 172 | if ($bbbsession['bigbluebuttonbn']->record) { |
173 | - $bbbsession['welcome'] .= '<br><br>'.get_string('bbbrecordwarning', 'bigbluebuttonbn'); |
|
173 | + $bbbsession['welcome'] .= '<br><br>' . get_string('bbbrecordwarning', 'bigbluebuttonbn'); |
|
174 | 174 | } |
175 | 175 | $bbbsession['openingtime'] = $bbbsession['bigbluebuttonbn']->openingtime; |
176 | 176 | $bbbsession['closingtime'] = $bbbsession['bigbluebuttonbn']->closingtime; |
@@ -183,7 +183,7 @@ discard block |
||
183 | 183 | $bbbsession['originServerName'] = $parsedurl['host']; |
184 | 184 | $bbbsession['originServerUrl'] = $CFG->wwwroot; |
185 | 185 | $bbbsession['originServerCommonName'] = ''; |
186 | - $bbbsession['originTag'] = 'moodle-mod_bigbluebuttonbn ('.get_config('mod_bigbluebuttonbn', 'version').')'; |
|
186 | + $bbbsession['originTag'] = 'moodle-mod_bigbluebuttonbn (' . get_config('mod_bigbluebuttonbn', 'version') . ')'; |
|
187 | 187 | $bbbsession['bnserver'] = bigbluebuttonbn_is_bn_server(); |
188 | 188 | $bbbsession['clienttype'] = $bbbsession['bigbluebuttonbn']->clienttype; |
189 | 189 | } |
@@ -239,8 +239,8 @@ discard block |
||
239 | 239 | $groupname = groups_get_group_name($bbbsession['group']); |
240 | 240 | } |
241 | 241 | // Assign group default values. |
242 | - $bbbsession['meetingid'] .= '['.$bbbsession['group'].']'; |
|
243 | - $bbbsession['meetingname'] .= ' ('.$groupname.')'; |
|
242 | + $bbbsession['meetingid'] .= '[' . $bbbsession['group'] . ']'; |
|
243 | + $bbbsession['meetingname'] .= ' (' . $groupname . ')'; |
|
244 | 244 | if (count($groups) == 0) { |
245 | 245 | // Only the All participants group exists. |
246 | 246 | bigbluebuttonbn_view_message_box($bbbsession, get_string('view_groups_notenrolled_warning', 'bigbluebuttonbn'), 'info'); |
@@ -250,7 +250,7 @@ discard block |
||
250 | 250 | if (has_capability('moodle/site:accessallgroups', $context)) { |
251 | 251 | bigbluebuttonbn_view_message_box($bbbsession, get_string('view_groups_selection_warning', 'bigbluebuttonbn')); |
252 | 252 | } |
253 | - $urltoroot = $CFG->wwwroot.'/mod/bigbluebuttonbn/view.php?id='.$bbbsession['cm']->id; |
|
253 | + $urltoroot = $CFG->wwwroot . '/mod/bigbluebuttonbn/view.php?id=' . $bbbsession['cm']->id; |
|
254 | 254 | groups_print_activity_menu($bbbsession['cm'], $urltoroot); |
255 | 255 | echo '<br><br>'; |
256 | 256 | } |
@@ -317,7 +317,7 @@ discard block |
||
317 | 317 | $recordingsdisabled = get_string('view_message_recordings_disabled', 'bigbluebuttonbn'); |
318 | 318 | $output .= bigbluebuttonbn_render_warning($recordingsdisabled, 'danger'); |
319 | 319 | } |
320 | - echo $output.html_writer::empty_tag('br').html_writer::empty_tag('br').html_writer::empty_tag('br'); |
|
320 | + echo $output . html_writer::empty_tag('br') . html_writer::empty_tag('br') . html_writer::empty_tag('br'); |
|
321 | 321 | $PAGE->requires->yui_module('moodle-mod_bigbluebuttonbn-broker', 'M.mod_bigbluebuttonbn.broker.init', array($jsvars)); |
322 | 322 | } |
323 | 323 | |
@@ -386,12 +386,12 @@ discard block |
||
386 | 386 | // JavaScript variables for room. |
387 | 387 | $openingtime = ''; |
388 | 388 | if ($bbbsession['openingtime']) { |
389 | - $openingtime = get_string('mod_form_field_openingtime', 'bigbluebuttonbn').': '. |
|
389 | + $openingtime = get_string('mod_form_field_openingtime', 'bigbluebuttonbn') . ': ' . |
|
390 | 390 | userdate($bbbsession['openingtime']); |
391 | 391 | } |
392 | 392 | $closingtime = ''; |
393 | 393 | if ($bbbsession['closingtime']) { |
394 | - $closingtime = get_string('mod_form_field_closingtime', 'bigbluebuttonbn').': '. |
|
394 | + $closingtime = get_string('mod_form_field_closingtime', 'bigbluebuttonbn') . ': ' . |
|
395 | 395 | userdate($bbbsession['closingtime']); |
396 | 396 | } |
397 | 397 | $jsvars += array( |
@@ -408,7 +408,7 @@ discard block |
||
408 | 408 | $output .= $OUTPUT->box_end(); |
409 | 409 | // Action button box. |
410 | 410 | $output .= $OUTPUT->box_start('generalbox boxaligncenter', 'bigbluebuttonbn_view_action_button_box'); |
411 | - $output .= '<br><br><span id="join_button"></span> <span id="end_button"></span>'."\n"; |
|
411 | + $output .= '<br><br><span id="join_button"></span> <span id="end_button"></span>' . "\n"; |
|
412 | 412 | $output .= $OUTPUT->box_end(); |
413 | 413 | if ($activity == 'ended') { |
414 | 414 | $output .= bigbluebuttonbn_view_ended($bbbsession); |
@@ -461,7 +461,7 @@ discard block |
||
461 | 461 | // If there are meetings with recordings load the data to the table. |
462 | 462 | if ($bbbsession['bigbluebuttonbn']->recordings_html) { |
463 | 463 | // Render a plain html table. |
464 | - return bigbluebuttonbn_output_recording_table($bbbsession, $recordings)."\n"; |
|
464 | + return bigbluebuttonbn_output_recording_table($bbbsession, $recordings) . "\n"; |
|
465 | 465 | } |
466 | 466 | // JavaScript variables for recordings with YUI. |
467 | 467 | $jsvars += array( |
@@ -489,8 +489,8 @@ discard block |
||
489 | 489 | array('type' => 'button', |
490 | 490 | 'value' => get_string('view_recording_button_import', 'bigbluebuttonbn'), |
491 | 491 | 'class' => 'btn btn-secondary', |
492 | - 'onclick' => 'window.location=\''.$CFG->wwwroot.'/mod/bigbluebuttonbn/import_view.php?bn='. |
|
493 | - $bbbsession['bigbluebuttonbn']->id.'\'')); |
|
492 | + 'onclick' => 'window.location=\'' . $CFG->wwwroot . '/mod/bigbluebuttonbn/import_view.php?bn=' . |
|
493 | + $bbbsession['bigbluebuttonbn']->id . '\'')); |
|
494 | 494 | $output = html_writer::empty_tag('br'); |
495 | 495 | $output .= html_writer::tag('span', $button, array('id' => 'import_recording_links_button')); |
496 | 496 | $output .= html_writer::tag('span', '', array('id' => 'import_recording_links_table')); |
@@ -509,10 +509,10 @@ discard block |
||
509 | 509 | if (!is_null($bbbsession['presentation']['url'])) { |
510 | 510 | $attributes = array('title' => $bbbsession['presentation']['name']); |
511 | 511 | $icon = new pix_icon($bbbsession['presentation']['icon'], $bbbsession['presentation']['mimetype_description']); |
512 | - return '<h4>'.get_string('view_section_title_presentation', 'bigbluebuttonbn').'</h4>'. |
|
513 | - $OUTPUT->action_icon($bbbsession['presentation']['url'], $icon, null, array(), false). |
|
512 | + return '<h4>' . get_string('view_section_title_presentation', 'bigbluebuttonbn') . '</h4>' . |
|
513 | + $OUTPUT->action_icon($bbbsession['presentation']['url'], $icon, null, array(), false) . |
|
514 | 514 | $OUTPUT->action_link($bbbsession['presentation']['url'], |
515 | - $bbbsession['presentation']['name'], null, $attributes).'<br><br>'; |
|
515 | + $bbbsession['presentation']['name'], null, $attributes) . '<br><br>'; |
|
516 | 516 | } |
517 | 517 | return ''; |
518 | 518 | } |
@@ -93,13 +93,13 @@ discard block |
||
93 | 93 | */ |
94 | 94 | function bigbluebuttonbn_get_join_url($meetingid, $username, $pw, $logouturl, $configtoken = null, $userid = null, $clienttype=BIGBLUEBUTTON_CLIENTTYPE_FLASH) { |
95 | 95 | $data = ['meetingID' => $meetingid, |
96 | - 'fullName' => $username, |
|
97 | - 'password' => $pw, |
|
98 | - 'logoutURL' => $logouturl, |
|
96 | + 'fullName' => $username, |
|
97 | + 'password' => $pw, |
|
98 | + 'logoutURL' => $logouturl, |
|
99 | 99 | ]; |
100 | 100 | // Choose between Adobe Flash or HTML5 Client |
101 | 101 | if ( $clienttype == BIGBLUEBUTTON_CLIENTTYPE_HTML5 ) { |
102 | - $data['joinViaHtml5'] = 'true'; |
|
102 | + $data['joinViaHtml5'] = 'true'; |
|
103 | 103 | } |
104 | 104 | |
105 | 105 | if (!is_null($configtoken)) { |
@@ -152,23 +152,23 @@ discard block |
||
152 | 152 | function bigbluebuttonbn_get_meeting_info_array($meetingid) { |
153 | 153 | $xml = bigbluebuttonbn_wrap_xml_load_file( |
154 | 154 | \mod_bigbluebuttonbn\locallib\bigbluebutton::action_url('getMeetingInfo', ['meetingID' => $meetingid]) |
155 | - ); |
|
155 | + ); |
|
156 | 156 | if ($xml && $xml->returncode == 'SUCCESS' && empty($xml->messageKey)) { |
157 | 157 | // Meeting info was returned. |
158 | 158 | return array('returncode' => $xml->returncode, |
159 | - 'meetingID' => $xml->meetingID, |
|
160 | - 'moderatorPW' => $xml->moderatorPW, |
|
161 | - 'attendeePW' => $xml->attendeePW, |
|
162 | - 'hasBeenForciblyEnded' => $xml->hasBeenForciblyEnded, |
|
163 | - 'running' => $xml->running, |
|
164 | - 'recording' => $xml->recording, |
|
165 | - 'startTime' => $xml->startTime, |
|
166 | - 'endTime' => $xml->endTime, |
|
167 | - 'participantCount' => $xml->participantCount, |
|
168 | - 'moderatorCount' => $xml->moderatorCount, |
|
169 | - 'attendees' => $xml->attendees, |
|
170 | - 'metadata' => $xml->metadata, |
|
171 | - ); |
|
159 | + 'meetingID' => $xml->meetingID, |
|
160 | + 'moderatorPW' => $xml->moderatorPW, |
|
161 | + 'attendeePW' => $xml->attendeePW, |
|
162 | + 'hasBeenForciblyEnded' => $xml->hasBeenForciblyEnded, |
|
163 | + 'running' => $xml->running, |
|
164 | + 'recording' => $xml->recording, |
|
165 | + 'startTime' => $xml->startTime, |
|
166 | + 'endTime' => $xml->endTime, |
|
167 | + 'participantCount' => $xml->participantCount, |
|
168 | + 'moderatorCount' => $xml->moderatorCount, |
|
169 | + 'attendees' => $xml->attendees, |
|
170 | + 'metadata' => $xml->metadata, |
|
171 | + ); |
|
172 | 172 | } |
173 | 173 | if ($xml) { |
174 | 174 | // Either failure or success without meeting info. |
@@ -304,7 +304,7 @@ discard block |
||
304 | 304 | function bigbluebuttonbn_get_default_config_xml() { |
305 | 305 | $xml = bigbluebuttonbn_wrap_xml_load_file( |
306 | 306 | \mod_bigbluebuttonbn\locallib\bigbluebutton::action_url('getDefaultConfigXML') |
307 | - ); |
|
307 | + ); |
|
308 | 308 | return $xml; |
309 | 309 | } |
310 | 310 | |
@@ -405,7 +405,7 @@ discard block |
||
405 | 405 | foreach ($ids as $id) { |
406 | 406 | $xml = bigbluebuttonbn_wrap_xml_load_file( |
407 | 407 | \mod_bigbluebuttonbn\locallib\bigbluebutton::action_url('deleteRecordings', ['recordID' => $id]) |
408 | - ); |
|
408 | + ); |
|
409 | 409 | if ($xml && $xml->returncode != 'SUCCESS') { |
410 | 410 | return false; |
411 | 411 | } |
@@ -424,7 +424,7 @@ discard block |
||
424 | 424 | foreach ($ids as $id) { |
425 | 425 | $xml = bigbluebuttonbn_wrap_xml_load_file( |
426 | 426 | \mod_bigbluebuttonbn\locallib\bigbluebutton::action_url('publishRecordings', ['recordID' => $id, 'publish' => $publish]) |
427 | - ); |
|
427 | + ); |
|
428 | 428 | if ($xml && $xml->returncode != 'SUCCESS') { |
429 | 429 | return false; |
430 | 430 | } |
@@ -443,7 +443,7 @@ discard block |
||
443 | 443 | foreach ($ids as $id) { |
444 | 444 | $xml = bigbluebuttonbn_wrap_xml_load_file( |
445 | 445 | \mod_bigbluebuttonbn\locallib\bigbluebutton::action_url('updateRecordings', ['recordID' => $id] + (array) $params) |
446 | - ); |
|
446 | + ); |
|
447 | 447 | if ($xml && $xml->returncode != 'SUCCESS') { |
448 | 448 | return false; |
449 | 449 | } |
@@ -460,7 +460,7 @@ discard block |
||
460 | 460 | function bigbluebuttonbn_end_meeting($meetingid, $modpw) { |
461 | 461 | $xml = bigbluebuttonbn_wrap_xml_load_file( |
462 | 462 | \mod_bigbluebuttonbn\locallib\bigbluebutton::action_url('end', ['meetingID' => $meetingid, 'password' => $modpw]) |
463 | - ); |
|
463 | + ); |
|
464 | 464 | if ($xml) { |
465 | 465 | // If the xml packet returned failure it displays the message to the user. |
466 | 466 | return array('returncode' => $xml->returncode, 'message' => $xml->message, 'messageKey' => $xml->messageKey); |
@@ -477,7 +477,7 @@ discard block |
||
477 | 477 | function bigbluebuttonbn_get_server_version() { |
478 | 478 | $xml = bigbluebuttonbn_wrap_xml_load_file( |
479 | 479 | \mod_bigbluebuttonbn\locallib\bigbluebutton::action_url() |
480 | - ); |
|
480 | + ); |
|
481 | 481 | if ($xml && $xml->returncode == 'SUCCESS') { |
482 | 482 | return $xml->version; |
483 | 483 | } |
@@ -544,10 +544,10 @@ discard block |
||
544 | 544 | } |
545 | 545 | $options = array(); |
546 | 546 | $options['CURLOPT_HTTPHEADER'] = array( |
547 | - 'Content-Type: '.$contenttype, |
|
548 | - 'Content-Length: '.strlen($data), |
|
549 | - 'Content-Language: en-US', |
|
550 | - ); |
|
547 | + 'Content-Type: '.$contenttype, |
|
548 | + 'Content-Length: '.strlen($data), |
|
549 | + 'Content-Language: en-US', |
|
550 | + ); |
|
551 | 551 | |
552 | 552 | return $c->post($url, $data, $options); |
553 | 553 | } |
@@ -694,16 +694,16 @@ discard block |
||
694 | 694 | 'all' => array( |
695 | 695 | 'name' => get_string('mod_form_field_participant_list_type_all', 'bigbluebuttonbn'), |
696 | 696 | 'children' => [] |
697 | - ) |
|
698 | - ); |
|
697 | + ) |
|
698 | + ); |
|
699 | 699 | $data['role'] = array( |
700 | 700 | 'name' => get_string('mod_form_field_participant_list_type_role', 'bigbluebuttonbn'), |
701 | 701 | 'children' => bigbluebuttonbn_get_roles_select($context) |
702 | - ); |
|
702 | + ); |
|
703 | 703 | $data['user'] = array( |
704 | 704 | 'name' => get_string('mod_form_field_participant_list_type_user', 'bigbluebuttonbn'), |
705 | 705 | 'children' => bigbluebuttonbn_get_users_select($context) |
706 | - ); |
|
706 | + ); |
|
707 | 707 | return $data; |
708 | 708 | } |
709 | 709 | |
@@ -746,7 +746,7 @@ discard block |
||
746 | 746 | 'selectiontype' => 'all', |
747 | 747 | 'selectionid' => 'all', |
748 | 748 | 'role' => BIGBLUEBUTTONBN_ROLE_VIEWER |
749 | - ); |
|
749 | + ); |
|
750 | 750 | $defaultrules = explode(',', \mod_bigbluebuttonbn\locallib\config::get('participant_moderator_default')); |
751 | 751 | foreach ($defaultrules as $defaultrule) { |
752 | 752 | if ($defaultrule == '0') { |
@@ -759,9 +759,9 @@ discard block |
||
759 | 759 | continue; |
760 | 760 | } |
761 | 761 | $participantlist[] = array( |
762 | - 'selectiontype' => 'role', |
|
763 | - 'selectionid' => $defaultrule, |
|
764 | - 'role' => BIGBLUEBUTTONBN_ROLE_MODERATOR); |
|
762 | + 'selectiontype' => 'role', |
|
763 | + 'selectionid' => $defaultrule, |
|
764 | + 'role' => BIGBLUEBUTTONBN_ROLE_MODERATOR); |
|
765 | 765 | } |
766 | 766 | return $participantlist; |
767 | 767 | } |
@@ -800,11 +800,11 @@ discard block |
||
800 | 800 | 'all' => get_string('mod_form_field_participant_list_type_all', 'bigbluebuttonbn'), |
801 | 801 | 'role' => get_string('mod_form_field_participant_list_type_role', 'bigbluebuttonbn'), |
802 | 802 | 'user' => get_string('mod_form_field_participant_list_type_user', 'bigbluebuttonbn'), |
803 | - ], |
|
803 | + ], |
|
804 | 804 | 'type_selected' => 'all', |
805 | 805 | 'options' => ['all' => '---------------'], |
806 | 806 | 'selected' => 'all', |
807 | - ]; |
|
807 | + ]; |
|
808 | 808 | } |
809 | 809 | |
810 | 810 | /** |
@@ -1081,7 +1081,7 @@ discard block |
||
1081 | 1081 | $eventproperties['other'] = $options['other']; |
1082 | 1082 | } |
1083 | 1083 | $event = call_user_func_array('\mod_bigbluebuttonbn\event\bigbluebuttonbn_'.$eventtype.'::create', |
1084 | - array($eventproperties)); |
|
1084 | + array($eventproperties)); |
|
1085 | 1085 | $event->trigger(); |
1086 | 1086 | } |
1087 | 1087 | |
@@ -1125,7 +1125,7 @@ discard block |
||
1125 | 1125 | // Ping again and refresh the cache. |
1126 | 1126 | $meetinginfo = (array) bigbluebuttonbn_wrap_xml_load_file( |
1127 | 1127 | \mod_bigbluebuttonbn\locallib\bigbluebutton::action_url('getMeetingInfo', ['meetingID' => $meetingid]) |
1128 | - ); |
|
1128 | + ); |
|
1129 | 1129 | $cache->set($meetingid, array('creation_time' => time(), 'meeting_info' => json_encode($meetinginfo))); |
1130 | 1130 | return $meetinginfo; |
1131 | 1131 | } |
@@ -1537,8 +1537,8 @@ discard block |
||
1537 | 1537 | } |
1538 | 1538 | $id = 'playbacks-'.$recording['recordID']; |
1539 | 1539 | $recordingtypes = html_writer::start_tag('div', array('id' => $id, 'data-imported' => $dataimported, |
1540 | - 'data-meetingid' => $recording['meetingID'], 'data-recordingid' => $recording['recordID'], |
|
1541 | - 'title' => $title, $visibility => $visibility)); |
|
1540 | + 'data-meetingid' => $recording['meetingID'], 'data-recordingid' => $recording['recordID'], |
|
1541 | + 'title' => $title, $visibility => $visibility)); |
|
1542 | 1542 | foreach ($recording['playbacks'] as $playback) { |
1543 | 1543 | $recordingtypes .= bigbluebuttonbn_get_recording_data_row_type($recording, $bbbsession, $playback); |
1544 | 1544 | } |
@@ -1562,7 +1562,7 @@ discard block |
||
1562 | 1562 | } |
1563 | 1563 | $text = get_string('view_recording_format_'.$playback['type'], 'bigbluebuttonbn'); |
1564 | 1564 | $href = $CFG->wwwroot . '/mod/bigbluebuttonbn/bbb_view.php?action=play&bn=' . $bbbsession['bigbluebuttonbn']->id . |
1565 | - '&mid='.$recording['meetingID'] . '&rid=' . $recording['recordID'] . '&rtype=' . $playback['type']; |
|
1565 | + '&mid='.$recording['meetingID'] . '&rid=' . $recording['recordID'] . '&rtype=' . $playback['type']; |
|
1566 | 1566 | if (!isset($recording['imported']) || !isset($recording['protected']) || $recording['protected'] === 'false') { |
1567 | 1567 | $href .= '&href='.urlencode(trim($playback['url'])); |
1568 | 1568 | } |
@@ -1573,7 +1573,7 @@ discard block |
||
1573 | 1573 | 'data-action' => 'play', |
1574 | 1574 | 'data-target' => $playback['type'], |
1575 | 1575 | 'data-href' => $href, |
1576 | - ); |
|
1576 | + ); |
|
1577 | 1577 | if (!bigbluebuttonbn_is_bn_server() && !bigbluebuttonbn_is_valid_resource(trim($playback['url']))) { |
1578 | 1578 | $linkattributes['class'] = 'btn btn-sm btn-warning'; |
1579 | 1579 | $linkattributes['title'] = get_string('view_recording_format_errror_unreachable', 'bigbluebuttonbn'); |
@@ -1723,10 +1723,10 @@ discard block |
||
1723 | 1723 | 'id' => $id, |
1724 | 1724 | 'onclick' => $onclick, |
1725 | 1725 | 'data-action' => $data['action'] |
1726 | - ); |
|
1726 | + ); |
|
1727 | 1727 | if (!isset($recording['imported'])) { |
1728 | 1728 | $linkattributes['data-links'] = bigbluebuttonbn_count_recording_imported_instances( |
1729 | - $recording['recordID']); |
|
1729 | + $recording['recordID']); |
|
1730 | 1730 | } |
1731 | 1731 | if (isset($data['disabled'])) { |
1732 | 1732 | $iconattributes['class'] .= ' fa-' . $data['disabled']; |
@@ -2267,8 +2267,8 @@ discard block |
||
2267 | 2267 | $activitytime = ''; |
2268 | 2268 | if ($time) { |
2269 | 2269 | $activitytime = calendar_day_representation($time).' '. |
2270 | - get_string('mod_form_field_notification_msg_at', 'bigbluebuttonbn').' '. |
|
2271 | - calendar_time_representation($time); |
|
2270 | + get_string('mod_form_field_notification_msg_at', 'bigbluebuttonbn').' '. |
|
2271 | + calendar_time_representation($time); |
|
2272 | 2272 | } |
2273 | 2273 | return $activitytime; |
2274 | 2274 | } |
@@ -2364,7 +2364,7 @@ discard block |
||
2364 | 2364 | global $BIGBLUEBUTTONBN_CFG; |
2365 | 2365 | if (isset($BIGBLUEBUTTONBN_CFG)) { |
2366 | 2366 | $renderer->render_warning_message('general_warning', |
2367 | - get_string('config_warning_bigbluebuttonbn_cfg_deprecated', 'bigbluebuttonbn')); |
|
2367 | + get_string('config_warning_bigbluebuttonbn_cfg_deprecated', 'bigbluebuttonbn')); |
|
2368 | 2368 | } |
2369 | 2369 | } |
2370 | 2370 | |
@@ -2572,7 +2572,7 @@ discard block |
||
2572 | 2572 | $renderer->render_group_element('participant_moderator_default', |
2573 | 2573 | $renderer->render_group_element_configmultiselect('participant_moderator_default', |
2574 | 2574 | array_keys($owner), array_merge($owner, $roles)) |
2575 | - ); |
|
2575 | + ); |
|
2576 | 2576 | } |
2577 | 2577 | } |
2578 | 2578 | |
@@ -2609,7 +2609,7 @@ discard block |
||
2609 | 2609 | // Web Client default |
2610 | 2610 | $clienttype_default = intval((int)\mod_bigbluebuttonbn\locallib\config::get('clienttype_default')); |
2611 | 2611 | |
2612 | - // Flash or HTML5 meeting |
|
2612 | + // Flash or HTML5 meeting |
|
2613 | 2613 | $clienttype_select_choices = array(BIGBLUEBUTTON_CLIENTTYPE_FLASH => get_string('mod_form_block_clienttype_flash', 'bigbluebuttonbn'), BIGBLUEBUTTON_CLIENTTYPE_HTML5 => get_string('mod_form_block_clienttype_html5', 'bigbluebuttonbn')); |
2614 | 2614 | $renderer->render_group_element('clienttype_default', |
2615 | 2615 | $renderer->render_group_element_configselect('clienttype_default', |
@@ -2701,7 +2701,7 @@ discard block |
||
2701 | 2701 | return $output; |
2702 | 2702 | } |
2703 | 2703 | $output .= $OUTPUT->box_start('box boxalignleft adminerror alert alert-' . $type . ' alert-block fade in', |
2704 | - 'bigbluebuttonbn_view_general_warning') . "\n"; |
|
2704 | + 'bigbluebuttonbn_view_general_warning') . "\n"; |
|
2705 | 2705 | $output .= ' ' . $message . "\n"; |
2706 | 2706 | $output .= ' <div class="singlebutton pull-right">' . "\n"; |
2707 | 2707 | if (!empty($href)) { |
@@ -28,7 +28,7 @@ discard block |
||
28 | 28 | |
29 | 29 | global $CFG; |
30 | 30 | |
31 | -require_once(dirname(__FILE__).'/lib.php'); |
|
31 | +require_once(dirname(__FILE__) . '/lib.php'); |
|
32 | 32 | |
33 | 33 | /** @var BIGBLUEBUTTONBN_UPDATE_CACHE boolean set to true indicates that cache has to be updated */ |
34 | 34 | const BIGBLUEBUTTONBN_UPDATE_CACHE = true; |
@@ -91,14 +91,14 @@ discard block |
||
91 | 91 | * |
92 | 92 | * @return string |
93 | 93 | */ |
94 | -function bigbluebuttonbn_get_join_url($meetingid, $username, $pw, $logouturl, $configtoken = null, $userid = null, $clienttype=BIGBLUEBUTTON_CLIENTTYPE_FLASH) { |
|
94 | +function bigbluebuttonbn_get_join_url($meetingid, $username, $pw, $logouturl, $configtoken = null, $userid = null, $clienttype = BIGBLUEBUTTON_CLIENTTYPE_FLASH) { |
|
95 | 95 | $data = ['meetingID' => $meetingid, |
96 | 96 | 'fullName' => $username, |
97 | 97 | 'password' => $pw, |
98 | 98 | 'logoutURL' => $logouturl, |
99 | 99 | ]; |
100 | 100 | // Choose between Adobe Flash or HTML5 Client |
101 | - if ( $clienttype == BIGBLUEBUTTON_CLIENTTYPE_HTML5 ) { |
|
101 | + if ($clienttype == BIGBLUEBUTTON_CLIENTTYPE_HTML5) { |
|
102 | 102 | $data['joinViaHtml5'] = 'true'; |
103 | 103 | } |
104 | 104 | |
@@ -127,8 +127,8 @@ discard block |
||
127 | 127 | $data = null; |
128 | 128 | if (!is_null($pname) && !is_null($purl)) { |
129 | 129 | $method = 'POST'; |
130 | - $data = "<?xml version='1.0' encoding='UTF-8'?><modules><module name='presentation'><document url='". |
|
131 | - $purl."' /></module></modules>"; |
|
130 | + $data = "<?xml version='1.0' encoding='UTF-8'?><modules><module name='presentation'><document url='" . |
|
131 | + $purl . "' /></module></modules>"; |
|
132 | 132 | } |
133 | 133 | $xml = bigbluebuttonbn_wrap_xml_load_file($createmeetingurl, $method, $data); |
134 | 134 | if ($xml) { |
@@ -289,7 +289,7 @@ discard block |
||
289 | 289 | // Override imported flag with actual ID. |
290 | 290 | $recording['imported'] = $recordimported->id; |
291 | 291 | if (isset($recordimported->protected)) { |
292 | - $recording['protected'] = (string) $recordimported->protected; |
|
292 | + $recording['protected'] = (string)$recordimported->protected; |
|
293 | 293 | } |
294 | 294 | $recordsimportedarray[$recording['recordID']] = $recording; |
295 | 295 | } |
@@ -319,21 +319,21 @@ discard block |
||
319 | 319 | // Add formats. |
320 | 320 | $playbackarray = array(); |
321 | 321 | foreach ($recording->playback->format as $format) { |
322 | - $playbackarray[(string) $format->type] = array('type' => (string) $format->type, |
|
323 | - 'url' => trim((string) $format->url), 'length' => (string) $format->length); |
|
322 | + $playbackarray[(string)$format->type] = array('type' => (string)$format->type, |
|
323 | + 'url' => trim((string)$format->url), 'length' => (string)$format->length); |
|
324 | 324 | // Add preview per format when existing. |
325 | 325 | if ($format->preview) { |
326 | - $playbackarray[(string) $format->type]['preview'] = bigbluebuttonbn_get_recording_preview_images($format->preview); |
|
326 | + $playbackarray[(string)$format->type]['preview'] = bigbluebuttonbn_get_recording_preview_images($format->preview); |
|
327 | 327 | } |
328 | 328 | } |
329 | 329 | // Add the metadata to the recordings array. |
330 | 330 | $metadataarray = bigbluebuttonbn_get_recording_array_meta(get_object_vars($recording->metadata)); |
331 | - $recordingarray = array('recordID' => (string) $recording->recordID, |
|
332 | - 'meetingID' => (string) $recording->meetingID, 'meetingName' => (string) $recording->name, |
|
333 | - 'published' => (string) $recording->published, 'startTime' => (string) $recording->startTime, |
|
334 | - 'endTime' => (string) $recording->endTime, 'playbacks' => $playbackarray); |
|
331 | + $recordingarray = array('recordID' => (string)$recording->recordID, |
|
332 | + 'meetingID' => (string)$recording->meetingID, 'meetingName' => (string)$recording->name, |
|
333 | + 'published' => (string)$recording->published, 'startTime' => (string)$recording->startTime, |
|
334 | + 'endTime' => (string)$recording->endTime, 'playbacks' => $playbackarray); |
|
335 | 335 | if (isset($recording->protected)) { |
336 | - $recordingarray['protected'] = (string) $recording->protected; |
|
336 | + $recordingarray['protected'] = (string)$recording->protected; |
|
337 | 337 | } |
338 | 338 | return $recordingarray + $metadataarray; |
339 | 339 | } |
@@ -348,9 +348,9 @@ discard block |
||
348 | 348 | function bigbluebuttonbn_get_recording_preview_images($preview) { |
349 | 349 | $imagesarray = array(); |
350 | 350 | foreach ($preview->images->image as $image) { |
351 | - $imagearray = array('url' => trim((string) $image)); |
|
351 | + $imagearray = array('url' => trim((string)$image)); |
|
352 | 352 | foreach ($image->attributes() as $attkey => $attvalue) { |
353 | - $imagearray[$attkey] = (string) $attvalue; |
|
353 | + $imagearray[$attkey] = (string)$attvalue; |
|
354 | 354 | } |
355 | 355 | array_push($imagesarray, $imagearray); |
356 | 356 | } |
@@ -370,7 +370,7 @@ discard block |
||
370 | 370 | if (is_object($value)) { |
371 | 371 | $value = ''; |
372 | 372 | } |
373 | - $metadataarray['meta_'.$key] = $value; |
|
373 | + $metadataarray['meta_' . $key] = $value; |
|
374 | 374 | } |
375 | 375 | return $metadataarray; |
376 | 376 | } |
@@ -442,7 +442,7 @@ discard block |
||
442 | 442 | $ids = explode(',', $recordids); |
443 | 443 | foreach ($ids as $id) { |
444 | 444 | $xml = bigbluebuttonbn_wrap_xml_load_file( |
445 | - \mod_bigbluebuttonbn\locallib\bigbluebutton::action_url('updateRecordings', ['recordID' => $id] + (array) $params) |
|
445 | + \mod_bigbluebuttonbn\locallib\bigbluebutton::action_url('updateRecordings', ['recordID' => $id] + (array)$params) |
|
446 | 446 | ); |
447 | 447 | if ($xml && $xml->returncode != 'SUCCESS') { |
448 | 448 | return false; |
@@ -507,7 +507,7 @@ discard block |
||
507 | 507 | return $xml; |
508 | 508 | } catch (Exception $e) { |
509 | 509 | libxml_use_internal_errors($previous); |
510 | - $error = 'Caught exception: '.$e->getMessage(); |
|
510 | + $error = 'Caught exception: ' . $e->getMessage(); |
|
511 | 511 | debugging($error, DEBUG_DEVELOPER); |
512 | 512 | return null; |
513 | 513 | } |
@@ -518,7 +518,7 @@ discard block |
||
518 | 518 | $response = simplexml_load_file($url, 'SimpleXMLElement', LIBXML_NOCDATA | LIBXML_NOBLANKS); |
519 | 519 | return $response; |
520 | 520 | } catch (Exception $e) { |
521 | - $error = 'Caught exception: '.$e->getMessage(); |
|
521 | + $error = 'Caught exception: ' . $e->getMessage(); |
|
522 | 522 | debugging($error, DEBUG_DEVELOPER); |
523 | 523 | libxml_use_internal_errors($previous); |
524 | 524 | return null; |
@@ -544,8 +544,8 @@ discard block |
||
544 | 544 | } |
545 | 545 | $options = array(); |
546 | 546 | $options['CURLOPT_HTTPHEADER'] = array( |
547 | - 'Content-Type: '.$contenttype, |
|
548 | - 'Content-Length: '.strlen($data), |
|
547 | + 'Content-Type: ' . $contenttype, |
|
548 | + 'Content-Length: ' . strlen($data), |
|
549 | 549 | 'Content-Language: en-US', |
550 | 550 | ); |
551 | 551 | |
@@ -566,7 +566,7 @@ discard block |
||
566 | 566 | * @return void |
567 | 567 | */ |
568 | 568 | function bigbluebuttonbn_end_meeting_if_running($bigbluebuttonbn) { |
569 | - $meetingid = $bigbluebuttonbn->meetingid.'-'.$bigbluebuttonbn->course.'-'.$bigbluebuttonbn->id; |
|
569 | + $meetingid = $bigbluebuttonbn->meetingid . '-' . $bigbluebuttonbn->course . '-' . $bigbluebuttonbn->id; |
|
570 | 570 | if (bigbluebuttonbn_is_meeting_running($meetingid)) { |
571 | 571 | bigbluebuttonbn_end_meeting($meetingid, $bigbluebuttonbn->moderatorpass); |
572 | 572 | } |
@@ -586,9 +586,9 @@ discard block |
||
586 | 586 | if ($userroles) { |
587 | 587 | $where = ''; |
588 | 588 | foreach ($userroles as $userrole) { |
589 | - $where .= (empty($where) ? ' WHERE' : ' OR').' id=' . $userrole->roleid; |
|
589 | + $where .= (empty($where) ? ' WHERE' : ' OR') . ' id=' . $userrole->roleid; |
|
590 | 590 | } |
591 | - $userroles = $DB->get_records_sql('SELECT * FROM {role}'.$where); |
|
591 | + $userroles = $DB->get_records_sql('SELECT * FROM {role}' . $where); |
|
592 | 592 | } |
593 | 593 | return $userroles; |
594 | 594 | } |
@@ -611,7 +611,7 @@ discard block |
||
611 | 611 | * @return array $users |
612 | 612 | */ |
613 | 613 | function bigbluebuttonbn_get_users(context $context = null) { |
614 | - $users = (array) get_enrolled_users($context, '', 0, 'u.*', null, 0, 0, true); |
|
614 | + $users = (array)get_enrolled_users($context, '', 0, 'u.*', null, 0, 0, true); |
|
615 | 615 | foreach ($users as $key => $value) { |
616 | 616 | $users[$key] = fullname($value); |
617 | 617 | } |
@@ -626,7 +626,7 @@ discard block |
||
626 | 626 | * @return array $users |
627 | 627 | */ |
628 | 628 | function bigbluebuttonbn_get_users_select(context $context = null) { |
629 | - $users = (array) get_enrolled_users($context, '', 0, 'u.*', null, 0, 0, true); |
|
629 | + $users = (array)get_enrolled_users($context, '', 0, 'u.*', null, 0, 0, true); |
|
630 | 630 | foreach ($users as $key => $value) { |
631 | 631 | $users[$key] = array('id' => $value->id, 'name' => fullname($value)); |
632 | 632 | } |
@@ -641,7 +641,7 @@ discard block |
||
641 | 641 | * @return array $roles |
642 | 642 | */ |
643 | 643 | function bigbluebuttonbn_get_roles(context $context = null) { |
644 | - $roles = (array) role_get_names($context); |
|
644 | + $roles = (array)role_get_names($context); |
|
645 | 645 | foreach ($roles as $key => $value) { |
646 | 646 | $roles[$key] = $value->localname; |
647 | 647 | } |
@@ -656,7 +656,7 @@ discard block |
||
656 | 656 | * @return array $users |
657 | 657 | */ |
658 | 658 | function bigbluebuttonbn_get_roles_select(context $context = null) { |
659 | - $roles = (array) role_get_names($context); |
|
659 | + $roles = (array)role_get_names($context); |
|
660 | 660 | foreach ($roles as $key => $value) { |
661 | 661 | $roles[$key] = array('id' => $value->id, 'name' => $value->localname); |
662 | 662 | } |
@@ -671,7 +671,7 @@ discard block |
||
671 | 671 | * @return object $role |
672 | 672 | */ |
673 | 673 | function bigbluebuttonbn_get_role($id) { |
674 | - $roles = (array) role_get_names(); |
|
674 | + $roles = (array)role_get_names(); |
|
675 | 675 | if (is_numeric($id) && isset($roles[$id])) { |
676 | 676 | return (object)$roles[$id]; |
677 | 677 | } |
@@ -828,7 +828,7 @@ discard block |
||
828 | 828 | if (!isguestuser()) { |
829 | 829 | $userroles = bigbluebuttonbn_get_user_roles($context, $userid); |
830 | 830 | } |
831 | - return bigbluebuttonbn_is_moderator_validator($participantlist, $userid , $userroles); |
|
831 | + return bigbluebuttonbn_is_moderator_validator($participantlist, $userid, $userroles); |
|
832 | 832 | } |
833 | 833 | |
834 | 834 | /** |
@@ -984,7 +984,7 @@ discard block |
||
984 | 984 | function bigbluebuttonbn_generate_nonce() { |
985 | 985 | $mt = microtime(); |
986 | 986 | $rand = mt_rand(); |
987 | - return md5($mt.$rand); |
|
987 | + return md5($mt . $rand); |
|
988 | 988 | } |
989 | 989 | |
990 | 990 | /** |
@@ -1010,21 +1010,21 @@ discard block |
||
1010 | 1010 | */ |
1011 | 1011 | function bigbluebuttonbn_events() { |
1012 | 1012 | return array( |
1013 | - (string) BIGBLUEBUTTON_EVENT_ACTIVITY_VIEWED, |
|
1014 | - (string) BIGBLUEBUTTON_EVENT_ACTIVITY_MANAGEMENT_VIEWED, |
|
1015 | - (string) BIGBLUEBUTTON_EVENT_LIVE_SESSION, |
|
1016 | - (string) BIGBLUEBUTTON_EVENT_MEETING_CREATED, |
|
1017 | - (string) BIGBLUEBUTTON_EVENT_MEETING_ENDED, |
|
1018 | - (string) BIGBLUEBUTTON_EVENT_MEETING_JOINED, |
|
1019 | - (string) BIGBLUEBUTTON_EVENT_MEETING_LEFT, |
|
1020 | - (string) BIGBLUEBUTTON_EVENT_RECORDING_DELETED, |
|
1021 | - (string) BIGBLUEBUTTON_EVENT_RECORDING_IMPORTED, |
|
1022 | - (string) BIGBLUEBUTTON_EVENT_RECORDING_PROTECTED, |
|
1023 | - (string) BIGBLUEBUTTON_EVENT_RECORDING_PUBLISHED, |
|
1024 | - (string) BIGBLUEBUTTON_EVENT_RECORDING_UNPROTECTED, |
|
1025 | - (string) BIGBLUEBUTTON_EVENT_RECORDING_UNPUBLISHED, |
|
1026 | - (string) BIGBLUEBUTTON_EVENT_RECORDING_EDITED, |
|
1027 | - (string) BIGBLUEBUTTON_EVENT_RECORDING_VIEWED |
|
1013 | + (string)BIGBLUEBUTTON_EVENT_ACTIVITY_VIEWED, |
|
1014 | + (string)BIGBLUEBUTTON_EVENT_ACTIVITY_MANAGEMENT_VIEWED, |
|
1015 | + (string)BIGBLUEBUTTON_EVENT_LIVE_SESSION, |
|
1016 | + (string)BIGBLUEBUTTON_EVENT_MEETING_CREATED, |
|
1017 | + (string)BIGBLUEBUTTON_EVENT_MEETING_ENDED, |
|
1018 | + (string)BIGBLUEBUTTON_EVENT_MEETING_JOINED, |
|
1019 | + (string)BIGBLUEBUTTON_EVENT_MEETING_LEFT, |
|
1020 | + (string)BIGBLUEBUTTON_EVENT_RECORDING_DELETED, |
|
1021 | + (string)BIGBLUEBUTTON_EVENT_RECORDING_IMPORTED, |
|
1022 | + (string)BIGBLUEBUTTON_EVENT_RECORDING_PROTECTED, |
|
1023 | + (string)BIGBLUEBUTTON_EVENT_RECORDING_PUBLISHED, |
|
1024 | + (string)BIGBLUEBUTTON_EVENT_RECORDING_UNPROTECTED, |
|
1025 | + (string)BIGBLUEBUTTON_EVENT_RECORDING_UNPUBLISHED, |
|
1026 | + (string)BIGBLUEBUTTON_EVENT_RECORDING_EDITED, |
|
1027 | + (string)BIGBLUEBUTTON_EVENT_RECORDING_VIEWED |
|
1028 | 1028 | ); |
1029 | 1029 | } |
1030 | 1030 | |
@@ -1035,21 +1035,21 @@ discard block |
||
1035 | 1035 | */ |
1036 | 1036 | function bigbluebuttonbn_events_action() { |
1037 | 1037 | return array( |
1038 | - 'view' => (string) BIGBLUEBUTTON_EVENT_ACTIVITY_VIEWED, |
|
1039 | - 'view_management' => (string) BIGBLUEBUTTON_EVENT_ACTIVITY_MANAGEMENT_VIEWED, |
|
1040 | - 'live_action' => (string) BIGBLUEBUTTON_EVENT_LIVE_SESSION, |
|
1041 | - 'meeting_create' => (string) BIGBLUEBUTTON_EVENT_MEETING_CREATED, |
|
1042 | - 'meeting_end' => (string) BIGBLUEBUTTON_EVENT_MEETING_ENDED, |
|
1043 | - 'meeting_join' => (string) BIGBLUEBUTTON_EVENT_MEETING_JOINED, |
|
1044 | - 'meeting_left' => (string) BIGBLUEBUTTON_EVENT_MEETING_LEFT, |
|
1045 | - 'recording_delete' => (string) BIGBLUEBUTTON_EVENT_RECORDING_DELETED, |
|
1046 | - 'recording_import' => (string) BIGBLUEBUTTON_EVENT_RECORDING_IMPORTED, |
|
1047 | - 'recording_protect' => (string) BIGBLUEBUTTON_EVENT_RECORDING_PROTECTED, |
|
1048 | - 'recording_publish' => (string) BIGBLUEBUTTON_EVENT_RECORDING_PUBLISHED, |
|
1049 | - 'recording_unprotect' => (string) BIGBLUEBUTTON_EVENT_RECORDING_UNPROTECTED, |
|
1050 | - 'recording_unpublish' => (string) BIGBLUEBUTTON_EVENT_RECORDING_UNPUBLISHED, |
|
1051 | - 'recording_edit' => (string) BIGBLUEBUTTON_EVENT_RECORDING_EDITED, |
|
1052 | - 'recording_play' => (string) BIGBLUEBUTTON_EVENT_RECORDING_VIEWED |
|
1038 | + 'view' => (string)BIGBLUEBUTTON_EVENT_ACTIVITY_VIEWED, |
|
1039 | + 'view_management' => (string)BIGBLUEBUTTON_EVENT_ACTIVITY_MANAGEMENT_VIEWED, |
|
1040 | + 'live_action' => (string)BIGBLUEBUTTON_EVENT_LIVE_SESSION, |
|
1041 | + 'meeting_create' => (string)BIGBLUEBUTTON_EVENT_MEETING_CREATED, |
|
1042 | + 'meeting_end' => (string)BIGBLUEBUTTON_EVENT_MEETING_ENDED, |
|
1043 | + 'meeting_join' => (string)BIGBLUEBUTTON_EVENT_MEETING_JOINED, |
|
1044 | + 'meeting_left' => (string)BIGBLUEBUTTON_EVENT_MEETING_LEFT, |
|
1045 | + 'recording_delete' => (string)BIGBLUEBUTTON_EVENT_RECORDING_DELETED, |
|
1046 | + 'recording_import' => (string)BIGBLUEBUTTON_EVENT_RECORDING_IMPORTED, |
|
1047 | + 'recording_protect' => (string)BIGBLUEBUTTON_EVENT_RECORDING_PROTECTED, |
|
1048 | + 'recording_publish' => (string)BIGBLUEBUTTON_EVENT_RECORDING_PUBLISHED, |
|
1049 | + 'recording_unprotect' => (string)BIGBLUEBUTTON_EVENT_RECORDING_UNPROTECTED, |
|
1050 | + 'recording_unpublish' => (string)BIGBLUEBUTTON_EVENT_RECORDING_UNPUBLISHED, |
|
1051 | + 'recording_edit' => (string)BIGBLUEBUTTON_EVENT_RECORDING_EDITED, |
|
1052 | + 'recording_play' => (string)BIGBLUEBUTTON_EVENT_RECORDING_VIEWED |
|
1053 | 1053 | ); |
1054 | 1054 | } |
1055 | 1055 | |
@@ -1080,7 +1080,7 @@ discard block |
||
1080 | 1080 | if (array_key_exists('other', $options)) { |
1081 | 1081 | $eventproperties['other'] = $options['other']; |
1082 | 1082 | } |
1083 | - $event = call_user_func_array('\mod_bigbluebuttonbn\event\bigbluebuttonbn_'.$eventtype.'::create', |
|
1083 | + $event = call_user_func_array('\mod_bigbluebuttonbn\event\bigbluebuttonbn_' . $eventtype . '::create', |
|
1084 | 1084 | array($eventproperties)); |
1085 | 1085 | $event->trigger(); |
1086 | 1086 | } |
@@ -1120,10 +1120,10 @@ discard block |
||
1120 | 1120 | $now = time(); |
1121 | 1121 | if (!$updatecache && isset($result) && $now < ($result['creation_time'] + $cachettl)) { |
1122 | 1122 | // Use the value in the cache. |
1123 | - return (array) json_decode($result['meeting_info']); |
|
1123 | + return (array)json_decode($result['meeting_info']); |
|
1124 | 1124 | } |
1125 | 1125 | // Ping again and refresh the cache. |
1126 | - $meetinginfo = (array) bigbluebuttonbn_wrap_xml_load_file( |
|
1126 | + $meetinginfo = (array)bigbluebuttonbn_wrap_xml_load_file( |
|
1127 | 1127 | \mod_bigbluebuttonbn\locallib\bigbluebutton::action_url('getMeetingInfo', ['meetingID' => $meetingid]) |
1128 | 1128 | ); |
1129 | 1129 | $cache->set($meetingid, array('creation_time' => time(), 'meeting_info' => json_encode($meetinginfo))); |
@@ -1234,7 +1234,7 @@ discard block |
||
1234 | 1234 | * @return object |
1235 | 1235 | */ |
1236 | 1236 | function bigbluebuttonbn_set_config_xml($meetingid, $configxml) { |
1237 | - $urldefaultconfig = \mod_bigbluebuttonbn\locallib\config::get('server_url').'api/setConfigXML?'; |
|
1237 | + $urldefaultconfig = \mod_bigbluebuttonbn\locallib\config::get('server_url') . 'api/setConfigXML?'; |
|
1238 | 1238 | $configxmlparams = bigbluebuttonbn_set_config_xml_params($meetingid, $configxml); |
1239 | 1239 | $xml = bigbluebuttonbn_wrap_xml_load_file($urldefaultconfig, 'POST', |
1240 | 1240 | $configxmlparams, 'application/x-www-form-urlencoded'); |
@@ -1250,8 +1250,8 @@ discard block |
||
1250 | 1250 | * @return string |
1251 | 1251 | */ |
1252 | 1252 | function bigbluebuttonbn_set_config_xml_params($meetingid, $configxml) { |
1253 | - $params = 'configXML='.urlencode($configxml).'&meetingID='.urlencode($meetingid); |
|
1254 | - $configxmlparams = $params.'&checksum='.sha1('setConfigXML'.$params.\mod_bigbluebuttonbn\locallib\config::get('shared_secret')); |
|
1253 | + $params = 'configXML=' . urlencode($configxml) . '&meetingID=' . urlencode($meetingid); |
|
1254 | + $configxmlparams = $params . '&checksum=' . sha1('setConfigXML' . $params . \mod_bigbluebuttonbn\locallib\config::get('shared_secret')); |
|
1255 | 1255 | return $configxmlparams; |
1256 | 1256 | } |
1257 | 1257 | |
@@ -1265,7 +1265,7 @@ discard block |
||
1265 | 1265 | */ |
1266 | 1266 | function bigbluebuttonbn_set_config_xml_array($meetingid, $configxml) { |
1267 | 1267 | $configxml = bigbluebuttonbn_setConfigXML($meetingid, $configxml); |
1268 | - $configxmlarray = (array) $configxml; |
|
1268 | + $configxmlarray = (array)$configxml; |
|
1269 | 1269 | if ($configxmlarray['returncode'] != 'SUCCESS') { |
1270 | 1270 | debugging('BigBlueButton was not able to set the custom config.xml file', DEBUG_DEVELOPER); |
1271 | 1271 | return ''; |
@@ -1357,7 +1357,7 @@ discard block |
||
1357 | 1357 | global $USER; |
1358 | 1358 | $starttime = $starttime - ($starttime % 1000); |
1359 | 1359 | // Set formatted date. |
1360 | - $dateformat = get_string('strftimerecentfull', 'langconfig').' %Z'; |
|
1360 | + $dateformat = get_string('strftimerecentfull', 'langconfig') . ' %Z'; |
|
1361 | 1361 | return userdate($starttime / 1000, $dateformat, usertimezone($USER->timezone)); |
1362 | 1362 | } |
1363 | 1363 | |
@@ -1473,7 +1473,7 @@ discard block |
||
1473 | 1473 | * @return string |
1474 | 1474 | */ |
1475 | 1475 | function bigbluebuttonbn_get_recording_data_row_preview($recording) { |
1476 | - $options = array('id' => 'preview-'.$recording['recordID']); |
|
1476 | + $options = array('id' => 'preview-' . $recording['recordID']); |
|
1477 | 1477 | if ($recording['published'] === 'false') { |
1478 | 1478 | $options['hidden'] = 'hidden'; |
1479 | 1479 | } |
@@ -1535,7 +1535,7 @@ discard block |
||
1535 | 1535 | if ($recording['published'] === 'false') { |
1536 | 1536 | $visibility = 'hidden '; |
1537 | 1537 | } |
1538 | - $id = 'playbacks-'.$recording['recordID']; |
|
1538 | + $id = 'playbacks-' . $recording['recordID']; |
|
1539 | 1539 | $recordingtypes = html_writer::start_tag('div', array('id' => $id, 'data-imported' => $dataimported, |
1540 | 1540 | 'data-meetingid' => $recording['meetingID'], 'data-recordingid' => $recording['recordID'], |
1541 | 1541 | 'title' => $title, $visibility => $visibility)); |
@@ -1560,11 +1560,11 @@ discard block |
||
1560 | 1560 | if (!bigbluebuttonbn_include_recording_data_row_type($recording, $bbbsession, $playback)) { |
1561 | 1561 | return ''; |
1562 | 1562 | } |
1563 | - $text = get_string('view_recording_format_'.$playback['type'], 'bigbluebuttonbn'); |
|
1563 | + $text = get_string('view_recording_format_' . $playback['type'], 'bigbluebuttonbn'); |
|
1564 | 1564 | $href = $CFG->wwwroot . '/mod/bigbluebuttonbn/bbb_view.php?action=play&bn=' . $bbbsession['bigbluebuttonbn']->id . |
1565 | - '&mid='.$recording['meetingID'] . '&rid=' . $recording['recordID'] . '&rtype=' . $playback['type']; |
|
1565 | + '&mid=' . $recording['meetingID'] . '&rid=' . $recording['recordID'] . '&rtype=' . $playback['type']; |
|
1566 | 1566 | if (!isset($recording['imported']) || !isset($recording['protected']) || $recording['protected'] === 'false') { |
1567 | - $href .= '&href='.urlencode(trim($playback['url'])); |
|
1567 | + $href .= '&href=' . urlencode(trim($playback['url'])); |
|
1568 | 1568 | } |
1569 | 1569 | $linkattributes = array( |
1570 | 1570 | 'id' => 'recording-play-' . $playback['type'] . '-' . $recording['recordID'], |
@@ -1733,7 +1733,7 @@ discard block |
||
1733 | 1733 | $linkattributes['class'] = 'disabled'; |
1734 | 1734 | unset($linkattributes['onclick']); |
1735 | 1735 | } |
1736 | - $icon = new pix_icon('i/'.$data['tag'], |
|
1736 | + $icon = new pix_icon('i/' . $data['tag'], |
|
1737 | 1737 | get_string('view_recording_list_actionbar_' . $data['action'], 'bigbluebuttonbn'), |
1738 | 1738 | 'moodle', $iconattributes); |
1739 | 1739 | return $OUTPUT->action_icon('#', $icon, null, $linkattributes, false); |
@@ -1850,7 +1850,7 @@ discard block |
||
1850 | 1850 | */ |
1851 | 1851 | function bigbluebuttonbn_get_recording_table_row($bbbsession, $recording, $rowdata) { |
1852 | 1852 | $row = new html_table_row(); |
1853 | - $row->id = 'recording-tr-'.$recording['recordID']; |
|
1853 | + $row->id = 'recording-tr-' . $recording['recordID']; |
|
1854 | 1854 | $row->attributes['data-imported'] = 'false'; |
1855 | 1855 | $texthead = ''; |
1856 | 1856 | $texttail = ''; |
@@ -1910,9 +1910,9 @@ discard block |
||
1910 | 1910 | function bigbluebuttonbn_send_notification_recording_ready($bigbluebuttonbn) { |
1911 | 1911 | $sender = get_admin(); |
1912 | 1912 | // Prepare message. |
1913 | - $messagetext = '<p>'.get_string('email_body_recording_ready_for', 'bigbluebuttonbn'). |
|
1914 | - ' "' . $bigbluebuttonbn->name . '" '. |
|
1915 | - get_string('email_body_recording_ready_is_ready', 'bigbluebuttonbn').'.</p>'; |
|
1913 | + $messagetext = '<p>' . get_string('email_body_recording_ready_for', 'bigbluebuttonbn') . |
|
1914 | + ' "' . $bigbluebuttonbn->name . '" ' . |
|
1915 | + get_string('email_body_recording_ready_is_ready', 'bigbluebuttonbn') . '.</p>'; |
|
1916 | 1916 | $context = context_course::instance($bigbluebuttonbn->course); |
1917 | 1917 | \mod_bigbluebuttonbn\locallib\notifier::notification_send($context, $sender, $bigbluebuttonbn, $messagetext); |
1918 | 1918 | } |
@@ -2134,7 +2134,7 @@ discard block |
||
2134 | 2134 | } |
2135 | 2135 | // Prepare select for loading records based on existent bigbluebuttonbns. |
2136 | 2136 | $sql = 'SELECT DISTINCT meetingid, bigbluebuttonbnid FROM {bigbluebuttonbn_logs} WHERE '; |
2137 | - $sql .= '(bigbluebuttonbnid='.implode(' OR bigbluebuttonbnid=', array_keys($bigbluebuttonbns)).')'; |
|
2137 | + $sql .= '(bigbluebuttonbnid=' . implode(' OR bigbluebuttonbnid=', array_keys($bigbluebuttonbns)) . ')'; |
|
2138 | 2138 | // Include only Create events and exclude those with record not true. |
2139 | 2139 | $sql .= ' AND log = ? AND meta LIKE ? AND meta LIKE ?'; |
2140 | 2140 | // Execute select for loading records based on existent bigbluebuttonbns. |
@@ -2266,8 +2266,8 @@ discard block |
||
2266 | 2266 | function bigbluebuttonbn_format_activity_time($time) { |
2267 | 2267 | $activitytime = ''; |
2268 | 2268 | if ($time) { |
2269 | - $activitytime = calendar_day_representation($time).' '. |
|
2270 | - get_string('mod_form_field_notification_msg_at', 'bigbluebuttonbn').' '. |
|
2269 | + $activitytime = calendar_day_representation($time) . ' ' . |
|
2270 | + get_string('mod_form_field_notification_msg_at', 'bigbluebuttonbn') . ' ' . |
|
2271 | 2271 | calendar_time_representation($time); |
2272 | 2272 | } |
2273 | 2273 | return $activitytime; |
@@ -2693,7 +2693,7 @@ discard block |
||
2693 | 2693 | * |
2694 | 2694 | * @return string |
2695 | 2695 | */ |
2696 | -function bigbluebuttonbn_render_warning($message, $type='info', $href='', $text='', $class='') { |
|
2696 | +function bigbluebuttonbn_render_warning($message, $type = 'info', $href = '', $text = '', $class = '') { |
|
2697 | 2697 | global $OUTPUT; |
2698 | 2698 | $output = "\n"; |
2699 | 2699 | // Evaluates if config_warning is enabled. |
@@ -2732,11 +2732,11 @@ discard block |
||
2732 | 2732 | if ($class == '') { |
2733 | 2733 | $class = 'btn btn-secondary'; |
2734 | 2734 | } |
2735 | - $output = ' <form method="post" action="' . $href . '" class="form-inline">'."\n"; |
|
2736 | - $output .= ' <button type="submit" class="' . $class . '"'."\n"; |
|
2737 | - $output .= ' title="' . $title . '"'."\n"; |
|
2738 | - $output .= ' >' . $text . '</button>'."\n"; |
|
2739 | - $output .= ' </form>'."\n"; |
|
2735 | + $output = ' <form method="post" action="' . $href . '" class="form-inline">' . "\n"; |
|
2736 | + $output .= ' <button type="submit" class="' . $class . '"' . "\n"; |
|
2737 | + $output .= ' title="' . $title . '"' . "\n"; |
|
2738 | + $output .= ' >' . $text . '</button>' . "\n"; |
|
2739 | + $output .= ' </form>' . "\n"; |
|
2740 | 2740 | return $output; |
2741 | 2741 | } |
2742 | 2742 |