@@ -216,8 +216,8 @@ discard block |
||
| 216 | 216 | $this->bigbluebuttonbn_mform_add_element($mform, $field['type'], $field['name'], $field['data_type'], |
| 217 | 217 | $field['description_key'], 0, ['maxlength' => 4, 'size' => 6], |
| 218 | 218 | ['message' => get_string('mod_form_field_voicebridge_format_error', 'bigbluebuttonbn'), |
| 219 | - 'type' => 'numeric', 'rule' => '####', 'validator' => 'server'] |
|
| 220 | - ); |
|
| 219 | + 'type' => 'numeric', 'rule' => '####', 'validator' => 'server'] |
|
| 220 | + ); |
|
| 221 | 221 | } else { |
| 222 | 222 | $this->bigbluebuttonbn_mform_add_element($mform, $field['type'], $field['name'], $field['data_type'], |
| 223 | 223 | $field['description_key'], 0, ['maxlength' => 4, 'size' => 6]); |
@@ -255,7 +255,7 @@ discard block |
||
| 255 | 255 | */ |
| 256 | 256 | private function bigbluebuttonbn_mform_add_block_room_recordings(&$mform, $cfg) { |
| 257 | 257 | $field = ['type' => 'hidden', 'name' => 'recordings_html', 'data_type' => PARAM_INT, |
| 258 | - 'description_key' => null]; |
|
| 258 | + 'description_key' => null]; |
|
| 259 | 259 | if ($cfg['recordings_html_editable']) { |
| 260 | 260 | $field['type'] = 'checkbox'; |
| 261 | 261 | $field['description_key'] = 'mod_form_field_recordings_html'; |
@@ -263,7 +263,7 @@ discard block |
||
| 263 | 263 | $this->bigbluebuttonbn_mform_add_element($mform, $field['type'], $field['name'], $field['data_type'], |
| 264 | 264 | $field['description_key'], $cfg['recordings_html_default']); |
| 265 | 265 | $field = ['type' => 'hidden', 'name' => 'recordings_deleted', 'data_type' => PARAM_INT, |
| 266 | - 'description_key' => null]; |
|
| 266 | + 'description_key' => null]; |
|
| 267 | 267 | if ($cfg['recordings_deleted_editable']) { |
| 268 | 268 | $field['type'] = 'checkbox'; |
| 269 | 269 | $field['description_key'] = 'mod_form_field_recordings_deleted'; |
@@ -271,7 +271,7 @@ discard block |
||
| 271 | 271 | $this->bigbluebuttonbn_mform_add_element($mform, $field['type'], $field['name'], $field['data_type'], |
| 272 | 272 | $field['description_key'], $cfg['recordings_deleted_default']); |
| 273 | 273 | $field = ['type' => 'hidden', 'name' => 'recordings_imported', 'data_type' => PARAM_INT, |
| 274 | - 'description_key' => null]; |
|
| 274 | + 'description_key' => null]; |
|
| 275 | 275 | if ($cfg['importrecordings_enabled'] && $cfg['recordings_imported_editable']) { |
| 276 | 276 | $field['type'] = 'checkbox'; |
| 277 | 277 | $field['description_key'] = 'mod_form_field_recordings_imported'; |
@@ -279,7 +279,7 @@ discard block |
||
| 279 | 279 | $this->bigbluebuttonbn_mform_add_element($mform, $field['type'], $field['name'], $field['data_type'], |
| 280 | 280 | $field['description_key'], $cfg['recordings_imported_default']); |
| 281 | 281 | $field = ['type' => 'hidden', 'name' => 'recordings_preview', 'data_type' => PARAM_INT, |
| 282 | - 'description_key' => null]; |
|
| 282 | + 'description_key' => null]; |
|
| 283 | 283 | if ($cfg['recordings_preview_editable']) { |
| 284 | 284 | $field['type'] = 'checkbox'; |
| 285 | 285 | $field['description_key'] = 'mod_form_field_recordings_preview'; |
@@ -350,7 +350,7 @@ discard block |
||
| 350 | 350 | $htmlselectiontype = html_writer::select($participantselection['type_options'], |
| 351 | 351 | 'bigbluebuttonbn_participant_selection_type', $participantselection['type_selected'], array(), |
| 352 | 352 | array('id' => 'bigbluebuttonbn_participant_selection_type', |
| 353 | - 'onchange' => 'M.mod_bigbluebuttonbn.modform.participantSelectionSet(); return 0;')); |
|
| 353 | + 'onchange' => 'M.mod_bigbluebuttonbn.modform.participantSelectionSet(); return 0;')); |
|
| 354 | 354 | $htmlselectionoptions = html_writer::select($participantselection['options'], 'bigbluebuttonbn_participant_selection', |
| 355 | 355 | $participantselection['selected'], array(), |
| 356 | 356 | array('id' => 'bigbluebuttonbn_participant_selection', 'disabled' => 'disabled')); |
@@ -358,7 +358,7 @@ discard block |
||
| 358 | 358 | 'type' => 'button', 'class' => 'btn btn-secondary', |
| 359 | 359 | 'value' => get_string('mod_form_field_participant_list_action_add', 'bigbluebuttonbn'), |
| 360 | 360 | 'onclick' => 'M.mod_bigbluebuttonbn.modform.participantAdd(); return 0;' |
| 361 | - )); |
|
| 361 | + )); |
|
| 362 | 362 | $htmladdparticipant = html_writer::tag('div', |
| 363 | 363 | $htmlselectiontype . ' ' . $htmlselectionoptions . ' ' . $htmlselectioninput, null); |
| 364 | 364 | $mform->addElement('html', "\n\n"); |
@@ -401,7 +401,7 @@ discard block |
||
| 401 | 401 | $field['description_key'], $cfg['clienttype_default'] ,$clienttype_select_choices); |
| 402 | 402 | } else { |
| 403 | 403 | $this->bigbluebuttonbn_mform_add_element($mform, $field['type'], $field['name'], $field['data_type'], null,$cfg['clienttype_default']); |
| 404 | - } |
|
| 404 | + } |
|
| 405 | 405 | |
| 406 | 406 | } |
| 407 | 407 | |
@@ -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. |
@@ -69,7 +69,7 @@ discard block |
||
| 69 | 69 | $context = context_course::instance($course->id); |
| 70 | 70 | // UI configuration options. |
| 71 | 71 | $cfg = \mod_bigbluebuttonbn\locallib\config::get_options(); |
| 72 | -error_log("RABSER DEBUG ".print_r($cfg,true)); |
|
| 72 | +error_log("RABSER DEBUG " . print_r($cfg, true)); |
|
| 73 | 73 | $mform = &$this->_form; |
| 74 | 74 | $jsvars = array(); |
| 75 | 75 | $jsvars['instanceTypeRoomOnly'] = BIGBLUEBUTTONBN_TYPE_ROOM_ONLY; |
@@ -119,7 +119,7 @@ discard block |
||
| 119 | 119 | ); |
| 120 | 120 | $defaultvalues['presentation'] = $draftitemid; |
| 121 | 121 | } catch (Exception $e) { |
| 122 | - debugging('Presentation could not be loaded: '.$e->getMessage(), DEBUG_DEVELOPER); |
|
| 122 | + debugging('Presentation could not be loaded: ' . $e->getMessage(), DEBUG_DEVELOPER); |
|
| 123 | 123 | return; |
| 124 | 124 | } |
| 125 | 125 | } |
@@ -398,9 +398,9 @@ discard block |
||
| 398 | 398 | |
| 399 | 399 | $mform->addElement('header', 'clienttypeselection', get_string('mod_form_block_clienttype', 'bigbluebuttonbn')); |
| 400 | 400 | $this->bigbluebuttonbn_mform_add_element($mform, $field['type'], $field['name'], $field['data_type'], |
| 401 | - $field['description_key'], $cfg['clienttype_default'] ,$clienttype_select_choices); |
|
| 401 | + $field['description_key'], $cfg['clienttype_default'], $clienttype_select_choices); |
|
| 402 | 402 | } else { |
| 403 | - $this->bigbluebuttonbn_mform_add_element($mform, $field['type'], $field['name'], $field['data_type'], null,$cfg['clienttype_default']); |
|
| 403 | + $this->bigbluebuttonbn_mform_add_element($mform, $field['type'], $field['name'], $field['data_type'], null, $cfg['clienttype_default']); |
|
| 404 | 404 | } |
| 405 | 405 | |
| 406 | 406 | } |
@@ -447,7 +447,7 @@ discard block |
||
| 447 | 447 | return; |
| 448 | 448 | } |
| 449 | 449 | $mform->addElement($type, $name, get_string($descriptionkey, 'bigbluebuttonbn'), $options); |
| 450 | - if (get_string_manager()->string_exists($descriptionkey.'_help', 'bigbluebuttonbn')) { |
|
| 450 | + if (get_string_manager()->string_exists($descriptionkey . '_help', 'bigbluebuttonbn')) { |
|
| 451 | 451 | $mform->addHelpButton($name, $descriptionkey, 'bigbluebuttonbn'); |
| 452 | 452 | } |
| 453 | 453 | if (!empty($rule)) { |
@@ -154,35 +154,35 @@ |
||
| 154 | 154 | */ |
| 155 | 155 | public static function get_options() { |
| 156 | 156 | return array( |
| 157 | - 'version_major' => self::get_moodle_version_major(), |
|
| 158 | - 'voicebridge_editable' => self::get('voicebridge_editable'), |
|
| 159 | - 'importrecordings_enabled' => self::get('importrecordings_enabled'), |
|
| 160 | - 'importrecordings_from_deleted_enabled' => self::get('importrecordings_from_deleted_enabled'), |
|
| 161 | - 'waitformoderator_default' => self::get('waitformoderator_default'), |
|
| 162 | - 'waitformoderator_editable' => self::get('waitformoderator_editable'), |
|
| 163 | - 'userlimit_default' => self::get('userlimit_default'), |
|
| 164 | - 'userlimit_editable' => self::get('userlimit_editable'), |
|
| 165 | - 'preuploadpresentation_enabled' => self::get('preuploadpresentation_enabled'), |
|
| 166 | - 'sendnotifications_enabled' => self::get('sendnotifications_enabled'), |
|
| 167 | - 'recordings_enabled' => self::get('recordings_enabled'), |
|
| 168 | - 'recordings_html_default' => self::get('recordings_html_default'), |
|
| 169 | - 'recordings_html_editable' => self::get('recordings_html_editable'), |
|
| 170 | - 'recordings_deleted_default' => self::get('recordings_deleted_default'), |
|
| 171 | - 'recordings_deleted_editable' => self::get('recordings_deleted_editable'), |
|
| 172 | - 'recordings_imported_default' => self::get('recordings_imported_default'), |
|
| 173 | - 'recordings_imported_editable' => self::get('recordings_imported_editable'), |
|
| 174 | - 'recordings_preview_default' => self::get('recordings_preview_default'), |
|
| 175 | - 'recordings_preview_editable' => self::get('recordings_preview_editable'), |
|
| 176 | - 'recording_default' => self::get('recording_default'), |
|
| 177 | - 'recording_editable' => self::get('recording_editable'), |
|
| 178 | - 'recording_icons_enabled' => self::get('recording_icons_enabled'), |
|
| 179 | - 'general_warning_message' => self::get('general_warning_message'), |
|
| 180 | - 'general_warning_box_type' => self::get('general_warning_box_type'), |
|
| 181 | - 'general_warning_button_text' => self::get('general_warning_button_text'), |
|
| 182 | - 'general_warning_button_href' => self::get('general_warning_button_href'), |
|
| 183 | - 'general_warning_button_class' => self::get('general_warning_button_class'), |
|
| 184 | - 'clienttype_editable' => self::get('clienttype_editable'), |
|
| 185 | - 'clienttype_default' => self::get('clienttype_default'), |
|
| 186 | - ); |
|
| 157 | + 'version_major' => self::get_moodle_version_major(), |
|
| 158 | + 'voicebridge_editable' => self::get('voicebridge_editable'), |
|
| 159 | + 'importrecordings_enabled' => self::get('importrecordings_enabled'), |
|
| 160 | + 'importrecordings_from_deleted_enabled' => self::get('importrecordings_from_deleted_enabled'), |
|
| 161 | + 'waitformoderator_default' => self::get('waitformoderator_default'), |
|
| 162 | + 'waitformoderator_editable' => self::get('waitformoderator_editable'), |
|
| 163 | + 'userlimit_default' => self::get('userlimit_default'), |
|
| 164 | + 'userlimit_editable' => self::get('userlimit_editable'), |
|
| 165 | + 'preuploadpresentation_enabled' => self::get('preuploadpresentation_enabled'), |
|
| 166 | + 'sendnotifications_enabled' => self::get('sendnotifications_enabled'), |
|
| 167 | + 'recordings_enabled' => self::get('recordings_enabled'), |
|
| 168 | + 'recordings_html_default' => self::get('recordings_html_default'), |
|
| 169 | + 'recordings_html_editable' => self::get('recordings_html_editable'), |
|
| 170 | + 'recordings_deleted_default' => self::get('recordings_deleted_default'), |
|
| 171 | + 'recordings_deleted_editable' => self::get('recordings_deleted_editable'), |
|
| 172 | + 'recordings_imported_default' => self::get('recordings_imported_default'), |
|
| 173 | + 'recordings_imported_editable' => self::get('recordings_imported_editable'), |
|
| 174 | + 'recordings_preview_default' => self::get('recordings_preview_default'), |
|
| 175 | + 'recordings_preview_editable' => self::get('recordings_preview_editable'), |
|
| 176 | + 'recording_default' => self::get('recording_default'), |
|
| 177 | + 'recording_editable' => self::get('recording_editable'), |
|
| 178 | + 'recording_icons_enabled' => self::get('recording_icons_enabled'), |
|
| 179 | + 'general_warning_message' => self::get('general_warning_message'), |
|
| 180 | + 'general_warning_box_type' => self::get('general_warning_box_type'), |
|
| 181 | + 'general_warning_button_text' => self::get('general_warning_button_text'), |
|
| 182 | + 'general_warning_button_href' => self::get('general_warning_button_href'), |
|
| 183 | + 'general_warning_button_class' => self::get('general_warning_button_class'), |
|
| 184 | + 'clienttype_editable' => self::get('clienttype_editable'), |
|
| 185 | + 'clienttype_default' => self::get('clienttype_default'), |
|
| 186 | + ); |
|
| 187 | 187 | } |
| 188 | 188 | } |
@@ -89,13 +89,13 @@ discard block |
||
| 89 | 89 | */ |
| 90 | 90 | function bigbluebuttonbn_get_join_url($meetingid, $username, $pw, $logouturl, $configtoken = null, $userid = null, $clienttype=0) { |
| 91 | 91 | $data = ['meetingID' => $meetingid, |
| 92 | - 'fullName' => $username, |
|
| 93 | - 'password' => $pw, |
|
| 94 | - 'logoutURL' => $logouturl, |
|
| 92 | + 'fullName' => $username, |
|
| 93 | + 'password' => $pw, |
|
| 94 | + 'logoutURL' => $logouturl, |
|
| 95 | 95 | ]; |
| 96 | 96 | // Choose between Adobe Flash or HTML5 Client |
| 97 | 97 | if ( $clienttype == 1 ) { |
| 98 | - $data['joinViaHtml5'] = 'true'; |
|
| 98 | + $data['joinViaHtml5'] = 'true'; |
|
| 99 | 99 | } |
| 100 | 100 | |
| 101 | 101 | if (!is_null($configtoken)) { |
@@ -148,23 +148,23 @@ discard block |
||
| 148 | 148 | function bigbluebuttonbn_get_meeting_info_array($meetingid) { |
| 149 | 149 | $xml = bigbluebuttonbn_wrap_xml_load_file( |
| 150 | 150 | \mod_bigbluebuttonbn\locallib\bigbluebutton::action_url('getMeetingInfo', ['meetingID' => $meetingid]) |
| 151 | - ); |
|
| 151 | + ); |
|
| 152 | 152 | if ($xml && $xml->returncode == 'SUCCESS' && empty($xml->messageKey)) { |
| 153 | 153 | // Meeting info was returned. |
| 154 | 154 | return array('returncode' => $xml->returncode, |
| 155 | - 'meetingID' => $xml->meetingID, |
|
| 156 | - 'moderatorPW' => $xml->moderatorPW, |
|
| 157 | - 'attendeePW' => $xml->attendeePW, |
|
| 158 | - 'hasBeenForciblyEnded' => $xml->hasBeenForciblyEnded, |
|
| 159 | - 'running' => $xml->running, |
|
| 160 | - 'recording' => $xml->recording, |
|
| 161 | - 'startTime' => $xml->startTime, |
|
| 162 | - 'endTime' => $xml->endTime, |
|
| 163 | - 'participantCount' => $xml->participantCount, |
|
| 164 | - 'moderatorCount' => $xml->moderatorCount, |
|
| 165 | - 'attendees' => $xml->attendees, |
|
| 166 | - 'metadata' => $xml->metadata, |
|
| 167 | - ); |
|
| 155 | + 'meetingID' => $xml->meetingID, |
|
| 156 | + 'moderatorPW' => $xml->moderatorPW, |
|
| 157 | + 'attendeePW' => $xml->attendeePW, |
|
| 158 | + 'hasBeenForciblyEnded' => $xml->hasBeenForciblyEnded, |
|
| 159 | + 'running' => $xml->running, |
|
| 160 | + 'recording' => $xml->recording, |
|
| 161 | + 'startTime' => $xml->startTime, |
|
| 162 | + 'endTime' => $xml->endTime, |
|
| 163 | + 'participantCount' => $xml->participantCount, |
|
| 164 | + 'moderatorCount' => $xml->moderatorCount, |
|
| 165 | + 'attendees' => $xml->attendees, |
|
| 166 | + 'metadata' => $xml->metadata, |
|
| 167 | + ); |
|
| 168 | 168 | } |
| 169 | 169 | if ($xml) { |
| 170 | 170 | // Either failure or success without meeting info. |
@@ -300,7 +300,7 @@ discard block |
||
| 300 | 300 | function bigbluebuttonbn_get_default_config_xml() { |
| 301 | 301 | $xml = bigbluebuttonbn_wrap_xml_load_file( |
| 302 | 302 | \mod_bigbluebuttonbn\locallib\bigbluebutton::action_url('getDefaultConfigXML') |
| 303 | - ); |
|
| 303 | + ); |
|
| 304 | 304 | return $xml; |
| 305 | 305 | } |
| 306 | 306 | |
@@ -401,7 +401,7 @@ discard block |
||
| 401 | 401 | foreach ($ids as $id) { |
| 402 | 402 | $xml = bigbluebuttonbn_wrap_xml_load_file( |
| 403 | 403 | \mod_bigbluebuttonbn\locallib\bigbluebutton::action_url('deleteRecordings', ['recordID' => $id]) |
| 404 | - ); |
|
| 404 | + ); |
|
| 405 | 405 | if ($xml && $xml->returncode != 'SUCCESS') { |
| 406 | 406 | return false; |
| 407 | 407 | } |
@@ -420,7 +420,7 @@ discard block |
||
| 420 | 420 | foreach ($ids as $id) { |
| 421 | 421 | $xml = bigbluebuttonbn_wrap_xml_load_file( |
| 422 | 422 | \mod_bigbluebuttonbn\locallib\bigbluebutton::action_url('publishRecordings', ['recordID' => $id, 'publish' => $publish]) |
| 423 | - ); |
|
| 423 | + ); |
|
| 424 | 424 | if ($xml && $xml->returncode != 'SUCCESS') { |
| 425 | 425 | return false; |
| 426 | 426 | } |
@@ -439,7 +439,7 @@ discard block |
||
| 439 | 439 | foreach ($ids as $id) { |
| 440 | 440 | $xml = bigbluebuttonbn_wrap_xml_load_file( |
| 441 | 441 | \mod_bigbluebuttonbn\locallib\bigbluebutton::action_url('updateRecordings', ['recordID' => $id] + (array) $params) |
| 442 | - ); |
|
| 442 | + ); |
|
| 443 | 443 | if ($xml && $xml->returncode != 'SUCCESS') { |
| 444 | 444 | return false; |
| 445 | 445 | } |
@@ -456,7 +456,7 @@ discard block |
||
| 456 | 456 | function bigbluebuttonbn_end_meeting($meetingid, $modpw) { |
| 457 | 457 | $xml = bigbluebuttonbn_wrap_xml_load_file( |
| 458 | 458 | \mod_bigbluebuttonbn\locallib\bigbluebutton::action_url('end', ['meetingID' => $meetingid, 'password' => $modpw]) |
| 459 | - ); |
|
| 459 | + ); |
|
| 460 | 460 | if ($xml) { |
| 461 | 461 | // If the xml packet returned failure it displays the message to the user. |
| 462 | 462 | return array('returncode' => $xml->returncode, 'message' => $xml->message, 'messageKey' => $xml->messageKey); |
@@ -473,7 +473,7 @@ discard block |
||
| 473 | 473 | function bigbluebuttonbn_get_server_version() { |
| 474 | 474 | $xml = bigbluebuttonbn_wrap_xml_load_file( |
| 475 | 475 | \mod_bigbluebuttonbn\locallib\bigbluebutton::action_url() |
| 476 | - ); |
|
| 476 | + ); |
|
| 477 | 477 | if ($xml && $xml->returncode == 'SUCCESS') { |
| 478 | 478 | return $xml->version; |
| 479 | 479 | } |
@@ -540,10 +540,10 @@ discard block |
||
| 540 | 540 | } |
| 541 | 541 | $options = array(); |
| 542 | 542 | $options['CURLOPT_HTTPHEADER'] = array( |
| 543 | - 'Content-Type: '.$contenttype, |
|
| 544 | - 'Content-Length: '.strlen($data), |
|
| 545 | - 'Content-Language: en-US', |
|
| 546 | - ); |
|
| 543 | + 'Content-Type: '.$contenttype, |
|
| 544 | + 'Content-Length: '.strlen($data), |
|
| 545 | + 'Content-Language: en-US', |
|
| 546 | + ); |
|
| 547 | 547 | |
| 548 | 548 | return $c->post($url, $data, $options); |
| 549 | 549 | } |
@@ -690,16 +690,16 @@ discard block |
||
| 690 | 690 | 'all' => array( |
| 691 | 691 | 'name' => get_string('mod_form_field_participant_list_type_all', 'bigbluebuttonbn'), |
| 692 | 692 | 'children' => [] |
| 693 | - ) |
|
| 694 | - ); |
|
| 693 | + ) |
|
| 694 | + ); |
|
| 695 | 695 | $data['role'] = array( |
| 696 | 696 | 'name' => get_string('mod_form_field_participant_list_type_role', 'bigbluebuttonbn'), |
| 697 | 697 | 'children' => bigbluebuttonbn_get_roles_select($context) |
| 698 | - ); |
|
| 698 | + ); |
|
| 699 | 699 | $data['user'] = array( |
| 700 | 700 | 'name' => get_string('mod_form_field_participant_list_type_user', 'bigbluebuttonbn'), |
| 701 | 701 | 'children' => bigbluebuttonbn_get_users_select($context) |
| 702 | - ); |
|
| 702 | + ); |
|
| 703 | 703 | return $data; |
| 704 | 704 | } |
| 705 | 705 | |
@@ -742,7 +742,7 @@ discard block |
||
| 742 | 742 | 'selectiontype' => 'all', |
| 743 | 743 | 'selectionid' => 'all', |
| 744 | 744 | 'role' => BIGBLUEBUTTONBN_ROLE_VIEWER |
| 745 | - ); |
|
| 745 | + ); |
|
| 746 | 746 | $defaultrules = explode(',', \mod_bigbluebuttonbn\locallib\config::get('participant_moderator_default')); |
| 747 | 747 | foreach ($defaultrules as $defaultrule) { |
| 748 | 748 | if ($defaultrule == '0') { |
@@ -755,9 +755,9 @@ discard block |
||
| 755 | 755 | continue; |
| 756 | 756 | } |
| 757 | 757 | $participantlist[] = array( |
| 758 | - 'selectiontype' => 'role', |
|
| 759 | - 'selectionid' => $defaultrule, |
|
| 760 | - 'role' => BIGBLUEBUTTONBN_ROLE_MODERATOR); |
|
| 758 | + 'selectiontype' => 'role', |
|
| 759 | + 'selectionid' => $defaultrule, |
|
| 760 | + 'role' => BIGBLUEBUTTONBN_ROLE_MODERATOR); |
|
| 761 | 761 | } |
| 762 | 762 | return $participantlist; |
| 763 | 763 | } |
@@ -796,11 +796,11 @@ discard block |
||
| 796 | 796 | 'all' => get_string('mod_form_field_participant_list_type_all', 'bigbluebuttonbn'), |
| 797 | 797 | 'role' => get_string('mod_form_field_participant_list_type_role', 'bigbluebuttonbn'), |
| 798 | 798 | 'user' => get_string('mod_form_field_participant_list_type_user', 'bigbluebuttonbn'), |
| 799 | - ], |
|
| 799 | + ], |
|
| 800 | 800 | 'type_selected' => 'all', |
| 801 | 801 | 'options' => ['all' => '---------------'], |
| 802 | 802 | 'selected' => 'all', |
| 803 | - ]; |
|
| 803 | + ]; |
|
| 804 | 804 | } |
| 805 | 805 | |
| 806 | 806 | /** |
@@ -1077,7 +1077,7 @@ discard block |
||
| 1077 | 1077 | $eventproperties['other'] = $options['other']; |
| 1078 | 1078 | } |
| 1079 | 1079 | $event = call_user_func_array('\mod_bigbluebuttonbn\event\bigbluebuttonbn_'.$eventtype.'::create', |
| 1080 | - array($eventproperties)); |
|
| 1080 | + array($eventproperties)); |
|
| 1081 | 1081 | $event->trigger(); |
| 1082 | 1082 | } |
| 1083 | 1083 | |
@@ -1121,7 +1121,7 @@ discard block |
||
| 1121 | 1121 | // Ping again and refresh the cache. |
| 1122 | 1122 | $meetinginfo = (array) bigbluebuttonbn_wrap_xml_load_file( |
| 1123 | 1123 | \mod_bigbluebuttonbn\locallib\bigbluebutton::action_url('getMeetingInfo', ['meetingID' => $meetingid]) |
| 1124 | - ); |
|
| 1124 | + ); |
|
| 1125 | 1125 | $cache->set($meetingid, array('creation_time' => time(), 'meeting_info' => json_encode($meetinginfo))); |
| 1126 | 1126 | return $meetinginfo; |
| 1127 | 1127 | } |
@@ -1533,8 +1533,8 @@ discard block |
||
| 1533 | 1533 | } |
| 1534 | 1534 | $id = 'playbacks-'.$recording['recordID']; |
| 1535 | 1535 | $recordingtypes = html_writer::start_tag('div', array('id' => $id, 'data-imported' => $dataimported, |
| 1536 | - 'data-meetingid' => $recording['meetingID'], 'data-recordingid' => $recording['recordID'], |
|
| 1537 | - 'title' => $title, $visibility => $visibility)); |
|
| 1536 | + 'data-meetingid' => $recording['meetingID'], 'data-recordingid' => $recording['recordID'], |
|
| 1537 | + 'title' => $title, $visibility => $visibility)); |
|
| 1538 | 1538 | foreach ($recording['playbacks'] as $playback) { |
| 1539 | 1539 | $recordingtypes .= bigbluebuttonbn_get_recording_data_row_type($recording, $bbbsession, $playback); |
| 1540 | 1540 | } |
@@ -1558,7 +1558,7 @@ discard block |
||
| 1558 | 1558 | } |
| 1559 | 1559 | $text = get_string('view_recording_format_'.$playback['type'], 'bigbluebuttonbn'); |
| 1560 | 1560 | $href = $CFG->wwwroot . '/mod/bigbluebuttonbn/bbb_view.php?action=play&bn=' . $bbbsession['bigbluebuttonbn']->id . |
| 1561 | - '&mid='.$recording['meetingID'] . '&rid=' . $recording['recordID'] . '&rtype=' . $playback['type']; |
|
| 1561 | + '&mid='.$recording['meetingID'] . '&rid=' . $recording['recordID'] . '&rtype=' . $playback['type']; |
|
| 1562 | 1562 | if (!isset($recording['imported']) || !isset($recording['protected']) || $recording['protected'] === 'false') { |
| 1563 | 1563 | $href .= '&href='.urlencode(trim($playback['url'])); |
| 1564 | 1564 | } |
@@ -1569,7 +1569,7 @@ discard block |
||
| 1569 | 1569 | 'data-action' => 'play', |
| 1570 | 1570 | 'data-target' => $playback['type'], |
| 1571 | 1571 | 'data-href' => $href, |
| 1572 | - ); |
|
| 1572 | + ); |
|
| 1573 | 1573 | if (!bigbluebuttonbn_is_bn_server() && !bigbluebuttonbn_is_valid_resource(trim($playback['url']))) { |
| 1574 | 1574 | $linkattributes['class'] = 'btn btn-sm btn-warning'; |
| 1575 | 1575 | $linkattributes['title'] = get_string('view_recording_format_errror_unreachable', 'bigbluebuttonbn'); |
@@ -1719,10 +1719,10 @@ discard block |
||
| 1719 | 1719 | 'id' => $id, |
| 1720 | 1720 | 'onclick' => $onclick, |
| 1721 | 1721 | 'data-action' => $data['action'] |
| 1722 | - ); |
|
| 1722 | + ); |
|
| 1723 | 1723 | if (!isset($recording['imported'])) { |
| 1724 | 1724 | $linkattributes['data-links'] = bigbluebuttonbn_count_recording_imported_instances( |
| 1725 | - $recording['recordID']); |
|
| 1725 | + $recording['recordID']); |
|
| 1726 | 1726 | } |
| 1727 | 1727 | if (isset($data['disabled'])) { |
| 1728 | 1728 | $iconattributes['class'] .= ' fa-' . $data['disabled']; |
@@ -2263,8 +2263,8 @@ discard block |
||
| 2263 | 2263 | $activitytime = ''; |
| 2264 | 2264 | if ($time) { |
| 2265 | 2265 | $activitytime = calendar_day_representation($time).' '. |
| 2266 | - get_string('mod_form_field_notification_msg_at', 'bigbluebuttonbn').' '. |
|
| 2267 | - calendar_time_representation($time); |
|
| 2266 | + get_string('mod_form_field_notification_msg_at', 'bigbluebuttonbn').' '. |
|
| 2267 | + calendar_time_representation($time); |
|
| 2268 | 2268 | } |
| 2269 | 2269 | return $activitytime; |
| 2270 | 2270 | } |
@@ -2360,7 +2360,7 @@ discard block |
||
| 2360 | 2360 | global $BIGBLUEBUTTONBN_CFG; |
| 2361 | 2361 | if (isset($BIGBLUEBUTTONBN_CFG)) { |
| 2362 | 2362 | $renderer->render_warning_message('general_warning', |
| 2363 | - get_string('config_warning_bigbluebuttonbn_cfg_deprecated', 'bigbluebuttonbn')); |
|
| 2363 | + get_string('config_warning_bigbluebuttonbn_cfg_deprecated', 'bigbluebuttonbn')); |
|
| 2364 | 2364 | } |
| 2365 | 2365 | } |
| 2366 | 2366 | |
@@ -2568,7 +2568,7 @@ discard block |
||
| 2568 | 2568 | $renderer->render_group_element('participant_moderator_default', |
| 2569 | 2569 | $renderer->render_group_element_configmultiselect('participant_moderator_default', |
| 2570 | 2570 | array_keys($owner), array_merge($owner, $roles)) |
| 2571 | - ); |
|
| 2571 | + ); |
|
| 2572 | 2572 | } |
| 2573 | 2573 | } |
| 2574 | 2574 | |
@@ -2605,7 +2605,7 @@ discard block |
||
| 2605 | 2605 | // Web Client default |
| 2606 | 2606 | $clienttype_default = intval((int)\mod_bigbluebuttonbn\locallib\config::get('clienttype_default')); |
| 2607 | 2607 | |
| 2608 | - // Flash or HTML5 meeting |
|
| 2608 | + // Flash or HTML5 meeting |
|
| 2609 | 2609 | $clienttype_select_choices = array(0 => get_string('mod_form_block_clienttype_flash', 'bigbluebuttonbn'), 1 => get_string('mod_form_block_clienttype_html5', 'bigbluebuttonbn')); |
| 2610 | 2610 | $renderer->render_group_element('clienttype_default', |
| 2611 | 2611 | $renderer->render_group_element_configselect('clienttype_default', |
@@ -2697,7 +2697,7 @@ discard block |
||
| 2697 | 2697 | return $output; |
| 2698 | 2698 | } |
| 2699 | 2699 | $output .= $OUTPUT->box_start('box boxalignleft adminerror alert alert-' . $type . ' alert-block fade in', |
| 2700 | - 'bigbluebuttonbn_view_general_warning') . "\n"; |
|
| 2700 | + 'bigbluebuttonbn_view_general_warning') . "\n"; |
|
| 2701 | 2701 | $output .= ' ' . $message . "\n"; |
| 2702 | 2702 | $output .= ' <div class="singlebutton pull-right">' . "\n"; |
| 2703 | 2703 | if (!empty($href)) { |
@@ -28,7 +28,7 @@ discard block |
||
| 28 | 28 | |
| 29 | 29 | global $CFG; |
| 30 | 30 | |
| 31 | -require_once(dirname(__FILE__).'/lib.php'); |
|
| 31 | +require_once(dirname(__FILE__) . '/lib.php'); |
|
| 32 | 32 | |
| 33 | 33 | /** @var BIGBLUEBUTTONBN_UPDATE_CACHE boolean set to true indicates that cache has to be updated */ |
| 34 | 34 | const BIGBLUEBUTTONBN_UPDATE_CACHE = true; |
@@ -87,14 +87,14 @@ discard block |
||
| 87 | 87 | * |
| 88 | 88 | * @return string |
| 89 | 89 | */ |
| 90 | -function bigbluebuttonbn_get_join_url($meetingid, $username, $pw, $logouturl, $configtoken = null, $userid = null, $clienttype=0) { |
|
| 90 | +function bigbluebuttonbn_get_join_url($meetingid, $username, $pw, $logouturl, $configtoken = null, $userid = null, $clienttype = 0) { |
|
| 91 | 91 | $data = ['meetingID' => $meetingid, |
| 92 | 92 | 'fullName' => $username, |
| 93 | 93 | 'password' => $pw, |
| 94 | 94 | 'logoutURL' => $logouturl, |
| 95 | 95 | ]; |
| 96 | 96 | // Choose between Adobe Flash or HTML5 Client |
| 97 | - if ( $clienttype == 1 ) { |
|
| 97 | + if ($clienttype == 1) { |
|
| 98 | 98 | $data['joinViaHtml5'] = 'true'; |
| 99 | 99 | } |
| 100 | 100 | |
@@ -123,8 +123,8 @@ discard block |
||
| 123 | 123 | $data = null; |
| 124 | 124 | if (!is_null($pname) && !is_null($purl)) { |
| 125 | 125 | $method = 'POST'; |
| 126 | - $data = "<?xml version='1.0' encoding='UTF-8'?><modules><module name='presentation'><document url='". |
|
| 127 | - $purl."' /></module></modules>"; |
|
| 126 | + $data = "<?xml version='1.0' encoding='UTF-8'?><modules><module name='presentation'><document url='" . |
|
| 127 | + $purl . "' /></module></modules>"; |
|
| 128 | 128 | } |
| 129 | 129 | $xml = bigbluebuttonbn_wrap_xml_load_file($createmeetingurl, $method, $data); |
| 130 | 130 | if ($xml) { |
@@ -285,7 +285,7 @@ discard block |
||
| 285 | 285 | // Override imported flag with actual ID. |
| 286 | 286 | $recording['imported'] = $recordimported->id; |
| 287 | 287 | if (isset($recordimported->protected)) { |
| 288 | - $recording['protected'] = (string) $recordimported->protected; |
|
| 288 | + $recording['protected'] = (string)$recordimported->protected; |
|
| 289 | 289 | } |
| 290 | 290 | $recordsimportedarray[$recording['recordID']] = $recording; |
| 291 | 291 | } |
@@ -315,21 +315,21 @@ discard block |
||
| 315 | 315 | // Add formats. |
| 316 | 316 | $playbackarray = array(); |
| 317 | 317 | foreach ($recording->playback->format as $format) { |
| 318 | - $playbackarray[(string) $format->type] = array('type' => (string) $format->type, |
|
| 319 | - 'url' => trim((string) $format->url), 'length' => (string) $format->length); |
|
| 318 | + $playbackarray[(string)$format->type] = array('type' => (string)$format->type, |
|
| 319 | + 'url' => trim((string)$format->url), 'length' => (string)$format->length); |
|
| 320 | 320 | // Add preview per format when existing. |
| 321 | 321 | if ($format->preview) { |
| 322 | - $playbackarray[(string) $format->type]['preview'] = bigbluebuttonbn_get_recording_preview_images($format->preview); |
|
| 322 | + $playbackarray[(string)$format->type]['preview'] = bigbluebuttonbn_get_recording_preview_images($format->preview); |
|
| 323 | 323 | } |
| 324 | 324 | } |
| 325 | 325 | // Add the metadata to the recordings array. |
| 326 | 326 | $metadataarray = bigbluebuttonbn_get_recording_array_meta(get_object_vars($recording->metadata)); |
| 327 | - $recordingarray = array('recordID' => (string) $recording->recordID, |
|
| 328 | - 'meetingID' => (string) $recording->meetingID, 'meetingName' => (string) $recording->name, |
|
| 329 | - 'published' => (string) $recording->published, 'startTime' => (string) $recording->startTime, |
|
| 330 | - 'endTime' => (string) $recording->endTime, 'playbacks' => $playbackarray); |
|
| 327 | + $recordingarray = array('recordID' => (string)$recording->recordID, |
|
| 328 | + 'meetingID' => (string)$recording->meetingID, 'meetingName' => (string)$recording->name, |
|
| 329 | + 'published' => (string)$recording->published, 'startTime' => (string)$recording->startTime, |
|
| 330 | + 'endTime' => (string)$recording->endTime, 'playbacks' => $playbackarray); |
|
| 331 | 331 | if (isset($recording->protected)) { |
| 332 | - $recordingarray['protected'] = (string) $recording->protected; |
|
| 332 | + $recordingarray['protected'] = (string)$recording->protected; |
|
| 333 | 333 | } |
| 334 | 334 | return $recordingarray + $metadataarray; |
| 335 | 335 | } |
@@ -344,9 +344,9 @@ discard block |
||
| 344 | 344 | function bigbluebuttonbn_get_recording_preview_images($preview) { |
| 345 | 345 | $imagesarray = array(); |
| 346 | 346 | foreach ($preview->images->image as $image) { |
| 347 | - $imagearray = array('url' => trim((string) $image)); |
|
| 347 | + $imagearray = array('url' => trim((string)$image)); |
|
| 348 | 348 | foreach ($image->attributes() as $attkey => $attvalue) { |
| 349 | - $imagearray[$attkey] = (string) $attvalue; |
|
| 349 | + $imagearray[$attkey] = (string)$attvalue; |
|
| 350 | 350 | } |
| 351 | 351 | array_push($imagesarray, $imagearray); |
| 352 | 352 | } |
@@ -366,7 +366,7 @@ discard block |
||
| 366 | 366 | if (is_object($value)) { |
| 367 | 367 | $value = ''; |
| 368 | 368 | } |
| 369 | - $metadataarray['meta_'.$key] = $value; |
|
| 369 | + $metadataarray['meta_' . $key] = $value; |
|
| 370 | 370 | } |
| 371 | 371 | return $metadataarray; |
| 372 | 372 | } |
@@ -438,7 +438,7 @@ discard block |
||
| 438 | 438 | $ids = explode(',', $recordids); |
| 439 | 439 | foreach ($ids as $id) { |
| 440 | 440 | $xml = bigbluebuttonbn_wrap_xml_load_file( |
| 441 | - \mod_bigbluebuttonbn\locallib\bigbluebutton::action_url('updateRecordings', ['recordID' => $id] + (array) $params) |
|
| 441 | + \mod_bigbluebuttonbn\locallib\bigbluebutton::action_url('updateRecordings', ['recordID' => $id] + (array)$params) |
|
| 442 | 442 | ); |
| 443 | 443 | if ($xml && $xml->returncode != 'SUCCESS') { |
| 444 | 444 | return false; |
@@ -503,7 +503,7 @@ discard block |
||
| 503 | 503 | return $xml; |
| 504 | 504 | } catch (Exception $e) { |
| 505 | 505 | libxml_use_internal_errors($previous); |
| 506 | - $error = 'Caught exception: '.$e->getMessage(); |
|
| 506 | + $error = 'Caught exception: ' . $e->getMessage(); |
|
| 507 | 507 | debugging($error, DEBUG_DEVELOPER); |
| 508 | 508 | return null; |
| 509 | 509 | } |
@@ -514,7 +514,7 @@ discard block |
||
| 514 | 514 | $response = simplexml_load_file($url, 'SimpleXMLElement', LIBXML_NOCDATA | LIBXML_NOBLANKS); |
| 515 | 515 | return $response; |
| 516 | 516 | } catch (Exception $e) { |
| 517 | - $error = 'Caught exception: '.$e->getMessage(); |
|
| 517 | + $error = 'Caught exception: ' . $e->getMessage(); |
|
| 518 | 518 | debugging($error, DEBUG_DEVELOPER); |
| 519 | 519 | libxml_use_internal_errors($previous); |
| 520 | 520 | return null; |
@@ -540,8 +540,8 @@ discard block |
||
| 540 | 540 | } |
| 541 | 541 | $options = array(); |
| 542 | 542 | $options['CURLOPT_HTTPHEADER'] = array( |
| 543 | - 'Content-Type: '.$contenttype, |
|
| 544 | - 'Content-Length: '.strlen($data), |
|
| 543 | + 'Content-Type: ' . $contenttype, |
|
| 544 | + 'Content-Length: ' . strlen($data), |
|
| 545 | 545 | 'Content-Language: en-US', |
| 546 | 546 | ); |
| 547 | 547 | |
@@ -562,7 +562,7 @@ discard block |
||
| 562 | 562 | * @return void |
| 563 | 563 | */ |
| 564 | 564 | function bigbluebuttonbn_end_meeting_if_running($bigbluebuttonbn) { |
| 565 | - $meetingid = $bigbluebuttonbn->meetingid.'-'.$bigbluebuttonbn->course.'-'.$bigbluebuttonbn->id; |
|
| 565 | + $meetingid = $bigbluebuttonbn->meetingid . '-' . $bigbluebuttonbn->course . '-' . $bigbluebuttonbn->id; |
|
| 566 | 566 | if (bigbluebuttonbn_is_meeting_running($meetingid)) { |
| 567 | 567 | bigbluebuttonbn_end_meeting($meetingid, $bigbluebuttonbn->moderatorpass); |
| 568 | 568 | } |
@@ -582,9 +582,9 @@ discard block |
||
| 582 | 582 | if ($userroles) { |
| 583 | 583 | $where = ''; |
| 584 | 584 | foreach ($userroles as $userrole) { |
| 585 | - $where .= (empty($where) ? ' WHERE' : ' OR').' id=' . $userrole->roleid; |
|
| 585 | + $where .= (empty($where) ? ' WHERE' : ' OR') . ' id=' . $userrole->roleid; |
|
| 586 | 586 | } |
| 587 | - $userroles = $DB->get_records_sql('SELECT * FROM {role}'.$where); |
|
| 587 | + $userroles = $DB->get_records_sql('SELECT * FROM {role}' . $where); |
|
| 588 | 588 | } |
| 589 | 589 | return $userroles; |
| 590 | 590 | } |
@@ -607,7 +607,7 @@ discard block |
||
| 607 | 607 | * @return array $users |
| 608 | 608 | */ |
| 609 | 609 | function bigbluebuttonbn_get_users(context $context = null) { |
| 610 | - $users = (array) get_enrolled_users($context, '', 0, 'u.*', null, 0, 0, true); |
|
| 610 | + $users = (array)get_enrolled_users($context, '', 0, 'u.*', null, 0, 0, true); |
|
| 611 | 611 | foreach ($users as $key => $value) { |
| 612 | 612 | $users[$key] = fullname($value); |
| 613 | 613 | } |
@@ -622,7 +622,7 @@ discard block |
||
| 622 | 622 | * @return array $users |
| 623 | 623 | */ |
| 624 | 624 | function bigbluebuttonbn_get_users_select(context $context = null) { |
| 625 | - $users = (array) get_enrolled_users($context, '', 0, 'u.*', null, 0, 0, true); |
|
| 625 | + $users = (array)get_enrolled_users($context, '', 0, 'u.*', null, 0, 0, true); |
|
| 626 | 626 | foreach ($users as $key => $value) { |
| 627 | 627 | $users[$key] = array('id' => $value->id, 'name' => fullname($value)); |
| 628 | 628 | } |
@@ -637,7 +637,7 @@ discard block |
||
| 637 | 637 | * @return array $roles |
| 638 | 638 | */ |
| 639 | 639 | function bigbluebuttonbn_get_roles(context $context = null) { |
| 640 | - $roles = (array) role_get_names($context); |
|
| 640 | + $roles = (array)role_get_names($context); |
|
| 641 | 641 | foreach ($roles as $key => $value) { |
| 642 | 642 | $roles[$key] = $value->localname; |
| 643 | 643 | } |
@@ -652,7 +652,7 @@ discard block |
||
| 652 | 652 | * @return array $users |
| 653 | 653 | */ |
| 654 | 654 | function bigbluebuttonbn_get_roles_select(context $context = null) { |
| 655 | - $roles = (array) role_get_names($context); |
|
| 655 | + $roles = (array)role_get_names($context); |
|
| 656 | 656 | foreach ($roles as $key => $value) { |
| 657 | 657 | $roles[$key] = array('id' => $value->id, 'name' => $value->localname); |
| 658 | 658 | } |
@@ -667,7 +667,7 @@ discard block |
||
| 667 | 667 | * @return object $role |
| 668 | 668 | */ |
| 669 | 669 | function bigbluebuttonbn_get_role($id) { |
| 670 | - $roles = (array) role_get_names(); |
|
| 670 | + $roles = (array)role_get_names(); |
|
| 671 | 671 | if (is_numeric($id) && isset($roles[$id])) { |
| 672 | 672 | return (object)$roles[$id]; |
| 673 | 673 | } |
@@ -824,7 +824,7 @@ discard block |
||
| 824 | 824 | if (!isguestuser()) { |
| 825 | 825 | $userroles = bigbluebuttonbn_get_user_roles($context, $userid); |
| 826 | 826 | } |
| 827 | - return bigbluebuttonbn_is_moderator_validator($participantlist, $userid , $userroles); |
|
| 827 | + return bigbluebuttonbn_is_moderator_validator($participantlist, $userid, $userroles); |
|
| 828 | 828 | } |
| 829 | 829 | |
| 830 | 830 | /** |
@@ -980,7 +980,7 @@ discard block |
||
| 980 | 980 | function bigbluebuttonbn_generate_nonce() { |
| 981 | 981 | $mt = microtime(); |
| 982 | 982 | $rand = mt_rand(); |
| 983 | - return md5($mt.$rand); |
|
| 983 | + return md5($mt . $rand); |
|
| 984 | 984 | } |
| 985 | 985 | |
| 986 | 986 | /** |
@@ -1006,21 +1006,21 @@ discard block |
||
| 1006 | 1006 | */ |
| 1007 | 1007 | function bigbluebuttonbn_events() { |
| 1008 | 1008 | return array( |
| 1009 | - (string) BIGBLUEBUTTON_EVENT_ACTIVITY_VIEWED, |
|
| 1010 | - (string) BIGBLUEBUTTON_EVENT_ACTIVITY_MANAGEMENT_VIEWED, |
|
| 1011 | - (string) BIGBLUEBUTTON_EVENT_LIVE_SESSION, |
|
| 1012 | - (string) BIGBLUEBUTTON_EVENT_MEETING_CREATED, |
|
| 1013 | - (string) BIGBLUEBUTTON_EVENT_MEETING_ENDED, |
|
| 1014 | - (string) BIGBLUEBUTTON_EVENT_MEETING_JOINED, |
|
| 1015 | - (string) BIGBLUEBUTTON_EVENT_MEETING_LEFT, |
|
| 1016 | - (string) BIGBLUEBUTTON_EVENT_RECORDING_DELETED, |
|
| 1017 | - (string) BIGBLUEBUTTON_EVENT_RECORDING_IMPORTED, |
|
| 1018 | - (string) BIGBLUEBUTTON_EVENT_RECORDING_PROTECTED, |
|
| 1019 | - (string) BIGBLUEBUTTON_EVENT_RECORDING_PUBLISHED, |
|
| 1020 | - (string) BIGBLUEBUTTON_EVENT_RECORDING_UNPROTECTED, |
|
| 1021 | - (string) BIGBLUEBUTTON_EVENT_RECORDING_UNPUBLISHED, |
|
| 1022 | - (string) BIGBLUEBUTTON_EVENT_RECORDING_EDITED, |
|
| 1023 | - (string) BIGBLUEBUTTON_EVENT_RECORDING_VIEWED |
|
| 1009 | + (string)BIGBLUEBUTTON_EVENT_ACTIVITY_VIEWED, |
|
| 1010 | + (string)BIGBLUEBUTTON_EVENT_ACTIVITY_MANAGEMENT_VIEWED, |
|
| 1011 | + (string)BIGBLUEBUTTON_EVENT_LIVE_SESSION, |
|
| 1012 | + (string)BIGBLUEBUTTON_EVENT_MEETING_CREATED, |
|
| 1013 | + (string)BIGBLUEBUTTON_EVENT_MEETING_ENDED, |
|
| 1014 | + (string)BIGBLUEBUTTON_EVENT_MEETING_JOINED, |
|
| 1015 | + (string)BIGBLUEBUTTON_EVENT_MEETING_LEFT, |
|
| 1016 | + (string)BIGBLUEBUTTON_EVENT_RECORDING_DELETED, |
|
| 1017 | + (string)BIGBLUEBUTTON_EVENT_RECORDING_IMPORTED, |
|
| 1018 | + (string)BIGBLUEBUTTON_EVENT_RECORDING_PROTECTED, |
|
| 1019 | + (string)BIGBLUEBUTTON_EVENT_RECORDING_PUBLISHED, |
|
| 1020 | + (string)BIGBLUEBUTTON_EVENT_RECORDING_UNPROTECTED, |
|
| 1021 | + (string)BIGBLUEBUTTON_EVENT_RECORDING_UNPUBLISHED, |
|
| 1022 | + (string)BIGBLUEBUTTON_EVENT_RECORDING_EDITED, |
|
| 1023 | + (string)BIGBLUEBUTTON_EVENT_RECORDING_VIEWED |
|
| 1024 | 1024 | ); |
| 1025 | 1025 | } |
| 1026 | 1026 | |
@@ -1031,21 +1031,21 @@ discard block |
||
| 1031 | 1031 | */ |
| 1032 | 1032 | function bigbluebuttonbn_events_action() { |
| 1033 | 1033 | return array( |
| 1034 | - 'view' => (string) BIGBLUEBUTTON_EVENT_ACTIVITY_VIEWED, |
|
| 1035 | - 'view_management' => (string) BIGBLUEBUTTON_EVENT_ACTIVITY_MANAGEMENT_VIEWED, |
|
| 1036 | - 'live_action' => (string) BIGBLUEBUTTON_EVENT_LIVE_SESSION, |
|
| 1037 | - 'meeting_create' => (string) BIGBLUEBUTTON_EVENT_MEETING_CREATED, |
|
| 1038 | - 'meeting_end' => (string) BIGBLUEBUTTON_EVENT_MEETING_ENDED, |
|
| 1039 | - 'meeting_join' => (string) BIGBLUEBUTTON_EVENT_MEETING_JOINED, |
|
| 1040 | - 'meeting_left' => (string) BIGBLUEBUTTON_EVENT_MEETING_LEFT, |
|
| 1041 | - 'recording_delete' => (string) BIGBLUEBUTTON_EVENT_RECORDING_DELETED, |
|
| 1042 | - 'recording_import' => (string) BIGBLUEBUTTON_EVENT_RECORDING_IMPORTED, |
|
| 1043 | - 'recording_protect' => (string) BIGBLUEBUTTON_EVENT_RECORDING_PROTECTED, |
|
| 1044 | - 'recording_publish' => (string) BIGBLUEBUTTON_EVENT_RECORDING_PUBLISHED, |
|
| 1045 | - 'recording_unprotect' => (string) BIGBLUEBUTTON_EVENT_RECORDING_UNPROTECTED, |
|
| 1046 | - 'recording_unpublish' => (string) BIGBLUEBUTTON_EVENT_RECORDING_UNPUBLISHED, |
|
| 1047 | - 'recording_edit' => (string) BIGBLUEBUTTON_EVENT_RECORDING_EDITED, |
|
| 1048 | - 'recording_play' => (string) BIGBLUEBUTTON_EVENT_RECORDING_VIEWED |
|
| 1034 | + 'view' => (string)BIGBLUEBUTTON_EVENT_ACTIVITY_VIEWED, |
|
| 1035 | + 'view_management' => (string)BIGBLUEBUTTON_EVENT_ACTIVITY_MANAGEMENT_VIEWED, |
|
| 1036 | + 'live_action' => (string)BIGBLUEBUTTON_EVENT_LIVE_SESSION, |
|
| 1037 | + 'meeting_create' => (string)BIGBLUEBUTTON_EVENT_MEETING_CREATED, |
|
| 1038 | + 'meeting_end' => (string)BIGBLUEBUTTON_EVENT_MEETING_ENDED, |
|
| 1039 | + 'meeting_join' => (string)BIGBLUEBUTTON_EVENT_MEETING_JOINED, |
|
| 1040 | + 'meeting_left' => (string)BIGBLUEBUTTON_EVENT_MEETING_LEFT, |
|
| 1041 | + 'recording_delete' => (string)BIGBLUEBUTTON_EVENT_RECORDING_DELETED, |
|
| 1042 | + 'recording_import' => (string)BIGBLUEBUTTON_EVENT_RECORDING_IMPORTED, |
|
| 1043 | + 'recording_protect' => (string)BIGBLUEBUTTON_EVENT_RECORDING_PROTECTED, |
|
| 1044 | + 'recording_publish' => (string)BIGBLUEBUTTON_EVENT_RECORDING_PUBLISHED, |
|
| 1045 | + 'recording_unprotect' => (string)BIGBLUEBUTTON_EVENT_RECORDING_UNPROTECTED, |
|
| 1046 | + 'recording_unpublish' => (string)BIGBLUEBUTTON_EVENT_RECORDING_UNPUBLISHED, |
|
| 1047 | + 'recording_edit' => (string)BIGBLUEBUTTON_EVENT_RECORDING_EDITED, |
|
| 1048 | + 'recording_play' => (string)BIGBLUEBUTTON_EVENT_RECORDING_VIEWED |
|
| 1049 | 1049 | ); |
| 1050 | 1050 | } |
| 1051 | 1051 | |
@@ -1076,7 +1076,7 @@ discard block |
||
| 1076 | 1076 | if (array_key_exists('other', $options)) { |
| 1077 | 1077 | $eventproperties['other'] = $options['other']; |
| 1078 | 1078 | } |
| 1079 | - $event = call_user_func_array('\mod_bigbluebuttonbn\event\bigbluebuttonbn_'.$eventtype.'::create', |
|
| 1079 | + $event = call_user_func_array('\mod_bigbluebuttonbn\event\bigbluebuttonbn_' . $eventtype . '::create', |
|
| 1080 | 1080 | array($eventproperties)); |
| 1081 | 1081 | $event->trigger(); |
| 1082 | 1082 | } |
@@ -1116,10 +1116,10 @@ discard block |
||
| 1116 | 1116 | $now = time(); |
| 1117 | 1117 | if (!$updatecache && isset($result) && $now < ($result['creation_time'] + $cachettl)) { |
| 1118 | 1118 | // Use the value in the cache. |
| 1119 | - return (array) json_decode($result['meeting_info']); |
|
| 1119 | + return (array)json_decode($result['meeting_info']); |
|
| 1120 | 1120 | } |
| 1121 | 1121 | // Ping again and refresh the cache. |
| 1122 | - $meetinginfo = (array) bigbluebuttonbn_wrap_xml_load_file( |
|
| 1122 | + $meetinginfo = (array)bigbluebuttonbn_wrap_xml_load_file( |
|
| 1123 | 1123 | \mod_bigbluebuttonbn\locallib\bigbluebutton::action_url('getMeetingInfo', ['meetingID' => $meetingid]) |
| 1124 | 1124 | ); |
| 1125 | 1125 | $cache->set($meetingid, array('creation_time' => time(), 'meeting_info' => json_encode($meetinginfo))); |
@@ -1230,7 +1230,7 @@ discard block |
||
| 1230 | 1230 | * @return object |
| 1231 | 1231 | */ |
| 1232 | 1232 | function bigbluebuttonbn_set_config_xml($meetingid, $configxml) { |
| 1233 | - $urldefaultconfig = \mod_bigbluebuttonbn\locallib\config::get('server_url').'api/setConfigXML?'; |
|
| 1233 | + $urldefaultconfig = \mod_bigbluebuttonbn\locallib\config::get('server_url') . 'api/setConfigXML?'; |
|
| 1234 | 1234 | $configxmlparams = bigbluebuttonbn_set_config_xml_params($meetingid, $configxml); |
| 1235 | 1235 | $xml = bigbluebuttonbn_wrap_xml_load_file($urldefaultconfig, 'POST', |
| 1236 | 1236 | $configxmlparams, 'application/x-www-form-urlencoded'); |
@@ -1246,8 +1246,8 @@ discard block |
||
| 1246 | 1246 | * @return string |
| 1247 | 1247 | */ |
| 1248 | 1248 | function bigbluebuttonbn_set_config_xml_params($meetingid, $configxml) { |
| 1249 | - $params = 'configXML='.urlencode($configxml).'&meetingID='.urlencode($meetingid); |
|
| 1250 | - $configxmlparams = $params.'&checksum='.sha1('setConfigXML'.$params.\mod_bigbluebuttonbn\locallib\config::get('shared_secret')); |
|
| 1249 | + $params = 'configXML=' . urlencode($configxml) . '&meetingID=' . urlencode($meetingid); |
|
| 1250 | + $configxmlparams = $params . '&checksum=' . sha1('setConfigXML' . $params . \mod_bigbluebuttonbn\locallib\config::get('shared_secret')); |
|
| 1251 | 1251 | return $configxmlparams; |
| 1252 | 1252 | } |
| 1253 | 1253 | |
@@ -1261,7 +1261,7 @@ discard block |
||
| 1261 | 1261 | */ |
| 1262 | 1262 | function bigbluebuttonbn_set_config_xml_array($meetingid, $configxml) { |
| 1263 | 1263 | $configxml = bigbluebuttonbn_setConfigXML($meetingid, $configxml); |
| 1264 | - $configxmlarray = (array) $configxml; |
|
| 1264 | + $configxmlarray = (array)$configxml; |
|
| 1265 | 1265 | if ($configxmlarray['returncode'] != 'SUCCESS') { |
| 1266 | 1266 | debugging('BigBlueButton was not able to set the custom config.xml file', DEBUG_DEVELOPER); |
| 1267 | 1267 | return ''; |
@@ -1353,7 +1353,7 @@ discard block |
||
| 1353 | 1353 | global $USER; |
| 1354 | 1354 | $starttime = $starttime - ($starttime % 1000); |
| 1355 | 1355 | // Set formatted date. |
| 1356 | - $dateformat = get_string('strftimerecentfull', 'langconfig').' %Z'; |
|
| 1356 | + $dateformat = get_string('strftimerecentfull', 'langconfig') . ' %Z'; |
|
| 1357 | 1357 | return userdate($starttime / 1000, $dateformat, usertimezone($USER->timezone)); |
| 1358 | 1358 | } |
| 1359 | 1359 | |
@@ -1469,7 +1469,7 @@ discard block |
||
| 1469 | 1469 | * @return string |
| 1470 | 1470 | */ |
| 1471 | 1471 | function bigbluebuttonbn_get_recording_data_row_preview($recording) { |
| 1472 | - $options = array('id' => 'preview-'.$recording['recordID']); |
|
| 1472 | + $options = array('id' => 'preview-' . $recording['recordID']); |
|
| 1473 | 1473 | if ($recording['published'] === 'false') { |
| 1474 | 1474 | $options['hidden'] = 'hidden'; |
| 1475 | 1475 | } |
@@ -1531,7 +1531,7 @@ discard block |
||
| 1531 | 1531 | if ($recording['published'] === 'false') { |
| 1532 | 1532 | $visibility = 'hidden '; |
| 1533 | 1533 | } |
| 1534 | - $id = 'playbacks-'.$recording['recordID']; |
|
| 1534 | + $id = 'playbacks-' . $recording['recordID']; |
|
| 1535 | 1535 | $recordingtypes = html_writer::start_tag('div', array('id' => $id, 'data-imported' => $dataimported, |
| 1536 | 1536 | 'data-meetingid' => $recording['meetingID'], 'data-recordingid' => $recording['recordID'], |
| 1537 | 1537 | 'title' => $title, $visibility => $visibility)); |
@@ -1556,11 +1556,11 @@ discard block |
||
| 1556 | 1556 | if (!bigbluebuttonbn_include_recording_data_row_type($recording, $bbbsession, $playback)) { |
| 1557 | 1557 | return ''; |
| 1558 | 1558 | } |
| 1559 | - $text = get_string('view_recording_format_'.$playback['type'], 'bigbluebuttonbn'); |
|
| 1559 | + $text = get_string('view_recording_format_' . $playback['type'], 'bigbluebuttonbn'); |
|
| 1560 | 1560 | $href = $CFG->wwwroot . '/mod/bigbluebuttonbn/bbb_view.php?action=play&bn=' . $bbbsession['bigbluebuttonbn']->id . |
| 1561 | - '&mid='.$recording['meetingID'] . '&rid=' . $recording['recordID'] . '&rtype=' . $playback['type']; |
|
| 1561 | + '&mid=' . $recording['meetingID'] . '&rid=' . $recording['recordID'] . '&rtype=' . $playback['type']; |
|
| 1562 | 1562 | if (!isset($recording['imported']) || !isset($recording['protected']) || $recording['protected'] === 'false') { |
| 1563 | - $href .= '&href='.urlencode(trim($playback['url'])); |
|
| 1563 | + $href .= '&href=' . urlencode(trim($playback['url'])); |
|
| 1564 | 1564 | } |
| 1565 | 1565 | $linkattributes = array( |
| 1566 | 1566 | 'id' => 'recording-play-' . $playback['type'] . '-' . $recording['recordID'], |
@@ -1729,7 +1729,7 @@ discard block |
||
| 1729 | 1729 | $linkattributes['class'] = 'disabled'; |
| 1730 | 1730 | unset($linkattributes['onclick']); |
| 1731 | 1731 | } |
| 1732 | - $icon = new pix_icon('i/'.$data['tag'], |
|
| 1732 | + $icon = new pix_icon('i/' . $data['tag'], |
|
| 1733 | 1733 | get_string('view_recording_list_actionbar_' . $data['action'], 'bigbluebuttonbn'), |
| 1734 | 1734 | 'moodle', $iconattributes); |
| 1735 | 1735 | return $OUTPUT->action_icon('#', $icon, null, $linkattributes, false); |
@@ -1846,7 +1846,7 @@ discard block |
||
| 1846 | 1846 | */ |
| 1847 | 1847 | function bigbluebuttonbn_get_recording_table_row($bbbsession, $recording, $rowdata) { |
| 1848 | 1848 | $row = new html_table_row(); |
| 1849 | - $row->id = 'recording-tr-'.$recording['recordID']; |
|
| 1849 | + $row->id = 'recording-tr-' . $recording['recordID']; |
|
| 1850 | 1850 | $row->attributes['data-imported'] = 'false'; |
| 1851 | 1851 | $texthead = ''; |
| 1852 | 1852 | $texttail = ''; |
@@ -1906,9 +1906,9 @@ discard block |
||
| 1906 | 1906 | function bigbluebuttonbn_send_notification_recording_ready($bigbluebuttonbn) { |
| 1907 | 1907 | $sender = get_admin(); |
| 1908 | 1908 | // Prepare message. |
| 1909 | - $messagetext = '<p>'.get_string('email_body_recording_ready_for', 'bigbluebuttonbn'). |
|
| 1910 | - ' "' . $bigbluebuttonbn->name . '" '. |
|
| 1911 | - get_string('email_body_recording_ready_is_ready', 'bigbluebuttonbn').'.</p>'; |
|
| 1909 | + $messagetext = '<p>' . get_string('email_body_recording_ready_for', 'bigbluebuttonbn') . |
|
| 1910 | + ' "' . $bigbluebuttonbn->name . '" ' . |
|
| 1911 | + get_string('email_body_recording_ready_is_ready', 'bigbluebuttonbn') . '.</p>'; |
|
| 1912 | 1912 | $context = context_course::instance($bigbluebuttonbn->course); |
| 1913 | 1913 | \mod_bigbluebuttonbn\locallib\notifier::notification_send($context, $sender, $bigbluebuttonbn, $messagetext); |
| 1914 | 1914 | } |
@@ -2130,7 +2130,7 @@ discard block |
||
| 2130 | 2130 | } |
| 2131 | 2131 | // Prepare select for loading records based on existent bigbluebuttonbns. |
| 2132 | 2132 | $sql = 'SELECT DISTINCT meetingid, bigbluebuttonbnid FROM {bigbluebuttonbn_logs} WHERE '; |
| 2133 | - $sql .= '(bigbluebuttonbnid='.implode(' OR bigbluebuttonbnid=', array_keys($bigbluebuttonbns)).')'; |
|
| 2133 | + $sql .= '(bigbluebuttonbnid=' . implode(' OR bigbluebuttonbnid=', array_keys($bigbluebuttonbns)) . ')'; |
|
| 2134 | 2134 | // Include only Create events and exclude those with record not true. |
| 2135 | 2135 | $sql .= ' AND log = ? AND meta LIKE ? AND meta LIKE ?'; |
| 2136 | 2136 | // Execute select for loading records based on existent bigbluebuttonbns. |
@@ -2262,8 +2262,8 @@ discard block |
||
| 2262 | 2262 | function bigbluebuttonbn_format_activity_time($time) { |
| 2263 | 2263 | $activitytime = ''; |
| 2264 | 2264 | if ($time) { |
| 2265 | - $activitytime = calendar_day_representation($time).' '. |
|
| 2266 | - get_string('mod_form_field_notification_msg_at', 'bigbluebuttonbn').' '. |
|
| 2265 | + $activitytime = calendar_day_representation($time) . ' ' . |
|
| 2266 | + get_string('mod_form_field_notification_msg_at', 'bigbluebuttonbn') . ' ' . |
|
| 2267 | 2267 | calendar_time_representation($time); |
| 2268 | 2268 | } |
| 2269 | 2269 | return $activitytime; |
@@ -2689,7 +2689,7 @@ discard block |
||
| 2689 | 2689 | * |
| 2690 | 2690 | * @return string |
| 2691 | 2691 | */ |
| 2692 | -function bigbluebuttonbn_render_warning($message, $type='info', $href='', $text='', $class='') { |
|
| 2692 | +function bigbluebuttonbn_render_warning($message, $type = 'info', $href = '', $text = '', $class = '') { |
|
| 2693 | 2693 | global $OUTPUT; |
| 2694 | 2694 | $output = "\n"; |
| 2695 | 2695 | // Evaluates if config_warning is enabled. |
@@ -2728,11 +2728,11 @@ discard block |
||
| 2728 | 2728 | if ($class == '') { |
| 2729 | 2729 | $class = 'btn btn-secondary'; |
| 2730 | 2730 | } |
| 2731 | - $output = ' <form method="post" action="' . $href . '" class="form-inline">'."\n"; |
|
| 2732 | - $output .= ' <button type="submit" class="' . $class . '"'."\n"; |
|
| 2733 | - $output .= ' title="' . $title . '"'."\n"; |
|
| 2734 | - $output .= ' >' . $text . '</button>'."\n"; |
|
| 2735 | - $output .= ' </form>'."\n"; |
|
| 2731 | + $output = ' <form method="post" action="' . $href . '" class="form-inline">' . "\n"; |
|
| 2732 | + $output .= ' <button type="submit" class="' . $class . '"' . "\n"; |
|
| 2733 | + $output .= ' title="' . $title . '"' . "\n"; |
|
| 2734 | + $output .= ' >' . $text . '</button>' . "\n"; |
|
| 2735 | + $output .= ' </form>' . "\n"; |
|
| 2736 | 2736 | return $output; |
| 2737 | 2737 | } |
| 2738 | 2738 | |
@@ -98,7 +98,7 @@ discard block |
||
| 98 | 98 | * recordings from a different activity even from a different course. |
| 99 | 99 | **/ |
| 100 | 100 | |
| 101 | - /* |
|
| 101 | + /* |
|
| 102 | 102 | * When the value is set to 1 (checked) the bigbluebuttonbn rooms or |
| 103 | 103 | * activities will have the 'import recordings' capability enabled. |
| 104 | 104 | * $CFG->bigbluebuttonbn['importrecordings_enabled'] = 0; |
@@ -119,7 +119,7 @@ discard block |
||
| 119 | 119 | * 'Join session' button enabled |
| 120 | 120 | **/ |
| 121 | 121 | |
| 122 | - /* |
|
| 122 | + /* |
|
| 123 | 123 | * When the value is set to 1 (checked) the bigbluebuttonbn rooms or |
| 124 | 124 | * activities will have the 'wait for moderator' capability enabled by |
| 125 | 125 | * default. |
@@ -259,32 +259,32 @@ discard block |
||
| 259 | 259 | * $CFG->bigbluebuttonbn['recordings_imported_editable'] = 1; |
| 260 | 260 | */ |
| 261 | 261 | |
| 262 | - /* |
|
| 262 | + /* |
|
| 263 | 263 | * When the value is set to 1 (checked) the bigbluebuttonbn resources |
| 264 | 264 | * will show the recodings with thumbnails. |
| 265 | 265 | * $CFG->bigbluebuttonbn['recordings_preview_default'] = 1; |
| 266 | 266 | */ |
| 267 | 267 | |
| 268 | - /* |
|
| 268 | + /* |
|
| 269 | 269 | * When the value is set to 1 (checked) the 'preview ui' capability can be |
| 270 | 270 | * enabled/disabled by the user creating or editing the resource. |
| 271 | 271 | * $CFG->bigbluebuttonbn['recordings_preview_editable'] = 0; |
| 272 | 272 | */ |
| 273 | 273 | |
| 274 | - /* |
|
| 274 | + /* |
|
| 275 | 275 | * The WebClient by default is the Flash one (value = 0) or |
| 276 | 276 | * the HTML5 one (value = 1) |
| 277 | 277 | * $CFG->bigbluebuttonbn['clienttype_default'] = 0; |
| 278 | 278 | */ |
| 279 | 279 | |
| 280 | - /* |
|
| 280 | + /* |
|
| 281 | 281 | * When the value is set to 1 (checked) the 'clienttype' |
| 282 | 282 | * capability is enabled, meaning that the administrator can choose the default web client type |
| 283 | 283 | * and if can be editable in each room through the plugin configuration |
| 284 | 284 | * $CFG->bigbluebuttonbn['clienttype_enabled'] = 0; |
| 285 | 285 | */ |
| 286 | 286 | |
| 287 | - /* |
|
| 287 | + /* |
|
| 288 | 288 | * When the value is set to 1 (checked) the WebClient can be chosen |
| 289 | 289 | * the user creating or editing the resource. |
| 290 | 290 | * $CFG->bigbluebuttonbn['clienttype_editable'] = 0; |
@@ -330,27 +330,27 @@ discard block |
||
| 330 | 330 | * $CFG->bigbluebuttonbn['general_warning_message'] = "Would you like to record your BigBlueButton sessions for later viewing? "; |
| 331 | 331 | */ |
| 332 | 332 | |
| 333 | - /* |
|
| 333 | + /* |
|
| 334 | 334 | * The warning box is always shown to administrators, but it is also possible to define other roles |
| 335 | 335 | * to whom the it will be shown. The roles are based on the shortnames defined by Moodle: |
| 336 | 336 | * 'manager,coursecreator,editingteacher,teacher,student,guest,user,frontpage' |
| 337 | 337 | * $CFG->bigbluebuttonbn['general_warning_roles'] = 'editingteacher,teacher'; |
| 338 | 338 | */ |
| 339 | 339 | |
| 340 | - /* |
|
| 340 | + /* |
|
| 341 | 341 | * As the general_warning_message is shown in a box, its type can be defined with general_warning_type |
| 342 | 342 | * The default type is 'info' which is normaly rendered in blue when using a bootstrap theme. |
| 343 | 343 | * All the modifiers for boxed in bootstrap can be used [info|success|warning|danger]. |
| 344 | 344 | * $CFG->bigbluebuttonbn['general_warning_box_type'] = 'info'; |
| 345 | 345 | */ |
| 346 | 346 | |
| 347 | - /* |
|
| 347 | + /* |
|
| 348 | 348 | * Additionally, when general_warning_button_href value is different than "", a button |
| 349 | 349 | * can also be shown right after the message. |
| 350 | 350 | * $CFG->bigbluebuttonbn['general_warning_button_href'] = "http://blindsidenetworks.com/"; |
| 351 | 351 | */ |
| 352 | 352 | |
| 353 | - /* |
|
| 353 | + /* |
|
| 354 | 354 | * Finally, the text and class for the button can be modified |
| 355 | 355 | * $CFG->bigbluebuttonbn['general_warning_button_text'] = "Upgrade your site"; |
| 356 | 356 | * $CFG->bigbluebuttonbn['general_warning_button_class'] = "btn btn-primary"; |
@@ -24,8 +24,8 @@ discard block |
||
| 24 | 24 | * @author Fred Dixon (ffdixon [at] blindsidenetworks [dt] com) |
| 25 | 25 | */ |
| 26 | 26 | |
| 27 | -require_once(dirname(dirname(dirname(__FILE__))).'/config.php'); |
|
| 28 | -require_once(dirname(__FILE__).'/locallib.php'); |
|
| 27 | +require_once(dirname(dirname(dirname(__FILE__))) . '/config.php'); |
|
| 28 | +require_once(dirname(__FILE__) . '/locallib.php'); |
|
| 29 | 29 | |
| 30 | 30 | $id = required_param('id', PARAM_INT); |
| 31 | 31 | $bn = optional_param('n', 0, PARAM_INT); |
@@ -60,19 +60,19 @@ discard block |
||
| 60 | 60 | if (is_null($serverversion)) { |
| 61 | 61 | if ($bbbsession['administrator']) { |
| 62 | 62 | print_error('view_error_unable_join', 'bigbluebuttonbn', |
| 63 | - $CFG->wwwroot.'/admin/settings.php?section=modsettingbigbluebuttonbn'); |
|
| 63 | + $CFG->wwwroot . '/admin/settings.php?section=modsettingbigbluebuttonbn'); |
|
| 64 | 64 | exit; |
| 65 | 65 | } |
| 66 | 66 | if ($bbbsession['moderator']) { |
| 67 | 67 | print_error('view_error_unable_join_teacher', 'bigbluebuttonbn', |
| 68 | - $CFG->wwwroot.'/course/view.php?id='.$bigbluebuttonbn->course); |
|
| 68 | + $CFG->wwwroot . '/course/view.php?id=' . $bigbluebuttonbn->course); |
|
| 69 | 69 | exit; |
| 70 | 70 | } |
| 71 | 71 | print_error('view_error_unable_join_student', 'bigbluebuttonbn', |
| 72 | - $CFG->wwwroot.'/course/view.php?id='.$bigbluebuttonbn->course); |
|
| 72 | + $CFG->wwwroot . '/course/view.php?id=' . $bigbluebuttonbn->course); |
|
| 73 | 73 | exit; |
| 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); |
@@ -80,7 +80,7 @@ discard block |
||
| 80 | 80 | |
| 81 | 81 | // Print the page header. |
| 82 | 82 | $PAGE->set_context($context); |
| 83 | -$PAGE->set_url($CFG->wwwroot.'/mod/bigbluebuttonbn/view.php', array('id' => $cm->id)); |
|
| 83 | +$PAGE->set_url($CFG->wwwroot . '/mod/bigbluebuttonbn/view.php', array('id' => $cm->id)); |
|
| 84 | 84 | $PAGE->set_title(format_string($bigbluebuttonbn->name)); |
| 85 | 85 | $PAGE->set_cacheable(false); |
| 86 | 86 | $PAGE->set_heading($course->fullname); |
@@ -90,11 +90,11 @@ discard block |
||
| 90 | 90 | if (!has_capability('moodle/category:manage', $context) && !has_capability('mod/bigbluebuttonbn:join', $context)) { |
| 91 | 91 | echo $OUTPUT->header(); |
| 92 | 92 | if (isguestuser()) { |
| 93 | - echo $OUTPUT->confirm('<p>'.get_string('view_noguests', 'bigbluebuttonbn').'</p>'.get_string('liketologin'), |
|
| 94 | - get_login_url(), $CFG->wwwroot.'/course/view.php?id='.$course->id); |
|
| 93 | + echo $OUTPUT->confirm('<p>' . get_string('view_noguests', 'bigbluebuttonbn') . '</p>' . get_string('liketologin'), |
|
| 94 | + get_login_url(), $CFG->wwwroot . '/course/view.php?id=' . $course->id); |
|
| 95 | 95 | } else { |
| 96 | - echo $OUTPUT->confirm('<p>'.get_string('view_nojoin', 'bigbluebuttonbn').'</p>'.get_string('liketologin'), |
|
| 97 | - get_login_url(), $CFG->wwwroot.'/course/view.php?id='.$course->id); |
|
| 96 | + echo $OUTPUT->confirm('<p>' . get_string('view_nojoin', 'bigbluebuttonbn') . '</p>' . get_string('liketologin'), |
|
| 97 | + get_login_url(), $CFG->wwwroot . '/course/view.php?id=' . $course->id); |
|
| 98 | 98 | } |
| 99 | 99 | echo $OUTPUT->footer(); |
| 100 | 100 | exit; |
@@ -102,7 +102,7 @@ discard block |
||
| 102 | 102 | |
| 103 | 103 | // Operation URLs. |
| 104 | 104 | $bbbsession['bigbluebuttonbnURL'] = $CFG->wwwroot . '/mod/bigbluebuttonbn/view.php?id=' . $bbbsession['cm']->id; |
| 105 | -$bbbsession['logoutURL'] = $CFG->wwwroot . '/mod/bigbluebuttonbn/bbb_view.php?action=logout&id='.$id . |
|
| 105 | +$bbbsession['logoutURL'] = $CFG->wwwroot . '/mod/bigbluebuttonbn/bbb_view.php?action=logout&id=' . $id . |
|
| 106 | 106 | '&bn=' . $bbbsession['bigbluebuttonbn']->id; |
| 107 | 107 | $bbbsession['recordingReadyURL'] = $CFG->wwwroot . '/mod/bigbluebuttonbn/bbb_broker.php?action=recording_' . |
| 108 | 108 | 'ready&bigbluebuttonbn=' . $bbbsession['bigbluebuttonbn']->id; |
@@ -122,7 +122,7 @@ discard block |
||
| 122 | 122 | echo $OUTPUT->footer(); |
| 123 | 123 | |
| 124 | 124 | // Shows version as a comment. |
| 125 | -echo '<!-- '.$bbbsession['originTag'].' -->'."\n"; |
|
| 125 | +echo '<!-- ' . $bbbsession['originTag'] . ' -->' . "\n"; |
|
| 126 | 126 | |
| 127 | 127 | // Initialize session variable used across views. |
| 128 | 128 | $SESSION->bigbluebuttonbn_bbbsession = $bbbsession; |
@@ -150,7 +150,7 @@ discard block |
||
| 150 | 150 | $bbbsession['modPW'] = $bbbsession['bigbluebuttonbn']->moderatorpass; |
| 151 | 151 | $bbbsession['viewerPW'] = $bbbsession['bigbluebuttonbn']->viewerpass; |
| 152 | 152 | // Database info related to the activity. |
| 153 | - $bbbsession['meetingid'] = $bbbsession['bigbluebuttonbn']->meetingid.'-'.$bbbsession['course']->id.'-'. |
|
| 153 | + $bbbsession['meetingid'] = $bbbsession['bigbluebuttonbn']->meetingid . '-' . $bbbsession['course']->id . '-' . |
|
| 154 | 154 | $bbbsession['bigbluebuttonbn']->id; |
| 155 | 155 | $bbbsession['meetingname'] = $bbbsession['bigbluebuttonbn']->name; |
| 156 | 156 | $bbbsession['meetingdescription'] = $bbbsession['bigbluebuttonbn']->intro; |
@@ -170,7 +170,7 @@ discard block |
||
| 170 | 170 | $bbbsession['welcome'] = get_string('mod_form_field_welcome_default', 'bigbluebuttonbn'); |
| 171 | 171 | } |
| 172 | 172 | if ($bbbsession['bigbluebuttonbn']->record) { |
| 173 | - $bbbsession['welcome'] .= '<br><br>'.get_string('bbbrecordwarning', 'bigbluebuttonbn'); |
|
| 173 | + $bbbsession['welcome'] .= '<br><br>' . get_string('bbbrecordwarning', 'bigbluebuttonbn'); |
|
| 174 | 174 | } |
| 175 | 175 | $bbbsession['openingtime'] = $bbbsession['bigbluebuttonbn']->openingtime; |
| 176 | 176 | $bbbsession['closingtime'] = $bbbsession['bigbluebuttonbn']->closingtime; |
@@ -183,7 +183,7 @@ discard block |
||
| 183 | 183 | $bbbsession['originServerName'] = $parsedurl['host']; |
| 184 | 184 | $bbbsession['originServerUrl'] = $CFG->wwwroot; |
| 185 | 185 | $bbbsession['originServerCommonName'] = ''; |
| 186 | - $bbbsession['originTag'] = 'moodle-mod_bigbluebuttonbn ('.get_config('mod_bigbluebuttonbn', 'version').')'; |
|
| 186 | + $bbbsession['originTag'] = 'moodle-mod_bigbluebuttonbn (' . get_config('mod_bigbluebuttonbn', 'version') . ')'; |
|
| 187 | 187 | $bbbsession['bnserver'] = bigbluebuttonbn_is_bn_server(); |
| 188 | 188 | $bbbsession['clienttype'] = $bbbsession['bigbluebuttonbn']->clienttype; |
| 189 | 189 | } |
@@ -239,8 +239,8 @@ discard block |
||
| 239 | 239 | $groupname = groups_get_group_name($bbbsession['group']); |
| 240 | 240 | } |
| 241 | 241 | // Assign group default values. |
| 242 | - $bbbsession['meetingid'] .= '['.$bbbsession['group'].']'; |
|
| 243 | - $bbbsession['meetingname'] .= ' ('.$groupname.')'; |
|
| 242 | + $bbbsession['meetingid'] .= '[' . $bbbsession['group'] . ']'; |
|
| 243 | + $bbbsession['meetingname'] .= ' (' . $groupname . ')'; |
|
| 244 | 244 | if (count($groups) == 0) { |
| 245 | 245 | // Only the All participants group exists. |
| 246 | 246 | bigbluebuttonbn_view_message_box($bbbsession, get_string('view_groups_notenrolled_warning', 'bigbluebuttonbn'), 'info'); |
@@ -250,7 +250,7 @@ discard block |
||
| 250 | 250 | if (has_capability('moodle/site:accessallgroups', $context)) { |
| 251 | 251 | bigbluebuttonbn_view_message_box($bbbsession, get_string('view_groups_selection_warning', 'bigbluebuttonbn')); |
| 252 | 252 | } |
| 253 | - $urltoroot = $CFG->wwwroot.'/mod/bigbluebuttonbn/view.php?id='.$bbbsession['cm']->id; |
|
| 253 | + $urltoroot = $CFG->wwwroot . '/mod/bigbluebuttonbn/view.php?id=' . $bbbsession['cm']->id; |
|
| 254 | 254 | groups_print_activity_menu($bbbsession['cm'], $urltoroot); |
| 255 | 255 | echo '<br><br>'; |
| 256 | 256 | } |
@@ -317,7 +317,7 @@ discard block |
||
| 317 | 317 | $recordingsdisabled = get_string('view_message_recordings_disabled', 'bigbluebuttonbn'); |
| 318 | 318 | $output .= bigbluebuttonbn_render_warning($recordingsdisabled, 'danger'); |
| 319 | 319 | } |
| 320 | - echo $output.html_writer::empty_tag('br').html_writer::empty_tag('br').html_writer::empty_tag('br'); |
|
| 320 | + echo $output . html_writer::empty_tag('br') . html_writer::empty_tag('br') . html_writer::empty_tag('br'); |
|
| 321 | 321 | $PAGE->requires->yui_module('moodle-mod_bigbluebuttonbn-broker', 'M.mod_bigbluebuttonbn.broker.init', array($jsvars)); |
| 322 | 322 | } |
| 323 | 323 | |
@@ -386,12 +386,12 @@ discard block |
||
| 386 | 386 | // JavaScript variables for room. |
| 387 | 387 | $openingtime = ''; |
| 388 | 388 | if ($bbbsession['openingtime']) { |
| 389 | - $openingtime = get_string('mod_form_field_openingtime', 'bigbluebuttonbn').': '. |
|
| 389 | + $openingtime = get_string('mod_form_field_openingtime', 'bigbluebuttonbn') . ': ' . |
|
| 390 | 390 | userdate($bbbsession['openingtime']); |
| 391 | 391 | } |
| 392 | 392 | $closingtime = ''; |
| 393 | 393 | if ($bbbsession['closingtime']) { |
| 394 | - $closingtime = get_string('mod_form_field_closingtime', 'bigbluebuttonbn').': '. |
|
| 394 | + $closingtime = get_string('mod_form_field_closingtime', 'bigbluebuttonbn') . ': ' . |
|
| 395 | 395 | userdate($bbbsession['closingtime']); |
| 396 | 396 | } |
| 397 | 397 | $jsvars += array( |
@@ -408,7 +408,7 @@ discard block |
||
| 408 | 408 | $output .= $OUTPUT->box_end(); |
| 409 | 409 | // Action button box. |
| 410 | 410 | $output .= $OUTPUT->box_start('generalbox boxaligncenter', 'bigbluebuttonbn_view_action_button_box'); |
| 411 | - $output .= '<br><br><span id="join_button"></span> <span id="end_button"></span>'."\n"; |
|
| 411 | + $output .= '<br><br><span id="join_button"></span> <span id="end_button"></span>' . "\n"; |
|
| 412 | 412 | $output .= $OUTPUT->box_end(); |
| 413 | 413 | if ($activity == 'ended') { |
| 414 | 414 | $output .= bigbluebuttonbn_view_ended($bbbsession); |
@@ -461,7 +461,7 @@ discard block |
||
| 461 | 461 | // If there are meetings with recordings load the data to the table. |
| 462 | 462 | if ($bbbsession['bigbluebuttonbn']->recordings_html) { |
| 463 | 463 | // Render a plain html table. |
| 464 | - return bigbluebuttonbn_output_recording_table($bbbsession, $recordings)."\n"; |
|
| 464 | + return bigbluebuttonbn_output_recording_table($bbbsession, $recordings) . "\n"; |
|
| 465 | 465 | } |
| 466 | 466 | // JavaScript variables for recordings with YUI. |
| 467 | 467 | $jsvars += array( |
@@ -489,8 +489,8 @@ discard block |
||
| 489 | 489 | array('type' => 'button', |
| 490 | 490 | 'value' => get_string('view_recording_button_import', 'bigbluebuttonbn'), |
| 491 | 491 | 'class' => 'btn btn-secondary', |
| 492 | - 'onclick' => 'window.location=\''.$CFG->wwwroot.'/mod/bigbluebuttonbn/import_view.php?bn='. |
|
| 493 | - $bbbsession['bigbluebuttonbn']->id.'\'')); |
|
| 492 | + 'onclick' => 'window.location=\'' . $CFG->wwwroot . '/mod/bigbluebuttonbn/import_view.php?bn=' . |
|
| 493 | + $bbbsession['bigbluebuttonbn']->id . '\'')); |
|
| 494 | 494 | $output = html_writer::empty_tag('br'); |
| 495 | 495 | $output .= html_writer::tag('span', $button, array('id' => 'import_recording_links_button')); |
| 496 | 496 | $output .= html_writer::tag('span', '', array('id' => 'import_recording_links_table')); |
@@ -509,10 +509,10 @@ discard block |
||
| 509 | 509 | if (!is_null($bbbsession['presentation']['url'])) { |
| 510 | 510 | $attributes = array('title' => $bbbsession['presentation']['name']); |
| 511 | 511 | $icon = new pix_icon($bbbsession['presentation']['icon'], $bbbsession['presentation']['mimetype_description']); |
| 512 | - return '<h4>'.get_string('view_section_title_presentation', 'bigbluebuttonbn').'</h4>'. |
|
| 513 | - $OUTPUT->action_icon($bbbsession['presentation']['url'], $icon, null, array(), false). |
|
| 512 | + return '<h4>' . get_string('view_section_title_presentation', 'bigbluebuttonbn') . '</h4>' . |
|
| 513 | + $OUTPUT->action_icon($bbbsession['presentation']['url'], $icon, null, array(), false) . |
|
| 514 | 514 | $OUTPUT->action_link($bbbsession['presentation']['url'], |
| 515 | - $bbbsession['presentation']['name'], null, $attributes).'<br><br>'; |
|
| 515 | + $bbbsession['presentation']['name'], null, $attributes) . '<br><br>'; |
|
| 516 | 516 | } |
| 517 | 517 | return ''; |
| 518 | 518 | } |