@@ -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 | |
@@ -63,16 +63,16 @@ discard block |
||
| 63 | 63 | if (is_null($serverversion)) { |
| 64 | 64 | if ($bbbsession['administrator']) { |
| 65 | 65 | print_error('view_error_unable_join', 'bigbluebuttonbn', |
| 66 | - $CFG->wwwroot.'/admin/settings.php?section=modsettingbigbluebuttonbn'); |
|
| 66 | + $CFG->wwwroot . '/admin/settings.php?section=modsettingbigbluebuttonbn'); |
|
| 67 | 67 | exit; |
| 68 | 68 | } |
| 69 | 69 | if ($bbbsession['moderator']) { |
| 70 | 70 | print_error('view_error_unable_join_teacher', 'bigbluebuttonbn', |
| 71 | - $CFG->wwwroot.'/course/view.php?id='.$bigbluebuttonbn->course); |
|
| 71 | + $CFG->wwwroot . '/course/view.php?id=' . $bigbluebuttonbn->course); |
|
| 72 | 72 | exit; |
| 73 | 73 | } |
| 74 | 74 | print_error('view_error_unable_join_student', 'bigbluebuttonbn', |
| 75 | - $CFG->wwwroot.'/course/view.php?id='.$bigbluebuttonbn->course); |
|
| 75 | + $CFG->wwwroot . '/course/view.php?id=' . $bigbluebuttonbn->course); |
|
| 76 | 76 | exit; |
| 77 | 77 | } |
| 78 | 78 | |
@@ -97,8 +97,8 @@ discard block |
||
| 97 | 97 | } |
| 98 | 98 | |
| 99 | 99 | // Assign group default values. |
| 100 | - $bbbsession['meetingid'] .= '['.$bbbsession['group'].']'; |
|
| 101 | - $bbbsession['meetingname'] .= ' ('.$groupname.')'; |
|
| 100 | + $bbbsession['meetingid'] .= '[' . $bbbsession['group'] . ']'; |
|
| 101 | + $bbbsession['meetingname'] .= ' (' . $groupname . ')'; |
|
| 102 | 102 | } |
| 103 | 103 | |
| 104 | 104 | // Initialize session variable used across views. |
@@ -163,7 +163,7 @@ discard block |
||
| 163 | 163 | } |
| 164 | 164 | // If user is not administrator nor moderator (user is steudent) and waiting is required. |
| 165 | 165 | if (!$bbbsession['administrator'] && !$bbbsession['moderator'] && $bbbsession['wait']) { |
| 166 | - header('Location: '.$bbbsession['logoutURL']); |
|
| 166 | + header('Location: ' . $bbbsession['logoutURL']); |
|
| 167 | 167 | break; |
| 168 | 168 | } |
| 169 | 169 | // As the meeting doesn't exist, try to create it. |
@@ -177,16 +177,16 @@ discard block |
||
| 177 | 177 | // The server is unreachable. |
| 178 | 178 | if ($bbbsession['administrator']) { |
| 179 | 179 | print_error('view_error_unable_join', 'bigbluebuttonbn', |
| 180 | - $CFG->wwwroot.'/admin/settings.php?section=modsettingbigbluebuttonbn'); |
|
| 180 | + $CFG->wwwroot . '/admin/settings.php?section=modsettingbigbluebuttonbn'); |
|
| 181 | 181 | break; |
| 182 | 182 | } |
| 183 | 183 | if ($bbbsession['moderator']) { |
| 184 | 184 | print_error('view_error_unable_join_teacher', 'bigbluebuttonbn', |
| 185 | - $CFG->wwwroot.'/admin/settings.php?section=modsettingbigbluebuttonbn'); |
|
| 185 | + $CFG->wwwroot . '/admin/settings.php?section=modsettingbigbluebuttonbn'); |
|
| 186 | 186 | break; |
| 187 | 187 | } |
| 188 | 188 | print_error('view_error_unable_join_student', 'bigbluebuttonbn', |
| 189 | - $CFG->wwwroot.'/admin/settings.php?section=modsettingbigbluebuttonbn'); |
|
| 189 | + $CFG->wwwroot . '/admin/settings.php?section=modsettingbigbluebuttonbn'); |
|
| 190 | 190 | break; |
| 191 | 191 | } |
| 192 | 192 | if ($response['returncode'] == 'FAILED') { |
@@ -207,7 +207,7 @@ discard block |
||
| 207 | 207 | bigbluebuttonbn_event_log(\mod_bigbluebuttonbn\event\events::$events['meeting_create'], $bigbluebuttonbn); |
| 208 | 208 | // Internal logger: Insert a record with the meeting created. |
| 209 | 209 | $overrides = array('meetingid' => $bbbsession['meetingid']); |
| 210 | - $meta = '{"record":'.($bbbsession['record'] ? 'true' : 'false').'}'; |
|
| 210 | + $meta = '{"record":' . ($bbbsession['record'] ? 'true' : 'false') . '}'; |
|
| 211 | 211 | bigbluebuttonbn_log($bbbsession['bigbluebuttonbn'], BIGBLUEBUTTONBN_LOG_EVENT_CREATE, $overrides, $meta); |
| 212 | 212 | // Since the meeting is already running, we just join the session. |
| 213 | 213 | bigbluebuttonbn_bbb_view_join_meeting($bbbsession, $bigbluebuttonbn, $origin); |
@@ -325,7 +325,7 @@ discard block |
||
| 325 | 325 | $data['welcome'] .= '<br><br>'; |
| 326 | 326 | $data['welcome'] .= str_replace( |
| 327 | 327 | '%duration%', |
| 328 | - (string) $durationtime, |
|
| 328 | + (string)$durationtime, |
|
| 329 | 329 | get_string('bbbdurationwarning', 'bigbluebuttonbn') |
| 330 | 330 | ); |
| 331 | 331 | } |
@@ -419,7 +419,7 @@ discard block |
||
| 419 | 419 | $meetinginfo = bigbluebuttonbn_get_meeting_info($bbbsession['meetingid'], BIGBLUEBUTTONBN_UPDATE_CACHE); |
| 420 | 420 | if ($bbbsession['userlimit'] > 0 && intval($meetinginfo['participantCount']) >= $bbbsession['userlimit']) { |
| 421 | 421 | // No more users allowed to join. |
| 422 | - header('Location: '.$bbbsession['logoutURL']); |
|
| 422 | + header('Location: ' . $bbbsession['logoutURL']); |
|
| 423 | 423 | return; |
| 424 | 424 | } |
| 425 | 425 | // Build the URL. |
@@ -434,13 +434,13 @@ discard block |
||
| 434 | 434 | bigbluebuttonbn_event_log(\mod_bigbluebuttonbn\event\events::$events['meeting_join'], $bigbluebuttonbn); |
| 435 | 435 | // Internal logger: Instert a record with the meeting created. |
| 436 | 436 | $overrides = array('meetingid' => $bbbsession['meetingid']); |
| 437 | - $meta = '{"origin":'.$origin.'}'; |
|
| 437 | + $meta = '{"origin":' . $origin . '}'; |
|
| 438 | 438 | bigbluebuttonbn_log($bbbsession['bigbluebuttonbn'], BIGBLUEBUTTONBN_LOG_EVENT_JOIN, $overrides, $meta); |
| 439 | 439 | // Before executing the redirect, increment the number of participants. |
| 440 | 440 | bigbluebuttonbn_participant_joined($bbbsession['meetingid'], |
| 441 | 441 | ($bbbsession['administrator'] || $bbbsession['moderator'])); |
| 442 | 442 | // Execute the redirect. |
| 443 | - header('Location: '.$joinurl); |
|
| 443 | + header('Location: ' . $joinurl); |
|
| 444 | 444 | } |
| 445 | 445 | |
| 446 | 446 | /** |
@@ -452,13 +452,13 @@ discard block |
||
| 452 | 452 | */ |
| 453 | 453 | function bigbluebuttonbn_bbb_view_errors($serrors, $id) { |
| 454 | 454 | global $CFG, $OUTPUT; |
| 455 | - $errors = (array) json_decode(urldecode($serrors)); |
|
| 455 | + $errors = (array)json_decode(urldecode($serrors)); |
|
| 456 | 456 | $msgerrors = ''; |
| 457 | 457 | foreach ($errors as $error) { |
| 458 | - $msgerrors .= html_writer::tag('p', $error->{'message'}, array('class' => 'alert alert-danger'))."\n"; |
|
| 458 | + $msgerrors .= html_writer::tag('p', $error->{'message'}, array('class' => 'alert alert-danger')) . "\n"; |
|
| 459 | 459 | } |
| 460 | 460 | echo $OUTPUT->header(); |
| 461 | 461 | print_error('view_error_bigbluebutton', 'bigbluebuttonbn', |
| 462 | - $CFG->wwwroot.'/mod/bigbluebuttonbn/view.php?id='.$id, $msgerrors, $serrors); |
|
| 462 | + $CFG->wwwroot . '/mod/bigbluebuttonbn/view.php?id=' . $id, $msgerrors, $serrors); |
|
| 463 | 463 | echo $OUTPUT->footer(); |
| 464 | 464 | } |
@@ -80,13 +80,13 @@ |
||
| 80 | 80 | $curl->setopt([ |
| 81 | 81 | 'CURLOPT_CERTINFO' => 1, |
| 82 | 82 | 'CURLOPT_SSL_VERIFYPEER' => true, |
| 83 | - 'CURLOPT_HEADERFUNCTION' => function ($curl, $header) use ($jstobereplaced) { |
|
| 84 | - if (!$jstobereplaced || stripos($header, 'content-length') === false) { |
|
| 83 | + 'CURLOPT_HEADERFUNCTION' => function($curl, $header) use ($jstobereplaced) { |
|
| 84 | + if (!$jstobereplaced || stripos($header, 'content-length') === false) { |
|
| 85 | 85 | header($header); |
| 86 | 86 | } |
| 87 | 87 | return strlen($header); |
| 88 | 88 | }, |
| 89 | - 'CURLOPT_WRITEFUNCTION' => function ($curl, $body) use ($jstobereplaced) { |
|
| 89 | + 'CURLOPT_WRITEFUNCTION' => function($curl, $body) use ($jstobereplaced) { |
|
| 90 | 90 | // Even if we modify the body, we need to return the original length |
| 91 | 91 | $originalbodylength = strlen($body); |
| 92 | 92 | |
@@ -193,67 +193,67 @@ |
||
| 193 | 193 | */ |
| 194 | 194 | public static function get_options() { |
| 195 | 195 | return array( |
| 196 | - 'version_major' => self::get_moodle_version_major(), |
|
| 197 | - 'voicebridge_editable' => self::get('voicebridge_editable'), |
|
| 198 | - 'importrecordings_enabled' => self::get('importrecordings_enabled'), |
|
| 199 | - 'importrecordings_from_deleted_enabled' => self::get('importrecordings_from_deleted_enabled'), |
|
| 200 | - 'waitformoderator_default' => self::get('waitformoderator_default'), |
|
| 201 | - 'waitformoderator_editable' => self::get('waitformoderator_editable'), |
|
| 202 | - 'userlimit_default' => self::get('userlimit_default'), |
|
| 203 | - 'userlimit_editable' => self::get('userlimit_editable'), |
|
| 204 | - 'preuploadpresentation_enabled' => self::get('preuploadpresentation_enabled'), |
|
| 205 | - 'sendnotifications_enabled' => self::get('sendnotifications_enabled'), |
|
| 206 | - 'recordings_enabled' => self::get('recordings_enabled'), |
|
| 207 | - 'meetingevents_enabled' => self::get('meetingevents_enabled'), |
|
| 208 | - 'recordings_html_default' => self::get('recordings_html_default'), |
|
| 209 | - 'recordings_html_editable' => self::get('recordings_html_editable'), |
|
| 210 | - 'recordings_deleted_default' => self::get('recordings_deleted_default'), |
|
| 211 | - 'recordings_deleted_editable' => self::get('recordings_deleted_editable'), |
|
| 212 | - 'recordings_imported_default' => self::get('recordings_imported_default'), |
|
| 213 | - 'recordings_imported_editable' => self::get('recordings_imported_editable'), |
|
| 214 | - 'recordings_preview_default' => self::get('recordings_preview_default'), |
|
| 215 | - 'recordings_preview_editable' => self::get('recordings_preview_editable'), |
|
| 216 | - 'recordings_validate_url' => self::get('recordings_validate_url'), |
|
| 217 | - 'recordings_proxy_playback' => self::get('recordings_proxy_playback'), |
|
| 218 | - 'recording_default' => self::get('recording_default'), |
|
| 219 | - 'recording_editable' => self::get('recording_editable'), |
|
| 220 | - 'recording_icons_enabled' => self::get('recording_icons_enabled'), |
|
| 221 | - 'recording_all_from_start_default' => self::get('recording_all_from_start_default'), |
|
| 222 | - 'recording_all_from_start_editable' => self::get('recording_all_from_start_editable'), |
|
| 223 | - 'recording_hide_button_default' => self::get('recording_hide_button_default'), |
|
| 224 | - 'recording_hide_button_editable' => self::get('recording_hide_button_editable'), |
|
| 225 | - 'recording_hide_button_activityonly' => self::get('recording_hide_button_activityonly'), |
|
| 226 | - 'general_warning_message' => self::get('general_warning_message'), |
|
| 227 | - 'general_warning_box_type' => self::get('general_warning_box_type'), |
|
| 228 | - 'general_warning_button_text' => self::get('general_warning_button_text'), |
|
| 229 | - 'general_warning_button_href' => self::get('general_warning_button_href'), |
|
| 230 | - 'general_warning_button_class' => self::get('general_warning_button_class'), |
|
| 231 | - 'accessmodal_editable' => self::get('accessmodal_editable'), |
|
| 232 | - 'accessmodal_default' => self::get('accessmodal_default'), |
|
| 233 | - 'clienttype_enabled' => self::get('clienttype_enabled'), |
|
| 234 | - 'clienttype_editable' => self::get('clienttype_editable'), |
|
| 235 | - 'clienttype_default' => self::get('clienttype_default'), |
|
| 236 | - 'muteonstart_editable' => self::get('muteonstart_editable'), |
|
| 237 | - 'muteonstart_default' => self::get('muteonstart_default'), |
|
| 238 | - 'disablecam_editable' => self::get('disablecam_editable'), |
|
| 239 | - 'disablecam_default' => self::get('disablecam_default'), |
|
| 240 | - 'disablemic_editable' => self::get('disablemic_editable'), |
|
| 241 | - 'disablemic_default' => self::get('disablemic_default'), |
|
| 242 | - 'disableprivatechat_editable' => self::get('disableprivatechat_editable'), |
|
| 243 | - 'disableprivatechat_default' => self::get('disableprivatechat_default'), |
|
| 244 | - 'disablepublicchat_editable' => self::get('disablepublicchat_editable'), |
|
| 245 | - 'disablepublicchat_default' => self::get('disablepublicchat_default'), |
|
| 246 | - 'disablenote_editable' => self::get('disablenote_editable'), |
|
| 247 | - 'disablenote_default' => self::get('disablenote_default'), |
|
| 248 | - 'hideuserlist_editable' => self::get('hideuserlist_editable'), |
|
| 249 | - 'hideuserlist_default' => self::get('hideuserlist_default'), |
|
| 250 | - 'lockedlayout_editable' => self::get('lockedlayout_editable'), |
|
| 251 | - 'lockedlayout_default' => self::get('lockedlayout_default'), |
|
| 252 | - 'lockonjoin_editable' => self::get('lockonjoin_editable'), |
|
| 253 | - 'lockonjoin_default' => self::get('lockonjoin_default'), |
|
| 254 | - 'lockonjoinconfigurable_editable' => self::get('lockonjoinconfigurable_editable'), |
|
| 255 | - 'lockonjoinconfigurable_default' => self::get('lockonjoinconfigurable_default'), |
|
| 256 | - 'welcome_default' => self::get('welcome_default'), |
|
| 257 | - ); |
|
| 196 | + 'version_major' => self::get_moodle_version_major(), |
|
| 197 | + 'voicebridge_editable' => self::get('voicebridge_editable'), |
|
| 198 | + 'importrecordings_enabled' => self::get('importrecordings_enabled'), |
|
| 199 | + 'importrecordings_from_deleted_enabled' => self::get('importrecordings_from_deleted_enabled'), |
|
| 200 | + 'waitformoderator_default' => self::get('waitformoderator_default'), |
|
| 201 | + 'waitformoderator_editable' => self::get('waitformoderator_editable'), |
|
| 202 | + 'userlimit_default' => self::get('userlimit_default'), |
|
| 203 | + 'userlimit_editable' => self::get('userlimit_editable'), |
|
| 204 | + 'preuploadpresentation_enabled' => self::get('preuploadpresentation_enabled'), |
|
| 205 | + 'sendnotifications_enabled' => self::get('sendnotifications_enabled'), |
|
| 206 | + 'recordings_enabled' => self::get('recordings_enabled'), |
|
| 207 | + 'meetingevents_enabled' => self::get('meetingevents_enabled'), |
|
| 208 | + 'recordings_html_default' => self::get('recordings_html_default'), |
|
| 209 | + 'recordings_html_editable' => self::get('recordings_html_editable'), |
|
| 210 | + 'recordings_deleted_default' => self::get('recordings_deleted_default'), |
|
| 211 | + 'recordings_deleted_editable' => self::get('recordings_deleted_editable'), |
|
| 212 | + 'recordings_imported_default' => self::get('recordings_imported_default'), |
|
| 213 | + 'recordings_imported_editable' => self::get('recordings_imported_editable'), |
|
| 214 | + 'recordings_preview_default' => self::get('recordings_preview_default'), |
|
| 215 | + 'recordings_preview_editable' => self::get('recordings_preview_editable'), |
|
| 216 | + 'recordings_validate_url' => self::get('recordings_validate_url'), |
|
| 217 | + 'recordings_proxy_playback' => self::get('recordings_proxy_playback'), |
|
| 218 | + 'recording_default' => self::get('recording_default'), |
|
| 219 | + 'recording_editable' => self::get('recording_editable'), |
|
| 220 | + 'recording_icons_enabled' => self::get('recording_icons_enabled'), |
|
| 221 | + 'recording_all_from_start_default' => self::get('recording_all_from_start_default'), |
|
| 222 | + 'recording_all_from_start_editable' => self::get('recording_all_from_start_editable'), |
|
| 223 | + 'recording_hide_button_default' => self::get('recording_hide_button_default'), |
|
| 224 | + 'recording_hide_button_editable' => self::get('recording_hide_button_editable'), |
|
| 225 | + 'recording_hide_button_activityonly' => self::get('recording_hide_button_activityonly'), |
|
| 226 | + 'general_warning_message' => self::get('general_warning_message'), |
|
| 227 | + 'general_warning_box_type' => self::get('general_warning_box_type'), |
|
| 228 | + 'general_warning_button_text' => self::get('general_warning_button_text'), |
|
| 229 | + 'general_warning_button_href' => self::get('general_warning_button_href'), |
|
| 230 | + 'general_warning_button_class' => self::get('general_warning_button_class'), |
|
| 231 | + 'accessmodal_editable' => self::get('accessmodal_editable'), |
|
| 232 | + 'accessmodal_default' => self::get('accessmodal_default'), |
|
| 233 | + 'clienttype_enabled' => self::get('clienttype_enabled'), |
|
| 234 | + 'clienttype_editable' => self::get('clienttype_editable'), |
|
| 235 | + 'clienttype_default' => self::get('clienttype_default'), |
|
| 236 | + 'muteonstart_editable' => self::get('muteonstart_editable'), |
|
| 237 | + 'muteonstart_default' => self::get('muteonstart_default'), |
|
| 238 | + 'disablecam_editable' => self::get('disablecam_editable'), |
|
| 239 | + 'disablecam_default' => self::get('disablecam_default'), |
|
| 240 | + 'disablemic_editable' => self::get('disablemic_editable'), |
|
| 241 | + 'disablemic_default' => self::get('disablemic_default'), |
|
| 242 | + 'disableprivatechat_editable' => self::get('disableprivatechat_editable'), |
|
| 243 | + 'disableprivatechat_default' => self::get('disableprivatechat_default'), |
|
| 244 | + 'disablepublicchat_editable' => self::get('disablepublicchat_editable'), |
|
| 245 | + 'disablepublicchat_default' => self::get('disablepublicchat_default'), |
|
| 246 | + 'disablenote_editable' => self::get('disablenote_editable'), |
|
| 247 | + 'disablenote_default' => self::get('disablenote_default'), |
|
| 248 | + 'hideuserlist_editable' => self::get('hideuserlist_editable'), |
|
| 249 | + 'hideuserlist_default' => self::get('hideuserlist_default'), |
|
| 250 | + 'lockedlayout_editable' => self::get('lockedlayout_editable'), |
|
| 251 | + 'lockedlayout_default' => self::get('lockedlayout_default'), |
|
| 252 | + 'lockonjoin_editable' => self::get('lockonjoin_editable'), |
|
| 253 | + 'lockonjoin_default' => self::get('lockonjoin_default'), |
|
| 254 | + 'lockonjoinconfigurable_editable' => self::get('lockonjoinconfigurable_editable'), |
|
| 255 | + 'lockonjoinconfigurable_default' => self::get('lockonjoinconfigurable_default'), |
|
| 256 | + 'welcome_default' => self::get('welcome_default'), |
|
| 257 | + ); |
|
| 258 | 258 | } |
| 259 | 259 | } |
@@ -150,8 +150,8 @@ discard block |
||
| 150 | 150 | $payload = null; |
| 151 | 151 | if (!is_null($pname) && !is_null($purl)) { |
| 152 | 152 | $method = 'POST'; |
| 153 | - $payload = "<?xml version='1.0' encoding='UTF-8'?><modules><module name='presentation'><document url='". |
|
| 154 | - $purl."' /></module></modules>"; |
|
| 153 | + $payload = "<?xml version='1.0' encoding='UTF-8'?><modules><module name='presentation'><document url='" . |
|
| 154 | + $purl . "' /></module></modules>"; |
|
| 155 | 155 | } |
| 156 | 156 | $xml = bigbluebuttonbn_wrap_xml_load_file($createmeetingurl, $method, $payload); |
| 157 | 157 | if ($xml) { |
@@ -195,7 +195,7 @@ discard block |
||
| 195 | 195 | } |
| 196 | 196 | if ($xml) { |
| 197 | 197 | // Either failure or success without meeting info. |
| 198 | - return (array) $xml; |
|
| 198 | + return (array)$xml; |
|
| 199 | 199 | } |
| 200 | 200 | // If the server is unreachable, then prompts the user of the necessary action. |
| 201 | 201 | return array('returncode' => 'FAILED', 'message' => 'unreachable', 'messageKey' => 'Server is unreachable'); |
@@ -288,7 +288,7 @@ discard block |
||
| 288 | 288 | foreach ($recordingxml->breakoutRooms->breakoutRoom as $breakoutroom) { |
| 289 | 289 | $url = \mod_bigbluebuttonbn\locallib\bigbluebutton::action_url( |
| 290 | 290 | 'getRecordings', |
| 291 | - ['recordID' => implode(',', (array) $breakoutroom)] |
|
| 291 | + ['recordID' => implode(',', (array)$breakoutroom)] |
|
| 292 | 292 | ); |
| 293 | 293 | $xml = bigbluebuttonbn_wrap_xml_load_file($url); |
| 294 | 294 | if ($xml && $xml->returncode == 'SUCCESS' && isset($xml->recordings)) { |
@@ -344,7 +344,7 @@ discard block |
||
| 344 | 344 | // Override imported flag with actual ID. |
| 345 | 345 | $recording['imported'] = $recordimported->id; |
| 346 | 346 | if (isset($recordimported->protected)) { |
| 347 | - $recording['protected'] = (string) $recordimported->protected; |
|
| 347 | + $recording['protected'] = (string)$recordimported->protected; |
|
| 348 | 348 | } |
| 349 | 349 | $recordsimportedarray[$recording['recordID']] = $recording; |
| 350 | 350 | } |
@@ -374,21 +374,21 @@ discard block |
||
| 374 | 374 | // Add formats. |
| 375 | 375 | $playbackarray = array(); |
| 376 | 376 | foreach ($recording->playback->format as $format) { |
| 377 | - $playbackarray[(string) $format->type] = array('type' => (string) $format->type, |
|
| 378 | - 'url' => trim((string) $format->url), 'length' => (string) $format->length); |
|
| 377 | + $playbackarray[(string)$format->type] = array('type' => (string)$format->type, |
|
| 378 | + 'url' => trim((string)$format->url), 'length' => (string)$format->length); |
|
| 379 | 379 | // Add preview per format when existing. |
| 380 | 380 | if ($format->preview) { |
| 381 | - $playbackarray[(string) $format->type]['preview'] = bigbluebuttonbn_get_recording_preview_images($format->preview); |
|
| 381 | + $playbackarray[(string)$format->type]['preview'] = bigbluebuttonbn_get_recording_preview_images($format->preview); |
|
| 382 | 382 | } |
| 383 | 383 | } |
| 384 | 384 | // Add the metadata to the recordings array. |
| 385 | 385 | $metadataarray = bigbluebuttonbn_get_recording_array_meta(get_object_vars($recording->metadata)); |
| 386 | - $recordingarray = array('recordID' => (string) $recording->recordID, |
|
| 387 | - 'meetingID' => (string) $recording->meetingID, 'meetingName' => (string) $recording->name, |
|
| 388 | - 'published' => (string) $recording->published, 'startTime' => (string) $recording->startTime, |
|
| 389 | - 'endTime' => (string) $recording->endTime, 'playbacks' => $playbackarray); |
|
| 386 | + $recordingarray = array('recordID' => (string)$recording->recordID, |
|
| 387 | + 'meetingID' => (string)$recording->meetingID, 'meetingName' => (string)$recording->name, |
|
| 388 | + 'published' => (string)$recording->published, 'startTime' => (string)$recording->startTime, |
|
| 389 | + 'endTime' => (string)$recording->endTime, 'playbacks' => $playbackarray); |
|
| 390 | 390 | if (isset($recording->protected)) { |
| 391 | - $recordingarray['protected'] = (string) $recording->protected; |
|
| 391 | + $recordingarray['protected'] = (string)$recording->protected; |
|
| 392 | 392 | } |
| 393 | 393 | return $recordingarray + $metadataarray; |
| 394 | 394 | } |
@@ -403,9 +403,9 @@ discard block |
||
| 403 | 403 | function bigbluebuttonbn_get_recording_preview_images($preview) { |
| 404 | 404 | $imagesarray = array(); |
| 405 | 405 | foreach ($preview->images->image as $image) { |
| 406 | - $imagearray = array('url' => trim((string) $image)); |
|
| 406 | + $imagearray = array('url' => trim((string)$image)); |
|
| 407 | 407 | foreach ($image->attributes() as $attkey => $attvalue) { |
| 408 | - $imagearray[$attkey] = (string) $attvalue; |
|
| 408 | + $imagearray[$attkey] = (string)$attvalue; |
|
| 409 | 409 | } |
| 410 | 410 | array_push($imagesarray, $imagearray); |
| 411 | 411 | } |
@@ -500,7 +500,7 @@ discard block |
||
| 500 | 500 | $ids = explode(',', $recordids); |
| 501 | 501 | foreach ($ids as $id) { |
| 502 | 502 | $xml = bigbluebuttonbn_wrap_xml_load_file( |
| 503 | - \mod_bigbluebuttonbn\locallib\bigbluebutton::action_url('updateRecordings', ['recordID' => $id] + (array) $params) |
|
| 503 | + \mod_bigbluebuttonbn\locallib\bigbluebutton::action_url('updateRecordings', ['recordID' => $id] + (array)$params) |
|
| 504 | 504 | ); |
| 505 | 505 | if ($xml && $xml->returncode != 'SUCCESS') { |
| 506 | 506 | return false; |
@@ -671,7 +671,7 @@ discard block |
||
| 671 | 671 | * @return array $users |
| 672 | 672 | */ |
| 673 | 673 | function bigbluebuttonbn_get_users(context $context = null) { |
| 674 | - $users = (array) get_enrolled_users($context, '', 0, 'u.*', null, 0, 0, true); |
|
| 674 | + $users = (array)get_enrolled_users($context, '', 0, 'u.*', null, 0, 0, true); |
|
| 675 | 675 | foreach ($users as $key => $value) { |
| 676 | 676 | $users[$key] = fullname($value); |
| 677 | 677 | } |
@@ -690,7 +690,7 @@ discard block |
||
| 690 | 690 | function bigbluebuttonbn_get_users_select(context_course $context, $bbactivity = null) { |
| 691 | 691 | // CONTRIB-7972, check the group of current user and course group mode. |
| 692 | 692 | $groups = null; |
| 693 | - $users = (array) get_enrolled_users($context, '', 0, 'u.*', null, 0, 0, true); |
|
| 693 | + $users = (array)get_enrolled_users($context, '', 0, 'u.*', null, 0, 0, true); |
|
| 694 | 694 | $course = get_course($context->instanceid); |
| 695 | 695 | $groupmode = groups_get_course_groupmode($course); |
| 696 | 696 | if ($bbactivity) { |
@@ -703,7 +703,7 @@ discard block |
||
| 703 | 703 | $groups = groups_get_all_groups($course->id, $USER->id); |
| 704 | 704 | $users = []; |
| 705 | 705 | foreach ($groups as $g) { |
| 706 | - $users += (array) get_enrolled_users($context, '', $g->id, 'u.*', null, 0, 0, true); |
|
| 706 | + $users += (array)get_enrolled_users($context, '', $g->id, 'u.*', null, 0, 0, true); |
|
| 707 | 707 | } |
| 708 | 708 | } |
| 709 | 709 | return array_map( |
@@ -725,12 +725,12 @@ discard block |
||
| 725 | 725 | global $CFG; |
| 726 | 726 | |
| 727 | 727 | if ($onlyviewableroles == true && $CFG->branch >= 35) { |
| 728 | - $roles = (array) get_viewable_roles($context); |
|
| 728 | + $roles = (array)get_viewable_roles($context); |
|
| 729 | 729 | foreach ($roles as $key => $value) { |
| 730 | 730 | $roles[$key] = $value; |
| 731 | 731 | } |
| 732 | 732 | } else { |
| 733 | - $roles = (array) role_get_names($context); |
|
| 733 | + $roles = (array)role_get_names($context); |
|
| 734 | 734 | foreach ($roles as $key => $value) { |
| 735 | 735 | $roles[$key] = $value->localname; |
| 736 | 736 | } |
@@ -751,12 +751,12 @@ discard block |
||
| 751 | 751 | global $CFG; |
| 752 | 752 | |
| 753 | 753 | if ($onlyviewableroles == true && $CFG->branch >= 35) { |
| 754 | - $roles = (array) get_viewable_roles($context); |
|
| 754 | + $roles = (array)get_viewable_roles($context); |
|
| 755 | 755 | foreach ($roles as $key => $value) { |
| 756 | 756 | $roles[$key] = array('id' => $key, 'name' => $value); |
| 757 | 757 | } |
| 758 | 758 | } else { |
| 759 | - $roles = (array) role_get_names($context); |
|
| 759 | + $roles = (array)role_get_names($context); |
|
| 760 | 760 | foreach ($roles as $key => $value) { |
| 761 | 761 | $roles[$key] = array('id' => $value->id, 'name' => $value->localname); |
| 762 | 762 | } |
@@ -773,9 +773,9 @@ discard block |
||
| 773 | 773 | * @return object $role |
| 774 | 774 | */ |
| 775 | 775 | function bigbluebuttonbn_get_role($id) { |
| 776 | - $roles = (array) role_get_names(); |
|
| 776 | + $roles = (array)role_get_names(); |
|
| 777 | 777 | if (is_numeric($id) && isset($roles[$id])) { |
| 778 | - return (object) $roles[$id]; |
|
| 778 | + return (object)$roles[$id]; |
|
| 779 | 779 | } |
| 780 | 780 | foreach ($roles as $role) { |
| 781 | 781 | if ($role->shortname == $id) { |
@@ -855,7 +855,7 @@ discard block |
||
| 855 | 855 | if (!empty($ownerid) && is_enrolled($context, $ownerid)) { |
| 856 | 856 | $participantlist[] = array( |
| 857 | 857 | 'selectiontype' => 'user', |
| 858 | - 'selectionid' => (string) $ownerid, |
|
| 858 | + 'selectionid' => (string)$ownerid, |
|
| 859 | 859 | 'role' => BIGBLUEBUTTONBN_ROLE_MODERATOR); |
| 860 | 860 | } |
| 861 | 861 | continue; |
@@ -1037,7 +1037,7 @@ discard block |
||
| 1037 | 1037 | $now = time(); |
| 1038 | 1038 | if ($closingtime > 0 && $now < $closingtime) { |
| 1039 | 1039 | $duration = ceil(($closingtime - $now) / 60); |
| 1040 | - $compensationtime = intval((int) \mod_bigbluebuttonbn\locallib\config::get('scheduled_duration_compensation')); |
|
| 1040 | + $compensationtime = intval((int)\mod_bigbluebuttonbn\locallib\config::get('scheduled_duration_compensation')); |
|
| 1041 | 1041 | $duration = intval($duration) + $compensationtime; |
| 1042 | 1042 | } |
| 1043 | 1043 | return $duration; |
@@ -1239,16 +1239,16 @@ discard block |
||
| 1239 | 1239 | * @return array |
| 1240 | 1240 | */ |
| 1241 | 1241 | function bigbluebuttonbn_get_meeting_info($meetingid, $updatecache = false) { |
| 1242 | - $cachettl = (int) \mod_bigbluebuttonbn\locallib\config::get('waitformoderator_cache_ttl'); |
|
| 1242 | + $cachettl = (int)\mod_bigbluebuttonbn\locallib\config::get('waitformoderator_cache_ttl'); |
|
| 1243 | 1243 | $cache = cache::make_from_params(cache_store::MODE_APPLICATION, 'mod_bigbluebuttonbn', 'meetings_cache'); |
| 1244 | 1244 | $result = $cache->get($meetingid); |
| 1245 | 1245 | $now = time(); |
| 1246 | 1246 | if (!$updatecache && !empty($result) && $now < ($result['creation_time'] + $cachettl)) { |
| 1247 | 1247 | // Use the value in the cache. |
| 1248 | - return (array) json_decode($result['meeting_info']); |
|
| 1248 | + return (array)json_decode($result['meeting_info']); |
|
| 1249 | 1249 | } |
| 1250 | 1250 | // Ping again and refresh the cache. |
| 1251 | - $meetinginfo = (array) bigbluebuttonbn_wrap_xml_load_file( |
|
| 1251 | + $meetinginfo = (array)bigbluebuttonbn_wrap_xml_load_file( |
|
| 1252 | 1252 | \mod_bigbluebuttonbn\locallib\bigbluebutton::action_url('getMeetingInfo', ['meetingID' => $meetingid]) |
| 1253 | 1253 | ); |
| 1254 | 1254 | $cache->set($meetingid, array('creation_time' => time(), 'meeting_info' => json_encode($meetinginfo))); |
@@ -1395,7 +1395,7 @@ discard block |
||
| 1395 | 1395 | */ |
| 1396 | 1396 | function bigbluebuttonbn_set_config_xml_array($meetingid, $configxml) { |
| 1397 | 1397 | $configxml = bigbluebuttonbn_set_config_xml($meetingid, $configxml); |
| 1398 | - $configxmlarray = (array) $configxml; |
|
| 1398 | + $configxmlarray = (array)$configxml; |
|
| 1399 | 1399 | if ($configxmlarray['returncode'] != 'SUCCESS') { |
| 1400 | 1400 | debugging('BigBlueButton was not able to set the custom config.xml file', DEBUG_DEVELOPER); |
| 1401 | 1401 | return ''; |
@@ -1448,7 +1448,7 @@ discard block |
||
| 1448 | 1448 | * @return boolean |
| 1449 | 1449 | */ |
| 1450 | 1450 | function bigbluebuttonbn_get_recording_data_row_editable($bbbsession) { |
| 1451 | - return ($bbbsession['managerecordings'] && ((double) $bbbsession['serverversion'] >= 1.0 || $bbbsession['bnserver'])); |
|
| 1451 | + return ($bbbsession['managerecordings'] && ((double)$bbbsession['serverversion'] >= 1.0 || $bbbsession['bnserver'])); |
|
| 1452 | 1452 | } |
| 1453 | 1453 | |
| 1454 | 1454 | /** |
@@ -1459,7 +1459,7 @@ discard block |
||
| 1459 | 1459 | * @return boolean |
| 1460 | 1460 | */ |
| 1461 | 1461 | function bigbluebuttonbn_get_recording_data_preview_enabled($bbbsession) { |
| 1462 | - return ((double) $bbbsession['serverversion'] >= 1.0 && $bbbsession['bigbluebuttonbn']->recordings_preview == '1'); |
|
| 1462 | + return ((double)$bbbsession['serverversion'] >= 1.0 && $bbbsession['bigbluebuttonbn']->recordings_preview == '1'); |
|
| 1463 | 1463 | } |
| 1464 | 1464 | |
| 1465 | 1465 | /** |
@@ -1893,7 +1893,7 @@ discard block |
||
| 1893 | 1893 | } |
| 1894 | 1894 | $id = 'recording-' . $target . '-' . $recording['recordID']; |
| 1895 | 1895 | $onclick = 'M.mod_bigbluebuttonbn.recordings.recording' . ucfirst($data['action']) . '(this); return false;'; |
| 1896 | - if ((boolean) \mod_bigbluebuttonbn\locallib\config::get('recording_icons_enabled')) { |
|
| 1896 | + if ((boolean)\mod_bigbluebuttonbn\locallib\config::get('recording_icons_enabled')) { |
|
| 1897 | 1897 | // With icon for $manageaction. |
| 1898 | 1898 | $iconattributes = array('id' => $id, 'class' => 'iconsmall'); |
| 1899 | 1899 | $linkattributes = array( |
@@ -2156,7 +2156,7 @@ discard block |
||
| 2156 | 2156 | // Enqueue it. |
| 2157 | 2157 | \core\task\manager::queue_adhoc_task($task); |
| 2158 | 2158 | } catch (Exception $e) { |
| 2159 | - mtrace("Error while enqueuing completion_update_state task. " . (string) $e); |
|
| 2159 | + mtrace("Error while enqueuing completion_update_state task. " . (string)$e); |
|
| 2160 | 2160 | } |
| 2161 | 2161 | } |
| 2162 | 2162 | |
@@ -2170,7 +2170,7 @@ discard block |
||
| 2170 | 2170 | */ |
| 2171 | 2171 | function bigbluebuttonbn_completion_update_state($bigbluebuttonbn, $userid) { |
| 2172 | 2172 | global $CFG; |
| 2173 | - require_once($CFG->libdir.'/completionlib.php'); |
|
| 2173 | + require_once($CFG->libdir . '/completionlib.php'); |
|
| 2174 | 2174 | list($course, $cm) = get_course_and_cm_from_instance($bigbluebuttonbn, 'bigbluebuttonbn'); |
| 2175 | 2175 | $completion = new completion_info($course); |
| 2176 | 2176 | if (!$completion->is_enabled($cm)) { |
@@ -2595,7 +2595,7 @@ discard block |
||
| 2595 | 2595 | */ |
| 2596 | 2596 | function bigbluebuttonbn_format_activity_time($time) { |
| 2597 | 2597 | global $CFG; |
| 2598 | - require_once($CFG->dirroot.'/calendar/lib.php'); |
|
| 2598 | + require_once($CFG->dirroot . '/calendar/lib.php'); |
|
| 2599 | 2599 | $activitytime = ''; |
| 2600 | 2600 | if ($time) { |
| 2601 | 2601 | $activitytime = calendar_day_representation($time) . ' ' . |
@@ -2693,7 +2693,7 @@ discard block |
||
| 2693 | 2693 | */ |
| 2694 | 2694 | function bigbluebuttonbn_settings_general(&$renderer) { |
| 2695 | 2695 | // Configuration for BigBlueButton. |
| 2696 | - if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_general_shown()) { |
|
| 2696 | + if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_general_shown()) { |
|
| 2697 | 2697 | $renderer->render_group_header('general'); |
| 2698 | 2698 | $renderer->render_group_element( |
| 2699 | 2699 | 'server_url', |
@@ -2715,7 +2715,7 @@ discard block |
||
| 2715 | 2715 | */ |
| 2716 | 2716 | function bigbluebuttonbn_settings_record(&$renderer) { |
| 2717 | 2717 | // Configuration for 'recording' feature. |
| 2718 | - if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_record_meeting_shown()) { |
|
| 2718 | + if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_record_meeting_shown()) { |
|
| 2719 | 2719 | $renderer->render_group_header('recording'); |
| 2720 | 2720 | $renderer->render_group_element( |
| 2721 | 2721 | 'recording_default', |
@@ -2763,7 +2763,7 @@ discard block |
||
| 2763 | 2763 | */ |
| 2764 | 2764 | function bigbluebuttonbn_settings_importrecordings(&$renderer) { |
| 2765 | 2765 | // Configuration for 'import recordings' feature. |
| 2766 | - if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_import_recordings_shown()) { |
|
| 2766 | + if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_import_recordings_shown()) { |
|
| 2767 | 2767 | $renderer->render_group_header('importrecordings'); |
| 2768 | 2768 | $renderer->render_group_element( |
| 2769 | 2769 | 'importrecordings_enabled', |
@@ -2785,7 +2785,7 @@ discard block |
||
| 2785 | 2785 | */ |
| 2786 | 2786 | function bigbluebuttonbn_settings_showrecordings(&$renderer) { |
| 2787 | 2787 | // Configuration for 'show recordings' feature. |
| 2788 | - if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_show_recordings_shown()) { |
|
| 2788 | + if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_show_recordings_shown()) { |
|
| 2789 | 2789 | $renderer->render_group_header('recordings'); |
| 2790 | 2790 | $renderer->render_group_element( |
| 2791 | 2791 | 'recordings_html_default', |
@@ -2843,7 +2843,7 @@ discard block |
||
| 2843 | 2843 | */ |
| 2844 | 2844 | function bigbluebuttonbn_settings_waitmoderator(&$renderer) { |
| 2845 | 2845 | // Configuration for wait for moderator feature. |
| 2846 | - if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_wait_moderator_shown()) { |
|
| 2846 | + if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_wait_moderator_shown()) { |
|
| 2847 | 2847 | $renderer->render_group_header('waitformoderator'); |
| 2848 | 2848 | $renderer->render_group_element( |
| 2849 | 2849 | 'waitformoderator_default', |
@@ -2873,7 +2873,7 @@ discard block |
||
| 2873 | 2873 | */ |
| 2874 | 2874 | function bigbluebuttonbn_settings_voicebridge(&$renderer) { |
| 2875 | 2875 | // Configuration for "static voice bridge" feature. |
| 2876 | - if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_static_voice_bridge_shown()) { |
|
| 2876 | + if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_static_voice_bridge_shown()) { |
|
| 2877 | 2877 | $renderer->render_group_header('voicebridge'); |
| 2878 | 2878 | $renderer->render_group_element( |
| 2879 | 2879 | 'voicebridge_editable', |
@@ -2891,7 +2891,7 @@ discard block |
||
| 2891 | 2891 | */ |
| 2892 | 2892 | function bigbluebuttonbn_settings_preupload(&$renderer) { |
| 2893 | 2893 | // Configuration for "preupload presentation" feature. |
| 2894 | - if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_preupload_presentation_shown()) { |
|
| 2894 | + if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_preupload_presentation_shown()) { |
|
| 2895 | 2895 | // This feature only works if curl is installed. |
| 2896 | 2896 | $preuploaddescripion = get_string('config_preuploadpresentation_description', 'bigbluebuttonbn'); |
| 2897 | 2897 | if (!extension_loaded('curl')) { |
@@ -2919,7 +2919,7 @@ discard block |
||
| 2919 | 2919 | */ |
| 2920 | 2920 | function bigbluebuttonbn_settings_preupload_manage_default_file(&$renderer) { |
| 2921 | 2921 | // Configuration for "preupload presentation" feature. |
| 2922 | - if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_preupload_presentation_shown()) { |
|
| 2922 | + if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_preupload_presentation_shown()) { |
|
| 2923 | 2923 | if (extension_loaded('curl')) { |
| 2924 | 2924 | // This feature only works if curl is installed. |
| 2925 | 2925 | $renderer->render_filemanager_default_file_presentation("presentation_default"); |
@@ -2936,7 +2936,7 @@ discard block |
||
| 2936 | 2936 | */ |
| 2937 | 2937 | function bigbluebuttonbn_settings_userlimit(&$renderer) { |
| 2938 | 2938 | // Configuration for "user limit" feature. |
| 2939 | - if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_user_limit_shown()) { |
|
| 2939 | + if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_user_limit_shown()) { |
|
| 2940 | 2940 | $renderer->render_group_header('userlimit'); |
| 2941 | 2941 | $renderer->render_group_element( |
| 2942 | 2942 | 'userlimit_default', |
@@ -2958,7 +2958,7 @@ discard block |
||
| 2958 | 2958 | */ |
| 2959 | 2959 | function bigbluebuttonbn_settings_accessmodal(&$renderer) { |
| 2960 | 2960 | // Configuration for "accessmodal" feature. |
| 2961 | - if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_accessmodal_shown()) { |
|
| 2961 | + if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_accessmodal_shown()) { |
|
| 2962 | 2962 | $renderer->render_group_header('accessmodal'); |
| 2963 | 2963 | |
| 2964 | 2964 | $renderer->render_group_element( |
@@ -2981,7 +2981,7 @@ discard block |
||
| 2981 | 2981 | */ |
| 2982 | 2982 | function bigbluebuttonbn_settings_duration(&$renderer) { |
| 2983 | 2983 | // Configuration for "scheduled duration" feature. |
| 2984 | - if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_scheduled_duration_shown()) { |
|
| 2984 | + if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_scheduled_duration_shown()) { |
|
| 2985 | 2985 | $renderer->render_group_header('scheduled'); |
| 2986 | 2986 | $renderer->render_group_element( |
| 2987 | 2987 | 'scheduled_duration_enabled', |
@@ -3007,7 +3007,7 @@ discard block |
||
| 3007 | 3007 | */ |
| 3008 | 3008 | function bigbluebuttonbn_settings_participants(&$renderer) { |
| 3009 | 3009 | // Configuration for defining the default role/user that will be moderator on new activities. |
| 3010 | - if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_moderator_default_shown()) { |
|
| 3010 | + if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_moderator_default_shown()) { |
|
| 3011 | 3011 | $renderer->render_group_header('participant'); |
| 3012 | 3012 | // UI for 'participants' feature. |
| 3013 | 3013 | $roles = bigbluebuttonbn_get_roles(null, false); |
@@ -3032,7 +3032,7 @@ discard block |
||
| 3032 | 3032 | */ |
| 3033 | 3033 | function bigbluebuttonbn_settings_notifications(&$renderer) { |
| 3034 | 3034 | // Configuration for "send notifications" feature. |
| 3035 | - if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_send_notifications_shown()) { |
|
| 3035 | + if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_send_notifications_shown()) { |
|
| 3036 | 3036 | $renderer->render_group_header('sendnotifications'); |
| 3037 | 3037 | $renderer->render_group_element( |
| 3038 | 3038 | 'sendnotifications_enabled', |
@@ -3050,14 +3050,14 @@ discard block |
||
| 3050 | 3050 | */ |
| 3051 | 3051 | function bigbluebuttonbn_settings_clienttype(&$renderer) { |
| 3052 | 3052 | // Configuration for "clienttype" feature. |
| 3053 | - if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_clienttype_shown()) { |
|
| 3053 | + if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_clienttype_shown()) { |
|
| 3054 | 3054 | $renderer->render_group_header('clienttype'); |
| 3055 | 3055 | $renderer->render_group_element( |
| 3056 | 3056 | 'clienttype_editable', |
| 3057 | 3057 | $renderer->render_group_element_checkbox('clienttype_editable', 0) |
| 3058 | 3058 | ); |
| 3059 | 3059 | // Web Client default. |
| 3060 | - $default = intval((int) \mod_bigbluebuttonbn\locallib\config::get('clienttype_default')); |
|
| 3060 | + $default = intval((int)\mod_bigbluebuttonbn\locallib\config::get('clienttype_default')); |
|
| 3061 | 3061 | $choices = array(BIGBLUEBUTTON_CLIENTTYPE_FLASH => get_string('mod_form_block_clienttype_flash', 'bigbluebuttonbn'), |
| 3062 | 3062 | BIGBLUEBUTTON_CLIENTTYPE_HTML5 => get_string('mod_form_block_clienttype_html5', 'bigbluebuttonbn')); |
| 3063 | 3063 | $renderer->render_group_element( |
@@ -3080,7 +3080,7 @@ discard block |
||
| 3080 | 3080 | */ |
| 3081 | 3081 | function bigbluebuttonbn_settings_muteonstart(&$renderer) { |
| 3082 | 3082 | // Configuration for BigBlueButton. |
| 3083 | - if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_muteonstart_shown()) { |
|
| 3083 | + if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_muteonstart_shown()) { |
|
| 3084 | 3084 | $renderer->render_group_header('muteonstart'); |
| 3085 | 3085 | $renderer->render_group_element( |
| 3086 | 3086 | 'muteonstart_default', |
@@ -3123,7 +3123,7 @@ discard block |
||
| 3123 | 3123 | */ |
| 3124 | 3124 | function bigbluebuttonbn_settings_disablecam(&$renderer) { |
| 3125 | 3125 | // Configuration for BigBlueButton. |
| 3126 | - if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_disablecam_shown()) { |
|
| 3126 | + if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_disablecam_shown()) { |
|
| 3127 | 3127 | $renderer->render_group_element( |
| 3128 | 3128 | 'disablecam_default', |
| 3129 | 3129 | $renderer->render_group_element_checkbox('disablecam_default', 0) |
@@ -3144,7 +3144,7 @@ discard block |
||
| 3144 | 3144 | */ |
| 3145 | 3145 | function bigbluebuttonbn_settings_disablemic(&$renderer) { |
| 3146 | 3146 | // Configuration for BigBlueButton. |
| 3147 | - if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_disablemic_shown()) { |
|
| 3147 | + if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_disablemic_shown()) { |
|
| 3148 | 3148 | $renderer->render_group_element( |
| 3149 | 3149 | 'disablemic_default', |
| 3150 | 3150 | $renderer->render_group_element_checkbox('disablemic_default', 0) |
@@ -3165,7 +3165,7 @@ discard block |
||
| 3165 | 3165 | */ |
| 3166 | 3166 | function bigbluebuttonbn_settings_disableprivatechat(&$renderer) { |
| 3167 | 3167 | // Configuration for BigBlueButton. |
| 3168 | - if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_disableprivatechat_shown()) { |
|
| 3168 | + if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_disableprivatechat_shown()) { |
|
| 3169 | 3169 | $renderer->render_group_element( |
| 3170 | 3170 | 'disableprivatechat_default', |
| 3171 | 3171 | $renderer->render_group_element_checkbox('disableprivatechat_default', 0) |
@@ -3186,7 +3186,7 @@ discard block |
||
| 3186 | 3186 | */ |
| 3187 | 3187 | function bigbluebuttonbn_settings_disablepublicchat(&$renderer) { |
| 3188 | 3188 | // Configuration for BigBlueButton. |
| 3189 | - if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_disablepublicchat_shown()) { |
|
| 3189 | + if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_disablepublicchat_shown()) { |
|
| 3190 | 3190 | $renderer->render_group_element( |
| 3191 | 3191 | 'disablepublicchat_default', |
| 3192 | 3192 | $renderer->render_group_element_checkbox('disablepublicchat_default', 0) |
@@ -3207,7 +3207,7 @@ discard block |
||
| 3207 | 3207 | */ |
| 3208 | 3208 | function bigbluebuttonbn_settings_disablenote(&$renderer) { |
| 3209 | 3209 | // Configuration for BigBlueButton. |
| 3210 | - if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_disablenote_shown()) { |
|
| 3210 | + if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_disablenote_shown()) { |
|
| 3211 | 3211 | $renderer->render_group_element( |
| 3212 | 3212 | 'disablenote_default', |
| 3213 | 3213 | $renderer->render_group_element_checkbox('disablenote_default', 0) |
@@ -3228,7 +3228,7 @@ discard block |
||
| 3228 | 3228 | */ |
| 3229 | 3229 | function bigbluebuttonbn_settings_hideuserlist(&$renderer) { |
| 3230 | 3230 | // Configuration for BigBlueButton. |
| 3231 | - if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_hideuserlist_shown()) { |
|
| 3231 | + if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_hideuserlist_shown()) { |
|
| 3232 | 3232 | $renderer->render_group_element( |
| 3233 | 3233 | 'hideuserlist_default', |
| 3234 | 3234 | $renderer->render_group_element_checkbox('hideuserlist_default', 0) |
@@ -3249,7 +3249,7 @@ discard block |
||
| 3249 | 3249 | */ |
| 3250 | 3250 | function bigbluebuttonbn_settings_lockedlayout(&$renderer) { |
| 3251 | 3251 | // Configuration for BigBlueButton. |
| 3252 | - if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_lockedlayout_shown()) { |
|
| 3252 | + if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_lockedlayout_shown()) { |
|
| 3253 | 3253 | $renderer->render_group_element( |
| 3254 | 3254 | 'lockedlayout_default', |
| 3255 | 3255 | $renderer->render_group_element_checkbox('lockedlayout_default', 0) |
@@ -3270,7 +3270,7 @@ discard block |
||
| 3270 | 3270 | */ |
| 3271 | 3271 | function bigbluebuttonbn_settings_lockonjoin(&$renderer) { |
| 3272 | 3272 | // Configuration for BigBlueButton. |
| 3273 | - if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_lockonjoin_shown()) { |
|
| 3273 | + if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_lockonjoin_shown()) { |
|
| 3274 | 3274 | $renderer->render_group_element( |
| 3275 | 3275 | 'lockonjoin_default', |
| 3276 | 3276 | $renderer->render_group_element_checkbox('lockonjoin_default', 0) |
@@ -3291,7 +3291,7 @@ discard block |
||
| 3291 | 3291 | */ |
| 3292 | 3292 | function bigbluebuttonbn_settings_lockonjoinconfigurable(&$renderer) { |
| 3293 | 3293 | // Configuration for BigBlueButton. |
| 3294 | - if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_lockonjoinconfigurable_shown()) { |
|
| 3294 | + if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_lockonjoinconfigurable_shown()) { |
|
| 3295 | 3295 | $renderer->render_group_element( |
| 3296 | 3296 | 'lockonjoinconfigurable_default', |
| 3297 | 3297 | $renderer->render_group_element_checkbox('lockonjoinconfigurable_default', 0) |
@@ -3327,7 +3327,7 @@ discard block |
||
| 3327 | 3327 | */ |
| 3328 | 3328 | function bigbluebuttonbn_settings_extended(&$renderer) { |
| 3329 | 3329 | // Configuration for extended capabilities. |
| 3330 | - if (!(boolean) \mod_bigbluebuttonbn\settings\validator::section_settings_extended_shown()) { |
|
| 3330 | + if (!(boolean)\mod_bigbluebuttonbn\settings\validator::section_settings_extended_shown()) { |
|
| 3331 | 3331 | return; |
| 3332 | 3332 | } |
| 3333 | 3333 | $renderer->render_group_header('extended_capabilities'); |
@@ -3365,7 +3365,7 @@ discard block |
||
| 3365 | 3365 | global $DB; |
| 3366 | 3366 | do { |
| 3367 | 3367 | $encodedseed = sha1(bigbluebuttonbn_random_password(12)); |
| 3368 | - $meetingid = (string) $DB->get_field('bigbluebuttonbn', 'meetingid', array('meetingid' => $encodedseed)); |
|
| 3368 | + $meetingid = (string)$DB->get_field('bigbluebuttonbn', 'meetingid', array('meetingid' => $encodedseed)); |
|
| 3369 | 3369 | } while ($meetingid == $encodedseed); |
| 3370 | 3370 | return $encodedseed; |
| 3371 | 3371 | } |
@@ -3578,7 +3578,7 @@ discard block |
||
| 3578 | 3578 | function bigbluebuttonbn_instance_ownerid($bigbluebuttonbn) { |
| 3579 | 3579 | global $DB; |
| 3580 | 3580 | $filters = array('bigbluebuttonbnid' => $bigbluebuttonbn->id, 'log' => 'Add'); |
| 3581 | - $ownerid = (integer) $DB->get_field('bigbluebuttonbn_logs', 'userid', $filters); |
|
| 3581 | + $ownerid = (integer)$DB->get_field('bigbluebuttonbn_logs', 'userid', $filters); |
|
| 3582 | 3582 | return $ownerid; |
| 3583 | 3583 | } |
| 3584 | 3584 | |
@@ -3621,8 +3621,8 @@ discard block |
||
| 3621 | 3621 | $bbbsession['meetingname'] = $bbbsession['bigbluebuttonbn']->name; |
| 3622 | 3622 | $bbbsession['meetingdescription'] = $bbbsession['bigbluebuttonbn']->intro; |
| 3623 | 3623 | // Extra data for setting up the Meeting. |
| 3624 | - $bbbsession['userlimit'] = intval((int) \mod_bigbluebuttonbn\locallib\config::get('userlimit_default')); |
|
| 3625 | - if ((boolean) \mod_bigbluebuttonbn\locallib\config::get('userlimit_editable')) { |
|
| 3624 | + $bbbsession['userlimit'] = intval((int)\mod_bigbluebuttonbn\locallib\config::get('userlimit_default')); |
|
| 3625 | + if ((boolean)\mod_bigbluebuttonbn\locallib\config::get('userlimit_editable')) { |
|
| 3626 | 3626 | $bbbsession['userlimit'] = intval($bbbsession['bigbluebuttonbn']->userlimit); |
| 3627 | 3627 | } |
| 3628 | 3628 | $bbbsession['voicebridge'] = $bbbsession['bigbluebuttonbn']->voicebridge; |
@@ -3788,7 +3788,7 @@ discard block |
||
| 3788 | 3788 | 'bbb-recording-tags' => bigbluebuttonbn_get_tags($bbbsession['cm']->id), // Same as $id. |
| 3789 | 3789 | ]; |
| 3790 | 3790 | // Special metadata for recording processing. |
| 3791 | - if ((boolean) \mod_bigbluebuttonbn\locallib\config::get('recordingstatus_enabled')) { |
|
| 3791 | + if ((boolean)\mod_bigbluebuttonbn\locallib\config::get('recordingstatus_enabled')) { |
|
| 3792 | 3792 | $metadata["bn-recording-status"] = json_encode( |
| 3793 | 3793 | array( |
| 3794 | 3794 | 'email' => array('"' . fullname($USER) . '" <' . $USER->email . '>'), |
@@ -3796,10 +3796,10 @@ discard block |
||
| 3796 | 3796 | ) |
| 3797 | 3797 | ); |
| 3798 | 3798 | } |
| 3799 | - if ((boolean) \mod_bigbluebuttonbn\locallib\config::get('recordingready_enabled')) { |
|
| 3799 | + if ((boolean)\mod_bigbluebuttonbn\locallib\config::get('recordingready_enabled')) { |
|
| 3800 | 3800 | $metadata['bn-recording-ready-url'] = $bbbsession['recordingReadyURL']; |
| 3801 | 3801 | } |
| 3802 | - if ((boolean) \mod_bigbluebuttonbn\locallib\config::get('meetingevents_enabled')) { |
|
| 3802 | + if ((boolean)\mod_bigbluebuttonbn\locallib\config::get('meetingevents_enabled')) { |
|
| 3803 | 3803 | $metadata['analytics-callback-url'] = $bbbsession['meetingEventsURL']; |
| 3804 | 3804 | } |
| 3805 | 3805 | return $metadata; |
@@ -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 | } |
@@ -138,7 +138,7 @@ discard block |
||
| 138 | 138 | $recordingsdisabled = get_string('view_message_recordings_disabled', 'bigbluebuttonbn'); |
| 139 | 139 | $output .= bigbluebuttonbn_render_warning($recordingsdisabled, 'danger'); |
| 140 | 140 | } |
| 141 | - echo $output.html_writer::empty_tag('br').html_writer::empty_tag('br').html_writer::empty_tag('br'); |
|
| 141 | + echo $output . html_writer::empty_tag('br') . html_writer::empty_tag('br') . html_writer::empty_tag('br'); |
|
| 142 | 142 | $PAGE->requires->yui_module('moodle-mod_bigbluebuttonbn-broker', 'M.mod_bigbluebuttonbn.broker.init', array($jsvars)); |
| 143 | 143 | } |
| 144 | 144 | |
@@ -207,12 +207,12 @@ discard block |
||
| 207 | 207 | // JavaScript variables for room. |
| 208 | 208 | $openingtime = ''; |
| 209 | 209 | if ($bbbsession['openingtime']) { |
| 210 | - $openingtime = get_string('mod_form_field_openingtime', 'bigbluebuttonbn').': '. |
|
| 210 | + $openingtime = get_string('mod_form_field_openingtime', 'bigbluebuttonbn') . ': ' . |
|
| 211 | 211 | userdate($bbbsession['openingtime']); |
| 212 | 212 | } |
| 213 | 213 | $closingtime = ''; |
| 214 | 214 | if ($bbbsession['closingtime']) { |
| 215 | - $closingtime = get_string('mod_form_field_closingtime', 'bigbluebuttonbn').': '. |
|
| 215 | + $closingtime = get_string('mod_form_field_closingtime', 'bigbluebuttonbn') . ': ' . |
|
| 216 | 216 | userdate($bbbsession['closingtime']); |
| 217 | 217 | } |
| 218 | 218 | |
@@ -231,7 +231,7 @@ discard block |
||
| 231 | 231 | |
| 232 | 232 | // Setup access policy modal window. |
| 233 | 233 | // If global editing is disabled, it is always the global version. |
| 234 | - if ((int) $CFG->bigbluebuttonbn_accessmodal_editable) { |
|
| 234 | + if ((int)$CFG->bigbluebuttonbn_accessmodal_editable) { |
|
| 235 | 235 | $policytext = format_text($bbbsession['bigbluebuttonbn']->accesspolicy ?? ''); |
| 236 | 236 | // If empty here, try the default policy. |
| 237 | 237 | if (empty(strip_tags($policytext))) { |
@@ -256,7 +256,7 @@ discard block |
||
| 256 | 256 | |
| 257 | 257 | // Action button box. |
| 258 | 258 | $output .= $OUTPUT->box_start('generalbox boxaligncenter', 'bigbluebuttonbn_view_action_button_box'); |
| 259 | - $output .= '<br><br><span id="join_button"></span> <span id="end_button"></span>'."\n"; |
|
| 259 | + $output .= '<br><br><span id="join_button"></span> <span id="end_button"></span>' . "\n"; |
|
| 260 | 260 | $output .= $OUTPUT->box_end(); |
| 261 | 261 | if ($activity == 'ended') { |
| 262 | 262 | $output .= bigbluebuttonbn_view_ended($bbbsession); |
@@ -289,7 +289,7 @@ discard block |
||
| 289 | 289 | // If there are meetings with recordings load the data to the table. |
| 290 | 290 | if ($bbbsession['bigbluebuttonbn']->recordings_html) { |
| 291 | 291 | // Render a plain html table. |
| 292 | - return bigbluebuttonbn_output_recording_table($bbbsession, $recordings)."\n"; |
|
| 292 | + return bigbluebuttonbn_output_recording_table($bbbsession, $recordings) . "\n"; |
|
| 293 | 293 | } |
| 294 | 294 | // JavaScript variables for recordings with YUI. |
| 295 | 295 | $jsvars += array( |
@@ -325,8 +325,8 @@ discard block |
||
| 325 | 325 | array('type' => 'button', |
| 326 | 326 | 'value' => get_string('view_recording_button_import', 'bigbluebuttonbn'), |
| 327 | 327 | 'class' => 'btn btn-secondary', |
| 328 | - 'onclick' => 'window.location=\''.$CFG->wwwroot.'/mod/bigbluebuttonbn/import_view.php?bn='. |
|
| 329 | - $bbbsession['bigbluebuttonbn']->id.'\'')); |
|
| 328 | + 'onclick' => 'window.location=\'' . $CFG->wwwroot . '/mod/bigbluebuttonbn/import_view.php?bn=' . |
|
| 329 | + $bbbsession['bigbluebuttonbn']->id . '\'')); |
|
| 330 | 330 | $output = html_writer::empty_tag('br'); |
| 331 | 331 | $output .= html_writer::tag('span', $button, array('id' => 'import_recording_links_button')); |
| 332 | 332 | $output .= html_writer::tag('span', '', array('id' => 'import_recording_links_table')); |
@@ -345,10 +345,10 @@ discard block |
||
| 345 | 345 | if (!is_null($bbbsession['presentation']['url'])) { |
| 346 | 346 | $attributes = array('title' => $bbbsession['presentation']['name']); |
| 347 | 347 | $icon = new pix_icon($bbbsession['presentation']['icon'], $bbbsession['presentation']['mimetype_description']); |
| 348 | - return '<h4>'.get_string('view_section_title_presentation', 'bigbluebuttonbn').'</h4>'. |
|
| 349 | - $OUTPUT->action_icon($bbbsession['presentation']['url'], $icon, null, array(), false). |
|
| 348 | + return '<h4>' . get_string('view_section_title_presentation', 'bigbluebuttonbn') . '</h4>' . |
|
| 349 | + $OUTPUT->action_icon($bbbsession['presentation']['url'], $icon, null, array(), false) . |
|
| 350 | 350 | $OUTPUT->action_link($bbbsession['presentation']['url'], |
| 351 | - $bbbsession['presentation']['name'], null, $attributes).'<br><br>'; |
|
| 351 | + $bbbsession['presentation']['name'], null, $attributes) . '<br><br>'; |
|
| 352 | 352 | } |
| 353 | 353 | return ''; |
| 354 | 354 | } |