@@ -54,7 +54,7 @@ discard block |
||
54 | 54 | */ |
55 | 55 | public function get_description() |
56 | 56 | { |
57 | - return "The user with id '$this->userid' viewed the bigbluebuttonbn activity management page for ". |
|
57 | + return "The user with id '$this->userid' viewed the bigbluebuttonbn activity management page for " . |
|
58 | 58 | "the course module id '$this->contextinstanceid'."; |
59 | 59 | } |
60 | 60 | |
@@ -66,7 +66,7 @@ discard block |
||
66 | 66 | protected function get_legacy_logdata() |
67 | 67 | { |
68 | 68 | return array($this->courseid, 'bigbluebuttonbn', 'activity management viewed', |
69 | - 'view.php?pageid='.$this->objectid, 'BigBlueButtonBN activity management viewed', $this->contextinstanceid, ); |
|
69 | + 'view.php?pageid=' . $this->objectid, 'BigBlueButtonBN activity management viewed', $this->contextinstanceid,); |
|
70 | 70 | } |
71 | 71 | |
72 | 72 | /** |
@@ -56,7 +56,7 @@ discard block |
||
56 | 56 | public function get_description() |
57 | 57 | { |
58 | 58 | $rid = isset($this->other['rid']) ? $this->other['rid'] : ''; |
59 | - $a = (object) array('userid' => $this->userid, 'recordingid' => $rid, 'courseid' => $this->contextinstanceid); |
|
59 | + $a = (object)array('userid' => $this->userid, 'recordingid' => $rid, 'courseid' => $this->contextinstanceid); |
|
60 | 60 | |
61 | 61 | return "The user with id '$a->userid' has unpublished a recording with id '$a->recordingid' in the course id '$a->courseid'."; |
62 | 62 | } |
@@ -69,7 +69,7 @@ discard block |
||
69 | 69 | protected function get_legacy_logdata() |
70 | 70 | { |
71 | 71 | return array($this->courseid, 'bigbluebuttonbn', 'recording unpublished', |
72 | - 'view.php?pageid='.$this->objectid, 'Recording unpublished', $this->contextinstanceid, ); |
|
72 | + 'view.php?pageid=' . $this->objectid, 'Recording unpublished', $this->contextinstanceid,); |
|
73 | 73 | } |
74 | 74 | |
75 | 75 | /** |
@@ -55,7 +55,7 @@ discard block |
||
55 | 55 | */ |
56 | 56 | public function get_description() |
57 | 57 | { |
58 | - $a = (object) array('userid' => $this->userid, 'bigbluebuttonbnid' => $this->objectid, 'courseid' => $this->contextinstanceid); |
|
58 | + $a = (object)array('userid' => $this->userid, 'bigbluebuttonbnid' => $this->objectid, 'courseid' => $this->contextinstanceid); |
|
59 | 59 | |
60 | 60 | 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'."; |
61 | 61 | } |
@@ -68,7 +68,7 @@ discard block |
||
68 | 68 | protected function get_legacy_logdata() |
69 | 69 | { |
70 | 70 | return array($this->courseid, 'bigbluebuttonbn', 'meeting left', |
71 | - 'view.php?pageid='.$this->objectid, 'BigBlueButtonBN meeting left', $this->contextinstanceid, ); |
|
71 | + 'view.php?pageid=' . $this->objectid, 'BigBlueButtonBN meeting left', $this->contextinstanceid,); |
|
72 | 72 | } |
73 | 73 | |
74 | 74 | /** |
@@ -55,9 +55,9 @@ discard block |
||
55 | 55 | */ |
56 | 56 | public function get_description() |
57 | 57 | { |
58 | - $a = (object) array('userid' => $this->userid, 'bigbluebuttonbnid' => $this->objectid, 'courseid' => $this->contextinstanceid); |
|
58 | + $a = (object)array('userid' => $this->userid, 'bigbluebuttonbnid' => $this->objectid, 'courseid' => $this->contextinstanceid); |
|
59 | 59 | |
60 | - return "The user with id '$a->userid' viewed the bigbluebuttonbn activity with id '$a->bigbluebuttonbnid' for ". |
|
60 | + return "The user with id '$a->userid' viewed the bigbluebuttonbn activity with id '$a->bigbluebuttonbnid' for " . |
|
61 | 61 | "the course id '$a->courseid'."; |
62 | 62 | } |
63 | 63 | |
@@ -69,7 +69,7 @@ discard block |
||
69 | 69 | protected function get_legacy_logdata() |
70 | 70 | { |
71 | 71 | return array($this->courseid, 'bigbluebuttonbn', 'activity viewed', |
72 | - 'view.php?pageid='.$this->objectid, 'BigBlueButtonBN activity viewed', $this->contextinstanceid, ); |
|
72 | + 'view.php?pageid=' . $this->objectid, 'BigBlueButtonBN activity viewed', $this->contextinstanceid,); |
|
73 | 73 | } |
74 | 74 | |
75 | 75 | /** |
@@ -56,7 +56,7 @@ discard block |
||
56 | 56 | public function get_description() |
57 | 57 | { |
58 | 58 | $rid = isset($this->other['rid']) ? $this->other['rid'] : ''; |
59 | - $a = (object) array('userid' => $this->userid, 'recordingid' => $rid, 'courseid' => $this->contextinstanceid); |
|
59 | + $a = (object)array('userid' => $this->userid, 'recordingid' => $rid, 'courseid' => $this->contextinstanceid); |
|
60 | 60 | |
61 | 61 | return "The user with id '$a->userid' has published a recording with id '$a->recordingid' in the course id '$a->courseid'."; |
62 | 62 | } |
@@ -69,7 +69,7 @@ discard block |
||
69 | 69 | protected function get_legacy_logdata() |
70 | 70 | { |
71 | 71 | return array($this->courseid, 'bigbluebuttonbn', 'recording published', |
72 | - 'view.php?pageid='.$this->objectid, 'Recording published', $this->contextinstanceid, ); |
|
72 | + 'view.php?pageid=' . $this->objectid, 'Recording published', $this->contextinstanceid,); |
|
73 | 73 | } |
74 | 74 | |
75 | 75 | /** |
@@ -55,7 +55,7 @@ discard block |
||
55 | 55 | */ |
56 | 56 | public function get_description() |
57 | 57 | { |
58 | - $a = (object) array('userid' => $this->userid, 'bigbluebuttonbnid' => $this->objectid, 'courseid' => $this->contextinstanceid); |
|
58 | + $a = (object)array('userid' => $this->userid, 'bigbluebuttonbnid' => $this->objectid, 'courseid' => $this->contextinstanceid); |
|
59 | 59 | |
60 | 60 | 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'."; |
61 | 61 | } |
@@ -68,7 +68,7 @@ discard block |
||
68 | 68 | protected function get_legacy_logdata() |
69 | 69 | { |
70 | 70 | return array($this->courseid, 'bigbluebuttonbn', 'meeting joined', |
71 | - 'view.php?pageid='.$this->objectid, 'BigBlueButtonBN meeting joined', $this->contextinstanceid, ); |
|
71 | + 'view.php?pageid=' . $this->objectid, 'BigBlueButtonBN meeting joined', $this->contextinstanceid,); |
|
72 | 72 | } |
73 | 73 | |
74 | 74 | /** |
@@ -55,7 +55,7 @@ discard block |
||
55 | 55 | */ |
56 | 56 | public function get_description() |
57 | 57 | { |
58 | - $a = (object) array('userid' => $this->userid, 'bigbluebuttonbnid' => $this->objectid, 'courseid' => $this->contextinstanceid, 'action' => $this->other); |
|
58 | + $a = (object)array('userid' => $this->userid, 'bigbluebuttonbnid' => $this->objectid, 'courseid' => $this->contextinstanceid, 'action' => $this->other); |
|
59 | 59 | |
60 | 60 | return "The user with id '$a->userid' triggered action $a->action in a bigbluebutton meeting for the bigbluebuttonbn activity with id '$a->bigbluebuttonbnid' for the course id '$a->courseid'."; |
61 | 61 | } |
@@ -68,7 +68,7 @@ discard block |
||
68 | 68 | protected function get_legacy_logdata() |
69 | 69 | { |
70 | 70 | return array($this->courseid, 'bigbluebuttonbn', 'meeting left', |
71 | - 'view.php?pageid='.$this->objectid, 'BigBlueButtonBN meeting live session event', $this->contextinstanceid, ); |
|
71 | + 'view.php?pageid=' . $this->objectid, 'BigBlueButtonBN meeting live session event', $this->contextinstanceid,); |
|
72 | 72 | } |
73 | 73 | |
74 | 74 | /** |
@@ -21,8 +21,8 @@ discard block |
||
21 | 21 | * @copyright 2015 Blindside Networks Inc |
22 | 22 | * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v2 or later |
23 | 23 | */ |
24 | -require_once dirname(dirname(dirname(__FILE__))).'/config.php'; |
|
25 | -require_once dirname(__FILE__).'/locallib.php'; |
|
24 | +require_once dirname(dirname(dirname(__FILE__))) . '/config.php'; |
|
25 | +require_once dirname(__FILE__) . '/locallib.php'; |
|
26 | 26 | |
27 | 27 | $bn = required_param('bn', PARAM_INT); // bigbluebuttonbn instance ID |
28 | 28 | $tc = optional_param('tc', 0, PARAM_INT); // target course ID |
@@ -85,7 +85,7 @@ discard block |
||
85 | 85 | $output .= html_writer::tag('div', get_string('view_error_import_no_recordings', 'bigbluebuttonbn')); |
86 | 86 | } |
87 | 87 | $output .= html_writer::start_tag('br'); |
88 | - $output .= html_writer::tag('input', '', array('type' => 'button', 'value' => get_string('view_recording_button_return', 'bigbluebuttonbn'), 'onclick' => 'window.location=\''.$CFG->wwwroot.'/mod/bigbluebuttonbn/view.php?id='.$cm->id.'\'')); |
|
88 | + $output .= html_writer::tag('input', '', array('type' => 'button', 'value' => get_string('view_recording_button_return', 'bigbluebuttonbn'), 'onclick' => 'window.location=\'' . $CFG->wwwroot . '/mod/bigbluebuttonbn/view.php?id=' . $cm->id . '\'')); |
|
89 | 89 | |
90 | 90 | $jsvars = array( |
91 | 91 | 'bn' => $bn, |
@@ -83,7 +83,7 @@ discard block |
||
83 | 83 | bigbluebuttonbn_mform_add_block_participants($mform, $cfg, [ |
84 | 84 | 'strings' => $strings, 'pix_icon_delete_url' => $pix_icon_delete_url, 'roles' => $roles, |
85 | 85 | 'users' => $users, 'participant_selection' => $participant_selection, 'participant_list' => $participant_list, |
86 | - ]); |
|
86 | + ]); |
|
87 | 87 | |
88 | 88 | // add block 'Schedule' |
89 | 89 | bigbluebuttonbn_mform_add_block_schedule($mform, ['activity' => $current_activity]); |
@@ -410,24 +410,24 @@ discard block |
||
410 | 410 | public function bigbluebuttonbn_get_participant_selection_strings() |
411 | 411 | { |
412 | 412 | return [ |
413 | - 'as' => get_string('mod_form_field_participant_list_text_as', 'bigbluebuttonbn'), |
|
414 | - 'viewer' => get_string('mod_form_field_participant_bbb_role_viewer', 'bigbluebuttonbn'), |
|
415 | - 'moderator' => get_string('mod_form_field_participant_bbb_role_moderator', 'bigbluebuttonbn'), |
|
416 | - 'remove' => get_string('mod_form_field_participant_list_action_remove', 'bigbluebuttonbn'), |
|
413 | + 'as' => get_string('mod_form_field_participant_list_text_as', 'bigbluebuttonbn'), |
|
414 | + 'viewer' => get_string('mod_form_field_participant_bbb_role_viewer', 'bigbluebuttonbn'), |
|
415 | + 'moderator' => get_string('mod_form_field_participant_bbb_role_moderator', 'bigbluebuttonbn'), |
|
416 | + 'remove' => get_string('mod_form_field_participant_list_action_remove', 'bigbluebuttonbn'), |
|
417 | 417 | ]; |
418 | 418 | } |
419 | 419 | |
420 | 420 | public function bigbluebuttonbn_get_participant_selection_data() |
421 | 421 | { |
422 | 422 | return [ |
423 | - 'type_options' => [ |
|
424 | - 'all' => get_string('mod_form_field_participant_list_type_all', 'bigbluebuttonbn'), |
|
425 | - 'role' => get_string('mod_form_field_participant_list_type_role', 'bigbluebuttonbn'), |
|
426 | - 'user' => get_string('mod_form_field_participant_list_type_user', 'bigbluebuttonbn'), |
|
427 | - ], |
|
428 | - 'type_selected' => 'all', |
|
429 | - 'options' => ['all' => '---------------'], |
|
430 | - 'selected' => 'all', |
|
423 | + 'type_options' => [ |
|
424 | + 'all' => get_string('mod_form_field_participant_list_type_all', 'bigbluebuttonbn'), |
|
425 | + 'role' => get_string('mod_form_field_participant_list_type_role', 'bigbluebuttonbn'), |
|
426 | + 'user' => get_string('mod_form_field_participant_list_type_user', 'bigbluebuttonbn'), |
|
427 | + ], |
|
428 | + 'type_selected' => 'all', |
|
429 | + 'options' => ['all' => '---------------'], |
|
430 | + 'selected' => 'all', |
|
431 | 431 | ]; |
432 | 432 | } |
433 | 433 | } |
@@ -24,8 +24,8 @@ discard block |
||
24 | 24 | */ |
25 | 25 | defined('MOODLE_INTERNAL') || die(); |
26 | 26 | |
27 | -require_once dirname(__FILE__).'/locallib.php'; |
|
28 | -require_once $CFG->dirroot.'/course/moodleform_mod.php'; |
|
27 | +require_once dirname(__FILE__) . '/locallib.php'; |
|
28 | +require_once $CFG->dirroot . '/course/moodleform_mod.php'; |
|
29 | 29 | |
30 | 30 | class mod_bigbluebuttonbn_mod_form extends moodleform_mod |
31 | 31 | { |
@@ -36,7 +36,7 @@ discard block |
||
36 | 36 | // Validates if the BigBlueButton server is running |
37 | 37 | $serverVersion = bigbluebuttonbn_getServerVersion(); |
38 | 38 | if (is_null($serverVersion)) { |
39 | - print_error('general_error_unable_connect', 'bigbluebuttonbn', $CFG->wwwroot.'/admin/settings.php?section=modsettingbigbluebuttonbn'); |
|
39 | + print_error('general_error_unable_connect', 'bigbluebuttonbn', $CFG->wwwroot . '/admin/settings.php?section=modsettingbigbluebuttonbn'); |
|
40 | 40 | } |
41 | 41 | |
42 | 42 | $bigbluebuttonbn = null; |
@@ -48,7 +48,7 @@ discard block |
||
48 | 48 | } |
49 | 49 | |
50 | 50 | $context = bigbluebuttonbn_get_context_course($course->id); |
51 | - $pix_icon_delete_url = ''.$OUTPUT->pix_url('t/delete', 'moodle'); |
|
51 | + $pix_icon_delete_url = '' . $OUTPUT->pix_url('t/delete', 'moodle'); |
|
52 | 52 | |
53 | 53 | // UI configuration options |
54 | 54 | $cfg = bigbluebuttonbn_get_cfg_options(); |
@@ -97,9 +97,9 @@ discard block |
||
97 | 97 | $jsvars['icons_enabled'] = $cfg['recording_icons_enabled']; |
98 | 98 | $jsvars['pix_icon_delete'] = $pix_icon_delete_url; |
99 | 99 | $jsvars['strings'] = $strings; |
100 | - $jsvars['participant_selection'] = json_decode('{"all": [], "role": '. |
|
101 | - json_encode(bigbluebuttonbn_get_roles_select($roles)).', "user": '. |
|
102 | - json_encode(bigbluebuttonbn_get_users_select($users)).'}'); |
|
100 | + $jsvars['participant_selection'] = json_decode('{"all": [], "role": ' . |
|
101 | + json_encode(bigbluebuttonbn_get_roles_select($roles)) . ', "user": ' . |
|
102 | + json_encode(bigbluebuttonbn_get_users_select($users)) . '}'); |
|
103 | 103 | $jsvars['participant_list'] = $participant_list; |
104 | 104 | $PAGE->requires->data_for_js('bigbluebuttonbn', $jsvars); |
105 | 105 | $jsmodule = array( |
@@ -120,7 +120,7 @@ discard block |
||
120 | 120 | ); |
121 | 121 | $default_values['presentation'] = $draftitemid; |
122 | 122 | } catch (Exception $e) { |
123 | - error_log('Presentation could not be loaded: '.$e->getMessage()); |
|
123 | + error_log('Presentation could not be loaded: ' . $e->getMessage()); |
|
124 | 124 | |
125 | 125 | return null; |
126 | 126 | } |
@@ -292,11 +292,11 @@ discard block |
||
292 | 292 | |
293 | 293 | // Render elements for participant selection |
294 | 294 | $html_participant_selection = html_writer::tag('div', |
295 | - html_writer::select($participant_selection['type_options'], 'bigbluebuttonbn_participant_selection_type', $participant_selection['type_selected'], array(), array('id' => 'bigbluebuttonbn_participant_selection_type', 'onchange' => 'M.mod_bigbluebuttonbn.mod_form_participant_selection_set(); return 0;')). |
|
296 | - ' '. |
|
297 | - html_writer::select($participant_selection['options'], 'bigbluebuttonbn_participant_selection', $participant_selection['selected'], array(), array('id' => 'bigbluebuttonbn_participant_selection', 'disabled' => 'disabled')). |
|
298 | - ' '. |
|
299 | - '<input value="'.get_string('mod_form_field_participant_list_action_add', 'bigbluebuttonbn').'" class="btn btn-secondary" type="button" id="id_addselectionid" onclick="M.mod_bigbluebuttonbn.mod_form_participant_add(); return 0;" />' |
|
295 | + html_writer::select($participant_selection['type_options'], 'bigbluebuttonbn_participant_selection_type', $participant_selection['type_selected'], array(), array('id' => 'bigbluebuttonbn_participant_selection_type', 'onchange' => 'M.mod_bigbluebuttonbn.mod_form_participant_selection_set(); return 0;')) . |
|
296 | + ' ' . |
|
297 | + html_writer::select($participant_selection['options'], 'bigbluebuttonbn_participant_selection', $participant_selection['selected'], array(), array('id' => 'bigbluebuttonbn_participant_selection', 'disabled' => 'disabled')) . |
|
298 | + ' ' . |
|
299 | + '<input value="' . get_string('mod_form_field_participant_list_action_add', 'bigbluebuttonbn') . '" class="btn btn-secondary" type="button" id="id_addselectionid" onclick="M.mod_bigbluebuttonbn.mod_form_participant_add(); return 0;" />' |
|
300 | 300 | ); |
301 | 301 | |
302 | 302 | $mform->addElement('html', "\n\n"); |
@@ -321,10 +321,10 @@ discard block |
||
321 | 321 | } |
322 | 322 | } |
323 | 323 | } |
324 | - $selectiontype = '<b><i>'.get_string('mod_form_field_participant_list_type_'.$selectiontype, 'bigbluebuttonbn').'</i></b>'; |
|
324 | + $selectiontype = '<b><i>' . get_string('mod_form_field_participant_list_type_' . $selectiontype, 'bigbluebuttonbn') . '</i></b>'; |
|
325 | 325 | |
326 | 326 | $row = new html_table_row(); |
327 | - $row->id = 'participant_list_tr_'.$participant['selectiontype'].'-'.$participant['selectionid']; |
|
327 | + $row->id = 'participant_list_tr_' . $participant['selectiontype'] . '-' . $participant['selectionid']; |
|
328 | 328 | |
329 | 329 | $col0 = new html_table_cell(); |
330 | 330 | $col0->text = $selectiontype; |
@@ -332,21 +332,21 @@ discard block |
||
332 | 332 | $col1->text = $selectionid; |
333 | 333 | $col2 = new html_table_cell(); |
334 | 334 | $options = [ |
335 | - BIGBLUEBUTTONBN_ROLE_VIEWER => get_string('mod_form_field_participant_bbb_role_'.BIGBLUEBUTTONBN_ROLE_VIEWER, 'bigbluebuttonbn'), |
|
336 | - BIGBLUEBUTTONBN_ROLE_MODERATOR => get_string('mod_form_field_participant_bbb_role_'.BIGBLUEBUTTONBN_ROLE_MODERATOR, 'bigbluebuttonbn'), |
|
335 | + BIGBLUEBUTTONBN_ROLE_VIEWER => get_string('mod_form_field_participant_bbb_role_' . BIGBLUEBUTTONBN_ROLE_VIEWER, 'bigbluebuttonbn'), |
|
336 | + BIGBLUEBUTTONBN_ROLE_MODERATOR => get_string('mod_form_field_participant_bbb_role_' . BIGBLUEBUTTONBN_ROLE_MODERATOR, 'bigbluebuttonbn'), |
|
337 | 337 | ]; |
338 | 338 | $option_selected = $participant['role']; |
339 | - $col2->text = html_writer::tag('i', ' '.get_string('mod_form_field_participant_list_text_as', 'bigbluebuttonbn').' '. |
|
339 | + $col2->text = html_writer::tag('i', ' ' . get_string('mod_form_field_participant_list_text_as', 'bigbluebuttonbn') . ' ' . |
|
340 | 340 | html_writer::select($options, |
341 | - 'participant_list_role_'.$participant['selectiontype'].'-'.$participant['selectionid'], |
|
341 | + 'participant_list_role_' . $participant['selectiontype'] . '-' . $participant['selectionid'], |
|
342 | 342 | $option_selected, array(), |
343 | - array('id' => 'participant_list_role_'.$participant['selectiontype'].'-'.$participant['selectionid'], |
|
344 | - 'onchange' => 'M.mod_bigbluebuttonbn.mod_form_participant_list_role_update(\''.$participant['selectiontype'].'\', \''.$participant['selectionid'].'\'); return 0;', |
|
343 | + array('id' => 'participant_list_role_' . $participant['selectiontype'] . '-' . $participant['selectionid'], |
|
344 | + 'onchange' => 'M.mod_bigbluebuttonbn.mod_form_participant_list_role_update(\'' . $participant['selectiontype'] . '\', \'' . $participant['selectionid'] . '\'); return 0;', |
|
345 | 345 | ) |
346 | 346 | ) |
347 | 347 | ); |
348 | 348 | $col3 = new html_table_cell(); |
349 | - $onclick = 'M.mod_bigbluebuttonbn.mod_form_participant_remove(\''.$participant['selectiontype'].'\', \''.$participant['selectionid'].'\'); return 0;'; |
|
349 | + $onclick = 'M.mod_bigbluebuttonbn.mod_form_participant_remove(\'' . $participant['selectiontype'] . '\', \'' . $participant['selectionid'] . '\'); return 0;'; |
|
350 | 350 | // With text for delete |
351 | 351 | $col3->text = html_writer::tag('a', '<b>x</b>', ['class' => 'btn action_icon', |
352 | 352 | 'onclick' => $onclick, 'title' => $data['strings']['remove'], ]); |
@@ -364,7 +364,7 @@ discard block |
||
364 | 364 | |
365 | 365 | // Render elements for participant list |
366 | 366 | $html_participant_list = html_writer::tag('div', |
367 | - html_writer::label(get_string('mod_form_field_participant_list', 'bigbluebuttonbn'), 'bigbluebuttonbn_participant_list'). |
|
367 | + html_writer::label(get_string('mod_form_field_participant_list', 'bigbluebuttonbn'), 'bigbluebuttonbn_participant_list') . |
|
368 | 368 | html_writer::table($table) |
369 | 369 | ); |
370 | 370 |