@@ -27,8 +27,8 @@ |
||
| 27 | 27 | use mod_bigbluebuttonbn\output\import_view; |
| 28 | 28 | use mod_bigbluebuttonbn\output\renderer; |
| 29 | 29 | |
| 30 | -require(__DIR__.'/../../config.php'); |
|
| 31 | -require_once(__DIR__.'/locallib.php'); |
|
| 30 | +require(__DIR__ . '/../../config.php'); |
|
| 31 | +require_once(__DIR__ . '/locallib.php'); |
|
| 32 | 32 | |
| 33 | 33 | $bn = required_param('bn', PARAM_INT); |
| 34 | 34 | $tc = optional_param('tc', 0, PARAM_INT); |
@@ -28,7 +28,7 @@ |
||
| 28 | 28 | |
| 29 | 29 | global $CFG; |
| 30 | 30 | |
| 31 | -require_once(__DIR__.'/locallib.php'); |
|
| 31 | +require_once(__DIR__ . '/locallib.php'); |
|
| 32 | 32 | |
| 33 | 33 | if ($hassiteconfig) { |
| 34 | 34 | // Configuration for BigBlueButton. |
@@ -27,9 +27,9 @@ discard block |
||
| 27 | 27 | |
| 28 | 28 | use mod_bigbluebuttonbn\plugin; |
| 29 | 29 | |
| 30 | -require(__DIR__.'/../../config.php'); |
|
| 31 | -require_once(__DIR__.'/locallib.php'); |
|
| 32 | -require_once(__DIR__.'/viewlib.php'); |
|
| 30 | +require(__DIR__ . '/../../config.php'); |
|
| 31 | +require_once(__DIR__ . '/locallib.php'); |
|
| 32 | +require_once(__DIR__ . '/viewlib.php'); |
|
| 33 | 33 | |
| 34 | 34 | $id = required_param('id', PARAM_INT); |
| 35 | 35 | $bn = optional_param('bn', 0, PARAM_INT); |
@@ -58,7 +58,7 @@ discard block |
||
| 58 | 58 | bigbluebuttonbn_view_bbbsession_set($PAGE->context, $bbbsession); |
| 59 | 59 | |
| 60 | 60 | // Validates if the BigBlueButton server is working. |
| 61 | -$serverversion = bigbluebuttonbn_get_server_version(); // In locallib. |
|
| 61 | +$serverversion = bigbluebuttonbn_get_server_version(); // In locallib. |
|
| 62 | 62 | if ($serverversion === null) { |
| 63 | 63 | $errmsg = 'view_error_unable_join_student'; |
| 64 | 64 | $errurl = '/course/view.php'; |
@@ -72,7 +72,7 @@ discard block |
||
| 72 | 72 | } |
| 73 | 73 | print_error($errmsg, plugin::COMPONENT, new moodle_url($errurl, $errurlparams)); |
| 74 | 74 | } |
| 75 | -$bbbsession['serverversion'] = (string) $serverversion; |
|
| 75 | +$bbbsession['serverversion'] = (string)$serverversion; |
|
| 76 | 76 | |
| 77 | 77 | // Mark viewed by user (if required). |
| 78 | 78 | $completion = new completion_info($course); |
@@ -116,7 +116,7 @@ discard block |
||
| 116 | 116 | echo $OUTPUT->footer(); |
| 117 | 117 | |
| 118 | 118 | // Shows version as a comment. |
| 119 | -echo '<!-- '.$bbbsession['originTag'].' -->'."\n"; |
|
| 119 | +echo '<!-- ' . $bbbsession['originTag'] . ' -->' . "\n"; |
|
| 120 | 120 | |
| 121 | 121 | // Initialize session variable used across views. |
| 122 | 122 | $SESSION->bigbluebuttonbn_bbbsession = $bbbsession; |
| 123 | 123 | \ No newline at end of file |
@@ -36,7 +36,7 @@ |
||
| 36 | 36 | |
| 37 | 37 | defined('MOODLE_INTERNAL') || die(); |
| 38 | 38 | |
| 39 | -require_once($CFG->dirroot.'/mod/bigbluebuttonbn/locallib.php'); |
|
| 39 | +require_once($CFG->dirroot . '/mod/bigbluebuttonbn/locallib.php'); |
|
| 40 | 40 | |
| 41 | 41 | /** |
| 42 | 42 | * Class import_view |
@@ -34,7 +34,7 @@ discard block |
||
| 34 | 34 | |
| 35 | 35 | defined('MOODLE_INTERNAL') || die(); |
| 36 | 36 | |
| 37 | -require_once($CFG->dirroot.'/mod/bigbluebuttonbn/locallib.php'); |
|
| 37 | +require_once($CFG->dirroot . '/mod/bigbluebuttonbn/locallib.php'); |
|
| 38 | 38 | |
| 39 | 39 | /** |
| 40 | 40 | * Class index |
@@ -92,7 +92,7 @@ discard block |
||
| 92 | 92 | // Add a the data for the bigbluebuttonbn instance. |
| 93 | 93 | $groupobj = null; |
| 94 | 94 | if (groups_get_activity_groupmode($cm) > 0) { |
| 95 | - $groupobj = (object) array('id' => 0, 'name' => get_string('allparticipants')); |
|
| 95 | + $groupobj = (object)array('id' => 0, 'name' => get_string('allparticipants')); |
|
| 96 | 96 | } |
| 97 | 97 | $table->data[] = self::bigbluebuttonbn_index_display_room($canmoderate, $course, $bigbluebuttonbn, $groupobj); |
| 98 | 98 | // Add a the data for the groups belonging to the bigbluebuttonbn instance, if any. |
@@ -182,7 +182,7 @@ discard block |
||
| 182 | 182 | $attendeecount = 0; |
| 183 | 183 | foreach ($meetinginfo['attendees']->attendee as $attendee) { |
| 184 | 184 | if ($attendee->role == $role) { |
| 185 | - $attendeelist .= ($attendeecount++ > 0 ? ', ' : '').$attendee->fullName; |
|
| 185 | + $attendeelist .= ($attendeecount++ > 0 ? ', ' : '') . $attendee->fullName; |
|
| 186 | 186 | } |
| 187 | 187 | } |
| 188 | 188 | } |
@@ -216,17 +216,17 @@ discard block |
||
| 216 | 216 | public static function bigbluebuttonbn_index_display_room_actions($moderator, $course, $bigbluebuttonbn, $groupobj = null) { |
| 217 | 217 | $actions = ''; |
| 218 | 218 | if ($moderator) { |
| 219 | - $actions .= '<form name="form1" method="post" action="">'."\n"; |
|
| 220 | - $actions .= ' <INPUT type="hidden" name="id" value="'.$course->id.'">'."\n"; |
|
| 221 | - $actions .= ' <INPUT type="hidden" name="a" value="'.$bigbluebuttonbn->id.'">'."\n"; |
|
| 219 | + $actions .= '<form name="form1" method="post" action="">' . "\n"; |
|
| 220 | + $actions .= ' <INPUT type="hidden" name="id" value="' . $course->id . '">' . "\n"; |
|
| 221 | + $actions .= ' <INPUT type="hidden" name="a" value="' . $bigbluebuttonbn->id . '">' . "\n"; |
|
| 222 | 222 | if ($groupobj != null) { |
| 223 | - $actions .= ' <INPUT type="hidden" name="g" value="'.$groupobj->id.'">'."\n"; |
|
| 223 | + $actions .= ' <INPUT type="hidden" name="g" value="' . $groupobj->id . '">' . "\n"; |
|
| 224 | 224 | } |
| 225 | 225 | $actions .= ' <INPUT type="submit" name="submit" value="' . |
| 226 | 226 | get_string('view_conference_action_end', 'bigbluebuttonbn') . |
| 227 | 227 | '" class="btn btn-primary btn-sm" onclick="return confirm(\'' . |
| 228 | 228 | get_string('index_confirm_end', 'bigbluebuttonbn') . '\')">' . "\n"; |
| 229 | - $actions .= '</form>'."\n"; |
|
| 229 | + $actions .= '</form>' . "\n"; |
|
| 230 | 230 | } |
| 231 | 231 | return $actions; |
| 232 | 232 | } |
@@ -54,8 +54,8 @@ discard block |
||
| 54 | 54 | $groupname = groups_get_group_name($bbbsession['group']); |
| 55 | 55 | } |
| 56 | 56 | // Assign group default values. |
| 57 | - $bbbsession['meetingid'] .= '['.$bbbsession['group'].']'; |
|
| 58 | - $bbbsession['meetingname'] .= ' ('.$groupname.')'; |
|
| 57 | + $bbbsession['meetingid'] .= '[' . $bbbsession['group'] . ']'; |
|
| 58 | + $bbbsession['meetingname'] .= ' (' . $groupname . ')'; |
|
| 59 | 59 | if (count($groups) == 0) { |
| 60 | 60 | // Only the All participants group exists. |
| 61 | 61 | bigbluebuttonbn_view_message_box($bbbsession, get_string('view_groups_notenrolled_warning', 'bigbluebuttonbn'), 'info'); |
@@ -65,7 +65,7 @@ discard block |
||
| 65 | 65 | if (has_capability('moodle/site:accessallgroups', $context)) { |
| 66 | 66 | bigbluebuttonbn_view_message_box($bbbsession, get_string('view_groups_selection_warning', 'bigbluebuttonbn')); |
| 67 | 67 | } |
| 68 | - $urltoroot = $CFG->wwwroot.'/mod/bigbluebuttonbn/view.php?id='.$bbbsession['cm']->id; |
|
| 68 | + $urltoroot = $CFG->wwwroot . '/mod/bigbluebuttonbn/view.php?id=' . $bbbsession['cm']->id; |
|
| 69 | 69 | groups_print_activity_menu($bbbsession['cm'], $urltoroot); |
| 70 | 70 | echo '<br><br>'; |
| 71 | 71 | } |
@@ -137,7 +137,7 @@ discard block |
||
| 137 | 137 | $recordingsdisabled = get_string('view_message_recordings_disabled', 'bigbluebuttonbn'); |
| 138 | 138 | $output .= bigbluebuttonbn_render_warning($recordingsdisabled, 'danger'); |
| 139 | 139 | } |
| 140 | - echo $output.html_writer::empty_tag('br').html_writer::empty_tag('br').html_writer::empty_tag('br'); |
|
| 140 | + echo $output . html_writer::empty_tag('br') . html_writer::empty_tag('br') . html_writer::empty_tag('br'); |
|
| 141 | 141 | $PAGE->requires->yui_module('moodle-mod_bigbluebuttonbn-broker', 'M.mod_bigbluebuttonbn.broker.init', array($jsvars)); |
| 142 | 142 | } |
| 143 | 143 | |
@@ -206,12 +206,12 @@ discard block |
||
| 206 | 206 | // JavaScript variables for room. |
| 207 | 207 | $openingtime = ''; |
| 208 | 208 | if ($bbbsession['openingtime']) { |
| 209 | - $openingtime = get_string('mod_form_field_openingtime', 'bigbluebuttonbn').': '. |
|
| 209 | + $openingtime = get_string('mod_form_field_openingtime', 'bigbluebuttonbn') . ': ' . |
|
| 210 | 210 | userdate($bbbsession['openingtime']); |
| 211 | 211 | } |
| 212 | 212 | $closingtime = ''; |
| 213 | 213 | if ($bbbsession['closingtime']) { |
| 214 | - $closingtime = get_string('mod_form_field_closingtime', 'bigbluebuttonbn').': '. |
|
| 214 | + $closingtime = get_string('mod_form_field_closingtime', 'bigbluebuttonbn') . ': ' . |
|
| 215 | 215 | userdate($bbbsession['closingtime']); |
| 216 | 216 | } |
| 217 | 217 | $jsvars += array( |
@@ -228,7 +228,7 @@ discard block |
||
| 228 | 228 | $output .= $OUTPUT->box_end(); |
| 229 | 229 | // Action button box. |
| 230 | 230 | $output .= $OUTPUT->box_start('generalbox boxaligncenter', 'bigbluebuttonbn_view_action_button_box'); |
| 231 | - $output .= '<br><br><span id="join_button"></span> <span id="end_button"></span>'."\n"; |
|
| 231 | + $output .= '<br><br><span id="join_button"></span> <span id="end_button"></span>' . "\n"; |
|
| 232 | 232 | $output .= $OUTPUT->box_end(); |
| 233 | 233 | if ($activity == 'ended') { |
| 234 | 234 | $output .= bigbluebuttonbn_view_ended($bbbsession); |
@@ -281,7 +281,7 @@ discard block |
||
| 281 | 281 | // If there are meetings with recordings load the data to the table. |
| 282 | 282 | if ($bbbsession['bigbluebuttonbn']->recordings_html) { |
| 283 | 283 | // Render a plain html table. |
| 284 | - return bigbluebuttonbn_output_recording_table($bbbsession, $recordings)."\n"; |
|
| 284 | + return bigbluebuttonbn_output_recording_table($bbbsession, $recordings) . "\n"; |
|
| 285 | 285 | } |
| 286 | 286 | // JavaScript variables for recordings with YUI. |
| 287 | 287 | $jsvars += array( |
@@ -318,8 +318,8 @@ discard block |
||
| 318 | 318 | array('type' => 'button', |
| 319 | 319 | 'value' => get_string('view_recording_button_import', 'bigbluebuttonbn'), |
| 320 | 320 | 'class' => 'btn btn-secondary', |
| 321 | - 'onclick' => 'window.location=\''.$CFG->wwwroot.'/mod/bigbluebuttonbn/import_view.php?bn='. |
|
| 322 | - $bbbsession['bigbluebuttonbn']->id.'\'')); |
|
| 321 | + 'onclick' => 'window.location=\'' . $CFG->wwwroot . '/mod/bigbluebuttonbn/import_view.php?bn=' . |
|
| 322 | + $bbbsession['bigbluebuttonbn']->id . '\'')); |
|
| 323 | 323 | $output = html_writer::empty_tag('br'); |
| 324 | 324 | $output .= html_writer::tag('span', $button, array('id' => 'import_recording_links_button')); |
| 325 | 325 | $output .= html_writer::tag('span', '', array('id' => 'import_recording_links_table')); |
@@ -338,10 +338,10 @@ discard block |
||
| 338 | 338 | if (!is_null($bbbsession['presentation']['url'])) { |
| 339 | 339 | $attributes = array('title' => $bbbsession['presentation']['name']); |
| 340 | 340 | $icon = new pix_icon($bbbsession['presentation']['icon'], $bbbsession['presentation']['mimetype_description']); |
| 341 | - return '<h4>'.get_string('view_section_title_presentation', 'bigbluebuttonbn').'</h4>'. |
|
| 342 | - $OUTPUT->action_icon($bbbsession['presentation']['url'], $icon, null, array(), false). |
|
| 341 | + return '<h4>' . get_string('view_section_title_presentation', 'bigbluebuttonbn') . '</h4>' . |
|
| 342 | + $OUTPUT->action_icon($bbbsession['presentation']['url'], $icon, null, array(), false) . |
|
| 343 | 343 | $OUTPUT->action_link($bbbsession['presentation']['url'], |
| 344 | - $bbbsession['presentation']['name'], null, $attributes).'<br><br>'; |
|
| 344 | + $bbbsession['presentation']['name'], null, $attributes) . '<br><br>'; |
|
| 345 | 345 | } |
| 346 | 346 | return ''; |
| 347 | 347 | } |
@@ -28,8 +28,8 @@ |
||
| 28 | 28 | use mod_bigbluebuttonbn\output\renderer; |
| 29 | 29 | use mod_bigbluebuttonbn\output\index; |
| 30 | 30 | |
| 31 | -require(__DIR__.'/../../config.php'); |
|
| 32 | -require_once(__DIR__.'/locallib.php'); |
|
| 31 | +require(__DIR__ . '/../../config.php'); |
|
| 32 | +require_once(__DIR__ . '/locallib.php'); |
|
| 33 | 33 | |
| 34 | 34 | $id = required_param('id', PARAM_INT); |
| 35 | 35 | $a = optional_param('a', 0, PARAM_INT); |
@@ -219,8 +219,8 @@ discard block |
||
| 219 | 219 | $this->bigbluebuttonbn_mform_add_element($mform, $field['type'], $field['name'], $field['data_type'], |
| 220 | 220 | $field['description_key'], 0, ['maxlength' => 4, 'size' => 6], |
| 221 | 221 | ['message' => get_string('mod_form_field_voicebridge_format_error', 'bigbluebuttonbn'), |
| 222 | - 'type' => 'numeric', 'rule' => '####', 'validator' => 'server'] |
|
| 223 | - ); |
|
| 222 | + 'type' => 'numeric', 'rule' => '####', 'validator' => 'server'] |
|
| 223 | + ); |
|
| 224 | 224 | } else { |
| 225 | 225 | $this->bigbluebuttonbn_mform_add_element($mform, $field['type'], $field['name'], $field['data_type'], |
| 226 | 226 | $field['description_key'], 0, ['maxlength' => 4, 'size' => 6]); |
@@ -290,7 +290,7 @@ discard block |
||
| 290 | 290 | private function bigbluebuttonbn_mform_add_block_room_recordings(&$mform, $cfg) { |
| 291 | 291 | $recordingsettings = false; |
| 292 | 292 | $field = ['type' => 'hidden', 'name' => 'recordings_html', 'data_type' => PARAM_INT, |
| 293 | - 'description_key' => null]; |
|
| 293 | + 'description_key' => null]; |
|
| 294 | 294 | if ($cfg['recordings_html_editable']) { |
| 295 | 295 | $field['type'] = 'checkbox'; |
| 296 | 296 | $field['description_key'] = 'mod_form_field_recordings_html'; |
@@ -299,7 +299,7 @@ discard block |
||
| 299 | 299 | $this->bigbluebuttonbn_mform_add_element($mform, $field['type'], $field['name'], $field['data_type'], |
| 300 | 300 | $field['description_key'], $cfg['recordings_html_default']); |
| 301 | 301 | $field = ['type' => 'hidden', 'name' => 'recordings_deleted', 'data_type' => PARAM_INT, |
| 302 | - 'description_key' => null]; |
|
| 302 | + 'description_key' => null]; |
|
| 303 | 303 | if ($cfg['recordings_deleted_editable']) { |
| 304 | 304 | $field['type'] = 'checkbox'; |
| 305 | 305 | $field['description_key'] = 'mod_form_field_recordings_deleted'; |
@@ -308,7 +308,7 @@ discard block |
||
| 308 | 308 | $this->bigbluebuttonbn_mform_add_element($mform, $field['type'], $field['name'], $field['data_type'], |
| 309 | 309 | $field['description_key'], $cfg['recordings_deleted_default']); |
| 310 | 310 | $field = ['type' => 'hidden', 'name' => 'recordings_imported', 'data_type' => PARAM_INT, |
| 311 | - 'description_key' => null]; |
|
| 311 | + 'description_key' => null]; |
|
| 312 | 312 | if ($cfg['importrecordings_enabled'] && $cfg['recordings_imported_editable']) { |
| 313 | 313 | $field['type'] = 'checkbox'; |
| 314 | 314 | $field['description_key'] = 'mod_form_field_recordings_imported'; |
@@ -317,7 +317,7 @@ discard block |
||
| 317 | 317 | $this->bigbluebuttonbn_mform_add_element($mform, $field['type'], $field['name'], $field['data_type'], |
| 318 | 318 | $field['description_key'], $cfg['recordings_imported_default']); |
| 319 | 319 | $field = ['type' => 'hidden', 'name' => 'recordings_preview', 'data_type' => PARAM_INT, |
| 320 | - 'description_key' => null]; |
|
| 320 | + 'description_key' => null]; |
|
| 321 | 321 | if ($cfg['recordings_preview_editable']) { |
| 322 | 322 | $field['type'] = 'checkbox'; |
| 323 | 323 | $field['description_key'] = 'mod_form_field_recordings_preview'; |
@@ -394,7 +394,7 @@ discard block |
||
| 394 | 394 | $htmlselectiontype = html_writer::select($participantselection['type_options'], |
| 395 | 395 | 'bigbluebuttonbn_participant_selection_type', $participantselection['type_selected'], array(), |
| 396 | 396 | array('id' => 'bigbluebuttonbn_participant_selection_type', |
| 397 | - 'onchange' => 'M.mod_bigbluebuttonbn.modform.participantSelectionSet(); return 0;')); |
|
| 397 | + 'onchange' => 'M.mod_bigbluebuttonbn.modform.participantSelectionSet(); return 0;')); |
|
| 398 | 398 | $htmlselectionoptions = html_writer::select($participantselection['options'], 'bigbluebuttonbn_participant_selection', |
| 399 | 399 | $participantselection['selected'], array(), |
| 400 | 400 | array('id' => 'bigbluebuttonbn_participant_selection', 'disabled' => 'disabled')); |
@@ -402,7 +402,7 @@ discard block |
||
| 402 | 402 | 'type' => 'button', 'class' => 'btn btn-secondary', |
| 403 | 403 | 'value' => get_string('mod_form_field_participant_list_action_add', 'bigbluebuttonbn'), |
| 404 | 404 | 'onclick' => 'M.mod_bigbluebuttonbn.modform.participantAdd(); return 0;' |
| 405 | - )); |
|
| 405 | + )); |
|
| 406 | 406 | $htmladdparticipant = html_writer::tag('div', |
| 407 | 407 | $htmlselectiontype . ' ' . $htmlselectionoptions . ' ' . $htmlselectioninput, null); |
| 408 | 408 | $mform->addElement('html', "\n\n"); |
@@ -444,9 +444,9 @@ discard block |
||
| 444 | 444 | $field['type'] = 'select'; |
| 445 | 445 | $field['data_type'] = PARAM_TEXT; |
| 446 | 446 | $field['description_key'] = 'mod_form_field_block_clienttype'; |
| 447 | - $choices = array(BIGBLUEBUTTON_CLIENTTYPE_FLASH => get_string('mod_form_block_clienttype_flash', 'bigbluebuttonbn'), |
|
| 448 | - BIGBLUEBUTTON_CLIENTTYPE_HTML5 => get_string('mod_form_block_clienttype_html5', 'bigbluebuttonbn')); |
|
| 449 | - $mform->addElement('header', 'clienttypeselection', get_string('mod_form_block_clienttype', 'bigbluebuttonbn')); |
|
| 447 | + $choices = array(BIGBLUEBUTTON_CLIENTTYPE_FLASH => get_string('mod_form_block_clienttype_flash', 'bigbluebuttonbn'), |
|
| 448 | + BIGBLUEBUTTON_CLIENTTYPE_HTML5 => get_string('mod_form_block_clienttype_html5', 'bigbluebuttonbn')); |
|
| 449 | + $mform->addElement('header', 'clienttypeselection', get_string('mod_form_block_clienttype', 'bigbluebuttonbn')); |
|
| 450 | 450 | $this->bigbluebuttonbn_mform_add_element($mform, $field['type'], $field['name'], $field['data_type'], |
| 451 | 451 | $field['description_key'], $cfg['clienttype_default'], $choices); |
| 452 | 452 | return; |
@@ -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. |
@@ -80,7 +80,7 @@ discard block |
||
| 80 | 80 | // If none is allowed, fail and return. |
| 81 | 81 | if (empty($jsvars['instanceTypeProfiles'])) { |
| 82 | 82 | print_error('general_error_not_allowed_to_create_instances)', 'bigbluebuttonbn', |
| 83 | - $CFG->wwwroot.'/admin/settings.php?section=modsettingbigbluebuttonbn'); |
|
| 83 | + $CFG->wwwroot . '/admin/settings.php?section=modsettingbigbluebuttonbn'); |
|
| 84 | 84 | return; |
| 85 | 85 | } |
| 86 | 86 | $this->bigbluebuttonbn_mform_add_block_profiles($mform, $jsvars['instanceTypeProfiles']); |
@@ -136,7 +136,7 @@ discard block |
||
| 136 | 136 | ); |
| 137 | 137 | $defaultvalues['presentation'] = $draftitemid; |
| 138 | 138 | } catch (Exception $e) { |
| 139 | - debugging('Presentation could not be loaded: '.$e->getMessage(), DEBUG_DEVELOPER); |
|
| 139 | + debugging('Presentation could not be loaded: ' . $e->getMessage(), DEBUG_DEVELOPER); |
|
| 140 | 140 | return; |
| 141 | 141 | } |
| 142 | 142 | // Completion: tick if completion attendance settings is set to 1 or more. |
@@ -564,7 +564,7 @@ discard block |
||
| 564 | 564 | return; |
| 565 | 565 | } |
| 566 | 566 | $mform->addElement($type, $name, get_string($descriptionkey, 'bigbluebuttonbn'), $options); |
| 567 | - if (get_string_manager()->string_exists($descriptionkey.'_help', 'bigbluebuttonbn')) { |
|
| 567 | + if (get_string_manager()->string_exists($descriptionkey . '_help', 'bigbluebuttonbn')) { |
|
| 568 | 568 | $mform->addHelpButton($name, $descriptionkey, 'bigbluebuttonbn'); |
| 569 | 569 | } |
| 570 | 570 | if (!empty($rule)) { |
@@ -28,23 +28,23 @@ discard block |
||
| 28 | 28 | |
| 29 | 29 | global $CFG; |
| 30 | 30 | |
| 31 | -require_once($CFG->dirroot.'/calendar/lib.php'); |
|
| 32 | -require_once($CFG->dirroot.'/message/lib.php'); |
|
| 33 | -require_once($CFG->dirroot.'/mod/lti/OAuth.php'); |
|
| 34 | -require_once($CFG->dirroot.'/tag/lib.php'); |
|
| 35 | -require_once($CFG->libdir.'/accesslib.php'); |
|
| 36 | -require_once($CFG->libdir.'/completionlib.php'); |
|
| 37 | -require_once($CFG->libdir.'/datalib.php'); |
|
| 38 | -require_once($CFG->libdir.'/enrollib.php'); |
|
| 39 | -require_once($CFG->libdir.'/filelib.php'); |
|
| 40 | -require_once($CFG->libdir.'/formslib.php'); |
|
| 31 | +require_once($CFG->dirroot . '/calendar/lib.php'); |
|
| 32 | +require_once($CFG->dirroot . '/message/lib.php'); |
|
| 33 | +require_once($CFG->dirroot . '/mod/lti/OAuth.php'); |
|
| 34 | +require_once($CFG->dirroot . '/tag/lib.php'); |
|
| 35 | +require_once($CFG->libdir . '/accesslib.php'); |
|
| 36 | +require_once($CFG->libdir . '/completionlib.php'); |
|
| 37 | +require_once($CFG->libdir . '/datalib.php'); |
|
| 38 | +require_once($CFG->libdir . '/enrollib.php'); |
|
| 39 | +require_once($CFG->libdir . '/filelib.php'); |
|
| 40 | +require_once($CFG->libdir . '/formslib.php'); |
|
| 41 | 41 | |
| 42 | 42 | // JWT is included in Moodle 3.7 core, but a local package is still needed for backward compatibility. |
| 43 | 43 | if (!class_exists('\Firebase\JWT\JWT')) { |
| 44 | - if (file_exists($CFG->libdir.'/php-jwt/src/JWT.php')) { |
|
| 45 | - require_once($CFG->libdir.'/php-jwt/src/JWT.php'); |
|
| 44 | + if (file_exists($CFG->libdir . '/php-jwt/src/JWT.php')) { |
|
| 45 | + require_once($CFG->libdir . '/php-jwt/src/JWT.php'); |
|
| 46 | 46 | } else { |
| 47 | - require_once($CFG->dirroot.'/mod/bigbluebuttonbn/vendor/firebase/php-jwt/src/JWT.php'); |
|
| 47 | + require_once($CFG->dirroot . '/mod/bigbluebuttonbn/vendor/firebase/php-jwt/src/JWT.php'); |
|
| 48 | 48 | } |
| 49 | 49 | } |
| 50 | 50 | |
@@ -52,8 +52,8 @@ discard block |
||
| 52 | 52 | $CFG->bigbluebuttonbn = array(); |
| 53 | 53 | } |
| 54 | 54 | |
| 55 | -if (file_exists(dirname(__FILE__).'/config.php')) { |
|
| 56 | - require_once(dirname(__FILE__).'/config.php'); |
|
| 55 | +if (file_exists(dirname(__FILE__) . '/config.php')) { |
|
| 56 | + require_once(dirname(__FILE__) . '/config.php'); |
|
| 57 | 57 | } |
| 58 | 58 | |
| 59 | 59 | /* |
@@ -110,19 +110,19 @@ discard block |
||
| 110 | 110 | return null; |
| 111 | 111 | } |
| 112 | 112 | $features = array( |
| 113 | - (string) FEATURE_IDNUMBER => true, |
|
| 114 | - (string) FEATURE_GROUPS => true, |
|
| 115 | - (string) FEATURE_GROUPINGS => true, |
|
| 116 | - (string) FEATURE_GROUPMEMBERSONLY => true, |
|
| 117 | - (string) FEATURE_MOD_INTRO => true, |
|
| 118 | - (string) FEATURE_BACKUP_MOODLE2 => true, |
|
| 119 | - (string) FEATURE_COMPLETION_TRACKS_VIEWS => true, |
|
| 120 | - (string) FEATURE_COMPLETION_HAS_RULES => true, |
|
| 121 | - (string) FEATURE_GRADE_HAS_GRADE => false, |
|
| 122 | - (string) FEATURE_GRADE_OUTCOMES => false, |
|
| 123 | - (string) FEATURE_SHOW_DESCRIPTION => true, |
|
| 113 | + (string)FEATURE_IDNUMBER => true, |
|
| 114 | + (string)FEATURE_GROUPS => true, |
|
| 115 | + (string)FEATURE_GROUPINGS => true, |
|
| 116 | + (string)FEATURE_GROUPMEMBERSONLY => true, |
|
| 117 | + (string)FEATURE_MOD_INTRO => true, |
|
| 118 | + (string)FEATURE_BACKUP_MOODLE2 => true, |
|
| 119 | + (string)FEATURE_COMPLETION_TRACKS_VIEWS => true, |
|
| 120 | + (string)FEATURE_COMPLETION_HAS_RULES => true, |
|
| 121 | + (string)FEATURE_GRADE_HAS_GRADE => false, |
|
| 122 | + (string)FEATURE_GRADE_OUTCOMES => false, |
|
| 123 | + (string)FEATURE_SHOW_DESCRIPTION => true, |
|
| 124 | 124 | ); |
| 125 | - if (isset($features[(string) $feature])) { |
|
| 125 | + if (isset($features[(string)$feature])) { |
|
| 126 | 126 | return $features[$feature]; |
| 127 | 127 | } |
| 128 | 128 | return null; |
@@ -277,7 +277,7 @@ discard block |
||
| 277 | 277 | function bigbluebuttonbn_delete_instance_log($bigbluebuttonbn) { |
| 278 | 278 | global $DB; |
| 279 | 279 | $sql = "SELECT * FROM {bigbluebuttonbn_logs} "; |
| 280 | - $sql .= "WHERE bigbluebuttonbnid = ? AND log = ? AND ". $DB->sql_compare_text('meta') . " = ?"; |
|
| 280 | + $sql .= "WHERE bigbluebuttonbnid = ? AND log = ? AND " . $DB->sql_compare_text('meta') . " = ?"; |
|
| 281 | 281 | $logs = $DB->get_records_sql($sql, array($bigbluebuttonbn->id, BIGBLUEBUTTONBN_LOG_EVENT_CREATE, "{\"record\":true}")); |
| 282 | 282 | $meta = "{\"has_recordings\":" . empty($logs) ? "true" : "false" . "}"; |
| 283 | 283 | bigbluebuttonbn_log($bigbluebuttonbn, BIGBLUEBUTTONBN_LOG_EVENT_DELETE, [], $meta); |
@@ -298,7 +298,7 @@ discard block |
||
| 298 | 298 | function bigbluebuttonbn_user_outline($course, $user, $mod, $bigbluebuttonbn) { |
| 299 | 299 | if ($completed = bigbluebuttonbn_user_complete($course, $user, $bigbluebuttonbn)) { |
| 300 | 300 | return fullname($user) . ' ' . get_string('view_message_has_joined', 'bigbluebuttonbn') . ' ' . |
| 301 | - get_string('view_message_session_for', 'bigbluebuttonbn') . ' ' . (string) $completed . ' ' . |
|
| 301 | + get_string('view_message_session_for', 'bigbluebuttonbn') . ' ' . (string)$completed . ' ' . |
|
| 302 | 302 | get_string('view_message_times', 'bigbluebuttonbn'); |
| 303 | 303 | } |
| 304 | 304 | return ''; |
@@ -487,7 +487,7 @@ discard block |
||
| 487 | 487 | * @return array status array |
| 488 | 488 | */ |
| 489 | 489 | function bigbluebuttonbn_reset_recordings($courseid) { |
| 490 | - require_once(__DIR__.'/locallib.php'); |
|
| 490 | + require_once(__DIR__ . '/locallib.php'); |
|
| 491 | 491 | // Criteria for search [courseid | bigbluebuttonbn=null | subset=false | includedeleted=true]. |
| 492 | 492 | $recordings = bigbluebuttonbn_get_recordings($courseid, null, false, true); |
| 493 | 493 | // Remove all the recordings. |
@@ -555,16 +555,16 @@ discard block |
||
| 555 | 555 | if ($bigbluebuttonbn->visible) { |
| 556 | 556 | $classes = 'class="dimmed" '; |
| 557 | 557 | } |
| 558 | - $str = '<div class="bigbluebuttonbn overview">'."\n"; |
|
| 559 | - $str .= ' <div class="name">'.get_string('modulename', 'bigbluebuttonbn').': '."\n"; |
|
| 560 | - $str .= ' <a '.$classes.'href="'.$CFG->wwwroot.'/mod/bigbluebuttonbn/view.php?id='.$bigbluebuttonbn->coursemodule. |
|
| 561 | - '">'.$bigbluebuttonbn->name.'</a>'."\n"; |
|
| 562 | - $str .= ' </div>'."\n"; |
|
| 563 | - $str .= ' <div class="info">'.get_string($start, 'bigbluebuttonbn').': '.userdate($bigbluebuttonbn->openingtime). |
|
| 564 | - '</div>'."\n"; |
|
| 565 | - $str .= ' <div class="info">'.get_string('ends_at', 'bigbluebuttonbn').': '.userdate($bigbluebuttonbn->closingtime) |
|
| 566 | - .'</div>'."\n"; |
|
| 567 | - $str .= '</div>'."\n"; |
|
| 558 | + $str = '<div class="bigbluebuttonbn overview">' . "\n"; |
|
| 559 | + $str .= ' <div class="name">' . get_string('modulename', 'bigbluebuttonbn') . ': ' . "\n"; |
|
| 560 | + $str .= ' <a ' . $classes . 'href="' . $CFG->wwwroot . '/mod/bigbluebuttonbn/view.php?id=' . $bigbluebuttonbn->coursemodule . |
|
| 561 | + '">' . $bigbluebuttonbn->name . '</a>' . "\n"; |
|
| 562 | + $str .= ' </div>' . "\n"; |
|
| 563 | + $str .= ' <div class="info">' . get_string($start, 'bigbluebuttonbn') . ': ' . userdate($bigbluebuttonbn->openingtime) . |
|
| 564 | + '</div>' . "\n"; |
|
| 565 | + $str .= ' <div class="info">' . get_string('ends_at', 'bigbluebuttonbn') . ': ' . userdate($bigbluebuttonbn->closingtime) |
|
| 566 | + .'</div>' . "\n"; |
|
| 567 | + $str .= '</div>' . "\n"; |
|
| 568 | 568 | return $str; |
| 569 | 569 | } |
| 570 | 570 | |
@@ -651,7 +651,7 @@ discard block |
||
| 651 | 651 | * @return void |
| 652 | 652 | **/ |
| 653 | 653 | function bigbluebuttonbn_process_pre_save_instance(&$bigbluebuttonbn) { |
| 654 | - require_once(__DIR__.'/locallib.php'); |
|
| 654 | + require_once(__DIR__ . '/locallib.php'); |
|
| 655 | 655 | $bigbluebuttonbn->timemodified = time(); |
| 656 | 656 | if ((integer)$bigbluebuttonbn->instance == 0) { |
| 657 | 657 | $bigbluebuttonbn->meetingid = 0; |
@@ -836,7 +836,7 @@ discard block |
||
| 836 | 836 | if (count($files) == 1) { |
| 837 | 837 | // Get the first (and only) file. |
| 838 | 838 | $file = reset($files); |
| 839 | - $filesrc = '/'.$file->get_filename(); |
|
| 839 | + $filesrc = '/' . $file->get_filename(); |
|
| 840 | 840 | } |
| 841 | 841 | return $filesrc; |
| 842 | 842 | } |
@@ -905,7 +905,7 @@ discard block |
||
| 905 | 905 | if (!$filename) { |
| 906 | 906 | return false; |
| 907 | 907 | } |
| 908 | - $fullpath = "/$context->id/mod_bigbluebuttonbn/$filearea/0/".$filename; |
|
| 908 | + $fullpath = "/$context->id/mod_bigbluebuttonbn/$filearea/0/" . $filename; |
|
| 909 | 909 | $fs = get_file_storage(); |
| 910 | 910 | $file = $fs->get_file_by_hash(sha1($fullpath)); |
| 911 | 911 | if (!$file || $file->is_directory()) { |
@@ -103,7 +103,7 @@ discard block |
||
| 103 | 103 | * @uses FEATURE_GRADE_OUTCOMES |
| 104 | 104 | * @uses FEATURE_SHOW_DESCRIPTION |
| 105 | 105 | * @param string $feature |
| 106 | - * @return mixed True if yes (some features may use other values) |
|
| 106 | + * @return null|boolean True if yes (some features may use other values) |
|
| 107 | 107 | */ |
| 108 | 108 | function bigbluebuttonbn_supports($feature) { |
| 109 | 109 | if (!$feature) { |
@@ -272,7 +272,7 @@ discard block |
||
| 272 | 272 | * |
| 273 | 273 | * @param object $bigbluebuttonbn Id of the module instance |
| 274 | 274 | * |
| 275 | - * @return bool Success/Failure |
|
| 275 | + * @return boolean|null Success/Failure |
|
| 276 | 276 | */ |
| 277 | 277 | function bigbluebuttonbn_delete_instance_log($bigbluebuttonbn) { |
| 278 | 278 | global $DB; |
@@ -293,7 +293,7 @@ discard block |
||
| 293 | 293 | * @param object $mod |
| 294 | 294 | * @param object $bigbluebuttonbn |
| 295 | 295 | * |
| 296 | - * @return bool |
|
| 296 | + * @return string |
|
| 297 | 297 | */ |
| 298 | 298 | function bigbluebuttonbn_user_outline($course, $user, $mod, $bigbluebuttonbn) { |
| 299 | 299 | if ($completed = bigbluebuttonbn_user_complete($course, $user, $bigbluebuttonbn)) { |
@@ -869,7 +869,7 @@ discard block |
||
| 869 | 869 | * @param stdClass $context context object |
| 870 | 870 | * @param string $filearea file area |
| 871 | 871 | * |
| 872 | - * @return false|null false if file not valid |
|
| 872 | + * @return boolean false if file not valid |
|
| 873 | 873 | */ |
| 874 | 874 | function bigbluebuttonbn_pluginfile_valid($context, $filearea) { |
| 875 | 875 | |
@@ -64,7 +64,7 @@ discard block |
||
| 64 | 64 | * Remove this block when restored |
| 65 | 65 | */ |
| 66 | 66 | |
| 67 | - /** @var BIGBLUEBUTTONBN_DEFAULT_SERVER_URL string of default bigbluebutton server url */ |
|
| 67 | + /** @var BIGBLUEBUTTONBN_DEFAULT_SERVER_URL string of default bigbluebutton server url */ |
|
| 68 | 68 | const BIGBLUEBUTTONBN_DEFAULT_SERVER_URL = 'http://test-install.blindsidenetworks.com/bigbluebutton/'; |
| 69 | 69 | /** @var BIGBLUEBUTTONBN_DEFAULT_SHARED_SECRET string of default bigbluebutton server shared secret */ |
| 70 | 70 | const BIGBLUEBUTTONBN_DEFAULT_SHARED_SECRET = '8cd8ef52e8e101574e400365b55e11a6'; |
@@ -375,7 +375,7 @@ discard block |
||
| 375 | 375 | $sql = "SELECT COUNT(*) FROM {bigbluebuttonbn_logs} "; |
| 376 | 376 | $sql .= "WHERE courseid = ? AND bigbluebuttonbnid = ? AND userid = ? AND (log = ? OR log = ?)"; |
| 377 | 377 | $result = $DB->count_records_sql($sql, array($course->id, $bigbluebuttonbn->id, $user->id, |
| 378 | - BIGBLUEBUTTONBN_LOG_EVENT_JOIN, BIGBLUEBUTTONBN_LOG_EVENT_PLAYED)); |
|
| 378 | + BIGBLUEBUTTONBN_LOG_EVENT_JOIN, BIGBLUEBUTTONBN_LOG_EVENT_PLAYED)); |
|
| 379 | 379 | return $result; |
| 380 | 380 | } |
| 381 | 381 | |
@@ -620,12 +620,12 @@ discard block |
||
| 620 | 620 | $str = '<div class="bigbluebuttonbn overview">'."\n"; |
| 621 | 621 | $str .= ' <div class="name">'.get_string('modulename', 'bigbluebuttonbn').': '."\n"; |
| 622 | 622 | $str .= ' <a '.$classes.'href="'.$CFG->wwwroot.'/mod/bigbluebuttonbn/view.php?id='.$bigbluebuttonbn->coursemodule. |
| 623 | - '">'.$bigbluebuttonbn->name.'</a>'."\n"; |
|
| 623 | + '">'.$bigbluebuttonbn->name.'</a>'."\n"; |
|
| 624 | 624 | $str .= ' </div>'."\n"; |
| 625 | 625 | $str .= ' <div class="info">'.get_string($start, 'bigbluebuttonbn').': '.userdate($bigbluebuttonbn->openingtime). |
| 626 | 626 | '</div>'."\n"; |
| 627 | 627 | $str .= ' <div class="info">'.get_string('ends_at', 'bigbluebuttonbn').': '.userdate($bigbluebuttonbn->closingtime) |
| 628 | - .'</div>'."\n"; |
|
| 628 | + .'</div>'."\n"; |
|
| 629 | 629 | $str .= '</div>'."\n"; |
| 630 | 630 | return $str; |
| 631 | 631 | } |
@@ -877,7 +877,7 @@ discard block |
||
| 877 | 877 | 'bigbluebuttonbn', |
| 878 | 878 | $bigbluebuttonbn->id, |
| 879 | 879 | $bigbluebuttonbn->completionexpected |
| 880 | - ); |
|
| 880 | + ); |
|
| 881 | 881 | } |
| 882 | 882 | } |
| 883 | 883 | |