@@ -59,7 +59,7 @@ |
||
| 59 | 59 | $logs = new backup_nested_element('logs'); |
| 60 | 60 | |
| 61 | 61 | $log = new backup_nested_element('log', array('id'), array( |
| 62 | - 'courseid', 'bigbluebuttonbnid', 'userid', 'timecreated', 'meetingid', 'log', 'meta', )); |
|
| 62 | + 'courseid', 'bigbluebuttonbnid', 'userid', 'timecreated', 'meetingid', 'log', 'meta',)); |
|
| 63 | 63 | |
| 64 | 64 | // Build the tree. |
| 65 | 65 | $bigbluebuttonbn->add_child($logs); |
@@ -47,7 +47,7 @@ |
||
| 47 | 47 | print_error('view_error_invalid_session', plugin::COMPONENT); |
| 48 | 48 | } |
| 49 | 49 | |
| 50 | -if (!(boolean)\mod_bigbluebuttonbn\locallib\config::importrecordings_enabled()) { |
|
| 50 | +if (!(boolean) \mod_bigbluebuttonbn\locallib\config::importrecordings_enabled()) { |
|
| 51 | 51 | print_error('view_message_importrecordings_disabled', plugin::COMPONENT); |
| 52 | 52 | } |
| 53 | 53 | |
@@ -106,8 +106,8 @@ discard block |
||
| 106 | 106 | $PAGE->requires->strings_for_js(array_keys(bigbluebuttonbn_get_strings_for_js()), 'bigbluebuttonbn'); |
| 107 | 107 | $jsvars['participantData'] = bigbluebuttonbn_get_participant_data($context); |
| 108 | 108 | $jsvars['participantList'] = $participantlist; |
| 109 | - $jsvars['iconsEnabled'] = (boolean)$cfg['recording_icons_enabled']; |
|
| 110 | - $jsvars['pixIconDelete'] = (string)$OUTPUT->pix_icon('t/delete', get_string('delete'), 'moodle'); |
|
| 109 | + $jsvars['iconsEnabled'] = (boolean) $cfg['recording_icons_enabled']; |
|
| 110 | + $jsvars['pixIconDelete'] = (string) $OUTPUT->pix_icon('t/delete', get_string('delete'), 'moodle'); |
|
| 111 | 111 | $PAGE->requires->yui_module('moodle-mod_bigbluebuttonbn-modform', |
| 112 | 112 | 'M.mod_bigbluebuttonbn.modform.init', array($jsvars)); |
| 113 | 113 | } |
@@ -178,7 +178,7 @@ discard block |
||
| 178 | 178 | */ |
| 179 | 179 | public function add_completion_rules() { |
| 180 | 180 | $mform = $this->_form; |
| 181 | - if (!bigbluebuttonbn_is_bn_server() || !(boolean)\mod_bigbluebuttonbn\locallib\config::get('meetingevents_enabled')) { |
|
| 181 | + if (!bigbluebuttonbn_is_bn_server() || !(boolean) \mod_bigbluebuttonbn\locallib\config::get('meetingevents_enabled')) { |
|
| 182 | 182 | return []; |
| 183 | 183 | } |
| 184 | 184 | |
@@ -186,7 +186,7 @@ discard block |
||
| 186 | 186 | $attendance['grouplabel'] = get_string('completionattendancegroup', 'bigbluebuttonbn'); |
| 187 | 187 | $attendance['rulelabel'] = get_string('completionattendance', 'bigbluebuttonbn'); |
| 188 | 188 | $attendance['group'] = [ |
| 189 | - $mform->createElement('checkbox', 'completionattendanceenabled', '', $attendance['rulelabel'] . ' '), |
|
| 189 | + $mform->createElement('checkbox', 'completionattendanceenabled', '', $attendance['rulelabel'].' '), |
|
| 190 | 190 | $mform->createElement('text', 'completionattendance', '', ['size' => 3]), |
| 191 | 191 | $mform->createElement('static', 'completionattendanceunit', ' ', get_string('minutes', 'bigbluebuttonbn')) |
| 192 | 192 | ]; |
@@ -204,11 +204,11 @@ discard block |
||
| 204 | 204 | $engagement['pollvotes'] = get_string('completionengagementpollvotes', 'bigbluebuttonbn'); |
| 205 | 205 | $engagement['emojis'] = get_string('completionengagementemojis', 'bigbluebuttonbn'); |
| 206 | 206 | $engagement['group'] = [ |
| 207 | - $mform->createElement('checkbox', 'completionengagementchats', '', $engagement['chatlabel'] . ' '), |
|
| 208 | - $mform->createElement('checkbox', 'completionengagementtalks', '', $engagement['talklabel'] . ' '), |
|
| 209 | - $mform->createElement('checkbox', 'completionengagementraisehand', '', $engagement['raisehand'] . ' '), |
|
| 210 | - $mform->createElement('checkbox', 'completionengagementpollvotes', '', $engagement['pollvotes'] . ' '), |
|
| 211 | - $mform->createElement('checkbox', 'completionengagementemojis', '', $engagement['emojis'] . ' '), |
|
| 207 | + $mform->createElement('checkbox', 'completionengagementchats', '', $engagement['chatlabel'].' '), |
|
| 208 | + $mform->createElement('checkbox', 'completionengagementtalks', '', $engagement['talklabel'].' '), |
|
| 209 | + $mform->createElement('checkbox', 'completionengagementraisehand', '', $engagement['raisehand'].' '), |
|
| 210 | + $mform->createElement('checkbox', 'completionengagementpollvotes', '', $engagement['pollvotes'].' '), |
|
| 211 | + $mform->createElement('checkbox', 'completionengagementemojis', '', $engagement['emojis'].' '), |
|
| 212 | 212 | ]; |
| 213 | 213 | $mform->addGroup($engagement['group'], 'completionengagementgroup', $engagement['grouplabel'], [' '], false); |
| 214 | 214 | $mform->addHelpButton('completionengagementgroup', 'completionengagementgroup', 'bigbluebuttonbn'); |
@@ -255,7 +255,7 @@ discard block |
||
| 255 | 255 | * @return void |
| 256 | 256 | */ |
| 257 | 257 | private function bigbluebuttonbn_mform_add_block_profiles(&$mform, $profiles) { |
| 258 | - if ((boolean)\mod_bigbluebuttonbn\locallib\config::recordings_enabled()) { |
|
| 258 | + if ((boolean) \mod_bigbluebuttonbn\locallib\config::recordings_enabled()) { |
|
| 259 | 259 | $mform->addElement('select', 'type', get_string('mod_form_field_instanceprofiles', 'bigbluebuttonbn'), |
| 260 | 260 | bigbluebuttonbn_get_instance_profiles_array($profiles), |
| 261 | 261 | array('onchange' => 'M.mod_bigbluebuttonbn.modform.updateInstanceTypeProfile(this);')); |
@@ -494,7 +494,7 @@ discard block |
||
| 494 | 494 | 'onclick' => 'M.mod_bigbluebuttonbn.modform.participantAdd(); return 0;' |
| 495 | 495 | )); |
| 496 | 496 | $htmladdparticipant = html_writer::tag('div', |
| 497 | - $htmlselectiontype . ' ' . $htmlselectionoptions . ' ' . $htmlselectioninput, null); |
|
| 497 | + $htmlselectiontype.' '.$htmlselectionoptions.' '.$htmlselectioninput, null); |
|
| 498 | 498 | $mform->addElement('html', "\n\n"); |
| 499 | 499 | $mform->addElement('static', 'static_add_participant', |
| 500 | 500 | get_string('mod_form_field_participant_add', 'bigbluebuttonbn'), $htmladdparticipant); |
@@ -58,7 +58,7 @@ |
||
| 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'; |
@@ -31,7 +31,7 @@ |
||
| 31 | 31 | 'coursebigbluebuttonbn' => array( // Handler unique name (can be anything). |
| 32 | 32 | 'displaydata' => array( |
| 33 | 33 | 'title' => 'pluginname', |
| 34 | - 'icon' => $CFG->wwwroot . '/mod/bigbluebuttonbn/pix/icon.gif', |
|
| 34 | + 'icon' => $CFG->wwwroot.'/mod/bigbluebuttonbn/pix/icon.gif', |
|
| 35 | 35 | 'class' => '', |
| 36 | 36 | ), |
| 37 | 37 | 'delegate' => 'CoreCourseModuleDelegate', // Delegate (where to display the link to the add-on). |
@@ -85,15 +85,15 @@ discard block |
||
| 85 | 85 | $bbbsession['serverversion'] = (string) $serverversion; |
| 86 | 86 | |
| 87 | 87 | // Operation URLs. |
| 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 . |
|
| 90 | - '&bn=' . $bbbsession['bigbluebuttonbn']->id; |
|
| 91 | - $bbbsession['recordingReadyURL'] = $CFG->wwwroot . '/mod/bigbluebuttonbn/bbb_broker.php?action=recording_' . |
|
| 92 | - 'ready&bigbluebuttonbn=' . $bbbsession['bigbluebuttonbn']->id; |
|
| 93 | - $bbbsession['meetingEventsURL'] = $CFG->wwwroot . '/mod/bigbluebuttonbn/bbb_broker.php?action=meeting' . |
|
| 94 | - '_events&bigbluebuttonbn=' . $bbbsession['bigbluebuttonbn']->id; |
|
| 95 | - $bbbsession['joinURL'] = $CFG->wwwroot . '/mod/bigbluebuttonbn/bbb_view.php?action=join&id=' . $cm->id . |
|
| 96 | - '&bn=' . $bbbsession['bigbluebuttonbn']->id; |
|
| 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. |
|
| 90 | + '&bn='.$bbbsession['bigbluebuttonbn']->id; |
|
| 91 | + $bbbsession['recordingReadyURL'] = $CFG->wwwroot.'/mod/bigbluebuttonbn/bbb_broker.php?action=recording_'. |
|
| 92 | + 'ready&bigbluebuttonbn='.$bbbsession['bigbluebuttonbn']->id; |
|
| 93 | + $bbbsession['meetingEventsURL'] = $CFG->wwwroot.'/mod/bigbluebuttonbn/bbb_broker.php?action=meeting'. |
|
| 94 | + '_events&bigbluebuttonbn='.$bbbsession['bigbluebuttonbn']->id; |
|
| 95 | + $bbbsession['joinURL'] = $CFG->wwwroot.'/mod/bigbluebuttonbn/bbb_view.php?action=join&id='.$cm->id. |
|
| 96 | + '&bn='.$bbbsession['bigbluebuttonbn']->id; |
|
| 97 | 97 | |
| 98 | 98 | // Check status and set extra values. |
| 99 | 99 | $activitystatus = bigbluebuttonbn_view_get_activity_status($bbbsession); |
@@ -155,7 +155,7 @@ discard block |
||
| 155 | 155 | $lastaccess = json_decode($lastaccess->meta); |
| 156 | 156 | // If the user acceded from Timeline it should be redirected to the Dashboard. |
| 157 | 157 | if (isset($lastaccess->origin) && $lastaccess->origin == BIGBLUEBUTTON_ORIGIN_TIMELINE) { |
| 158 | - redirect($CFG->wwwroot . '/my/'); |
|
| 158 | + redirect($CFG->wwwroot.'/my/'); |
|
| 159 | 159 | } |
| 160 | 160 | // Close the tab or window where BBB was opened. |
| 161 | 161 | bigbluebuttonbn_bbb_view_close_window(); |
@@ -357,7 +357,7 @@ discard block |
||
| 357 | 357 | * @return string |
| 358 | 358 | */ |
| 359 | 359 | function bigbluebuttonbn_bbb_view_create_meeting_data_record($record) { |
| 360 | - if ((boolean)\mod_bigbluebuttonbn\locallib\config::recordings_enabled() && $record) { |
|
| 360 | + if ((boolean) \mod_bigbluebuttonbn\locallib\config::recordings_enabled() && $record) { |
|
| 361 | 361 | return 'true'; |
| 362 | 362 | } |
| 363 | 363 | return 'false'; |
@@ -370,7 +370,7 @@ discard block |
||
| 370 | 370 | * @return integer |
| 371 | 371 | */ |
| 372 | 372 | function bigbluebuttonbn_bbb_view_create_meeting_data_duration($closingtime) { |
| 373 | - if ((boolean)\mod_bigbluebuttonbn\locallib\config::get('scheduled_duration_enabled')) { |
|
| 373 | + if ((boolean) \mod_bigbluebuttonbn\locallib\config::get('scheduled_duration_enabled')) { |
|
| 374 | 374 | return bigbluebuttonbn_get_duration($closingtime); |
| 375 | 375 | } |
| 376 | 376 | return 0; |
@@ -26,7 +26,7 @@ discard block |
||
| 26 | 26 | |
| 27 | 27 | defined('MOODLE_INTERNAL') || die(); |
| 28 | 28 | |
| 29 | -require_once($CFG->dirroot . '/mod/bigbluebuttonbn/locallib.php'); |
|
| 29 | +require_once($CFG->dirroot.'/mod/bigbluebuttonbn/locallib.php'); |
|
| 30 | 30 | |
| 31 | 31 | /** |
| 32 | 32 | * Methods used to render view BBB in mobile. |
@@ -62,8 +62,8 @@ discard block |
||
| 62 | 62 | $session['bigbluebuttonbn']->id; |
| 63 | 63 | $session['meetingname'] = $session['bigbluebuttonbn']->name; |
| 64 | 64 | $session['meetingdescription'] = $session['bigbluebuttonbn']->intro; |
| 65 | - $session['userlimit'] = intval((int)\mod_bigbluebuttonbn\locallib\config::get('userlimit_default')); |
|
| 66 | - if ((boolean)\mod_bigbluebuttonbn\locallib\config::get('userlimit_editable')) { |
|
| 65 | + $session['userlimit'] = intval((int) \mod_bigbluebuttonbn\locallib\config::get('userlimit_default')); |
|
| 66 | + if ((boolean) \mod_bigbluebuttonbn\locallib\config::get('userlimit_editable')) { |
|
| 67 | 67 | $session['userlimit'] = intval($session['bigbluebuttonbn']->userlimit); |
| 68 | 68 | } |
| 69 | 69 | $session['voicebridge'] = $session['bigbluebuttonbn']->voicebridge; |
@@ -223,7 +223,7 @@ discard block |
||
| 223 | 223 | * @return string |
| 224 | 224 | */ |
| 225 | 225 | public static function create_meeting_data_record($record) { |
| 226 | - if ((boolean)\mod_bigbluebuttonbn\locallib\config::recordings_enabled() && $record) { |
|
| 226 | + if ((boolean) \mod_bigbluebuttonbn\locallib\config::recordings_enabled() && $record) { |
|
| 227 | 227 | return 'true'; |
| 228 | 228 | } |
| 229 | 229 | return 'false'; |
@@ -236,7 +236,7 @@ discard block |
||
| 236 | 236 | * @return integer |
| 237 | 237 | */ |
| 238 | 238 | public static function create_meeting_data_duration($closingtime) { |
| 239 | - if ((boolean)\mod_bigbluebuttonbn\locallib\config::get('scheduled_duration_enabled')) { |
|
| 239 | + if ((boolean) \mod_bigbluebuttonbn\locallib\config::get('scheduled_duration_enabled')) { |
|
| 240 | 240 | return bigbluebuttonbn_get_duration($closingtime); |
| 241 | 241 | } |
| 242 | 242 | return 0; |
@@ -27,7 +27,7 @@ discard block |
||
| 27 | 27 | |
| 28 | 28 | defined('MOODLE_INTERNAL') || die(); |
| 29 | 29 | |
| 30 | -require_once($CFG->dirroot . '/mod/bigbluebuttonbn/locallib.php'); |
|
| 30 | +require_once($CFG->dirroot.'/mod/bigbluebuttonbn/locallib.php'); |
|
| 31 | 31 | |
| 32 | 32 | /** |
| 33 | 33 | * Handles the global configuration based on config.php. |
@@ -128,10 +128,10 @@ discard block |
||
| 128 | 128 | public static function get($setting) { |
| 129 | 129 | global $CFG; |
| 130 | 130 | if (isset($CFG->bigbluebuttonbn[$setting])) { |
| 131 | - return (string)$CFG->bigbluebuttonbn[$setting]; |
|
| 131 | + return (string) $CFG->bigbluebuttonbn[$setting]; |
|
| 132 | 132 | } |
| 133 | 133 | if (isset($CFG->{'bigbluebuttonbn_'.$setting})) { |
| 134 | - return (string)$CFG->{'bigbluebuttonbn_'.$setting}; |
|
| 134 | + return (string) $CFG->{'bigbluebuttonbn_'.$setting}; |
|
| 135 | 135 | } |
| 136 | 136 | return self::defaultvalue($setting); |
| 137 | 137 | } |
@@ -142,7 +142,7 @@ discard block |
||
| 142 | 142 | * @return boolean |
| 143 | 143 | */ |
| 144 | 144 | public static function recordings_enabled() { |
| 145 | - return (boolean)self::get('recordings_enabled'); |
|
| 145 | + return (boolean) self::get('recordings_enabled'); |
|
| 146 | 146 | } |
| 147 | 147 | |
| 148 | 148 | /** |
@@ -151,7 +151,7 @@ discard block |
||
| 151 | 151 | * @return boolean |
| 152 | 152 | */ |
| 153 | 153 | public static function importrecordings_enabled() { |
| 154 | - return (boolean)self::get('importrecordings_enabled'); |
|
| 154 | + return (boolean) self::get('importrecordings_enabled'); |
|
| 155 | 155 | } |
| 156 | 156 | |
| 157 | 157 | /** |
@@ -160,7 +160,7 @@ discard block |
||
| 160 | 160 | * @return boolean |
| 161 | 161 | */ |
| 162 | 162 | public static function clienttype_enabled() { |
| 163 | - return (boolean)self::get('clienttype_enabled'); |
|
| 163 | + return (boolean) self::get('clienttype_enabled'); |
|
| 164 | 164 | } |
| 165 | 165 | |
| 166 | 166 | /** |
@@ -27,7 +27,7 @@ discard block |
||
| 27 | 27 | |
| 28 | 28 | defined('MOODLE_INTERNAL') || die(); |
| 29 | 29 | |
| 30 | -require_once($CFG->dirroot . '/mod/bigbluebuttonbn/locallib.php'); |
|
| 30 | +require_once($CFG->dirroot.'/mod/bigbluebuttonbn/locallib.php'); |
|
| 31 | 31 | |
| 32 | 32 | /** |
| 33 | 33 | * Wrapper for executing http requests on a BigBlueButton server. |
@@ -46,15 +46,15 @@ discard block |
||
| 46 | 46 | * @return string |
| 47 | 47 | */ |
| 48 | 48 | public static function action_url($action = '', $data = array(), $metadata = array()) { |
| 49 | - $baseurl = self::sanitized_url() . $action . '?'; |
|
| 49 | + $baseurl = self::sanitized_url().$action.'?'; |
|
| 50 | 50 | $params = ''; |
| 51 | 51 | foreach ($data as $key => $value) { |
| 52 | - $params .= '&' . $key . '=' . urlencode($value); |
|
| 52 | + $params .= '&'.$key.'='.urlencode($value); |
|
| 53 | 53 | } |
| 54 | 54 | foreach ($metadata as $key => $value) { |
| 55 | - $params .= '&' . 'meta_' . $key.'=' . urlencode($value); |
|
| 55 | + $params .= '&'.'meta_'.$key.'='.urlencode($value); |
|
| 56 | 56 | } |
| 57 | - return $baseurl . $params . '&checksum=' . sha1($action . $params . self::sanitized_secret()); |
|
| 57 | + return $baseurl.$params.'&checksum='.sha1($action.$params.self::sanitized_secret()); |
|
| 58 | 58 | } |
| 59 | 59 | |
| 60 | 60 | /** |
@@ -70,7 +70,7 @@ discard block |
||
| 70 | 70 | if (substr($serverurl, -4) == '/api') { |
| 71 | 71 | $serverurl = rtrim($serverurl, '/api'); |
| 72 | 72 | } |
| 73 | - return $serverurl . '/api/'; |
|
| 73 | + return $serverurl.'/api/'; |
|
| 74 | 74 | } |
| 75 | 75 | |
| 76 | 76 | /** |
@@ -91,8 +91,8 @@ discard block |
||
| 91 | 91 | $pserverurl = parse_url(trim(\mod_bigbluebuttonbn\locallib\config::get('server_url'))); |
| 92 | 92 | $pserverurlport = ""; |
| 93 | 93 | if (isset($pserverurl['port'])) { |
| 94 | - $pserverurlport = ":" . $pserverurl['port']; |
|
| 94 | + $pserverurlport = ":".$pserverurl['port']; |
|
| 95 | 95 | } |
| 96 | - return $pserverurl['scheme'] . "://" . $pserverurl['host'] . $pserverurlport . "/"; |
|
| 96 | + return $pserverurl['scheme']."://".$pserverurl['host'].$pserverurlport."/"; |
|
| 97 | 97 | } |
| 98 | 98 | } |