@@ -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 |
@@ -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)) { |
@@ -309,10 +309,10 @@ discard block |
||
| 309 | 309 | */ |
| 310 | 310 | function bigbluebuttonbn_bbb_view_create_meeting_data(&$bbbsession) { |
| 311 | 311 | $data = ['meetingID' => $bbbsession['meetingid'], |
| 312 | - 'name' => bigbluebuttonbn_html2text($bbbsession['meetingname'], 64), |
|
| 313 | - 'attendeePW' => $bbbsession['viewerPW'], |
|
| 314 | - 'moderatorPW' => $bbbsession['modPW'], |
|
| 315 | - 'logoutURL' => $bbbsession['logoutURL'], |
|
| 312 | + 'name' => bigbluebuttonbn_html2text($bbbsession['meetingname'], 64), |
|
| 313 | + 'attendeePW' => $bbbsession['viewerPW'], |
|
| 314 | + 'moderatorPW' => $bbbsession['modPW'], |
|
| 315 | + 'logoutURL' => $bbbsession['logoutURL'], |
|
| 316 | 316 | ]; |
| 317 | 317 | $data['record'] = bigbluebuttonbn_bbb_view_create_meeting_data_record($bbbsession['record']); |
| 318 | 318 | // Check if auto_start_record is enable. |
@@ -334,7 +334,7 @@ discard block |
||
| 334 | 334 | '%duration%', |
| 335 | 335 | (string) $durationtime, |
| 336 | 336 | get_string('bbbdurationwarning', 'bigbluebuttonbn') |
| 337 | - ); |
|
| 337 | + ); |
|
| 338 | 338 | } |
| 339 | 339 | $voicebridge = intval($bbbsession['voicebridge']); |
| 340 | 340 | if ($voicebridge > 0 && $voicebridge < 79999) { |
@@ -23,8 +23,8 @@ discard block |
||
| 23 | 23 | * @author Jesus Federico (jesus [at] blindsidenetworks [dt] com) |
| 24 | 24 | */ |
| 25 | 25 | |
| 26 | -require_once(dirname(dirname(dirname(__FILE__))).'/config.php'); |
|
| 27 | -require_once(dirname(__FILE__).'/locallib.php'); |
|
| 26 | +require_once(dirname(dirname(dirname(__FILE__))) . '/config.php'); |
|
| 27 | +require_once(dirname(__FILE__) . '/locallib.php'); |
|
| 28 | 28 | |
| 29 | 29 | global $SESSION; |
| 30 | 30 | |
@@ -70,23 +70,23 @@ discard block |
||
| 70 | 70 | if (is_null($serverversion)) { |
| 71 | 71 | if ($bbbsession['administrator']) { |
| 72 | 72 | print_error('view_error_unable_join', 'bigbluebuttonbn', |
| 73 | - $CFG->wwwroot.'/admin/settings.php?section=modsettingbigbluebuttonbn'); |
|
| 73 | + $CFG->wwwroot . '/admin/settings.php?section=modsettingbigbluebuttonbn'); |
|
| 74 | 74 | exit; |
| 75 | 75 | } |
| 76 | 76 | if ($bbbsession['moderator']) { |
| 77 | 77 | print_error('view_error_unable_join_teacher', 'bigbluebuttonbn', |
| 78 | - $CFG->wwwroot.'/course/view.php?id='.$bigbluebuttonbn->course); |
|
| 78 | + $CFG->wwwroot . '/course/view.php?id=' . $bigbluebuttonbn->course); |
|
| 79 | 79 | exit; |
| 80 | 80 | } |
| 81 | 81 | print_error('view_error_unable_join_student', 'bigbluebuttonbn', |
| 82 | - $CFG->wwwroot.'/course/view.php?id='.$bigbluebuttonbn->course); |
|
| 82 | + $CFG->wwwroot . '/course/view.php?id=' . $bigbluebuttonbn->course); |
|
| 83 | 83 | exit; |
| 84 | 84 | } |
| 85 | - $bbbsession['serverversion'] = (string) $serverversion; |
|
| 85 | + $bbbsession['serverversion'] = (string)$serverversion; |
|
| 86 | 86 | |
| 87 | 87 | // Operation URLs. |
| 88 | 88 | $bbbsession['bigbluebuttonbnURL'] = $CFG->wwwroot . '/mod/bigbluebuttonbn/view.php?id=' . $bbbsession['cm']->id; |
| 89 | - $bbbsession['logoutURL'] = $CFG->wwwroot . '/mod/bigbluebuttonbn/bbb_view.php?action=logout&id='.$id . |
|
| 89 | + $bbbsession['logoutURL'] = $CFG->wwwroot . '/mod/bigbluebuttonbn/bbb_view.php?action=logout&id=' . $id . |
|
| 90 | 90 | '&bn=' . $bbbsession['bigbluebuttonbn']->id; |
| 91 | 91 | $bbbsession['recordingReadyURL'] = $CFG->wwwroot . '/mod/bigbluebuttonbn/bbb_broker.php?action=recording_' . |
| 92 | 92 | 'ready&bigbluebuttonbn=' . $bbbsession['bigbluebuttonbn']->id; |
@@ -114,8 +114,8 @@ discard block |
||
| 114 | 114 | } |
| 115 | 115 | |
| 116 | 116 | // Assign group default values. |
| 117 | - $bbbsession['meetingid'] .= '['.$bbbsession['group'].']'; |
|
| 118 | - $bbbsession['meetingname'] .= ' ('.$groupname.')'; |
|
| 117 | + $bbbsession['meetingid'] .= '[' . $bbbsession['group'] . ']'; |
|
| 118 | + $bbbsession['meetingname'] .= ' (' . $groupname . ')'; |
|
| 119 | 119 | } |
| 120 | 120 | |
| 121 | 121 | // Initialize session variable used across views. |
@@ -180,7 +180,7 @@ discard block |
||
| 180 | 180 | } |
| 181 | 181 | // If user is not administrator nor moderator (user is steudent) and waiting is required. |
| 182 | 182 | if (!$bbbsession['administrator'] && !$bbbsession['moderator'] && $bbbsession['wait']) { |
| 183 | - header('Location: '.$bbbsession['logoutURL']); |
|
| 183 | + header('Location: ' . $bbbsession['logoutURL']); |
|
| 184 | 184 | break; |
| 185 | 185 | } |
| 186 | 186 | // As the meeting doesn't exist, try to create it. |
@@ -194,16 +194,16 @@ discard block |
||
| 194 | 194 | // The server is unreachable. |
| 195 | 195 | if ($bbbsession['administrator']) { |
| 196 | 196 | print_error('view_error_unable_join', 'bigbluebuttonbn', |
| 197 | - $CFG->wwwroot.'/admin/settings.php?section=modsettingbigbluebuttonbn'); |
|
| 197 | + $CFG->wwwroot . '/admin/settings.php?section=modsettingbigbluebuttonbn'); |
|
| 198 | 198 | break; |
| 199 | 199 | } |
| 200 | 200 | if ($bbbsession['moderator']) { |
| 201 | 201 | print_error('view_error_unable_join_teacher', 'bigbluebuttonbn', |
| 202 | - $CFG->wwwroot.'/admin/settings.php?section=modsettingbigbluebuttonbn'); |
|
| 202 | + $CFG->wwwroot . '/admin/settings.php?section=modsettingbigbluebuttonbn'); |
|
| 203 | 203 | break; |
| 204 | 204 | } |
| 205 | 205 | print_error('view_error_unable_join_student', 'bigbluebuttonbn', |
| 206 | - $CFG->wwwroot.'/admin/settings.php?section=modsettingbigbluebuttonbn'); |
|
| 206 | + $CFG->wwwroot . '/admin/settings.php?section=modsettingbigbluebuttonbn'); |
|
| 207 | 207 | break; |
| 208 | 208 | } |
| 209 | 209 | if ($response['returncode'] == 'FAILED') { |
@@ -224,7 +224,7 @@ discard block |
||
| 224 | 224 | bigbluebuttonbn_event_log(\mod_bigbluebuttonbn\event\events::$events['meeting_create'], $bigbluebuttonbn); |
| 225 | 225 | // Internal logger: Insert a record with the meeting created. |
| 226 | 226 | $overrides = array('meetingid' => $bbbsession['meetingid']); |
| 227 | - $meta = '{"record":'.($bbbsession['record'] ? 'true' : 'false').'}'; |
|
| 227 | + $meta = '{"record":' . ($bbbsession['record'] ? 'true' : 'false') . '}'; |
|
| 228 | 228 | bigbluebuttonbn_log($bbbsession['bigbluebuttonbn'], BIGBLUEBUTTONBN_LOG_EVENT_CREATE, $overrides, $meta); |
| 229 | 229 | // Since the meeting is already running, we just join the session. |
| 230 | 230 | bigbluebuttonbn_bbb_view_join_meeting($bbbsession, $bigbluebuttonbn, $origin); |
@@ -238,7 +238,7 @@ discard block |
||
| 238 | 238 | $overrides = array('meetingid' => $bbbsession['meetingid']); |
| 239 | 239 | bigbluebuttonbn_log($bbbsession['bigbluebuttonbn'], BIGBLUEBUTTONBN_LOG_EVENT_PLAYED, $overrides); |
| 240 | 240 | // Execute the redirect. |
| 241 | - header('Location: '.urldecode($href)); |
|
| 241 | + header('Location: ' . urldecode($href)); |
|
| 242 | 242 | break; |
| 243 | 243 | default: |
| 244 | 244 | bigbluebuttonbn_bbb_view_close_window(); |
@@ -332,7 +332,7 @@ discard block |
||
| 332 | 332 | $data['welcome'] .= '<br><br>'; |
| 333 | 333 | $data['welcome'] .= str_replace( |
| 334 | 334 | '%duration%', |
| 335 | - (string) $durationtime, |
|
| 335 | + (string)$durationtime, |
|
| 336 | 336 | get_string('bbbdurationwarning', 'bigbluebuttonbn') |
| 337 | 337 | ); |
| 338 | 338 | } |
@@ -398,7 +398,7 @@ discard block |
||
| 398 | 398 | $meetinginfo = bigbluebuttonbn_get_meeting_info($bbbsession['meetingid'], BIGBLUEBUTTONBN_UPDATE_CACHE); |
| 399 | 399 | if ($bbbsession['userlimit'] > 0 && intval($meetinginfo['participantCount']) >= $bbbsession['userlimit']) { |
| 400 | 400 | // No more users allowed to join. |
| 401 | - header('Location: '.$bbbsession['logoutURL']); |
|
| 401 | + header('Location: ' . $bbbsession['logoutURL']); |
|
| 402 | 402 | return; |
| 403 | 403 | } |
| 404 | 404 | // Build the URL. |
@@ -412,13 +412,13 @@ discard block |
||
| 412 | 412 | bigbluebuttonbn_event_log(\mod_bigbluebuttonbn\event\events::$events['meeting_join'], $bigbluebuttonbn); |
| 413 | 413 | // Internal logger: Instert a record with the meeting created. |
| 414 | 414 | $overrides = array('meetingid' => $bbbsession['meetingid']); |
| 415 | - $meta = '{"origin":'.$origin.'}'; |
|
| 415 | + $meta = '{"origin":' . $origin . '}'; |
|
| 416 | 416 | bigbluebuttonbn_log($bbbsession['bigbluebuttonbn'], BIGBLUEBUTTONBN_LOG_EVENT_JOIN, $overrides, $meta); |
| 417 | 417 | // Before executing the redirect, increment the number of participants. |
| 418 | 418 | bigbluebuttonbn_participant_joined($bbbsession['meetingid'], |
| 419 | 419 | ($bbbsession['administrator'] || $bbbsession['moderator'])); |
| 420 | 420 | // Execute the redirect. |
| 421 | - header('Location: '.$joinurl); |
|
| 421 | + header('Location: ' . $joinurl); |
|
| 422 | 422 | } |
| 423 | 423 | |
| 424 | 424 | /** |
@@ -430,13 +430,13 @@ discard block |
||
| 430 | 430 | */ |
| 431 | 431 | function bigbluebuttonbn_bbb_view_errors($serrors, $id) { |
| 432 | 432 | global $CFG, $OUTPUT; |
| 433 | - $errors = (array) json_decode(urldecode($serrors)); |
|
| 433 | + $errors = (array)json_decode(urldecode($serrors)); |
|
| 434 | 434 | $msgerrors = ''; |
| 435 | 435 | foreach ($errors as $error) { |
| 436 | - $msgerrors .= html_writer::tag('p', $error->{'message'}, array('class' => 'alert alert-danger'))."\n"; |
|
| 436 | + $msgerrors .= html_writer::tag('p', $error->{'message'}, array('class' => 'alert alert-danger')) . "\n"; |
|
| 437 | 437 | } |
| 438 | 438 | echo $OUTPUT->header(); |
| 439 | 439 | print_error('view_error_bigbluebutton', 'bigbluebuttonbn', |
| 440 | - $CFG->wwwroot.'/mod/bigbluebuttonbn/view.php?id='.$id, $msgerrors, $serrors); |
|
| 440 | + $CFG->wwwroot . '/mod/bigbluebuttonbn/view.php?id=' . $id, $msgerrors, $serrors); |
|
| 441 | 441 | echo $OUTPUT->footer(); |
| 442 | 442 | } |
@@ -24,9 +24,9 @@ discard block |
||
| 24 | 24 | * @author Darko Miletic (darko.miletic [at] gmail [dt] com) |
| 25 | 25 | */ |
| 26 | 26 | |
| 27 | -require(__DIR__.'/../../config.php'); |
|
| 28 | -require_once(__DIR__.'/locallib.php'); |
|
| 29 | -require_once(__DIR__.'/brokerlib.php'); |
|
| 27 | +require(__DIR__ . '/../../config.php'); |
|
| 28 | +require_once(__DIR__ . '/locallib.php'); |
|
| 29 | +require_once(__DIR__ . '/brokerlib.php'); |
|
| 30 | 30 | |
| 31 | 31 | use \Firebase\JWT\JWT; |
| 32 | 32 | |
@@ -35,7 +35,7 @@ discard block |
||
| 35 | 35 | $params = $_REQUEST; |
| 36 | 36 | |
| 37 | 37 | if (!isset($params['action']) || empty($params['action'])) { |
| 38 | - header('HTTP/1.0 400 Bad Request. Parameter ['.$params['action'].'] was not included'); |
|
| 38 | + header('HTTP/1.0 400 Bad Request. Parameter [' . $params['action'] . '] was not included'); |
|
| 39 | 39 | return; |
| 40 | 40 | } |
| 41 | 41 | |
@@ -50,7 +50,7 @@ discard block |
||
| 50 | 50 | |
| 51 | 51 | $error = bigbluebuttonbn_broker_validate_parameters($params); |
| 52 | 52 | if (!empty($error)) { |
| 53 | - header('HTTP/1.0 400 Bad Request. '.$error); |
|
| 53 | + header('HTTP/1.0 400 Bad Request. ' . $error); |
|
| 54 | 54 | return; |
| 55 | 55 | } |
| 56 | 56 | |
@@ -71,7 +71,7 @@ discard block |
||
| 71 | 71 | bigbluebuttonbn_broker_meeting_events($bigbluebuttonbn); |
| 72 | 72 | return; |
| 73 | 73 | } |
| 74 | - header('HTTP/1.0 400 Bad request. The action '. $a . ' doesn\'t exist'); |
|
| 74 | + header('HTTP/1.0 400 Bad request. The action ' . $a . ' doesn\'t exist'); |
|
| 75 | 75 | } catch (Exception $e) { |
| 76 | - header('HTTP/1.0 500 Internal Server Error. '.$e->getMessage()); |
|
| 76 | + header('HTTP/1.0 500 Internal Server Error. ' . $e->getMessage()); |
|
| 77 | 77 | } |
@@ -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 | |
@@ -356,7 +356,7 @@ discard block |
||
| 356 | 356 | $sql = "SELECT COUNT(*) FROM {bigbluebuttonbn_logs} "; |
| 357 | 357 | $sql .= "WHERE courseid = ? AND bigbluebuttonbnid = ? AND userid = ? AND (log = ? OR log = ?)"; |
| 358 | 358 | $result = $DB->count_records_sql($sql, array($course->id, $bigbluebuttonbn->id, $user->id, |
| 359 | - BIGBLUEBUTTONBN_LOG_EVENT_JOIN, BIGBLUEBUTTONBN_LOG_EVENT_PLAYED)); |
|
| 359 | + BIGBLUEBUTTONBN_LOG_EVENT_JOIN, BIGBLUEBUTTONBN_LOG_EVENT_PLAYED)); |
|
| 360 | 360 | return $result; |
| 361 | 361 | } |
| 362 | 362 | |
@@ -589,12 +589,12 @@ discard block |
||
| 589 | 589 | $str = '<div class="bigbluebuttonbn overview">'."\n"; |
| 590 | 590 | $str .= ' <div class="name">'.get_string('modulename', 'bigbluebuttonbn').': '."\n"; |
| 591 | 591 | $str .= ' <a '.$classes.'href="'.$CFG->wwwroot.'/mod/bigbluebuttonbn/view.php?id='.$bigbluebuttonbn->coursemodule. |
| 592 | - '">'.$bigbluebuttonbn->name.'</a>'."\n"; |
|
| 592 | + '">'.$bigbluebuttonbn->name.'</a>'."\n"; |
|
| 593 | 593 | $str .= ' </div>'."\n"; |
| 594 | 594 | $str .= ' <div class="info">'.get_string($start, 'bigbluebuttonbn').': '.userdate($bigbluebuttonbn->openingtime). |
| 595 | 595 | '</div>'."\n"; |
| 596 | 596 | $str .= ' <div class="info">'.get_string('ends_at', 'bigbluebuttonbn').': '.userdate($bigbluebuttonbn->closingtime) |
| 597 | - .'</div>'."\n"; |
|
| 597 | + .'</div>'."\n"; |
|
| 598 | 598 | $str .= '</div>'."\n"; |
| 599 | 599 | return $str; |
| 600 | 600 | } |
@@ -836,7 +836,7 @@ discard block |
||
| 836 | 836 | 'bigbluebuttonbn', |
| 837 | 837 | $bigbluebuttonbn->id, |
| 838 | 838 | $bigbluebuttonbn->completionexpected |
| 839 | - ); |
|
| 839 | + ); |
|
| 840 | 840 | } |
| 841 | 841 | } |
| 842 | 842 | |
@@ -30,10 +30,10 @@ discard block |
||
| 30 | 30 | |
| 31 | 31 | // JWT is included in Moodle 3.7 core, but a local package is still needed for backward compatibility. |
| 32 | 32 | if (!class_exists('\Firebase\JWT\JWT')) { |
| 33 | - if (file_exists($CFG->libdir.'/php-jwt/src/JWT.php')) { |
|
| 34 | - require_once($CFG->libdir.'/php-jwt/src/JWT.php'); |
|
| 33 | + if (file_exists($CFG->libdir . '/php-jwt/src/JWT.php')) { |
|
| 34 | + require_once($CFG->libdir . '/php-jwt/src/JWT.php'); |
|
| 35 | 35 | } else { |
| 36 | - require_once($CFG->dirroot.'/mod/bigbluebuttonbn/vendor/firebase/php-jwt/src/JWT.php'); |
|
| 36 | + require_once($CFG->dirroot . '/mod/bigbluebuttonbn/vendor/firebase/php-jwt/src/JWT.php'); |
|
| 37 | 37 | } |
| 38 | 38 | } |
| 39 | 39 | |
@@ -41,8 +41,8 @@ discard block |
||
| 41 | 41 | $CFG->bigbluebuttonbn = array(); |
| 42 | 42 | } |
| 43 | 43 | |
| 44 | -if (file_exists(dirname(__FILE__).'/config.php')) { |
|
| 45 | - require_once(dirname(__FILE__).'/config.php'); |
|
| 44 | +if (file_exists(dirname(__FILE__) . '/config.php')) { |
|
| 45 | + require_once(dirname(__FILE__) . '/config.php'); |
|
| 46 | 46 | } |
| 47 | 47 | |
| 48 | 48 | /* |
@@ -99,19 +99,19 @@ discard block |
||
| 99 | 99 | return null; |
| 100 | 100 | } |
| 101 | 101 | $features = array( |
| 102 | - (string) FEATURE_IDNUMBER => true, |
|
| 103 | - (string) FEATURE_GROUPS => true, |
|
| 104 | - (string) FEATURE_GROUPINGS => true, |
|
| 105 | - (string) FEATURE_GROUPMEMBERSONLY => true, |
|
| 106 | - (string) FEATURE_MOD_INTRO => true, |
|
| 107 | - (string) FEATURE_BACKUP_MOODLE2 => true, |
|
| 108 | - (string) FEATURE_COMPLETION_TRACKS_VIEWS => true, |
|
| 109 | - (string) FEATURE_COMPLETION_HAS_RULES => true, |
|
| 110 | - (string) FEATURE_GRADE_HAS_GRADE => false, |
|
| 111 | - (string) FEATURE_GRADE_OUTCOMES => false, |
|
| 112 | - (string) FEATURE_SHOW_DESCRIPTION => true, |
|
| 102 | + (string)FEATURE_IDNUMBER => true, |
|
| 103 | + (string)FEATURE_GROUPS => true, |
|
| 104 | + (string)FEATURE_GROUPINGS => true, |
|
| 105 | + (string)FEATURE_GROUPMEMBERSONLY => true, |
|
| 106 | + (string)FEATURE_MOD_INTRO => true, |
|
| 107 | + (string)FEATURE_BACKUP_MOODLE2 => true, |
|
| 108 | + (string)FEATURE_COMPLETION_TRACKS_VIEWS => true, |
|
| 109 | + (string)FEATURE_COMPLETION_HAS_RULES => true, |
|
| 110 | + (string)FEATURE_GRADE_HAS_GRADE => false, |
|
| 111 | + (string)FEATURE_GRADE_OUTCOMES => false, |
|
| 112 | + (string)FEATURE_SHOW_DESCRIPTION => true, |
|
| 113 | 113 | ); |
| 114 | - if (isset($features[(string) $feature])) { |
|
| 114 | + if (isset($features[(string)$feature])) { |
|
| 115 | 115 | return $features[$feature]; |
| 116 | 116 | } |
| 117 | 117 | return null; |
@@ -304,7 +304,7 @@ discard block |
||
| 304 | 304 | function bigbluebuttonbn_delete_instance_log($bigbluebuttonbn) { |
| 305 | 305 | global $DB; |
| 306 | 306 | $sql = "SELECT * FROM {bigbluebuttonbn_logs} "; |
| 307 | - $sql .= "WHERE bigbluebuttonbnid = ? AND log = ? AND ". $DB->sql_compare_text('meta') . " = ?"; |
|
| 307 | + $sql .= "WHERE bigbluebuttonbnid = ? AND log = ? AND " . $DB->sql_compare_text('meta') . " = ?"; |
|
| 308 | 308 | $logs = $DB->get_records_sql($sql, array($bigbluebuttonbn->id, BIGBLUEBUTTONBN_LOG_EVENT_CREATE, "{\"record\":true}")); |
| 309 | 309 | $meta = "{\"has_recordings\":" . empty($logs) ? "true" : "false" . "}"; |
| 310 | 310 | bigbluebuttonbn_log($bigbluebuttonbn, BIGBLUEBUTTONBN_LOG_EVENT_DELETE, [], $meta); |
@@ -325,7 +325,7 @@ discard block |
||
| 325 | 325 | function bigbluebuttonbn_user_outline($course, $user, $mod, $bigbluebuttonbn) { |
| 326 | 326 | if ($completed = bigbluebuttonbn_user_complete($course, $user, $bigbluebuttonbn)) { |
| 327 | 327 | return fullname($user) . ' ' . get_string('view_message_has_joined', 'bigbluebuttonbn') . ' ' . |
| 328 | - get_string('view_message_session_for', 'bigbluebuttonbn') . ' ' . (string) $completed . ' ' . |
|
| 328 | + get_string('view_message_session_for', 'bigbluebuttonbn') . ' ' . (string)$completed . ' ' . |
|
| 329 | 329 | get_string('view_message_times', 'bigbluebuttonbn'); |
| 330 | 330 | } |
| 331 | 331 | return ''; |
@@ -517,7 +517,7 @@ discard block |
||
| 517 | 517 | * @return array status array |
| 518 | 518 | */ |
| 519 | 519 | function bigbluebuttonbn_reset_recordings($courseid) { |
| 520 | - require_once(__DIR__.'/locallib.php'); |
|
| 520 | + require_once(__DIR__ . '/locallib.php'); |
|
| 521 | 521 | // Criteria for search [courseid | bigbluebuttonbn=null | subset=false | includedeleted=true]. |
| 522 | 522 | $recordings = bigbluebuttonbn_get_recordings($courseid, null, false, true); |
| 523 | 523 | // Remove all the recordings. |
@@ -586,16 +586,16 @@ discard block |
||
| 586 | 586 | if ($bigbluebuttonbn->visible) { |
| 587 | 587 | $classes = 'class="dimmed" '; |
| 588 | 588 | } |
| 589 | - $str = '<div class="bigbluebuttonbn overview">'."\n"; |
|
| 590 | - $str .= ' <div class="name">'.get_string('modulename', 'bigbluebuttonbn').': '."\n"; |
|
| 591 | - $str .= ' <a '.$classes.'href="'.$CFG->wwwroot.'/mod/bigbluebuttonbn/view.php?id='.$bigbluebuttonbn->coursemodule. |
|
| 592 | - '">'.$bigbluebuttonbn->name.'</a>'."\n"; |
|
| 593 | - $str .= ' </div>'."\n"; |
|
| 594 | - $str .= ' <div class="info">'.get_string($start, 'bigbluebuttonbn').': '.userdate($bigbluebuttonbn->openingtime). |
|
| 595 | - '</div>'."\n"; |
|
| 596 | - $str .= ' <div class="info">'.get_string('ends_at', 'bigbluebuttonbn').': '.userdate($bigbluebuttonbn->closingtime) |
|
| 597 | - .'</div>'."\n"; |
|
| 598 | - $str .= '</div>'."\n"; |
|
| 589 | + $str = '<div class="bigbluebuttonbn overview">' . "\n"; |
|
| 590 | + $str .= ' <div class="name">' . get_string('modulename', 'bigbluebuttonbn') . ': ' . "\n"; |
|
| 591 | + $str .= ' <a ' . $classes . 'href="' . $CFG->wwwroot . '/mod/bigbluebuttonbn/view.php?id=' . $bigbluebuttonbn->coursemodule . |
|
| 592 | + '">' . $bigbluebuttonbn->name . '</a>' . "\n"; |
|
| 593 | + $str .= ' </div>' . "\n"; |
|
| 594 | + $str .= ' <div class="info">' . get_string($start, 'bigbluebuttonbn') . ': ' . userdate($bigbluebuttonbn->openingtime) . |
|
| 595 | + '</div>' . "\n"; |
|
| 596 | + $str .= ' <div class="info">' . get_string('ends_at', 'bigbluebuttonbn') . ': ' . userdate($bigbluebuttonbn->closingtime) |
|
| 597 | + .'</div>' . "\n"; |
|
| 598 | + $str .= '</div>' . "\n"; |
|
| 599 | 599 | return $str; |
| 600 | 600 | } |
| 601 | 601 | |
@@ -683,7 +683,7 @@ discard block |
||
| 683 | 683 | * @return void |
| 684 | 684 | **/ |
| 685 | 685 | function bigbluebuttonbn_process_pre_save_instance(&$bigbluebuttonbn) { |
| 686 | - require_once(__DIR__.'/locallib.php'); |
|
| 686 | + require_once(__DIR__ . '/locallib.php'); |
|
| 687 | 687 | $bigbluebuttonbn->timemodified = time(); |
| 688 | 688 | if ((integer)$bigbluebuttonbn->instance == 0) { |
| 689 | 689 | $bigbluebuttonbn->meetingid = 0; |
@@ -786,7 +786,7 @@ discard block |
||
| 786 | 786 | **/ |
| 787 | 787 | function bigbluebuttonbn_process_post_save_event(&$bigbluebuttonbn) { |
| 788 | 788 | global $CFG, $DB; |
| 789 | - require_once($CFG->dirroot.'/calendar/lib.php'); |
|
| 789 | + require_once($CFG->dirroot . '/calendar/lib.php'); |
|
| 790 | 790 | $eventid = $DB->get_field('event', 'id', array('modulename' => 'bigbluebuttonbn', |
| 791 | 791 | 'instance' => $bigbluebuttonbn->id)); |
| 792 | 792 | // Delete the event from calendar when/if openingtime is NOT set. |
@@ -872,7 +872,7 @@ discard block |
||
| 872 | 872 | if (count($files) == 1) { |
| 873 | 873 | // Get the first (and only) file. |
| 874 | 874 | $file = reset($files); |
| 875 | - $filesrc = '/'.$file->get_filename(); |
|
| 875 | + $filesrc = '/' . $file->get_filename(); |
|
| 876 | 876 | } |
| 877 | 877 | return $filesrc; |
| 878 | 878 | } |
@@ -941,7 +941,7 @@ discard block |
||
| 941 | 941 | if (!$filename) { |
| 942 | 942 | return false; |
| 943 | 943 | } |
| 944 | - $fullpath = "/$context->id/mod_bigbluebuttonbn/$filearea/0/".$filename; |
|
| 944 | + $fullpath = "/$context->id/mod_bigbluebuttonbn/$filearea/0/" . $filename; |
|
| 945 | 945 | $fs = get_file_storage(); |
| 946 | 946 | $file = $fs->get_file_by_hash(sha1($fullpath)); |
| 947 | 947 | if (!$file || $file->is_directory()) { |