@@ -111,7 +111,7 @@ |
||
| 111 | 111 | * |
| 112 | 112 | * @param object $bigbluebuttonbn |
| 113 | 113 | * |
| 114 | - * @return void |
|
| 114 | + * @return string |
|
| 115 | 115 | */ |
| 116 | 116 | public static function htmlmsg_recording_ready($bigbluebuttonbn) { |
| 117 | 117 | return '<p>'.get_string('email_body_recording_ready_for', 'bigbluebuttonbn'). |
@@ -44,29 +44,29 @@ discard block |
||
| 44 | 44 | * @return string |
| 45 | 45 | */ |
| 46 | 46 | public static function htmlmsg_instance_updated($msg) { |
| 47 | - $messagetext = '<p>'.$msg->activity_type.' "'.$msg->activity_title.'" '. |
|
| 48 | - get_string('email_body_notification_meeting_has_been', 'bigbluebuttonbn').' '.$msg->action.'.</p>'."\n"; |
|
| 49 | - $messagetext .= '<p><b>'.$msg->activity_title.'</b> '. |
|
| 50 | - get_string('email_body_notification_meeting_details', 'bigbluebuttonbn').':'."\n"; |
|
| 51 | - $messagetext .= '<table border="0" style="margin: 5px 0 0 20px"><tbody>'."\n"; |
|
| 52 | - $messagetext .= '<tr><td style="font-weight:bold;color:#555;">'. |
|
| 53 | - get_string('email_body_notification_meeting_title', 'bigbluebuttonbn').': </td><td>'."\n"; |
|
| 54 | - $messagetext .= $msg->activity_title.'</td></tr>'."\n"; |
|
| 55 | - $messagetext .= '<tr><td style="font-weight:bold;color:#555;">'. |
|
| 56 | - get_string('email_body_notification_meeting_description', 'bigbluebuttonbn').': </td><td>'."\n"; |
|
| 57 | - $messagetext .= $msg->activity_description.'</td></tr>'."\n"; |
|
| 58 | - $messagetext .= '<tr><td style="font-weight:bold;color:#555;">'. |
|
| 59 | - get_string('email_body_notification_meeting_start_date', 'bigbluebuttonbn').': </td><td>'."\n"; |
|
| 60 | - $messagetext .= $msg->activity_openingtime.'</td></tr>'."\n"; |
|
| 61 | - $messagetext .= '<tr><td style="font-weight:bold;color:#555;">'. |
|
| 62 | - get_string('email_body_notification_meeting_end_date', 'bigbluebuttonbn').': </td><td>'."\n"; |
|
| 63 | - $messagetext .= $msg->activity_closingtime.'</td></tr>'."\n"; |
|
| 64 | - $messagetext .= '<tr><td style="font-weight:bold;color:#555;">'.$msg->action.' '. |
|
| 65 | - get_string('email_body_notification_meeting_by', 'bigbluebuttonbn').': </td><td>'."\n"; |
|
| 66 | - $messagetext .= $msg->activity_owner.'</td></tr></tbody></table></p>'."\n"; |
|
| 67 | - $messagetext .= '<p><hr/><br/>'.get_string('email_footer_sent_by', 'bigbluebuttonbn').' '. |
|
| 68 | - $msg->user_name.'('.$msg->user_email.') '; |
|
| 69 | - $messagetext .= get_string('email_footer_sent_from', 'bigbluebuttonbn').' '.$msg->course_name.'.</p>'; |
|
| 47 | + $messagetext = '<p>' . $msg->activity_type . ' "' . $msg->activity_title . '" ' . |
|
| 48 | + get_string('email_body_notification_meeting_has_been', 'bigbluebuttonbn') . ' ' . $msg->action . '.</p>' . "\n"; |
|
| 49 | + $messagetext .= '<p><b>' . $msg->activity_title . '</b> ' . |
|
| 50 | + get_string('email_body_notification_meeting_details', 'bigbluebuttonbn') . ':' . "\n"; |
|
| 51 | + $messagetext .= '<table border="0" style="margin: 5px 0 0 20px"><tbody>' . "\n"; |
|
| 52 | + $messagetext .= '<tr><td style="font-weight:bold;color:#555;">' . |
|
| 53 | + get_string('email_body_notification_meeting_title', 'bigbluebuttonbn') . ': </td><td>' . "\n"; |
|
| 54 | + $messagetext .= $msg->activity_title . '</td></tr>' . "\n"; |
|
| 55 | + $messagetext .= '<tr><td style="font-weight:bold;color:#555;">' . |
|
| 56 | + get_string('email_body_notification_meeting_description', 'bigbluebuttonbn') . ': </td><td>' . "\n"; |
|
| 57 | + $messagetext .= $msg->activity_description . '</td></tr>' . "\n"; |
|
| 58 | + $messagetext .= '<tr><td style="font-weight:bold;color:#555;">' . |
|
| 59 | + get_string('email_body_notification_meeting_start_date', 'bigbluebuttonbn') . ': </td><td>' . "\n"; |
|
| 60 | + $messagetext .= $msg->activity_openingtime . '</td></tr>' . "\n"; |
|
| 61 | + $messagetext .= '<tr><td style="font-weight:bold;color:#555;">' . |
|
| 62 | + get_string('email_body_notification_meeting_end_date', 'bigbluebuttonbn') . ': </td><td>' . "\n"; |
|
| 63 | + $messagetext .= $msg->activity_closingtime . '</td></tr>' . "\n"; |
|
| 64 | + $messagetext .= '<tr><td style="font-weight:bold;color:#555;">' . $msg->action . ' ' . |
|
| 65 | + get_string('email_body_notification_meeting_by', 'bigbluebuttonbn') . ': </td><td>' . "\n"; |
|
| 66 | + $messagetext .= $msg->activity_owner . '</td></tr></tbody></table></p>' . "\n"; |
|
| 67 | + $messagetext .= '<p><hr/><br/>' . get_string('email_footer_sent_by', 'bigbluebuttonbn') . ' ' . |
|
| 68 | + $msg->user_name . '(' . $msg->user_email . ') '; |
|
| 69 | + $messagetext .= get_string('email_footer_sent_from', 'bigbluebuttonbn') . ' ' . $msg->course_name . '.</p>'; |
|
| 70 | 70 | return $messagetext; |
| 71 | 71 | } |
| 72 | 72 | |
@@ -83,7 +83,7 @@ discard block |
||
| 83 | 83 | $course = $coursemodinfo->get_course($bigbluebuttonbn->course); |
| 84 | 84 | $sender = $USER; |
| 85 | 85 | // Prepare message. |
| 86 | - $msg = (object) array(); |
|
| 86 | + $msg = (object)array(); |
|
| 87 | 87 | // Build the message_body. |
| 88 | 88 | $msg->action = $action; |
| 89 | 89 | $msg->activity_type = ''; |
@@ -114,9 +114,9 @@ discard block |
||
| 114 | 114 | * @return void |
| 115 | 115 | */ |
| 116 | 116 | public static function htmlmsg_recording_ready($bigbluebuttonbn) { |
| 117 | - return '<p>'.get_string('email_body_recording_ready_for', 'bigbluebuttonbn'). |
|
| 118 | - ' "' . $bigbluebuttonbn->name . '" '. |
|
| 119 | - get_string('email_body_recording_ready_is_ready', 'bigbluebuttonbn').'.</p>'; |
|
| 117 | + return '<p>' . get_string('email_body_recording_ready_for', 'bigbluebuttonbn') . |
|
| 118 | + ' "' . $bigbluebuttonbn->name . '" ' . |
|
| 119 | + get_string('email_body_recording_ready_is_ready', 'bigbluebuttonbn') . '.</p>'; |
|
| 120 | 120 | } |
| 121 | 121 | |
| 122 | 122 | /** |
@@ -158,7 +158,7 @@ discard block |
||
| 158 | 158 | // Enqueue it. |
| 159 | 159 | \core\task\manager::queue_adhoc_task($task); |
| 160 | 160 | } catch (Exception $e) { |
| 161 | - mtrace("Error while enqueuing completion_uopdate_state task. " . (string) $e); |
|
| 161 | + mtrace("Error while enqueuing completion_uopdate_state task. " . (string)$e); |
|
| 162 | 162 | } |
| 163 | 163 | } |
| 164 | 164 | } |
@@ -23,9 +23,9 @@ discard block |
||
| 23 | 23 | * @author Jesus Federico (jesus [at] blindsidenetworks [dt] com) |
| 24 | 24 | */ |
| 25 | 25 | |
| 26 | -require(__DIR__.'/../../config.php'); |
|
| 27 | -require_once(__DIR__.'/locallib.php'); |
|
| 28 | -require_once(__DIR__.'/brokerlib.php'); |
|
| 26 | +require(__DIR__ . '/../../config.php'); |
|
| 27 | +require_once(__DIR__ . '/locallib.php'); |
|
| 28 | +require_once(__DIR__ . '/brokerlib.php'); |
|
| 29 | 29 | |
| 30 | 30 | global $PAGE, $USER, $CFG, $SESSION, $DB; |
| 31 | 31 | |
@@ -42,13 +42,13 @@ discard block |
||
| 42 | 42 | require_sesskey(); |
| 43 | 43 | |
| 44 | 44 | if (empty($params['action'])) { |
| 45 | - header('HTTP/1.0 400 Bad Request. Parameter ['.$params['action'].'] was not included'); |
|
| 45 | + header('HTTP/1.0 400 Bad Request. Parameter [' . $params['action'] . '] was not included'); |
|
| 46 | 46 | return; |
| 47 | 47 | } |
| 48 | 48 | |
| 49 | 49 | $error = bigbluebuttonbn_broker_validate_parameters($params); |
| 50 | 50 | if (!empty($error)) { |
| 51 | - header('HTTP/1.0 400 Bad Request. '.$error); |
|
| 51 | + header('HTTP/1.0 400 Bad Request. ' . $error); |
|
| 52 | 52 | return; |
| 53 | 53 | } |
| 54 | 54 | |
@@ -127,7 +127,7 @@ discard block |
||
| 127 | 127 | echo $completionvalidate; |
| 128 | 128 | return; |
| 129 | 129 | } |
| 130 | - header('HTTP/1.0 400 Bad request. The action '. $a . ' doesn\'t exist'); |
|
| 130 | + header('HTTP/1.0 400 Bad request. The action ' . $a . ' doesn\'t exist'); |
|
| 131 | 131 | } catch (Exception $e) { |
| 132 | - header('HTTP/1.0 500 Internal Server Error. '.$e->getMessage()); |
|
| 132 | + header('HTTP/1.0 500 Internal Server Error. ' . $e->getMessage()); |
|
| 133 | 133 | } |
@@ -54,8 +54,8 @@ discard block |
||
| 54 | 54 | $groupname = groups_get_group_name($bbbsession['group']); |
| 55 | 55 | } |
| 56 | 56 | // Assign group default values. |
| 57 | - $bbbsession['meetingid'] .= '['.$bbbsession['group'].']'; |
|
| 58 | - $bbbsession['meetingname'] .= ' ('.$groupname.')'; |
|
| 57 | + $bbbsession['meetingid'] .= '[' . $bbbsession['group'] . ']'; |
|
| 58 | + $bbbsession['meetingname'] .= ' (' . $groupname . ')'; |
|
| 59 | 59 | if (count($groups) == 0) { |
| 60 | 60 | // Only the All participants group exists. |
| 61 | 61 | bigbluebuttonbn_view_message_box($bbbsession, get_string('view_groups_notenrolled_warning', 'bigbluebuttonbn'), 'info'); |
@@ -65,7 +65,7 @@ discard block |
||
| 65 | 65 | if (has_capability('moodle/site:accessallgroups', $context)) { |
| 66 | 66 | bigbluebuttonbn_view_message_box($bbbsession, get_string('view_groups_selection_warning', 'bigbluebuttonbn')); |
| 67 | 67 | } |
| 68 | - $urltoroot = $CFG->wwwroot.'/mod/bigbluebuttonbn/view.php?id='.$bbbsession['cm']->id; |
|
| 68 | + $urltoroot = $CFG->wwwroot . '/mod/bigbluebuttonbn/view.php?id=' . $bbbsession['cm']->id; |
|
| 69 | 69 | groups_print_activity_menu($bbbsession['cm'], $urltoroot); |
| 70 | 70 | echo '<br><br>'; |
| 71 | 71 | } |
@@ -137,7 +137,7 @@ discard block |
||
| 137 | 137 | $recordingsdisabled = get_string('view_message_recordings_disabled', 'bigbluebuttonbn'); |
| 138 | 138 | $output .= bigbluebuttonbn_render_warning($recordingsdisabled, 'danger'); |
| 139 | 139 | } |
| 140 | - echo $output.html_writer::empty_tag('br').html_writer::empty_tag('br').html_writer::empty_tag('br'); |
|
| 140 | + echo $output . html_writer::empty_tag('br') . html_writer::empty_tag('br') . html_writer::empty_tag('br'); |
|
| 141 | 141 | $PAGE->requires->yui_module('moodle-mod_bigbluebuttonbn-broker', 'M.mod_bigbluebuttonbn.broker.init', array($jsvars)); |
| 142 | 142 | } |
| 143 | 143 | |
@@ -206,12 +206,12 @@ discard block |
||
| 206 | 206 | // JavaScript variables for room. |
| 207 | 207 | $openingtime = ''; |
| 208 | 208 | if ($bbbsession['openingtime']) { |
| 209 | - $openingtime = get_string('mod_form_field_openingtime', 'bigbluebuttonbn').': '. |
|
| 209 | + $openingtime = get_string('mod_form_field_openingtime', 'bigbluebuttonbn') . ': ' . |
|
| 210 | 210 | userdate($bbbsession['openingtime']); |
| 211 | 211 | } |
| 212 | 212 | $closingtime = ''; |
| 213 | 213 | if ($bbbsession['closingtime']) { |
| 214 | - $closingtime = get_string('mod_form_field_closingtime', 'bigbluebuttonbn').': '. |
|
| 214 | + $closingtime = get_string('mod_form_field_closingtime', 'bigbluebuttonbn') . ': ' . |
|
| 215 | 215 | userdate($bbbsession['closingtime']); |
| 216 | 216 | } |
| 217 | 217 | $jsvars += array( |
@@ -228,7 +228,7 @@ discard block |
||
| 228 | 228 | $output .= $OUTPUT->box_end(); |
| 229 | 229 | // Action button box. |
| 230 | 230 | $output .= $OUTPUT->box_start('generalbox boxaligncenter', 'bigbluebuttonbn_view_action_button_box'); |
| 231 | - $output .= '<br><br><span id="join_button"></span> <span id="end_button"></span>'."\n"; |
|
| 231 | + $output .= '<br><br><span id="join_button"></span> <span id="end_button"></span>' . "\n"; |
|
| 232 | 232 | $output .= $OUTPUT->box_end(); |
| 233 | 233 | if ($activity == 'ended') { |
| 234 | 234 | $output .= bigbluebuttonbn_view_ended($bbbsession); |
@@ -259,7 +259,7 @@ discard block |
||
| 259 | 259 | // Get recording links. |
| 260 | 260 | $bigbluebuttonbnid = $bbbsession['bigbluebuttonbn']->id; |
| 261 | 261 | $recordingsimported = bigbluebuttonbn_get_recordings_imported_array( |
| 262 | - $bbbsession['course']->id, $bigbluebuttonbnid, true |
|
| 262 | + $bbbsession['course']->id, $bigbluebuttonbnid, true |
|
| 263 | 263 | ); |
| 264 | 264 | /* Perform aritmetic addition instead of merge so the imported recordings corresponding to existent |
| 265 | 265 | * recordings are not included. */ |
@@ -282,7 +282,7 @@ discard block |
||
| 282 | 282 | // If there are meetings with recordings load the data to the table. |
| 283 | 283 | if ($bbbsession['bigbluebuttonbn']->recordings_html) { |
| 284 | 284 | // Render a plain html table. |
| 285 | - return bigbluebuttonbn_output_recording_table($bbbsession, $recordings)."\n"; |
|
| 285 | + return bigbluebuttonbn_output_recording_table($bbbsession, $recordings) . "\n"; |
|
| 286 | 286 | } |
| 287 | 287 | // JavaScript variables for recordings with YUI. |
| 288 | 288 | $jsvars += array( |
@@ -319,8 +319,8 @@ discard block |
||
| 319 | 319 | array('type' => 'button', |
| 320 | 320 | 'value' => get_string('view_recording_button_import', 'bigbluebuttonbn'), |
| 321 | 321 | 'class' => 'btn btn-secondary', |
| 322 | - 'onclick' => 'window.location=\''.$CFG->wwwroot.'/mod/bigbluebuttonbn/import_view.php?bn='. |
|
| 323 | - $bbbsession['bigbluebuttonbn']->id.'\'')); |
|
| 322 | + 'onclick' => 'window.location=\'' . $CFG->wwwroot . '/mod/bigbluebuttonbn/import_view.php?bn=' . |
|
| 323 | + $bbbsession['bigbluebuttonbn']->id . '\'')); |
|
| 324 | 324 | $output = html_writer::empty_tag('br'); |
| 325 | 325 | $output .= html_writer::tag('span', $button, array('id' => 'import_recording_links_button')); |
| 326 | 326 | $output .= html_writer::tag('span', '', array('id' => 'import_recording_links_table')); |
@@ -339,10 +339,10 @@ discard block |
||
| 339 | 339 | if (!is_null($bbbsession['presentation']['url'])) { |
| 340 | 340 | $attributes = array('title' => $bbbsession['presentation']['name']); |
| 341 | 341 | $icon = new pix_icon($bbbsession['presentation']['icon'], $bbbsession['presentation']['mimetype_description']); |
| 342 | - return '<h4>'.get_string('view_section_title_presentation', 'bigbluebuttonbn').'</h4>'. |
|
| 343 | - $OUTPUT->action_icon($bbbsession['presentation']['url'], $icon, null, array(), false). |
|
| 342 | + return '<h4>' . get_string('view_section_title_presentation', 'bigbluebuttonbn') . '</h4>' . |
|
| 343 | + $OUTPUT->action_icon($bbbsession['presentation']['url'], $icon, null, array(), false) . |
|
| 344 | 344 | $OUTPUT->action_link($bbbsession['presentation']['url'], |
| 345 | - $bbbsession['presentation']['name'], null, $attributes).'<br><br>'; |
|
| 345 | + $bbbsession['presentation']['name'], null, $attributes) . '<br><br>'; |
|
| 346 | 346 | } |
| 347 | 347 | return ''; |
| 348 | 348 | } |
@@ -317,7 +317,7 @@ discard block |
||
| 317 | 317 | * Helper function to retrieve imported recordings from the Moodle database. |
| 318 | 318 | * The references are stored as events in bigbluebuttonbn_logs. |
| 319 | 319 | * |
| 320 | - * @param string $courseid |
|
| 320 | + * @param integer $courseid |
|
| 321 | 321 | * @param string $bigbluebuttonbnid |
| 322 | 322 | * @param bool $subset |
| 323 | 323 | * |
@@ -345,7 +345,7 @@ discard block |
||
| 345 | 345 | /** |
| 346 | 346 | * Helper function to retrive the default config.xml file. |
| 347 | 347 | * |
| 348 | - * @return string |
|
| 348 | + * @return null|SimpleXMLElement |
|
| 349 | 349 | */ |
| 350 | 350 | function bigbluebuttonbn_get_default_config_xml() { |
| 351 | 351 | $xml = bigbluebuttonbn_wrap_xml_load_file( |
@@ -427,7 +427,7 @@ discard block |
||
| 427 | 427 | * @param object $a |
| 428 | 428 | * @param object $b |
| 429 | 429 | * |
| 430 | - * @return array |
|
| 430 | + * @return integer |
|
| 431 | 431 | */ |
| 432 | 432 | function bigbluebuttonbn_recording_build_sorter($a, $b) { |
| 433 | 433 | global $CFG; |
@@ -541,7 +541,7 @@ discard block |
||
| 541 | 541 | * @param string $data |
| 542 | 542 | * @param string $contenttype |
| 543 | 543 | * |
| 544 | - * @return object |
|
| 544 | + * @return null|SimpleXMLElement |
|
| 545 | 545 | */ |
| 546 | 546 | function bigbluebuttonbn_wrap_xml_load_file($url, $method = 'GET', $data = null, $contenttype = 'text/xml') { |
| 547 | 547 | if (extension_loaded('curl')) { |
@@ -582,7 +582,7 @@ discard block |
||
| 582 | 582 | * @param string $data |
| 583 | 583 | * @param string $contenttype |
| 584 | 584 | * |
| 585 | - * @return object |
|
| 585 | + * @return string |
|
| 586 | 586 | */ |
| 587 | 587 | function bigbluebuttonbn_wrap_xml_load_file_curl_request($url, $method = 'GET', $data = null, $contenttype = 'text/xml') { |
| 588 | 588 | global $CFG; |
@@ -974,7 +974,7 @@ discard block |
||
| 974 | 974 | * @param integer $instance |
| 975 | 975 | * @param integer $voicebridge |
| 976 | 976 | * |
| 977 | - * @return string |
|
| 977 | + * @return boolean |
|
| 978 | 978 | */ |
| 979 | 979 | function bigbluebuttonbn_voicebridge_unique($instance, $voicebridge) { |
| 980 | 980 | global $DB; |
@@ -1322,7 +1322,7 @@ discard block |
||
| 1322 | 1322 | * @param string $meetingid |
| 1323 | 1323 | * @param string $configxml |
| 1324 | 1324 | * |
| 1325 | - * @return object |
|
| 1325 | + * @return null|SimpleXMLElement |
|
| 1326 | 1326 | */ |
| 1327 | 1327 | function bigbluebuttonbn_set_config_xml($meetingid, $configxml) { |
| 1328 | 1328 | $urldefaultconfig = \mod_bigbluebuttonbn\locallib\config::get('server_url') . 'api/setConfigXML?'; |
@@ -1376,7 +1376,7 @@ discard block |
||
| 1376 | 1376 | * @param array $recording |
| 1377 | 1377 | * @param array $tools |
| 1378 | 1378 | * |
| 1379 | - * @return array |
|
| 1379 | + * @return null|stdClass |
|
| 1380 | 1380 | */ |
| 1381 | 1381 | function bigbluebuttonbn_get_recording_data_row($bbbsession, $recording, $tools = ['protect', 'publish', 'delete']) { |
| 1382 | 1382 | if (!bigbluebuttonbn_include_recording_table_row($bbbsession, $recording)) { |
@@ -2018,7 +2018,7 @@ discard block |
||
| 2018 | 2018 | * |
| 2019 | 2019 | * @param array $bbbsession |
| 2020 | 2020 | * @param array $recording |
| 2021 | - * @param object $rowdata |
|
| 2021 | + * @param stdClass $rowdata |
|
| 2022 | 2022 | * |
| 2023 | 2023 | * @return object |
| 2024 | 2024 | */ |
@@ -2215,7 +2215,7 @@ discard block |
||
| 2215 | 2215 | * |
| 2216 | 2216 | * @param array $bbbsession |
| 2217 | 2217 | * @param array $recordings |
| 2218 | - * @param array $tools |
|
| 2218 | + * @param string[] $tools |
|
| 2219 | 2219 | * |
| 2220 | 2220 | * @return array |
| 2221 | 2221 | */ |
@@ -2296,7 +2296,7 @@ discard block |
||
| 2296 | 2296 | * Helper function to define the sql used for gattering the bigbluebuttonbnids whose meetingids should be included |
| 2297 | 2297 | * in the getRecordings request considering only those that belong to deleted activities. |
| 2298 | 2298 | * |
| 2299 | - * @param string $courseid |
|
| 2299 | + * @param integer $courseid |
|
| 2300 | 2300 | * @param string $bigbluebuttonbnid |
| 2301 | 2301 | * @param bool $subset |
| 2302 | 2302 | * |
@@ -2320,7 +2320,7 @@ discard block |
||
| 2320 | 2320 | * Helper function to define the sql used for gattering the bigbluebuttonbnids whose meetingids should be included |
| 2321 | 2321 | * in the getRecordings request considering only those that belong to imported recordings. |
| 2322 | 2322 | * |
| 2323 | - * @param string $courseid |
|
| 2323 | + * @param integer $courseid |
|
| 2324 | 2324 | * @param string $bigbluebuttonbnid |
| 2325 | 2325 | * @param bool $subset |
| 2326 | 2326 | * |
@@ -2343,7 +2343,7 @@ discard block |
||
| 2343 | 2343 | /** |
| 2344 | 2344 | * Helper function to get recordings and imported recordings together. |
| 2345 | 2345 | * |
| 2346 | - * @param string $courseid |
|
| 2346 | + * @param integer $courseid |
|
| 2347 | 2347 | * @param string $bigbluebuttonbnid |
| 2348 | 2348 | * @param bool $subset |
| 2349 | 2349 | * @param bool $includedeleted |
@@ -2361,7 +2361,7 @@ discard block |
||
| 2361 | 2361 | * Helper function to retrieve recordings from the BigBlueButton. The references are stored as events |
| 2362 | 2362 | * in bigbluebuttonbn_logs. |
| 2363 | 2363 | * |
| 2364 | - * @param string $courseid |
|
| 2364 | + * @param integer $courseid |
|
| 2365 | 2365 | * @param string $bigbluebuttonbnid |
| 2366 | 2366 | * @param bool $subset |
| 2367 | 2367 | * @param bool $includedeleted |
@@ -190,7 +190,7 @@ discard block |
||
| 190 | 190 | } |
| 191 | 191 | if ($xml) { |
| 192 | 192 | // Either failure or success without meeting info. |
| 193 | - return (array) $xml; |
|
| 193 | + return (array)$xml; |
|
| 194 | 194 | } |
| 195 | 195 | // If the server is unreachable, then prompts the user of the necessary action. |
| 196 | 196 | return array('returncode' => 'FAILED', 'message' => 'unreachable', 'messageKey' => 'Server is unreachable'); |
@@ -279,7 +279,7 @@ discard block |
||
| 279 | 279 | foreach ($recordingxml->breakoutRooms->breakoutRoom as $breakoutroom) { |
| 280 | 280 | $url = \mod_bigbluebuttonbn\locallib\bigbluebutton::action_url( |
| 281 | 281 | 'getRecordings', |
| 282 | - ['recordID' => implode(',', (array) $breakoutroom)] |
|
| 282 | + ['recordID' => implode(',', (array)$breakoutroom)] |
|
| 283 | 283 | ); |
| 284 | 284 | $xml = bigbluebuttonbn_wrap_xml_load_file($url); |
| 285 | 285 | if ($xml && $xml->returncode == 'SUCCESS' && isset($xml->recordings)) { |
@@ -335,7 +335,7 @@ discard block |
||
| 335 | 335 | // Override imported flag with actual ID. |
| 336 | 336 | $recording['imported'] = $recordimported->id; |
| 337 | 337 | if (isset($recordimported->protected)) { |
| 338 | - $recording['protected'] = (string) $recordimported->protected; |
|
| 338 | + $recording['protected'] = (string)$recordimported->protected; |
|
| 339 | 339 | } |
| 340 | 340 | $recordsimportedarray[$recording['recordID']] = $recording; |
| 341 | 341 | } |
@@ -365,21 +365,21 @@ discard block |
||
| 365 | 365 | // Add formats. |
| 366 | 366 | $playbackarray = array(); |
| 367 | 367 | foreach ($recording->playback->format as $format) { |
| 368 | - $playbackarray[(string) $format->type] = array('type' => (string) $format->type, |
|
| 369 | - 'url' => trim((string) $format->url), 'length' => (string) $format->length); |
|
| 368 | + $playbackarray[(string)$format->type] = array('type' => (string)$format->type, |
|
| 369 | + 'url' => trim((string)$format->url), 'length' => (string)$format->length); |
|
| 370 | 370 | // Add preview per format when existing. |
| 371 | 371 | if ($format->preview) { |
| 372 | - $playbackarray[(string) $format->type]['preview'] = bigbluebuttonbn_get_recording_preview_images($format->preview); |
|
| 372 | + $playbackarray[(string)$format->type]['preview'] = bigbluebuttonbn_get_recording_preview_images($format->preview); |
|
| 373 | 373 | } |
| 374 | 374 | } |
| 375 | 375 | // Add the metadata to the recordings array. |
| 376 | 376 | $metadataarray = bigbluebuttonbn_get_recording_array_meta(get_object_vars($recording->metadata)); |
| 377 | - $recordingarray = array('recordID' => (string) $recording->recordID, |
|
| 378 | - 'meetingID' => (string) $recording->meetingID, 'meetingName' => (string) $recording->name, |
|
| 379 | - 'published' => (string) $recording->published, 'startTime' => (string) $recording->startTime, |
|
| 380 | - 'endTime' => (string) $recording->endTime, 'playbacks' => $playbackarray); |
|
| 377 | + $recordingarray = array('recordID' => (string)$recording->recordID, |
|
| 378 | + 'meetingID' => (string)$recording->meetingID, 'meetingName' => (string)$recording->name, |
|
| 379 | + 'published' => (string)$recording->published, 'startTime' => (string)$recording->startTime, |
|
| 380 | + 'endTime' => (string)$recording->endTime, 'playbacks' => $playbackarray); |
|
| 381 | 381 | if (isset($recording->protected)) { |
| 382 | - $recordingarray['protected'] = (string) $recording->protected; |
|
| 382 | + $recordingarray['protected'] = (string)$recording->protected; |
|
| 383 | 383 | } |
| 384 | 384 | return $recordingarray + $metadataarray; |
| 385 | 385 | } |
@@ -394,9 +394,9 @@ discard block |
||
| 394 | 394 | function bigbluebuttonbn_get_recording_preview_images($preview) { |
| 395 | 395 | $imagesarray = array(); |
| 396 | 396 | foreach ($preview->images->image as $image) { |
| 397 | - $imagearray = array('url' => trim((string) $image)); |
|
| 397 | + $imagearray = array('url' => trim((string)$image)); |
|
| 398 | 398 | foreach ($image->attributes() as $attkey => $attvalue) { |
| 399 | - $imagearray[$attkey] = (string) $attvalue; |
|
| 399 | + $imagearray[$attkey] = (string)$attvalue; |
|
| 400 | 400 | } |
| 401 | 401 | array_push($imagesarray, $imagearray); |
| 402 | 402 | } |
@@ -491,7 +491,7 @@ discard block |
||
| 491 | 491 | $ids = explode(',', $recordids); |
| 492 | 492 | foreach ($ids as $id) { |
| 493 | 493 | $xml = bigbluebuttonbn_wrap_xml_load_file( |
| 494 | - \mod_bigbluebuttonbn\locallib\bigbluebutton::action_url('updateRecordings', ['recordID' => $id] + (array) $params) |
|
| 494 | + \mod_bigbluebuttonbn\locallib\bigbluebutton::action_url('updateRecordings', ['recordID' => $id] + (array)$params) |
|
| 495 | 495 | ); |
| 496 | 496 | if ($xml && $xml->returncode != 'SUCCESS') { |
| 497 | 497 | return false; |
@@ -662,7 +662,7 @@ discard block |
||
| 662 | 662 | * @return array $users |
| 663 | 663 | */ |
| 664 | 664 | function bigbluebuttonbn_get_users(context $context = null) { |
| 665 | - $users = (array) get_enrolled_users($context, '', 0, 'u.*', null, 0, 0, true); |
|
| 665 | + $users = (array)get_enrolled_users($context, '', 0, 'u.*', null, 0, 0, true); |
|
| 666 | 666 | foreach ($users as $key => $value) { |
| 667 | 667 | $users[$key] = fullname($value); |
| 668 | 668 | } |
@@ -681,7 +681,7 @@ discard block |
||
| 681 | 681 | function bigbluebuttonbn_get_users_select(context_course $context, $bbactivity = null) { |
| 682 | 682 | // CONTRIB-7972, check the group of current user and course group mode. |
| 683 | 683 | $groups = null; |
| 684 | - $users = (array) get_enrolled_users($context, '', 0, 'u.*', null, 0, 0, true); |
|
| 684 | + $users = (array)get_enrolled_users($context, '', 0, 'u.*', null, 0, 0, true); |
|
| 685 | 685 | $course = get_course($context->instanceid); |
| 686 | 686 | $groupmode = groups_get_course_groupmode($course); |
| 687 | 687 | if ($bbactivity) { |
@@ -694,7 +694,7 @@ discard block |
||
| 694 | 694 | $groups = groups_get_all_groups($course->id, $USER->id); |
| 695 | 695 | $users = []; |
| 696 | 696 | foreach ($groups as $g) { |
| 697 | - $users += (array) get_enrolled_users($context, '', $g->id, 'u.*', null, 0, 0, true); |
|
| 697 | + $users += (array)get_enrolled_users($context, '', $g->id, 'u.*', null, 0, 0, true); |
|
| 698 | 698 | } |
| 699 | 699 | } |
| 700 | 700 | return array_map( |
@@ -712,7 +712,7 @@ discard block |
||
| 712 | 712 | * @return array $roles |
| 713 | 713 | */ |
| 714 | 714 | function bigbluebuttonbn_get_roles(context $context = null) { |
| 715 | - $roles = (array) role_get_names($context); |
|
| 715 | + $roles = (array)role_get_names($context); |
|
| 716 | 716 | foreach ($roles as $key => $value) { |
| 717 | 717 | $roles[$key] = $value->localname; |
| 718 | 718 | } |
@@ -727,7 +727,7 @@ discard block |
||
| 727 | 727 | * @return array $users |
| 728 | 728 | */ |
| 729 | 729 | function bigbluebuttonbn_get_roles_select(context $context = null) { |
| 730 | - $roles = (array) role_get_names($context); |
|
| 730 | + $roles = (array)role_get_names($context); |
|
| 731 | 731 | foreach ($roles as $key => $value) { |
| 732 | 732 | $roles[$key] = array('id' => $value->id, 'name' => $value->localname); |
| 733 | 733 | } |
@@ -742,9 +742,9 @@ discard block |
||
| 742 | 742 | * @return object $role |
| 743 | 743 | */ |
| 744 | 744 | function bigbluebuttonbn_get_role($id) { |
| 745 | - $roles = (array) role_get_names(); |
|
| 745 | + $roles = (array)role_get_names(); |
|
| 746 | 746 | if (is_numeric($id) && isset($roles[$id])) { |
| 747 | - return (object) $roles[$id]; |
|
| 747 | + return (object)$roles[$id]; |
|
| 748 | 748 | } |
| 749 | 749 | foreach ($roles as $role) { |
| 750 | 750 | if ($role->shortname == $id) { |
@@ -824,7 +824,7 @@ discard block |
||
| 824 | 824 | if (!empty($ownerid) && is_enrolled($context, $ownerid)) { |
| 825 | 825 | $participantlist[] = array( |
| 826 | 826 | 'selectiontype' => 'user', |
| 827 | - 'selectionid' => (string) $ownerid, |
|
| 827 | + 'selectionid' => (string)$ownerid, |
|
| 828 | 828 | 'role' => BIGBLUEBUTTONBN_ROLE_MODERATOR); |
| 829 | 829 | } |
| 830 | 830 | continue; |
@@ -1006,7 +1006,7 @@ discard block |
||
| 1006 | 1006 | $now = time(); |
| 1007 | 1007 | if ($closingtime > 0 && $now < $closingtime) { |
| 1008 | 1008 | $duration = ceil(($closingtime - $now) / 60); |
| 1009 | - $compensationtime = intval((int) \mod_bigbluebuttonbn\locallib\config::get('scheduled_duration_compensation')); |
|
| 1009 | + $compensationtime = intval((int)\mod_bigbluebuttonbn\locallib\config::get('scheduled_duration_compensation')); |
|
| 1010 | 1010 | $duration = intval($duration) + $compensationtime; |
| 1011 | 1011 | } |
| 1012 | 1012 | return $duration; |
@@ -1208,16 +1208,16 @@ discard block |
||
| 1208 | 1208 | * @return array |
| 1209 | 1209 | */ |
| 1210 | 1210 | function bigbluebuttonbn_get_meeting_info($meetingid, $updatecache = false) { |
| 1211 | - $cachettl = (int) \mod_bigbluebuttonbn\locallib\config::get('waitformoderator_cache_ttl'); |
|
| 1211 | + $cachettl = (int)\mod_bigbluebuttonbn\locallib\config::get('waitformoderator_cache_ttl'); |
|
| 1212 | 1212 | $cache = cache::make_from_params(cache_store::MODE_APPLICATION, 'mod_bigbluebuttonbn', 'meetings_cache'); |
| 1213 | 1213 | $result = $cache->get($meetingid); |
| 1214 | 1214 | $now = time(); |
| 1215 | 1215 | if (!$updatecache && isset($result) && $now < ($result['creation_time'] + $cachettl)) { |
| 1216 | 1216 | // Use the value in the cache. |
| 1217 | - return (array) json_decode($result['meeting_info']); |
|
| 1217 | + return (array)json_decode($result['meeting_info']); |
|
| 1218 | 1218 | } |
| 1219 | 1219 | // Ping again and refresh the cache. |
| 1220 | - $meetinginfo = (array) bigbluebuttonbn_wrap_xml_load_file( |
|
| 1220 | + $meetinginfo = (array)bigbluebuttonbn_wrap_xml_load_file( |
|
| 1221 | 1221 | \mod_bigbluebuttonbn\locallib\bigbluebutton::action_url('getMeetingInfo', ['meetingID' => $meetingid]) |
| 1222 | 1222 | ); |
| 1223 | 1223 | $cache->set($meetingid, array('creation_time' => time(), 'meeting_info' => json_encode($meetinginfo))); |
@@ -1364,7 +1364,7 @@ discard block |
||
| 1364 | 1364 | */ |
| 1365 | 1365 | function bigbluebuttonbn_set_config_xml_array($meetingid, $configxml) { |
| 1366 | 1366 | $configxml = bigbluebuttonbn_setConfigXML($meetingid, $configxml); |
| 1367 | - $configxmlarray = (array) $configxml; |
|
| 1367 | + $configxmlarray = (array)$configxml; |
|
| 1368 | 1368 | if ($configxmlarray['returncode'] != 'SUCCESS') { |
| 1369 | 1369 | debugging('BigBlueButton was not able to set the custom config.xml file', DEBUG_DEVELOPER); |
| 1370 | 1370 | return ''; |
@@ -1417,7 +1417,7 @@ discard block |
||
| 1417 | 1417 | * @return boolean |
| 1418 | 1418 | */ |
| 1419 | 1419 | function bigbluebuttonbn_get_recording_data_row_editable($bbbsession) { |
| 1420 | - return ($bbbsession['managerecordings'] && ((double) $bbbsession['serverversion'] >= 1.0 || $bbbsession['bnserver'])); |
|
| 1420 | + return ($bbbsession['managerecordings'] && ((double)$bbbsession['serverversion'] >= 1.0 || $bbbsession['bnserver'])); |
|
| 1421 | 1421 | } |
| 1422 | 1422 | |
| 1423 | 1423 | /** |
@@ -1428,7 +1428,7 @@ discard block |
||
| 1428 | 1428 | * @return boolean |
| 1429 | 1429 | */ |
| 1430 | 1430 | function bigbluebuttonbn_get_recording_data_preview_enabled($bbbsession) { |
| 1431 | - return ((double) $bbbsession['serverversion'] >= 1.0 && $bbbsession['bigbluebuttonbn']->recordings_preview == '1'); |
|
| 1431 | + return ((double)$bbbsession['serverversion'] >= 1.0 && $bbbsession['bigbluebuttonbn']->recordings_preview == '1'); |
|
| 1432 | 1432 | } |
| 1433 | 1433 | |
| 1434 | 1434 | /** |
@@ -1852,7 +1852,7 @@ discard block |
||
| 1852 | 1852 | } |
| 1853 | 1853 | $id = 'recording-' . $target . '-' . $recording['recordID']; |
| 1854 | 1854 | $onclick = 'M.mod_bigbluebuttonbn.recordings.recording' . ucfirst($data['action']) . '(this); return false;'; |
| 1855 | - if ((boolean) \mod_bigbluebuttonbn\locallib\config::get('recording_icons_enabled')) { |
|
| 1855 | + if ((boolean)\mod_bigbluebuttonbn\locallib\config::get('recording_icons_enabled')) { |
|
| 1856 | 1856 | // With icon for $manageaction. |
| 1857 | 1857 | $iconattributes = array('id' => $id, 'class' => 'iconsmall'); |
| 1858 | 1858 | $linkattributes = array( |
@@ -2131,7 +2131,7 @@ discard block |
||
| 2131 | 2131 | // Enqueue it. |
| 2132 | 2132 | \core\task\manager::queue_adhoc_task($task); |
| 2133 | 2133 | } catch (Exception $e) { |
| 2134 | - mtrace("Error while enqueuing completion_update_state task. " . (string) $e); |
|
| 2134 | + mtrace("Error while enqueuing completion_update_state task. " . (string)$e); |
|
| 2135 | 2135 | } |
| 2136 | 2136 | } |
| 2137 | 2137 | |
@@ -2145,7 +2145,7 @@ discard block |
||
| 2145 | 2145 | */ |
| 2146 | 2146 | function bigbluebuttonbn_completion_update_state($bigbluebuttonbn, $userid) { |
| 2147 | 2147 | global $CFG; |
| 2148 | - require_once($CFG->libdir.'/completionlib.php'); |
|
| 2148 | + require_once($CFG->libdir . '/completionlib.php'); |
|
| 2149 | 2149 | list($course, $cm) = get_course_and_cm_from_instance($bigbluebuttonbn, 'bigbluebuttonbn'); |
| 2150 | 2150 | $completion = new completion_info($course); |
| 2151 | 2151 | if (!$completion->is_enabled($cm)) { |
@@ -2574,7 +2574,7 @@ discard block |
||
| 2574 | 2574 | */ |
| 2575 | 2575 | function bigbluebuttonbn_format_activity_time($time) { |
| 2576 | 2576 | global $CFG; |
| 2577 | - require_once($CFG->dirroot.'/calendar/lib.php'); |
|
| 2577 | + require_once($CFG->dirroot . '/calendar/lib.php'); |
|
| 2578 | 2578 | $activitytime = ''; |
| 2579 | 2579 | if ($time) { |
| 2580 | 2580 | $activitytime = calendar_day_representation($time) . ' ' . |
@@ -2672,7 +2672,7 @@ discard block |
||
| 2672 | 2672 | */ |
| 2673 | 2673 | function bigbluebuttonbn_settings_general(&$renderer) { |
| 2674 | 2674 | // Configuration for BigBlueButton. |
| 2675 | - if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_general_shown()) { |
|
| 2675 | + if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_general_shown()) { |
|
| 2676 | 2676 | $renderer->render_group_header('general'); |
| 2677 | 2677 | $renderer->render_group_element( |
| 2678 | 2678 | 'server_url', |
@@ -2694,7 +2694,7 @@ discard block |
||
| 2694 | 2694 | */ |
| 2695 | 2695 | function bigbluebuttonbn_settings_record(&$renderer) { |
| 2696 | 2696 | // Configuration for 'recording' feature. |
| 2697 | - if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_record_meeting_shown()) { |
|
| 2697 | + if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_record_meeting_shown()) { |
|
| 2698 | 2698 | $renderer->render_group_header('recording'); |
| 2699 | 2699 | $renderer->render_group_element( |
| 2700 | 2700 | 'recording_default', |
@@ -2738,7 +2738,7 @@ discard block |
||
| 2738 | 2738 | */ |
| 2739 | 2739 | function bigbluebuttonbn_settings_importrecordings(&$renderer) { |
| 2740 | 2740 | // Configuration for 'import recordings' feature. |
| 2741 | - if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_import_recordings_shown()) { |
|
| 2741 | + if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_import_recordings_shown()) { |
|
| 2742 | 2742 | $renderer->render_group_header('importrecordings'); |
| 2743 | 2743 | $renderer->render_group_element( |
| 2744 | 2744 | 'importrecordings_enabled', |
@@ -2760,7 +2760,7 @@ discard block |
||
| 2760 | 2760 | */ |
| 2761 | 2761 | function bigbluebuttonbn_settings_showrecordings(&$renderer) { |
| 2762 | 2762 | // Configuration for 'show recordings' feature. |
| 2763 | - if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_show_recordings_shown()) { |
|
| 2763 | + if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_show_recordings_shown()) { |
|
| 2764 | 2764 | $renderer->render_group_header('recordings'); |
| 2765 | 2765 | $renderer->render_group_element( |
| 2766 | 2766 | 'recordings_html_default', |
@@ -2810,7 +2810,7 @@ discard block |
||
| 2810 | 2810 | */ |
| 2811 | 2811 | function bigbluebuttonbn_settings_waitmoderator(&$renderer) { |
| 2812 | 2812 | // Configuration for wait for moderator feature. |
| 2813 | - if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_wait_moderator_shown()) { |
|
| 2813 | + if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_wait_moderator_shown()) { |
|
| 2814 | 2814 | $renderer->render_group_header('waitformoderator'); |
| 2815 | 2815 | $renderer->render_group_element( |
| 2816 | 2816 | 'waitformoderator_default', |
@@ -2840,7 +2840,7 @@ discard block |
||
| 2840 | 2840 | */ |
| 2841 | 2841 | function bigbluebuttonbn_settings_voicebridge(&$renderer) { |
| 2842 | 2842 | // Configuration for "static voice bridge" feature. |
| 2843 | - if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_static_voice_bridge_shown()) { |
|
| 2843 | + if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_static_voice_bridge_shown()) { |
|
| 2844 | 2844 | $renderer->render_group_header('voicebridge'); |
| 2845 | 2845 | $renderer->render_group_element( |
| 2846 | 2846 | 'voicebridge_editable', |
@@ -2858,7 +2858,7 @@ discard block |
||
| 2858 | 2858 | */ |
| 2859 | 2859 | function bigbluebuttonbn_settings_preupload(&$renderer) { |
| 2860 | 2860 | // Configuration for "preupload presentation" feature. |
| 2861 | - if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_preupload_presentation_shown()) { |
|
| 2861 | + if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_preupload_presentation_shown()) { |
|
| 2862 | 2862 | // This feature only works if curl is installed. |
| 2863 | 2863 | $preuploaddescripion = get_string('config_preuploadpresentation_description', 'bigbluebuttonbn'); |
| 2864 | 2864 | if (!extension_loaded('curl')) { |
@@ -2886,7 +2886,7 @@ discard block |
||
| 2886 | 2886 | */ |
| 2887 | 2887 | function bigbluebuttonbn_settings_preupload_manage_default_file(&$renderer) { |
| 2888 | 2888 | // Configuration for "preupload presentation" feature. |
| 2889 | - if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_preupload_presentation_shown()) { |
|
| 2889 | + if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_preupload_presentation_shown()) { |
|
| 2890 | 2890 | if (extension_loaded('curl')) { |
| 2891 | 2891 | // This feature only works if curl is installed. |
| 2892 | 2892 | $renderer->render_filemanager_default_file_presentation("presentation_default"); |
@@ -2903,7 +2903,7 @@ discard block |
||
| 2903 | 2903 | */ |
| 2904 | 2904 | function bigbluebuttonbn_settings_userlimit(&$renderer) { |
| 2905 | 2905 | // Configuration for "user limit" feature. |
| 2906 | - if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_user_limit_shown()) { |
|
| 2906 | + if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_user_limit_shown()) { |
|
| 2907 | 2907 | $renderer->render_group_header('userlimit'); |
| 2908 | 2908 | $renderer->render_group_element( |
| 2909 | 2909 | 'userlimit_default', |
@@ -2925,7 +2925,7 @@ discard block |
||
| 2925 | 2925 | */ |
| 2926 | 2926 | function bigbluebuttonbn_settings_duration(&$renderer) { |
| 2927 | 2927 | // Configuration for "scheduled duration" feature. |
| 2928 | - if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_scheduled_duration_shown()) { |
|
| 2928 | + if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_scheduled_duration_shown()) { |
|
| 2929 | 2929 | $renderer->render_group_header('scheduled'); |
| 2930 | 2930 | $renderer->render_group_element( |
| 2931 | 2931 | 'scheduled_duration_enabled', |
@@ -2951,7 +2951,7 @@ discard block |
||
| 2951 | 2951 | */ |
| 2952 | 2952 | function bigbluebuttonbn_settings_participants(&$renderer) { |
| 2953 | 2953 | // Configuration for defining the default role/user that will be moderator on new activities. |
| 2954 | - if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_moderator_default_shown()) { |
|
| 2954 | + if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_moderator_default_shown()) { |
|
| 2955 | 2955 | $renderer->render_group_header('participant'); |
| 2956 | 2956 | // UI for 'participants' feature. |
| 2957 | 2957 | $roles = bigbluebuttonbn_get_roles(); |
@@ -2976,7 +2976,7 @@ discard block |
||
| 2976 | 2976 | */ |
| 2977 | 2977 | function bigbluebuttonbn_settings_notifications(&$renderer) { |
| 2978 | 2978 | // Configuration for "send notifications" feature. |
| 2979 | - if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_send_notifications_shown()) { |
|
| 2979 | + if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_send_notifications_shown()) { |
|
| 2980 | 2980 | $renderer->render_group_header('sendnotifications'); |
| 2981 | 2981 | $renderer->render_group_element( |
| 2982 | 2982 | 'sendnotifications_enabled', |
@@ -2994,14 +2994,14 @@ discard block |
||
| 2994 | 2994 | */ |
| 2995 | 2995 | function bigbluebuttonbn_settings_clienttype(&$renderer) { |
| 2996 | 2996 | // Configuration for "clienttype" feature. |
| 2997 | - if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_clienttype_shown()) { |
|
| 2997 | + if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_clienttype_shown()) { |
|
| 2998 | 2998 | $renderer->render_group_header('clienttype'); |
| 2999 | 2999 | $renderer->render_group_element( |
| 3000 | 3000 | 'clienttype_editable', |
| 3001 | 3001 | $renderer->render_group_element_checkbox('clienttype_editable', 0) |
| 3002 | 3002 | ); |
| 3003 | 3003 | // Web Client default. |
| 3004 | - $default = intval((int) \mod_bigbluebuttonbn\locallib\config::get('clienttype_default')); |
|
| 3004 | + $default = intval((int)\mod_bigbluebuttonbn\locallib\config::get('clienttype_default')); |
|
| 3005 | 3005 | $choices = array(BIGBLUEBUTTON_CLIENTTYPE_FLASH => get_string('mod_form_block_clienttype_flash', 'bigbluebuttonbn'), |
| 3006 | 3006 | BIGBLUEBUTTON_CLIENTTYPE_HTML5 => get_string('mod_form_block_clienttype_html5', 'bigbluebuttonbn')); |
| 3007 | 3007 | $renderer->render_group_element( |
@@ -3024,7 +3024,7 @@ discard block |
||
| 3024 | 3024 | */ |
| 3025 | 3025 | function bigbluebuttonbn_settings_muteonstart(&$renderer) { |
| 3026 | 3026 | // Configuration for BigBlueButton. |
| 3027 | - if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_muteonstart_shown()) { |
|
| 3027 | + if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_muteonstart_shown()) { |
|
| 3028 | 3028 | $renderer->render_group_header('muteonstart'); |
| 3029 | 3029 | $renderer->render_group_element( |
| 3030 | 3030 | 'muteonstart_default', |
@@ -3046,7 +3046,7 @@ discard block |
||
| 3046 | 3046 | */ |
| 3047 | 3047 | function bigbluebuttonbn_settings_extended(&$renderer) { |
| 3048 | 3048 | // Configuration for 'notify users when recording ready' feature. |
| 3049 | - if (!(boolean) \mod_bigbluebuttonbn\settings\validator::section_settings_extended_shown()) { |
|
| 3049 | + if (!(boolean)\mod_bigbluebuttonbn\settings\validator::section_settings_extended_shown()) { |
|
| 3050 | 3050 | return; |
| 3051 | 3051 | } |
| 3052 | 3052 | $renderer->render_group_header('extended_capabilities'); |
@@ -3074,7 +3074,7 @@ discard block |
||
| 3074 | 3074 | global $DB; |
| 3075 | 3075 | do { |
| 3076 | 3076 | $encodedseed = sha1(bigbluebuttonbn_random_password(12)); |
| 3077 | - $meetingid = (string) $DB->get_field('bigbluebuttonbn', 'meetingid', array('meetingid' => $encodedseed)); |
|
| 3077 | + $meetingid = (string)$DB->get_field('bigbluebuttonbn', 'meetingid', array('meetingid' => $encodedseed)); |
|
| 3078 | 3078 | } while ($meetingid == $encodedseed); |
| 3079 | 3079 | return $encodedseed; |
| 3080 | 3080 | } |
@@ -3287,7 +3287,7 @@ discard block |
||
| 3287 | 3287 | function bigbluebuttonbn_instance_ownerid($bigbluebuttonbn) { |
| 3288 | 3288 | global $DB; |
| 3289 | 3289 | $filters = array('bigbluebuttonbnid' => $bigbluebuttonbn->id, 'log' => 'Add'); |
| 3290 | - $ownerid = (integer) $DB->get_field('bigbluebuttonbn_logs', 'userid', $filters); |
|
| 3290 | + $ownerid = (integer)$DB->get_field('bigbluebuttonbn_logs', 'userid', $filters); |
|
| 3291 | 3291 | return $ownerid; |
| 3292 | 3292 | } |
| 3293 | 3293 | |
@@ -3330,8 +3330,8 @@ discard block |
||
| 3330 | 3330 | $bbbsession['meetingname'] = $bbbsession['bigbluebuttonbn']->name; |
| 3331 | 3331 | $bbbsession['meetingdescription'] = $bbbsession['bigbluebuttonbn']->intro; |
| 3332 | 3332 | // Extra data for setting up the Meeting. |
| 3333 | - $bbbsession['userlimit'] = intval((int) \mod_bigbluebuttonbn\locallib\config::get('userlimit_default')); |
|
| 3334 | - if ((boolean) \mod_bigbluebuttonbn\locallib\config::get('userlimit_editable')) { |
|
| 3333 | + $bbbsession['userlimit'] = intval((int)\mod_bigbluebuttonbn\locallib\config::get('userlimit_default')); |
|
| 3334 | + if ((boolean)\mod_bigbluebuttonbn\locallib\config::get('userlimit_editable')) { |
|
| 3335 | 3335 | $bbbsession['userlimit'] = intval($bbbsession['bigbluebuttonbn']->userlimit); |
| 3336 | 3336 | } |
| 3337 | 3337 | $bbbsession['voicebridge'] = $bbbsession['bigbluebuttonbn']->voicebridge; |
@@ -3481,7 +3481,7 @@ discard block |
||
| 3481 | 3481 | 'bbb-recording-tags' => bigbluebuttonbn_get_tags($bbbsession['cm']->id), // Same as $id. |
| 3482 | 3482 | ]; |
| 3483 | 3483 | // Special metadata for recording processing. |
| 3484 | - if ((boolean) \mod_bigbluebuttonbn\locallib\config::get('recordingstatus_enabled')) { |
|
| 3484 | + if ((boolean)\mod_bigbluebuttonbn\locallib\config::get('recordingstatus_enabled')) { |
|
| 3485 | 3485 | $metadata["bn-recording-status"] = json_encode( |
| 3486 | 3486 | array( |
| 3487 | 3487 | 'email' => array('"' . fullname($USER) . '" <' . $USER->email . '>'), |
@@ -3489,10 +3489,10 @@ discard block |
||
| 3489 | 3489 | ) |
| 3490 | 3490 | ); |
| 3491 | 3491 | } |
| 3492 | - if ((boolean) \mod_bigbluebuttonbn\locallib\config::get('recordingready_enabled')) { |
|
| 3492 | + if ((boolean)\mod_bigbluebuttonbn\locallib\config::get('recordingready_enabled')) { |
|
| 3493 | 3493 | $metadata['bn-recording-ready-url'] = $bbbsession['recordingReadyURL']; |
| 3494 | 3494 | } |
| 3495 | - if ((boolean) \mod_bigbluebuttonbn\locallib\config::get('meetingevents_enabled')) { |
|
| 3495 | + if ((boolean)\mod_bigbluebuttonbn\locallib\config::get('meetingevents_enabled')) { |
|
| 3496 | 3496 | $metadata['analytics-callback-url'] = $bbbsession['meetingEventsURL']; |
| 3497 | 3497 | } |
| 3498 | 3498 | return $metadata; |
@@ -35,7 +35,7 @@ discard block |
||
| 35 | 35 | |
| 36 | 36 | defined('MOODLE_INTERNAL') || die(); |
| 37 | 37 | |
| 38 | -require_once($CFG->dirroot.'/mod/bigbluebuttonbn/locallib.php'); |
|
| 38 | +require_once($CFG->dirroot . '/mod/bigbluebuttonbn/locallib.php'); |
|
| 39 | 39 | |
| 40 | 40 | /** |
| 41 | 41 | * Class index |
@@ -91,7 +91,7 @@ discard block |
||
| 91 | 91 | // Add a the data for the bigbluebuttonbn instance. |
| 92 | 92 | $groupobj = null; |
| 93 | 93 | if (groups_get_activity_groupmode($cm) > 0) { |
| 94 | - $groupobj = (object) array('id' => 0, 'name' => get_string('allparticipants')); |
|
| 94 | + $groupobj = (object)array('id' => 0, 'name' => get_string('allparticipants')); |
|
| 95 | 95 | } |
| 96 | 96 | $table->data[] = self::bigbluebuttonbn_index_display_room($canmoderate, $course, $bigbluebuttonbn, $groupobj); |
| 97 | 97 | // Add a the data for the groups belonging to the bigbluebuttonbn instance, if any. |
@@ -181,7 +181,7 @@ discard block |
||
| 181 | 181 | $attendeecount = 0; |
| 182 | 182 | foreach ($meetinginfo['attendees']->attendee as $attendee) { |
| 183 | 183 | if ($attendee->role == $role) { |
| 184 | - $attendeelist .= ($attendeecount++ > 0 ? ', ' : '').$attendee->fullName; |
|
| 184 | + $attendeelist .= ($attendeecount++ > 0 ? ', ' : '') . $attendee->fullName; |
|
| 185 | 185 | } |
| 186 | 186 | } |
| 187 | 187 | } |
@@ -215,18 +215,18 @@ discard block |
||
| 215 | 215 | public static function bigbluebuttonbn_index_display_room_actions($moderator, $course, $bigbluebuttonbn, $groupobj = null) { |
| 216 | 216 | $actions = ''; |
| 217 | 217 | if ($moderator) { |
| 218 | - $actions .= '<form name="form1" method="post" action="">'."\n"; |
|
| 219 | - $actions .= ' <INPUT type="hidden" name="id" value="'.$course->id.'">'."\n"; |
|
| 220 | - $actions .= ' <INPUT type="hidden" name="a" value="'.$bigbluebuttonbn->id.'">'."\n"; |
|
| 221 | - $actions .= ' <INPUT type="hidden" name="action" value="end">'."\n"; |
|
| 218 | + $actions .= '<form name="form1" method="post" action="">' . "\n"; |
|
| 219 | + $actions .= ' <INPUT type="hidden" name="id" value="' . $course->id . '">' . "\n"; |
|
| 220 | + $actions .= ' <INPUT type="hidden" name="a" value="' . $bigbluebuttonbn->id . '">' . "\n"; |
|
| 221 | + $actions .= ' <INPUT type="hidden" name="action" value="end">' . "\n"; |
|
| 222 | 222 | if ($groupobj != null) { |
| 223 | - $actions .= ' <INPUT type="hidden" name="g" value="'.$groupobj->id.'">'."\n"; |
|
| 223 | + $actions .= ' <INPUT type="hidden" name="g" value="' . $groupobj->id . '">' . "\n"; |
|
| 224 | 224 | } |
| 225 | 225 | $actions .= ' <INPUT type="submit" name="submit" value="' . |
| 226 | 226 | get_string('view_conference_action_end', 'bigbluebuttonbn') . |
| 227 | 227 | '" class="btn btn-primary btn-sm" onclick="return confirm(\'' . |
| 228 | 228 | get_string('index_confirm_end', 'bigbluebuttonbn') . '\')">' . "\n"; |
| 229 | - $actions .= '</form>'."\n"; |
|
| 229 | + $actions .= '</form>' . "\n"; |
|
| 230 | 230 | } |
| 231 | 231 | return $actions; |
| 232 | 232 | } |