@@ -83,7 +83,7 @@ |
||
| 83 | 83 | 'objectid' => $this->objectid, |
| 84 | 84 | 'contextinstanceid' => $this->contextinstanceid, |
| 85 | 85 | 'other' => $this->other |
| 86 | - ); |
|
| 86 | + ); |
|
| 87 | 87 | $string = $this->description; |
| 88 | 88 | foreach ($vars as $key => $value) { |
| 89 | 89 | $string = str_replace("##" . $key, $value, $string); |
@@ -86,7 +86,7 @@ discard block |
||
| 86 | 86 | ); |
| 87 | 87 | $string = $this->description; |
| 88 | 88 | foreach ($vars as $key => $value) { |
| 89 | - $string = str_replace("##" . $key, $value, $string); |
|
| 89 | + $string = str_replace("##".$key, $value, $string); |
|
| 90 | 90 | } |
| 91 | 91 | return $string; |
| 92 | 92 | } |
@@ -108,9 +108,9 @@ discard block |
||
| 108 | 108 | * @param string $url The url to the assign module instance. |
| 109 | 109 | */ |
| 110 | 110 | public function set_legacy_logdata($action = '', $info = '', $url = '') { |
| 111 | - $fullurl = 'view.php?id=' . $this->contextinstanceid; |
|
| 111 | + $fullurl = 'view.php?id='.$this->contextinstanceid; |
|
| 112 | 112 | if ($url != '') { |
| 113 | - $fullurl .= '&' . $url; |
|
| 113 | + $fullurl .= '&'.$url; |
|
| 114 | 114 | } |
| 115 | 115 | |
| 116 | 116 | $this->legacylogdata = array($this->courseid, 'bigbluebuttonbn', $action, $fullurl, $info, $this->contextinstanceid); |
@@ -27,7 +27,7 @@ |
||
| 27 | 27 | |
| 28 | 28 | defined('MOODLE_INTERNAL') || die(); |
| 29 | 29 | |
| 30 | -require_once($CFG->dirroot . '/mod/bigbluebuttonbn/locallib.php'); |
|
| 30 | +require_once($CFG->dirroot.'/mod/bigbluebuttonbn/locallib.php'); |
|
| 31 | 31 | |
| 32 | 32 | /** |
| 33 | 33 | * The mod_bigbluebuttonbn class for event name definition. |
@@ -43,7 +43,7 @@ |
||
| 43 | 43 | */ |
| 44 | 44 | protected function init($crud = 'r', $edulevel = self::LEVEL_PARTICIPATING) { |
| 45 | 45 | parent::init($crud, $edulevel); |
| 46 | - $this->description = "The user with id '##userid' viewed the bigbluebuttonbn activity " . |
|
| 46 | + $this->description = "The user with id '##userid' viewed the bigbluebuttonbn activity ". |
|
| 47 | 47 | "with id '##objectid' for the course id '##courseid'."; |
| 48 | 48 | } |
| 49 | 49 | |
@@ -27,7 +27,7 @@ discard block |
||
| 27 | 27 | |
| 28 | 28 | defined('MOODLE_INTERNAL') || die(); |
| 29 | 29 | |
| 30 | -require_once($CFG->dirroot . '/mod/bigbluebuttonbn/locallib.php'); |
|
| 30 | +require_once($CFG->dirroot.'/mod/bigbluebuttonbn/locallib.php'); |
|
| 31 | 31 | require_once($CFG->libdir.'/adminlib.php'); |
| 32 | 32 | |
| 33 | 33 | /** |
@@ -62,7 +62,7 @@ discard block |
||
| 62 | 62 | !isset($CFG->bigbluebuttonbn['recording_all_from_start_default']) || |
| 63 | 63 | !isset($CFG->bigbluebuttonbn['recording_all_from_start_editable']) || |
| 64 | 64 | !isset($CFG->bigbluebuttonbn['recording_hide_button_default']) || |
| 65 | - !isset($CFG->bigbluebuttonbn['recording_hide_button_editable']) ); |
|
| 65 | + !isset($CFG->bigbluebuttonbn['recording_hide_button_editable'])); |
|
| 66 | 66 | } |
| 67 | 67 | |
| 68 | 68 | /** |
@@ -92,7 +92,7 @@ |
||
| 92 | 92 | !isset($CFG->bigbluebuttonbn['recordings_preview_default']) || |
| 93 | 93 | !isset($CFG->bigbluebuttonbn['recordings_preview_editable']) || |
| 94 | 94 | !isset($CFG->bigbluebuttonbn['recordings_validate_url']) |
| 95 | - ); |
|
| 95 | + ); |
|
| 96 | 96 | } |
| 97 | 97 | |
| 98 | 98 | /** |
@@ -101,7 +101,7 @@ discard block |
||
| 101 | 101 | * @uses FEATURE_GRADE_OUTCOMES |
| 102 | 102 | * @uses FEATURE_SHOW_DESCRIPTION |
| 103 | 103 | * @param string $feature |
| 104 | - * @return mixed True if yes (some features may use other values) |
|
| 104 | + * @return null|boolean True if yes (some features may use other values) |
|
| 105 | 105 | */ |
| 106 | 106 | function bigbluebuttonbn_supports($feature) { |
| 107 | 107 | if (!$feature) { |
@@ -220,7 +220,7 @@ discard block |
||
| 220 | 220 | * |
| 221 | 221 | * @param object $bigbluebuttonbn Id of the module instance |
| 222 | 222 | * |
| 223 | - * @return bool Success/Failure |
|
| 223 | + * @return boolean|null Success/Failure |
|
| 224 | 224 | */ |
| 225 | 225 | function bigbluebuttonbn_delete_instance_log($bigbluebuttonbn) { |
| 226 | 226 | global $DB; |
@@ -241,7 +241,7 @@ discard block |
||
| 241 | 241 | * @param object $mod |
| 242 | 242 | * @param object $bigbluebuttonbn |
| 243 | 243 | * |
| 244 | - * @return bool |
|
| 244 | + * @return string |
|
| 245 | 245 | */ |
| 246 | 246 | function bigbluebuttonbn_user_outline($course, $user, $mod, $bigbluebuttonbn) { |
| 247 | 247 | if ($completed = bigbluebuttonbn_user_complete($course, $user, $mod, $bigbluebuttonbn)) { |
@@ -783,7 +783,7 @@ discard block |
||
| 783 | 783 | * @param stdClass $context context object |
| 784 | 784 | * @param string $filearea file area |
| 785 | 785 | * |
| 786 | - * @return false|null false if file not valid |
|
| 786 | + * @return boolean false if file not valid |
|
| 787 | 787 | */ |
| 788 | 788 | function bigbluebuttonbn_pluginfile_valid($context, $filearea) { |
| 789 | 789 | |
@@ -171,7 +171,7 @@ discard block |
||
| 171 | 171 | // Update a record. |
| 172 | 172 | $DB->update_record('bigbluebuttonbn', $bigbluebuttonbn); |
| 173 | 173 | // Get the meetingid column in the bigbluebuttonbn table. |
| 174 | - $bigbluebuttonbn->meetingid = (string)$DB->get_field('bigbluebuttonbn', 'meetingid', array('id' => $bigbluebuttonbn->id)); |
|
| 174 | + $bigbluebuttonbn->meetingid = (string) $DB->get_field('bigbluebuttonbn', 'meetingid', array('id' => $bigbluebuttonbn->id)); |
|
| 175 | 175 | // Log update action. |
| 176 | 176 | bigbluebuttonbn_log($bigbluebuttonbn, BIGBLUEBUTTONBN_LOG_EVENT_EDIT); |
| 177 | 177 | // Complete the process. |
@@ -225,9 +225,9 @@ discard block |
||
| 225 | 225 | function bigbluebuttonbn_delete_instance_log($bigbluebuttonbn) { |
| 226 | 226 | global $DB; |
| 227 | 227 | $sql = "SELECT * FROM {bigbluebuttonbn_logs} "; |
| 228 | - $sql .= "WHERE bigbluebuttonbnid = ? AND log = ? AND ". $DB->sql_compare_text('meta') . " = ?"; |
|
| 228 | + $sql .= "WHERE bigbluebuttonbnid = ? AND log = ? AND ".$DB->sql_compare_text('meta')." = ?"; |
|
| 229 | 229 | $logs = $DB->get_records_sql($sql, array($bigbluebuttonbn->id, BIGBLUEBUTTONBN_LOG_EVENT_CREATE, "{\"record\":true}")); |
| 230 | - $meta = "{\"has_recordings\":" . empty($logs) ? "true" : "false" . "}"; |
|
| 230 | + $meta = "{\"has_recordings\":".empty($logs) ? "true" : "false"."}"; |
|
| 231 | 231 | bigbluebuttonbn_log($bigbluebuttonbn, BIGBLUEBUTTONBN_LOG_EVENT_DELETE, [], $meta); |
| 232 | 232 | } |
| 233 | 233 | |
@@ -268,12 +268,12 @@ discard block |
||
| 268 | 268 | if (is_object($courseorid)) { |
| 269 | 269 | $course = $courseorid; |
| 270 | 270 | } else { |
| 271 | - $course = (object)array('id' => $courseorid); |
|
| 271 | + $course = (object) array('id' => $courseorid); |
|
| 272 | 272 | } |
| 273 | 273 | if (is_object($userorid)) { |
| 274 | 274 | $user = $userorid; |
| 275 | 275 | } else { |
| 276 | - $user = (object)array('id' => $userorid); |
|
| 276 | + $user = (object) array('id' => $userorid); |
|
| 277 | 277 | } |
| 278 | 278 | $sql = "SELECT COUNT(*) FROM {bigbluebuttonbn_logs} "; |
| 279 | 279 | $sql .= "WHERE courseid = ? AND bigbluebuttonbnid = ? AND userid = ? AND (log = ? OR log = ?)"; |
@@ -299,7 +299,7 @@ discard block |
||
| 299 | 299 | function bigbluebuttonbn_reset_course_items() { |
| 300 | 300 | $items = array("events" => 0, "tags" => 0, "logs" => 0); |
| 301 | 301 | // Include recordings only if enabled. |
| 302 | - if ((boolean)\mod_bigbluebuttonbn\locallib\config::recordings_enabled()) { |
|
| 302 | + if ((boolean) \mod_bigbluebuttonbn\locallib\config::recordings_enabled()) { |
|
| 303 | 303 | $items["recordings"] = 0; |
| 304 | 304 | } |
| 305 | 305 | return $items; |
@@ -567,7 +567,7 @@ discard block |
||
| 567 | 567 | function bigbluebuttonbn_process_pre_save_instance(&$bigbluebuttonbn) { |
| 568 | 568 | require_once(__DIR__.'/locallib.php'); |
| 569 | 569 | $bigbluebuttonbn->timemodified = time(); |
| 570 | - if ((integer)$bigbluebuttonbn->instance == 0) { |
|
| 570 | + if ((integer) $bigbluebuttonbn->instance == 0) { |
|
| 571 | 571 | $bigbluebuttonbn->meetingid = 0; |
| 572 | 572 | $bigbluebuttonbn->timecreated = time(); |
| 573 | 573 | $bigbluebuttonbn->timemodified = 0; |
@@ -992,7 +992,7 @@ discard block |
||
| 992 | 992 | \core_calendar\action_factory $factory) { |
| 993 | 993 | global $CFG, $DB; |
| 994 | 994 | |
| 995 | - require_once($CFG->dirroot . '/mod/bigbluebuttonbn/locallib.php'); |
|
| 995 | + require_once($CFG->dirroot.'/mod/bigbluebuttonbn/locallib.php'); |
|
| 996 | 996 | |
| 997 | 997 | // Get mod info. |
| 998 | 998 | $cm = get_fast_modinfo($event->courseid)->instances['bigbluebuttonbn'][$event->instance]; |
@@ -271,7 +271,7 @@ discard block |
||
| 271 | 271 | $sql = "SELECT COUNT(*) FROM {bigbluebuttonbn_logs} "; |
| 272 | 272 | $sql .= "WHERE courseid = ? AND bigbluebuttonbnid = ? AND userid = ? AND (log = ? OR log = ?)"; |
| 273 | 273 | $result = $DB->count_records_sql($sql, array($course->id, $bigbluebuttonbn->id, $user->id, |
| 274 | - BIGBLUEBUTTONBN_LOG_EVENT_JOIN, BIGBLUEBUTTONBN_LOG_EVENT_PLAYED)); |
|
| 274 | + BIGBLUEBUTTONBN_LOG_EVENT_JOIN, BIGBLUEBUTTONBN_LOG_EVENT_PLAYED)); |
|
| 275 | 275 | return $result; |
| 276 | 276 | } |
| 277 | 277 | |
@@ -500,7 +500,7 @@ discard block |
||
| 500 | 500 | $str = '<div class="bigbluebuttonbn overview">'."\n"; |
| 501 | 501 | $str .= ' <div class="name">'.get_string('modulename', 'bigbluebuttonbn').': '."\n"; |
| 502 | 502 | $str .= ' <a '.$classes.'href="'.$CFG->wwwroot.'/mod/bigbluebuttonbn/view.php?id='.$bigbluebuttonbn->coursemodule. |
| 503 | - '">'.$bigbluebuttonbn->name.'</a>'."\n"; |
|
| 503 | + '">'.$bigbluebuttonbn->name.'</a>'."\n"; |
|
| 504 | 504 | $str .= ' </div>'."\n"; |
| 505 | 505 | $str .= ' <div class="info">'.get_string($start, 'bigbluebuttonbn').': '.userdate($bigbluebuttonbn->openingtime). |
| 506 | 506 | '</div>'."\n"; |
@@ -717,7 +717,7 @@ discard block |
||
| 717 | 717 | $bigbluebuttonbn->coursemodule, |
| 718 | 718 | 'bigbluebuttonbn', |
| 719 | 719 | $bigbluebuttonbn->id, $bigbluebuttonbn->completionexpected |
| 720 | - ); |
|
| 720 | + ); |
|
| 721 | 721 | } |
| 722 | 722 | } |
| 723 | 723 | |
@@ -309,10 +309,10 @@ discard block |
||
| 309 | 309 | */ |
| 310 | 310 | function bigbluebutton_bbb_view_create_meeting_data(&$bbbsession) { |
| 311 | 311 | $data = ['meetingID' => $bbbsession['meetingid'], |
| 312 | - 'name' => bigbluebuttonbn_html2text($bbbsession['meetingname'], 64), |
|
| 313 | - 'attendeePW' => $bbbsession['viewerPW'], |
|
| 314 | - 'moderatorPW' => $bbbsession['modPW'], |
|
| 315 | - 'logoutURL' => $bbbsession['logoutURL'], |
|
| 312 | + 'name' => bigbluebuttonbn_html2text($bbbsession['meetingname'], 64), |
|
| 313 | + 'attendeePW' => $bbbsession['viewerPW'], |
|
| 314 | + 'moderatorPW' => $bbbsession['modPW'], |
|
| 315 | + 'logoutURL' => $bbbsession['logoutURL'], |
|
| 316 | 316 | ]; |
| 317 | 317 | $data['record'] = bigbluebutton_bbb_view_create_meeting_data_record($bbbsession['record']); |
| 318 | 318 | // Check if auto_start_record is enable. |
@@ -334,7 +334,7 @@ discard block |
||
| 334 | 334 | '%duration%', |
| 335 | 335 | (string) $durationtime, |
| 336 | 336 | get_string('bbbdurationwarning', 'bigbluebuttonbn') |
| 337 | - ); |
|
| 337 | + ); |
|
| 338 | 338 | } |
| 339 | 339 | $voicebridge = intval($bbbsession['voicebridge']); |
| 340 | 340 | if ($voicebridge > 0 && $voicebridge < 79999) { |
@@ -385,22 +385,22 @@ discard block |
||
| 385 | 385 | function bigbluebutton_bbb_view_create_meeting_metadata(&$bbbsession) { |
| 386 | 386 | global $USER; |
| 387 | 387 | $metadata = ['bbb-origin' => $bbbsession['origin'], |
| 388 | - 'bbb-origin-version' => $bbbsession['originVersion'], |
|
| 389 | - 'bbb-origin-server-name' => $bbbsession['originServerName'], |
|
| 390 | - 'bbb-origin-server-common-name' => $bbbsession['originServerCommonName'], |
|
| 391 | - 'bbb-origin-tag' => $bbbsession['originTag'], |
|
| 392 | - 'bbb-context' => $bbbsession['course']->fullname, |
|
| 393 | - 'bbb-recording-name' => bigbluebuttonbn_html2text($bbbsession['meetingname'], 64), |
|
| 394 | - 'bbb-recording-description' => bigbluebuttonbn_html2text($bbbsession['meetingdescription'], 64), |
|
| 395 | - 'bbb-recording-tags' => bigbluebuttonbn_get_tags($bbbsession['cm']->id), // Same as $id. |
|
| 388 | + 'bbb-origin-version' => $bbbsession['originVersion'], |
|
| 389 | + 'bbb-origin-server-name' => $bbbsession['originServerName'], |
|
| 390 | + 'bbb-origin-server-common-name' => $bbbsession['originServerCommonName'], |
|
| 391 | + 'bbb-origin-tag' => $bbbsession['originTag'], |
|
| 392 | + 'bbb-context' => $bbbsession['course']->fullname, |
|
| 393 | + 'bbb-recording-name' => bigbluebuttonbn_html2text($bbbsession['meetingname'], 64), |
|
| 394 | + 'bbb-recording-description' => bigbluebuttonbn_html2text($bbbsession['meetingdescription'], 64), |
|
| 395 | + 'bbb-recording-tags' => bigbluebuttonbn_get_tags($bbbsession['cm']->id), // Same as $id. |
|
| 396 | 396 | ]; |
| 397 | 397 | if ((boolean)\mod_bigbluebuttonbn\locallib\config::get('recordingstatus_enabled')) { |
| 398 | 398 | $metadata["bn-recording-status"] = json_encode( |
| 399 | 399 | array( |
| 400 | 400 | 'email' => array('"' . fullname($USER) . '" <' . $USER->email . '>'), |
| 401 | 401 | 'context' => $bbbsession['bigbluebuttonbnURL'] |
| 402 | - ) |
|
| 403 | - ); |
|
| 402 | + ) |
|
| 403 | + ); |
|
| 404 | 404 | } |
| 405 | 405 | if ((boolean)\mod_bigbluebuttonbn\locallib\config::get('recordingready_enabled')) { |
| 406 | 406 | $metadata['bn-recording-ready-url'] = $bbbsession['recordingReadyURL']; |
@@ -138,7 +138,7 @@ discard block |
||
| 138 | 138 | $lastaccess = json_decode($lastaccess->meta); |
| 139 | 139 | // If the user acceded from Timeline it should be redirected to the Dashboard. |
| 140 | 140 | if (isset($lastaccess->origin) && $lastaccess->origin == BIGBLUEBUTTON_ORIGIN_TIMELINE) { |
| 141 | - redirect($CFG->wwwroot . '/my/'); |
|
| 141 | + redirect($CFG->wwwroot.'/my/'); |
|
| 142 | 142 | } |
| 143 | 143 | // Close the tab or window where BBB was opened. |
| 144 | 144 | bigbluebutton_bbb_view_close_window(); |
@@ -340,7 +340,7 @@ discard block |
||
| 340 | 340 | * @return string |
| 341 | 341 | */ |
| 342 | 342 | function bigbluebutton_bbb_view_create_meeting_data_record($record) { |
| 343 | - if ((boolean)\mod_bigbluebuttonbn\locallib\config::recordings_enabled() && $record) { |
|
| 343 | + if ((boolean) \mod_bigbluebuttonbn\locallib\config::recordings_enabled() && $record) { |
|
| 344 | 344 | return 'true'; |
| 345 | 345 | } |
| 346 | 346 | return 'false'; |
@@ -353,7 +353,7 @@ discard block |
||
| 353 | 353 | * @return integer |
| 354 | 354 | */ |
| 355 | 355 | function bigbluebutton_bbb_view_create_meeting_data_duration($closingtime) { |
| 356 | - if ((boolean)\mod_bigbluebuttonbn\locallib\config::get('scheduled_duration_enabled')) { |
|
| 356 | + if ((boolean) \mod_bigbluebuttonbn\locallib\config::get('scheduled_duration_enabled')) { |
|
| 357 | 357 | return bigbluebuttonbn_get_duration($closingtime); |
| 358 | 358 | } |
| 359 | 359 | return 0; |
@@ -377,18 +377,18 @@ discard block |
||
| 377 | 377 | 'bbb-recording-description' => bigbluebuttonbn_html2text($bbbsession['meetingdescription'], 64), |
| 378 | 378 | 'bbb-recording-tags' => bigbluebuttonbn_get_tags($bbbsession['cm']->id), // Same as $id. |
| 379 | 379 | ]; |
| 380 | - if ((boolean)\mod_bigbluebuttonbn\locallib\config::get('recordingstatus_enabled')) { |
|
| 380 | + if ((boolean) \mod_bigbluebuttonbn\locallib\config::get('recordingstatus_enabled')) { |
|
| 381 | 381 | $metadata["bn-recording-status"] = json_encode( |
| 382 | 382 | array( |
| 383 | - 'email' => array('"' . fullname($USER) . '" <' . $USER->email . '>'), |
|
| 383 | + 'email' => array('"'.fullname($USER).'" <'.$USER->email.'>'), |
|
| 384 | 384 | 'context' => $bbbsession['bigbluebuttonbnURL'] |
| 385 | 385 | ) |
| 386 | 386 | ); |
| 387 | 387 | } |
| 388 | - if ((boolean)\mod_bigbluebuttonbn\locallib\config::get('recordingready_enabled')) { |
|
| 388 | + if ((boolean) \mod_bigbluebuttonbn\locallib\config::get('recordingready_enabled')) { |
|
| 389 | 389 | $metadata['bn-recording-ready-url'] = $bbbsession['recordingReadyURL']; |
| 390 | 390 | } |
| 391 | - if ((boolean)\mod_bigbluebuttonbn\locallib\config::get('meetingevents_enabled')) { |
|
| 391 | + if ((boolean) \mod_bigbluebuttonbn\locallib\config::get('meetingevents_enabled')) { |
|
| 392 | 392 | $metadata['bn-meeting-events-url'] = $bbbsession['meetingEventsURL']; |
| 393 | 393 | } |
| 394 | 394 | return $metadata; |
@@ -50,8 +50,8 @@ discard block |
||
| 50 | 50 | // The endpoints for recording_ready and live_session_event callbacks must be moved to services (CONTRIB-7440). |
| 51 | 51 | // But in order to support the transition, requests other than the callbacks are redirected to bbb_ajax.php. |
| 52 | 52 | if ($params['action'] != 'recording_ready' && $params['action'] != 'live_session_events') { |
| 53 | - $url = $CFG->wwwroot . '/mod/bigbluebuttonbn/bbb_ajax.php?' . http_build_query($params, '', '&'); |
|
| 54 | - header("Location: " . $url); |
|
| 53 | + $url = $CFG->wwwroot.'/mod/bigbluebuttonbn/bbb_ajax.php?'.http_build_query($params, '', '&'); |
|
| 54 | + header("Location: ".$url); |
|
| 55 | 55 | exit; |
| 56 | 56 | } |
| 57 | 57 | |
@@ -76,7 +76,7 @@ discard block |
||
| 76 | 76 | bigbluebuttonbn_broker_live_session_events($params, $bigbluebuttonbn); |
| 77 | 77 | return; |
| 78 | 78 | } |
| 79 | - header('HTTP/1.0 400 Bad request. The action '. $a . ' doesn\'t exist'); |
|
| 79 | + header('HTTP/1.0 400 Bad request. The action '.$a.' doesn\'t exist'); |
|
| 80 | 80 | } catch (Exception $e) { |
| 81 | 81 | header('HTTP/1.0 500 Internal Server Error. '.$e->getMessage()); |
| 82 | 82 | } |
@@ -121,7 +121,7 @@ |
||
| 121 | 121 | echo bigbluebuttonbn_broker_recording_import($bbbsession, $params); |
| 122 | 122 | return; |
| 123 | 123 | } |
| 124 | - header('HTTP/1.0 400 Bad request. The action '. $a . ' doesn\'t exist'); |
|
| 124 | + header('HTTP/1.0 400 Bad request. The action '.$a.' doesn\'t exist'); |
|
| 125 | 125 | } catch (Exception $e) { |
| 126 | 126 | header('HTTP/1.0 500 Internal Server Error. '.$e->getMessage()); |
| 127 | 127 | } |
@@ -296,7 +296,7 @@ discard block |
||
| 296 | 296 | * Helper function to retrieve imported recordings from the Moodle database. |
| 297 | 297 | * The references are stored as events in bigbluebuttonbn_logs. |
| 298 | 298 | * |
| 299 | - * @param string $courseid |
|
| 299 | + * @param integer $courseid |
|
| 300 | 300 | * @param string $bigbluebuttonbnid |
| 301 | 301 | * @param bool $subset |
| 302 | 302 | * |
@@ -324,7 +324,7 @@ discard block |
||
| 324 | 324 | /** |
| 325 | 325 | * Helper function to retrive the default config.xml file. |
| 326 | 326 | * |
| 327 | - * @return string |
|
| 327 | + * @return null|SimpleXMLElement |
|
| 328 | 328 | */ |
| 329 | 329 | function bigbluebuttonbn_get_default_config_xml() { |
| 330 | 330 | $xml = bigbluebuttonbn_wrap_xml_load_file( |
@@ -406,7 +406,7 @@ discard block |
||
| 406 | 406 | * @param object $a |
| 407 | 407 | * @param object $b |
| 408 | 408 | * |
| 409 | - * @return array |
|
| 409 | + * @return integer |
|
| 410 | 410 | */ |
| 411 | 411 | function bigbluebuttonbn_recording_build_sorter($a, $b) { |
| 412 | 412 | global $CFG; |
@@ -520,7 +520,7 @@ discard block |
||
| 520 | 520 | * @param string $data |
| 521 | 521 | * @param string $contenttype |
| 522 | 522 | * |
| 523 | - * @return object |
|
| 523 | + * @return null|SimpleXMLElement |
|
| 524 | 524 | */ |
| 525 | 525 | function bigbluebuttonbn_wrap_xml_load_file($url, $method = 'GET', $data = null, $contenttype = 'text/xml') { |
| 526 | 526 | if (extension_loaded('curl')) { |
@@ -561,7 +561,7 @@ discard block |
||
| 561 | 561 | * @param string $data |
| 562 | 562 | * @param string $contenttype |
| 563 | 563 | * |
| 564 | - * @return object |
|
| 564 | + * @return string |
|
| 565 | 565 | */ |
| 566 | 566 | function bigbluebuttonbn_wrap_xml_load_file_curl_request($url, $method = 'GET', $data = null, $contenttype = 'text/xml') { |
| 567 | 567 | global $CFG; |
@@ -956,7 +956,7 @@ discard block |
||
| 956 | 956 | * @param integer $instance |
| 957 | 957 | * @param integer $voicebridge |
| 958 | 958 | * |
| 959 | - * @return string |
|
| 959 | + * @return boolean |
|
| 960 | 960 | */ |
| 961 | 961 | function bigbluebuttonbn_voicebridge_unique($instance, $voicebridge) { |
| 962 | 962 | global $DB; |
@@ -1279,7 +1279,7 @@ discard block |
||
| 1279 | 1279 | * @param string $meetingid |
| 1280 | 1280 | * @param string $configxml |
| 1281 | 1281 | * |
| 1282 | - * @return object |
|
| 1282 | + * @return null|SimpleXMLElement |
|
| 1283 | 1283 | */ |
| 1284 | 1284 | function bigbluebuttonbn_set_config_xml($meetingid, $configxml) { |
| 1285 | 1285 | $urldefaultconfig = \mod_bigbluebuttonbn\locallib\config::get('server_url').'api/setConfigXML?'; |
@@ -1328,7 +1328,7 @@ discard block |
||
| 1328 | 1328 | * @param array $recording |
| 1329 | 1329 | * @param array $tools |
| 1330 | 1330 | * |
| 1331 | - * @return array |
|
| 1331 | + * @return null|stdClass |
|
| 1332 | 1332 | */ |
| 1333 | 1333 | function bigbluebuttonbn_get_recording_data_row($bbbsession, $recording, $tools = ['protect', 'publish', 'delete']) { |
| 1334 | 1334 | if (!bigbluebuttonbn_include_recording_table_row($bbbsession, $recording)) { |
@@ -1962,7 +1962,7 @@ discard block |
||
| 1962 | 1962 | * |
| 1963 | 1963 | * @param array $bbbsession |
| 1964 | 1964 | * @param array $recording |
| 1965 | - * @param object $rowdata |
|
| 1965 | + * @param stdClass $rowdata |
|
| 1966 | 1966 | * |
| 1967 | 1967 | * @return object |
| 1968 | 1968 | */ |
@@ -2080,7 +2080,7 @@ discard block |
||
| 2080 | 2080 | * |
| 2081 | 2081 | * @param array $bbbsession |
| 2082 | 2082 | * @param array $recordings |
| 2083 | - * @param array $tools |
|
| 2083 | + * @param string[] $tools |
|
| 2084 | 2084 | * |
| 2085 | 2085 | * @return array |
| 2086 | 2086 | */ |
@@ -2158,7 +2158,7 @@ discard block |
||
| 2158 | 2158 | * Helper function to define the sql used for gattering the bigbluebuttonbnids whose meetingids should be included |
| 2159 | 2159 | * in the getRecordings request considering only those that belong to deleted activities. |
| 2160 | 2160 | * |
| 2161 | - * @param string $courseid |
|
| 2161 | + * @param integer $courseid |
|
| 2162 | 2162 | * @param string $bigbluebuttonbnid |
| 2163 | 2163 | * @param bool $subset |
| 2164 | 2164 | * |
@@ -2182,7 +2182,7 @@ discard block |
||
| 2182 | 2182 | * Helper function to define the sql used for gattering the bigbluebuttonbnids whose meetingids should be included |
| 2183 | 2183 | * in the getRecordings request considering only those that belong to imported recordings. |
| 2184 | 2184 | * |
| 2185 | - * @param string $courseid |
|
| 2185 | + * @param integer $courseid |
|
| 2186 | 2186 | * @param string $bigbluebuttonbnid |
| 2187 | 2187 | * @param bool $subset |
| 2188 | 2188 | * |
@@ -2205,7 +2205,7 @@ discard block |
||
| 2205 | 2205 | /** |
| 2206 | 2206 | * Helper function to get recordings and imported recordings together. |
| 2207 | 2207 | * |
| 2208 | - * @param string $courseid |
|
| 2208 | + * @param integer $courseid |
|
| 2209 | 2209 | * @param string $bigbluebuttonbnid |
| 2210 | 2210 | * @param bool $subset |
| 2211 | 2211 | * @param bool $includedeleted |
@@ -2223,7 +2223,7 @@ discard block |
||
| 2223 | 2223 | * Helper function to retrieve recordings from the BigBlueButton. The references are stored as events |
| 2224 | 2224 | * in bigbluebuttonbn_logs. |
| 2225 | 2225 | * |
| 2226 | - * @param string $courseid |
|
| 2226 | + * @param integer $courseid |
|
| 2227 | 2227 | * @param string $bigbluebuttonbnid |
| 2228 | 2228 | * @param bool $subset |
| 2229 | 2229 | * @param bool $includedeleted |
@@ -103,9 +103,9 @@ discard block |
||
| 103 | 103 | function bigbluebuttonbn_get_join_url($meetingid, $username, $pw, $logouturl, $configtoken = null, |
| 104 | 104 | $userid = null, $clienttype = BIGBLUEBUTTON_CLIENTTYPE_FLASH) { |
| 105 | 105 | $data = ['meetingID' => $meetingid, |
| 106 | - 'fullName' => $username, |
|
| 107 | - 'password' => $pw, |
|
| 108 | - 'logoutURL' => $logouturl, |
|
| 106 | + 'fullName' => $username, |
|
| 107 | + 'password' => $pw, |
|
| 108 | + 'logoutURL' => $logouturl, |
|
| 109 | 109 | ]; |
| 110 | 110 | // Choose between Adobe Flash or HTML5 Client. |
| 111 | 111 | if ( $clienttype == BIGBLUEBUTTON_CLIENTTYPE_HTML5 ) { |
@@ -161,23 +161,23 @@ discard block |
||
| 161 | 161 | function bigbluebuttonbn_get_meeting_info_array($meetingid) { |
| 162 | 162 | $xml = bigbluebuttonbn_wrap_xml_load_file( |
| 163 | 163 | \mod_bigbluebuttonbn\locallib\bigbluebutton::action_url('getMeetingInfo', ['meetingID' => $meetingid]) |
| 164 | - ); |
|
| 164 | + ); |
|
| 165 | 165 | if ($xml && $xml->returncode == 'SUCCESS' && empty($xml->messageKey)) { |
| 166 | 166 | // Meeting info was returned. |
| 167 | 167 | return array('returncode' => $xml->returncode, |
| 168 | - 'meetingID' => $xml->meetingID, |
|
| 169 | - 'moderatorPW' => $xml->moderatorPW, |
|
| 170 | - 'attendeePW' => $xml->attendeePW, |
|
| 171 | - 'hasBeenForciblyEnded' => $xml->hasBeenForciblyEnded, |
|
| 172 | - 'running' => $xml->running, |
|
| 173 | - 'recording' => $xml->recording, |
|
| 174 | - 'startTime' => $xml->startTime, |
|
| 175 | - 'endTime' => $xml->endTime, |
|
| 176 | - 'participantCount' => $xml->participantCount, |
|
| 177 | - 'moderatorCount' => $xml->moderatorCount, |
|
| 178 | - 'attendees' => $xml->attendees, |
|
| 179 | - 'metadata' => $xml->metadata, |
|
| 180 | - ); |
|
| 168 | + 'meetingID' => $xml->meetingID, |
|
| 169 | + 'moderatorPW' => $xml->moderatorPW, |
|
| 170 | + 'attendeePW' => $xml->attendeePW, |
|
| 171 | + 'hasBeenForciblyEnded' => $xml->hasBeenForciblyEnded, |
|
| 172 | + 'running' => $xml->running, |
|
| 173 | + 'recording' => $xml->recording, |
|
| 174 | + 'startTime' => $xml->startTime, |
|
| 175 | + 'endTime' => $xml->endTime, |
|
| 176 | + 'participantCount' => $xml->participantCount, |
|
| 177 | + 'moderatorCount' => $xml->moderatorCount, |
|
| 178 | + 'attendees' => $xml->attendees, |
|
| 179 | + 'metadata' => $xml->metadata, |
|
| 180 | + ); |
|
| 181 | 181 | } |
| 182 | 182 | if ($xml) { |
| 183 | 183 | // Either failure or success without meeting info. |
@@ -333,7 +333,7 @@ discard block |
||
| 333 | 333 | function bigbluebuttonbn_get_default_config_xml() { |
| 334 | 334 | $xml = bigbluebuttonbn_wrap_xml_load_file( |
| 335 | 335 | \mod_bigbluebuttonbn\locallib\bigbluebutton::action_url('getDefaultConfigXML') |
| 336 | - ); |
|
| 336 | + ); |
|
| 337 | 337 | return $xml; |
| 338 | 338 | } |
| 339 | 339 | |
@@ -437,7 +437,7 @@ discard block |
||
| 437 | 437 | foreach ($ids as $id) { |
| 438 | 438 | $xml = bigbluebuttonbn_wrap_xml_load_file( |
| 439 | 439 | \mod_bigbluebuttonbn\locallib\bigbluebutton::action_url('deleteRecordings', ['recordID' => $id]) |
| 440 | - ); |
|
| 440 | + ); |
|
| 441 | 441 | if ($xml && $xml->returncode != 'SUCCESS') { |
| 442 | 442 | return false; |
| 443 | 443 | } |
@@ -456,7 +456,7 @@ discard block |
||
| 456 | 456 | foreach ($ids as $id) { |
| 457 | 457 | $xml = bigbluebuttonbn_wrap_xml_load_file( |
| 458 | 458 | \mod_bigbluebuttonbn\locallib\bigbluebutton::action_url('publishRecordings', ['recordID' => $id, 'publish' => $publish]) |
| 459 | - ); |
|
| 459 | + ); |
|
| 460 | 460 | if ($xml && $xml->returncode != 'SUCCESS') { |
| 461 | 461 | return false; |
| 462 | 462 | } |
@@ -475,7 +475,7 @@ discard block |
||
| 475 | 475 | foreach ($ids as $id) { |
| 476 | 476 | $xml = bigbluebuttonbn_wrap_xml_load_file( |
| 477 | 477 | \mod_bigbluebuttonbn\locallib\bigbluebutton::action_url('updateRecordings', ['recordID' => $id] + (array) $params) |
| 478 | - ); |
|
| 478 | + ); |
|
| 479 | 479 | if ($xml && $xml->returncode != 'SUCCESS') { |
| 480 | 480 | return false; |
| 481 | 481 | } |
@@ -492,7 +492,7 @@ discard block |
||
| 492 | 492 | function bigbluebuttonbn_end_meeting($meetingid, $modpw) { |
| 493 | 493 | $xml = bigbluebuttonbn_wrap_xml_load_file( |
| 494 | 494 | \mod_bigbluebuttonbn\locallib\bigbluebutton::action_url('end', ['meetingID' => $meetingid, 'password' => $modpw]) |
| 495 | - ); |
|
| 495 | + ); |
|
| 496 | 496 | if ($xml) { |
| 497 | 497 | // If the xml packet returned failure it displays the message to the user. |
| 498 | 498 | return array('returncode' => $xml->returncode, 'message' => $xml->message, 'messageKey' => $xml->messageKey); |
@@ -509,7 +509,7 @@ discard block |
||
| 509 | 509 | function bigbluebuttonbn_get_server_version() { |
| 510 | 510 | $xml = bigbluebuttonbn_wrap_xml_load_file( |
| 511 | 511 | \mod_bigbluebuttonbn\locallib\bigbluebutton::action_url() |
| 512 | - ); |
|
| 512 | + ); |
|
| 513 | 513 | if ($xml && $xml->returncode == 'SUCCESS') { |
| 514 | 514 | return $xml->version; |
| 515 | 515 | } |
@@ -578,10 +578,10 @@ discard block |
||
| 578 | 578 | } |
| 579 | 579 | $options = array(); |
| 580 | 580 | $options['CURLOPT_HTTPHEADER'] = array( |
| 581 | - 'Content-Type: '.$contenttype, |
|
| 582 | - 'Content-Length: '.strlen($data), |
|
| 583 | - 'Content-Language: en-US', |
|
| 584 | - ); |
|
| 581 | + 'Content-Type: '.$contenttype, |
|
| 582 | + 'Content-Length: '.strlen($data), |
|
| 583 | + 'Content-Language: en-US', |
|
| 584 | + ); |
|
| 585 | 585 | |
| 586 | 586 | return $c->post($url, $data, $options); |
| 587 | 587 | } |
@@ -770,12 +770,12 @@ discard block |
||
| 770 | 770 | 'all' => array( |
| 771 | 771 | 'name' => get_string('mod_form_field_participant_list_type_all', 'bigbluebuttonbn'), |
| 772 | 772 | 'children' => [] |
| 773 | - ) |
|
| 774 | - ); |
|
| 773 | + ) |
|
| 774 | + ); |
|
| 775 | 775 | $data['role'] = array( |
| 776 | 776 | 'name' => get_string('mod_form_field_participant_list_type_role', 'bigbluebuttonbn'), |
| 777 | 777 | 'children' => bigbluebuttonbn_get_roles_select($context, true) |
| 778 | - ); |
|
| 778 | + ); |
|
| 779 | 779 | $data['user'] = array( |
| 780 | 780 | 'name' => get_string('mod_form_field_participant_list_type_user', 'bigbluebuttonbn'), |
| 781 | 781 | 'children' => bigbluebuttonbn_get_users_select($context, $bbactivity), |
@@ -822,7 +822,7 @@ discard block |
||
| 822 | 822 | 'selectiontype' => 'all', |
| 823 | 823 | 'selectionid' => 'all', |
| 824 | 824 | 'role' => BIGBLUEBUTTONBN_ROLE_VIEWER |
| 825 | - ); |
|
| 825 | + ); |
|
| 826 | 826 | $defaultrules = explode(',', \mod_bigbluebuttonbn\locallib\config::get('participant_moderator_default')); |
| 827 | 827 | foreach ($defaultrules as $defaultrule) { |
| 828 | 828 | if ($defaultrule == '0') { |
@@ -835,9 +835,9 @@ discard block |
||
| 835 | 835 | continue; |
| 836 | 836 | } |
| 837 | 837 | $participantlist[] = array( |
| 838 | - 'selectiontype' => 'role', |
|
| 839 | - 'selectionid' => $defaultrule, |
|
| 840 | - 'role' => BIGBLUEBUTTONBN_ROLE_MODERATOR); |
|
| 838 | + 'selectiontype' => 'role', |
|
| 839 | + 'selectionid' => $defaultrule, |
|
| 840 | + 'role' => BIGBLUEBUTTONBN_ROLE_MODERATOR); |
|
| 841 | 841 | } |
| 842 | 842 | return $participantlist; |
| 843 | 843 | } |
@@ -876,11 +876,11 @@ discard block |
||
| 876 | 876 | 'all' => get_string('mod_form_field_participant_list_type_all', 'bigbluebuttonbn'), |
| 877 | 877 | 'role' => get_string('mod_form_field_participant_list_type_role', 'bigbluebuttonbn'), |
| 878 | 878 | 'user' => get_string('mod_form_field_participant_list_type_user', 'bigbluebuttonbn'), |
| 879 | - ], |
|
| 879 | + ], |
|
| 880 | 880 | 'type_selected' => 'all', |
| 881 | 881 | 'options' => ['all' => '---------------'], |
| 882 | 882 | 'selected' => 'all', |
| 883 | - ]; |
|
| 883 | + ]; |
|
| 884 | 884 | } |
| 885 | 885 | |
| 886 | 886 | /** |
@@ -1199,7 +1199,7 @@ discard block |
||
| 1199 | 1199 | // Ping again and refresh the cache. |
| 1200 | 1200 | $meetinginfo = (array) bigbluebuttonbn_wrap_xml_load_file( |
| 1201 | 1201 | \mod_bigbluebuttonbn\locallib\bigbluebutton::action_url('getMeetingInfo', ['meetingID' => $meetingid]) |
| 1202 | - ); |
|
| 1202 | + ); |
|
| 1203 | 1203 | $cache->set($meetingid, array('creation_time' => time(), 'meeting_info' => json_encode($meetinginfo))); |
| 1204 | 1204 | return $meetinginfo; |
| 1205 | 1205 | } |
@@ -1612,8 +1612,8 @@ discard block |
||
| 1612 | 1612 | } |
| 1613 | 1613 | $id = 'playbacks-'.$recording['recordID']; |
| 1614 | 1614 | $recordingtypes = html_writer::start_tag('div', array('id' => $id, 'data-imported' => $dataimported, |
| 1615 | - 'data-meetingid' => $recording['meetingID'], 'data-recordingid' => $recording['recordID'], |
|
| 1616 | - 'title' => $title, $visibility => $visibility)); |
|
| 1615 | + 'data-meetingid' => $recording['meetingID'], 'data-recordingid' => $recording['recordID'], |
|
| 1616 | + 'title' => $title, $visibility => $visibility)); |
|
| 1617 | 1617 | foreach ($recording['playbacks'] as $playback) { |
| 1618 | 1618 | $recordingtypes .= bigbluebuttonbn_get_recording_data_row_type($recording, $bbbsession, $playback); |
| 1619 | 1619 | } |
@@ -1648,7 +1648,7 @@ discard block |
||
| 1648 | 1648 | 'data-action' => 'play', |
| 1649 | 1649 | 'data-target' => $playback['type'], |
| 1650 | 1650 | 'data-href' => $href, |
| 1651 | - ); |
|
| 1651 | + ); |
|
| 1652 | 1652 | if ($CFG->bigbluebuttonbn_recordings_validate_url && !bigbluebuttonbn_is_bn_server() |
| 1653 | 1653 | && !bigbluebuttonbn_is_valid_resource(trim($playback['url']))) { |
| 1654 | 1654 | $linkattributes['class'] = 'btn btn-sm btn-warning'; |
@@ -1831,10 +1831,10 @@ discard block |
||
| 1831 | 1831 | 'id' => $id, |
| 1832 | 1832 | 'onclick' => $onclick, |
| 1833 | 1833 | 'data-action' => $data['action'] |
| 1834 | - ); |
|
| 1834 | + ); |
|
| 1835 | 1835 | if (!isset($recording['imported'])) { |
| 1836 | 1836 | $linkattributes['data-links'] = bigbluebuttonbn_count_recording_imported_instances( |
| 1837 | - $recording['recordID']); |
|
| 1837 | + $recording['recordID']); |
|
| 1838 | 1838 | } |
| 1839 | 1839 | if (isset($data['disabled'])) { |
| 1840 | 1840 | $iconattributes['class'] .= ' fa-' . $data['disabled']; |
@@ -2353,17 +2353,17 @@ discard block |
||
| 2353 | 2353 | function bigbluebuttonbn_get_instance_type_profiles() { |
| 2354 | 2354 | $instanceprofiles = array( |
| 2355 | 2355 | BIGBLUEBUTTONBN_TYPE_ALL => array('id' => BIGBLUEBUTTONBN_TYPE_ALL, |
| 2356 | - 'name' => get_string('instance_type_default', 'bigbluebuttonbn'), |
|
| 2357 | - 'features' => array('all')), |
|
| 2356 | + 'name' => get_string('instance_type_default', 'bigbluebuttonbn'), |
|
| 2357 | + 'features' => array('all')), |
|
| 2358 | 2358 | BIGBLUEBUTTONBN_TYPE_ROOM_ONLY => array('id' => BIGBLUEBUTTONBN_TYPE_ROOM_ONLY, |
| 2359 | - 'name' => get_string('instance_type_room_only', 'bigbluebuttonbn'), |
|
| 2360 | - 'features' => array('showroom', 'welcomemessage', 'voicebridge', 'waitformoderator', 'userlimit', |
|
| 2361 | - 'recording', 'sendnotifications', 'preuploadpresentation', 'permissions', 'schedule', 'groups', |
|
| 2362 | - 'modstandardelshdr', 'availabilityconditionsheader', 'tagshdr', 'competenciessection', |
|
| 2363 | - 'clienttype', 'availabilityconditionsheader')), |
|
| 2359 | + 'name' => get_string('instance_type_room_only', 'bigbluebuttonbn'), |
|
| 2360 | + 'features' => array('showroom', 'welcomemessage', 'voicebridge', 'waitformoderator', 'userlimit', |
|
| 2361 | + 'recording', 'sendnotifications', 'preuploadpresentation', 'permissions', 'schedule', 'groups', |
|
| 2362 | + 'modstandardelshdr', 'availabilityconditionsheader', 'tagshdr', 'competenciessection', |
|
| 2363 | + 'clienttype', 'availabilityconditionsheader')), |
|
| 2364 | 2364 | BIGBLUEBUTTONBN_TYPE_RECORDING_ONLY => array('id' => BIGBLUEBUTTONBN_TYPE_RECORDING_ONLY, |
| 2365 | - 'name' => get_string('instance_type_recording_only', 'bigbluebuttonbn'), |
|
| 2366 | - 'features' => array('showrecordings', 'importrecordings', 'availabilityconditionsheader')) |
|
| 2365 | + 'name' => get_string('instance_type_recording_only', 'bigbluebuttonbn'), |
|
| 2366 | + 'features' => array('showrecordings', 'importrecordings', 'availabilityconditionsheader')) |
|
| 2367 | 2367 | ); |
| 2368 | 2368 | return $instanceprofiles; |
| 2369 | 2369 | } |
@@ -2452,8 +2452,8 @@ discard block |
||
| 2452 | 2452 | $activitytime = ''; |
| 2453 | 2453 | if ($time) { |
| 2454 | 2454 | $activitytime = calendar_day_representation($time).' '. |
| 2455 | - get_string('mod_form_field_notification_msg_at', 'bigbluebuttonbn').' '. |
|
| 2456 | - calendar_time_representation($time); |
|
| 2455 | + get_string('mod_form_field_notification_msg_at', 'bigbluebuttonbn').' '. |
|
| 2456 | + calendar_time_representation($time); |
|
| 2457 | 2457 | } |
| 2458 | 2458 | return $activitytime; |
| 2459 | 2459 | } |
@@ -2776,7 +2776,7 @@ discard block |
||
| 2776 | 2776 | 'participant_moderator_default', |
| 2777 | 2777 | array_keys($owner), |
| 2778 | 2778 | $owner + $roles) // CONTRIB-7966: don't use array_merge here so it does not reindex the array. |
| 2779 | - ); |
|
| 2779 | + ); |
|
| 2780 | 2780 | } |
| 2781 | 2781 | } |
| 2782 | 2782 | |
@@ -2812,7 +2812,7 @@ discard block |
||
| 2812 | 2812 | // Web Client default. |
| 2813 | 2813 | $default = intval((int)\mod_bigbluebuttonbn\locallib\config::get('clienttype_default')); |
| 2814 | 2814 | $choices = array(BIGBLUEBUTTON_CLIENTTYPE_FLASH => get_string('mod_form_block_clienttype_flash', 'bigbluebuttonbn'), |
| 2815 | - BIGBLUEBUTTON_CLIENTTYPE_HTML5 => get_string('mod_form_block_clienttype_html5', 'bigbluebuttonbn')); |
|
| 2815 | + BIGBLUEBUTTON_CLIENTTYPE_HTML5 => get_string('mod_form_block_clienttype_html5', 'bigbluebuttonbn')); |
|
| 2816 | 2816 | $renderer->render_group_element('clienttype_default', |
| 2817 | 2817 | $renderer->render_group_element_configselect('clienttype_default', |
| 2818 | 2818 | $default, $choices)); |
@@ -2923,7 +2923,7 @@ discard block |
||
| 2923 | 2923 | return $output; |
| 2924 | 2924 | } |
| 2925 | 2925 | $output .= $OUTPUT->box_start('box boxalignleft adminerror alert alert-' . $type . ' alert-block fade in', |
| 2926 | - 'bigbluebuttonbn_view_general_warning') . "\n"; |
|
| 2926 | + 'bigbluebuttonbn_view_general_warning') . "\n"; |
|
| 2927 | 2927 | $output .= ' ' . $message . "\n"; |
| 2928 | 2928 | $output .= ' <div class="singlebutton pull-right">' . "\n"; |
| 2929 | 2929 | if (!empty($href)) { |
@@ -108,7 +108,7 @@ discard block |
||
| 108 | 108 | 'logoutURL' => $logouturl, |
| 109 | 109 | ]; |
| 110 | 110 | // Choose between Adobe Flash or HTML5 Client. |
| 111 | - if ( $clienttype == BIGBLUEBUTTON_CLIENTTYPE_HTML5 ) { |
|
| 111 | + if ($clienttype == BIGBLUEBUTTON_CLIENTTYPE_HTML5) { |
|
| 112 | 112 | $data['joinViaHtml5'] = 'true'; |
| 113 | 113 | } |
| 114 | 114 | if (!is_null($configtoken)) { |
@@ -181,7 +181,7 @@ discard block |
||
| 181 | 181 | } |
| 182 | 182 | if ($xml) { |
| 183 | 183 | // Either failure or success without meeting info. |
| 184 | - return (array)$xml; |
|
| 184 | + return (array) $xml; |
|
| 185 | 185 | } |
| 186 | 186 | // If the server is unreachable, then prompts the user of the necessary action. |
| 187 | 187 | return array('returncode' => 'FAILED', 'message' => 'unreachable', 'messageKey' => 'Server is unreachable'); |
@@ -569,7 +569,7 @@ discard block |
||
| 569 | 569 | */ |
| 570 | 570 | function bigbluebuttonbn_wrap_xml_load_file_curl_request($url, $method = 'GET', $data = null, $contenttype = 'text/xml') { |
| 571 | 571 | global $CFG; |
| 572 | - require_once($CFG->libdir . '/filelib.php'); |
|
| 572 | + require_once($CFG->libdir.'/filelib.php'); |
|
| 573 | 573 | $c = new curl(); |
| 574 | 574 | $c->setopt(array('SSL_VERIFYPEER' => true)); |
| 575 | 575 | if ($method == 'POST') { |
@@ -620,7 +620,7 @@ discard block |
||
| 620 | 620 | if ($userroles) { |
| 621 | 621 | $where = ''; |
| 622 | 622 | foreach ($userroles as $userrole) { |
| 623 | - $where .= (empty($where) ? ' WHERE' : ' OR').' id=' . $userrole->roleid; |
|
| 623 | + $where .= (empty($where) ? ' WHERE' : ' OR').' id='.$userrole->roleid; |
|
| 624 | 624 | } |
| 625 | 625 | $userroles = $DB->get_records_sql('SELECT * FROM {role}'.$where); |
| 626 | 626 | } |
@@ -749,7 +749,7 @@ discard block |
||
| 749 | 749 | function bigbluebuttonbn_get_role($id) { |
| 750 | 750 | $roles = (array) role_get_names(); |
| 751 | 751 | if (is_numeric($id) && isset($roles[$id])) { |
| 752 | - return (object)$roles[$id]; |
|
| 752 | + return (object) $roles[$id]; |
|
| 753 | 753 | } |
| 754 | 754 | foreach ($roles as $role) { |
| 755 | 755 | if ($role->shortname == $id) { |
@@ -829,7 +829,7 @@ discard block |
||
| 829 | 829 | if (!empty($ownerid) && is_enrolled($context, $ownerid)) { |
| 830 | 830 | $participantlist[] = array( |
| 831 | 831 | 'selectiontype' => 'user', |
| 832 | - 'selectionid' => (string)$ownerid, |
|
| 832 | + 'selectionid' => (string) $ownerid, |
|
| 833 | 833 | 'role' => BIGBLUEBUTTONBN_ROLE_MODERATOR); |
| 834 | 834 | } |
| 835 | 835 | continue; |
@@ -904,7 +904,7 @@ discard block |
||
| 904 | 904 | if (!isguestuser()) { |
| 905 | 905 | $userroles = bigbluebuttonbn_get_user_roles($context, $userid); |
| 906 | 906 | } |
| 907 | - return bigbluebuttonbn_is_moderator_validator($participantlist, $userid , $userroles); |
|
| 907 | + return bigbluebuttonbn_is_moderator_validator($participantlist, $userid, $userroles); |
|
| 908 | 908 | } |
| 909 | 909 | |
| 910 | 910 | /** |
@@ -989,9 +989,9 @@ discard block |
||
| 989 | 989 | if ($voicebridge == 0) { |
| 990 | 990 | return true; |
| 991 | 991 | } |
| 992 | - $select = 'voicebridge = ' . $voicebridge; |
|
| 992 | + $select = 'voicebridge = '.$voicebridge; |
|
| 993 | 993 | if ($instance != 0) { |
| 994 | - $select .= ' AND id <>' . $instance; |
|
| 994 | + $select .= ' AND id <>'.$instance; |
|
| 995 | 995 | } |
| 996 | 996 | if (!$DB->get_records_select('bigbluebuttonbn', $select)) { |
| 997 | 997 | return true; |
@@ -1011,7 +1011,7 @@ discard block |
||
| 1011 | 1011 | $now = time(); |
| 1012 | 1012 | if ($closingtime > 0 && $now < $closingtime) { |
| 1013 | 1013 | $duration = ceil(($closingtime - $now) / 60); |
| 1014 | - $compensationtime = intval((int)\mod_bigbluebuttonbn\locallib\config::get('scheduled_duration_compensation')); |
|
| 1014 | + $compensationtime = intval((int) \mod_bigbluebuttonbn\locallib\config::get('scheduled_duration_compensation')); |
|
| 1015 | 1015 | $duration = intval($duration) + $compensationtime; |
| 1016 | 1016 | } |
| 1017 | 1017 | return $duration; |
@@ -1151,7 +1151,7 @@ discard block |
||
| 1151 | 1151 | if (array_key_exists('other', $options)) { |
| 1152 | 1152 | $params['other'] = $options['other']; |
| 1153 | 1153 | } |
| 1154 | - $event = call_user_func_array('\mod_bigbluebuttonbn\event\\' . $type . '::create', |
|
| 1154 | + $event = call_user_func_array('\mod_bigbluebuttonbn\event\\'.$type.'::create', |
|
| 1155 | 1155 | array($params)); |
| 1156 | 1156 | $event->add_record_snapshot('course_modules', $cm); |
| 1157 | 1157 | $event->add_record_snapshot('course', $course); |
@@ -1188,7 +1188,7 @@ discard block |
||
| 1188 | 1188 | * @return array |
| 1189 | 1189 | */ |
| 1190 | 1190 | function bigbluebuttonbn_get_meeting_info($meetingid, $updatecache = false) { |
| 1191 | - $cachettl = (int)\mod_bigbluebuttonbn\locallib\config::get('waitformoderator_cache_ttl'); |
|
| 1191 | + $cachettl = (int) \mod_bigbluebuttonbn\locallib\config::get('waitformoderator_cache_ttl'); |
|
| 1192 | 1192 | $cache = cache::make_from_params(cache_store::MODE_APPLICATION, 'mod_bigbluebuttonbn', 'meetings_cache'); |
| 1193 | 1193 | $result = $cache->get($meetingid); |
| 1194 | 1194 | $now = time(); |
@@ -1392,7 +1392,7 @@ discard block |
||
| 1392 | 1392 | * @return boolean |
| 1393 | 1393 | */ |
| 1394 | 1394 | function bigbluebuttonbn_get_recording_data_row_editable($bbbsession) { |
| 1395 | - return ($bbbsession['managerecordings'] && ((double)$bbbsession['serverversion'] >= 1.0 || $bbbsession['bnserver'])); |
|
| 1395 | + return ($bbbsession['managerecordings'] && ((double) $bbbsession['serverversion'] >= 1.0 || $bbbsession['bnserver'])); |
|
| 1396 | 1396 | } |
| 1397 | 1397 | |
| 1398 | 1398 | /** |
@@ -1403,7 +1403,7 @@ discard block |
||
| 1403 | 1403 | * @return boolean |
| 1404 | 1404 | */ |
| 1405 | 1405 | function bigbluebuttonbn_get_recording_data_preview_enabled($bbbsession) { |
| 1406 | - return ((double)$bbbsession['serverversion'] >= 1.0 && $bbbsession['bigbluebuttonbn']->recordings_preview == '1'); |
|
| 1406 | + return ((double) $bbbsession['serverversion'] >= 1.0 && $bbbsession['bigbluebuttonbn']->recordings_preview == '1'); |
|
| 1407 | 1407 | } |
| 1408 | 1408 | |
| 1409 | 1409 | /** |
@@ -1479,11 +1479,11 @@ discard block |
||
| 1479 | 1479 | $actionbar .= bigbluebuttonbn_actionbar_render_button($recording, $buttonpayload); |
| 1480 | 1480 | } |
| 1481 | 1481 | $head = html_writer::start_tag('div', array( |
| 1482 | - 'id' => 'recording-actionbar-' . $recording['recordID'], |
|
| 1482 | + 'id' => 'recording-actionbar-'.$recording['recordID'], |
|
| 1483 | 1483 | 'data-recordingid' => $recording['recordID'], |
| 1484 | 1484 | 'data-meetingid' => $recording['meetingID'])); |
| 1485 | 1485 | $tail = html_writer::end_tag('div'); |
| 1486 | - return $head . $actionbar . $tail; |
|
| 1486 | + return $head.$actionbar.$tail; |
|
| 1487 | 1487 | } |
| 1488 | 1488 | |
| 1489 | 1489 | /** |
@@ -1579,7 +1579,7 @@ discard block |
||
| 1579 | 1579 | } |
| 1580 | 1580 | $recordingpreview .= html_writer::start_tag('div', array('class' => '')); |
| 1581 | 1581 | $recordingpreview .= html_writer::empty_tag('img', |
| 1582 | - array('src' => trim($image['url']) . '?' . time(), 'class' => 'recording-thumbnail pull-left')); |
|
| 1582 | + array('src' => trim($image['url']).'?'.time(), 'class' => 'recording-thumbnail pull-left')); |
|
| 1583 | 1583 | $recordingpreview .= html_writer::end_tag('div'); |
| 1584 | 1584 | } |
| 1585 | 1585 | $recordingpreview .= html_writer::end_tag('div'); |
@@ -1636,13 +1636,13 @@ discard block |
||
| 1636 | 1636 | return ''; |
| 1637 | 1637 | } |
| 1638 | 1638 | $text = bigbluebuttonbn_get_recording_type_text($playback['type']); |
| 1639 | - $href = $CFG->wwwroot . '/mod/bigbluebuttonbn/bbb_view.php?action=play&bn=' . $bbbsession['bigbluebuttonbn']->id . |
|
| 1640 | - '&mid=' . $recording['meetingID'] . '&rid=' . $recording['recordID'] . '&rtype=' . $playback['type']; |
|
| 1639 | + $href = $CFG->wwwroot.'/mod/bigbluebuttonbn/bbb_view.php?action=play&bn='.$bbbsession['bigbluebuttonbn']->id. |
|
| 1640 | + '&mid='.$recording['meetingID'].'&rid='.$recording['recordID'].'&rtype='.$playback['type']; |
|
| 1641 | 1641 | if (!isset($recording['imported']) || !isset($recording['protected']) || $recording['protected'] === 'false') { |
| 1642 | - $href .= '&href=' . urlencode(trim($playback['url'])); |
|
| 1642 | + $href .= '&href='.urlencode(trim($playback['url'])); |
|
| 1643 | 1643 | } |
| 1644 | 1644 | $linkattributes = array( |
| 1645 | - 'id' => 'recording-play-' . $playback['type'] . '-' . $recording['recordID'], |
|
| 1645 | + 'id' => 'recording-play-'.$playback['type'].'-'.$recording['recordID'], |
|
| 1646 | 1646 | 'class' => 'btn btn-sm btn-default', |
| 1647 | 1647 | 'onclick' => 'M.mod_bigbluebuttonbn.recordings.recordingPlay(this);', |
| 1648 | 1648 | 'data-action' => 'play', |
@@ -1655,7 +1655,7 @@ discard block |
||
| 1655 | 1655 | $linkattributes['title'] = get_string('view_recording_format_errror_unreachable', 'bigbluebuttonbn'); |
| 1656 | 1656 | unset($linkattributes['data-href']); |
| 1657 | 1657 | } |
| 1658 | - return $OUTPUT->action_link('#', $text, null, $linkattributes) . ' '; |
|
| 1658 | + return $OUTPUT->action_link('#', $text, null, $linkattributes).' '; |
|
| 1659 | 1659 | } |
| 1660 | 1660 | |
| 1661 | 1661 | /** |
@@ -1668,7 +1668,7 @@ discard block |
||
| 1668 | 1668 | function bigbluebuttonbn_get_recording_type_text($playbacktype) { |
| 1669 | 1669 | // Check first if string exists, and if it does'nt just default to the capitalised version of the string. |
| 1670 | 1670 | $text = ucwords($playbacktype); |
| 1671 | - $typestringid = 'view_recording_format_' . $playbacktype; |
|
| 1671 | + $typestringid = 'view_recording_format_'.$playbacktype; |
|
| 1672 | 1672 | if (get_string_manager()->string_exists($typestringid, 'bigbluebuttonbn')) { |
| 1673 | 1673 | $text = get_string($typestringid, 'bigbluebuttonbn'); |
| 1674 | 1674 | } |
@@ -1698,7 +1698,7 @@ discard block |
||
| 1698 | 1698 | $validatedurls[$urlhost] = true; |
| 1699 | 1699 | $curlinfo = bigbluebuttonbn_wrap_xml_load_file_curl_request($url, 'HEAD'); |
| 1700 | 1700 | if (!isset($curlinfo['http_code']) || $curlinfo['http_code'] != 200) { |
| 1701 | - $error = "Resources hosted by " . $urlhost . " are unreachable. Server responded with code " . $curlinfo['http_code']; |
|
| 1701 | + $error = "Resources hosted by ".$urlhost." are unreachable. Server responded with code ".$curlinfo['http_code']; |
|
| 1702 | 1702 | debugging($error, DEBUG_DEVELOPER); |
| 1703 | 1703 | $validatedurls[$urlhost] = false; |
| 1704 | 1704 | } |
@@ -1789,12 +1789,12 @@ discard block |
||
| 1789 | 1789 | * @return string |
| 1790 | 1790 | */ |
| 1791 | 1791 | function bigbluebuttonbn_get_recording_data_row_text($recording, $text, $source, $data) { |
| 1792 | - $htmltext = '<span>' . htmlentities($text) . '</span>'; |
|
| 1792 | + $htmltext = '<span>'.htmlentities($text).'</span>'; |
|
| 1793 | 1793 | if (empty($data)) { |
| 1794 | 1794 | return $htmltext; |
| 1795 | 1795 | } |
| 1796 | - $target = $data['action'] . '-' . $data['target']; |
|
| 1797 | - $id = 'recording-' . $target . '-' . $data['recordingid']; |
|
| 1796 | + $target = $data['action'].'-'.$data['target']; |
|
| 1797 | + $id = 'recording-'.$target.'-'.$data['recordingid']; |
|
| 1798 | 1798 | $attributes = array('id' => $id, 'class' => 'quickeditlink col-md-20', |
| 1799 | 1799 | 'data-recordingid' => $data['recordingid'], 'data-meetingid' => $data['meetingid'], |
| 1800 | 1800 | 'data-target' => $data['target'], 'data-source' => $source); |
@@ -1802,7 +1802,7 @@ discard block |
||
| 1802 | 1802 | $tail = html_writer::end_tag('div'); |
| 1803 | 1803 | $payload = array('action' => $data['action'], 'tag' => $data['tag'], 'target' => $data['target']); |
| 1804 | 1804 | $htmllink = bigbluebuttonbn_actionbar_render_button($recording, $payload); |
| 1805 | - return $head . $htmltext . $htmllink . $tail; |
|
| 1805 | + return $head.$htmltext.$htmllink.$tail; |
|
| 1806 | 1806 | } |
| 1807 | 1807 | |
| 1808 | 1808 | /** |
@@ -1820,10 +1820,10 @@ discard block |
||
| 1820 | 1820 | } |
| 1821 | 1821 | $target = $data['action']; |
| 1822 | 1822 | if (isset($data['target'])) { |
| 1823 | - $target .= '-' . $data['target']; |
|
| 1823 | + $target .= '-'.$data['target']; |
|
| 1824 | 1824 | } |
| 1825 | - $id = 'recording-' . $target . '-' . $recording['recordID']; |
|
| 1826 | - $onclick = 'M.mod_bigbluebuttonbn.recordings.recording' . ucfirst($data['action']) . '(this); return false;'; |
|
| 1825 | + $id = 'recording-'.$target.'-'.$recording['recordID']; |
|
| 1826 | + $onclick = 'M.mod_bigbluebuttonbn.recordings.recording'.ucfirst($data['action']).'(this); return false;'; |
|
| 1827 | 1827 | if ((boolean) \mod_bigbluebuttonbn\locallib\config::get('recording_icons_enabled')) { |
| 1828 | 1828 | // With icon for $manageaction. |
| 1829 | 1829 | $iconattributes = array('id' => $id, 'class' => 'iconsmall'); |
@@ -1837,12 +1837,12 @@ discard block |
||
| 1837 | 1837 | $recording['recordID']); |
| 1838 | 1838 | } |
| 1839 | 1839 | if (isset($data['disabled'])) { |
| 1840 | - $iconattributes['class'] .= ' fa-' . $data['disabled']; |
|
| 1840 | + $iconattributes['class'] .= ' fa-'.$data['disabled']; |
|
| 1841 | 1841 | $linkattributes['class'] = 'disabled'; |
| 1842 | 1842 | unset($linkattributes['onclick']); |
| 1843 | 1843 | } |
| 1844 | 1844 | $icon = new pix_icon('i/'.$data['tag'], |
| 1845 | - get_string('view_recording_list_actionbar_' . $data['action'], 'bigbluebuttonbn'), |
|
| 1845 | + get_string('view_recording_list_actionbar_'.$data['action'], 'bigbluebuttonbn'), |
|
| 1846 | 1846 | 'moodle', $iconattributes); |
| 1847 | 1847 | return $OUTPUT->action_icon('#', $icon, null, $linkattributes, false); |
| 1848 | 1848 | } |
@@ -1935,7 +1935,7 @@ discard block |
||
| 1935 | 1935 | if ($bbbsession['managerecordings']) { |
| 1936 | 1936 | $table->head[] = get_string('view_recording_actionbar', 'bigbluebuttonbn'); |
| 1937 | 1937 | $table->align[] = 'left'; |
| 1938 | - $table->size[] = (count($tools) * 40) . 'px'; |
|
| 1938 | + $table->size[] = (count($tools) * 40).'px'; |
|
| 1939 | 1939 | } |
| 1940 | 1940 | // Get the groups of the user. |
| 1941 | 1941 | $usergroups = groups_get_all_groups($bbbsession['course']->id, $bbbsession['userID']); |
@@ -2003,13 +2003,13 @@ discard block |
||
| 2003 | 2003 | } |
| 2004 | 2004 | $rowdata->date_formatted = str_replace(' ', ' ', $rowdata->date_formatted); |
| 2005 | 2005 | $row->cells = array(); |
| 2006 | - $row->cells[] = $texthead . $rowdata->playback . $texttail; |
|
| 2007 | - $row->cells[] = $texthead . $rowdata->recording . $texttail; |
|
| 2008 | - $row->cells[] = $texthead . $rowdata->description . $texttail; |
|
| 2006 | + $row->cells[] = $texthead.$rowdata->playback.$texttail; |
|
| 2007 | + $row->cells[] = $texthead.$rowdata->recording.$texttail; |
|
| 2008 | + $row->cells[] = $texthead.$rowdata->description.$texttail; |
|
| 2009 | 2009 | if (bigbluebuttonbn_get_recording_data_preview_enabled($bbbsession)) { |
| 2010 | 2010 | $row->cells[] = $rowdata->preview; |
| 2011 | 2011 | } |
| 2012 | - $row->cells[] = $texthead . $rowdata->date_formatted . $texttail; |
|
| 2012 | + $row->cells[] = $texthead.$rowdata->date_formatted.$texttail; |
|
| 2013 | 2013 | $row->cells[] = $rowdata->duration_formatted; |
| 2014 | 2014 | if ($bbbsession['managerecordings']) { |
| 2015 | 2015 | $row->cells[] = $rowdata->actionbar; |
@@ -2056,7 +2056,7 @@ discard block |
||
| 2056 | 2056 | $sender = get_admin(); |
| 2057 | 2057 | // Prepare message. |
| 2058 | 2058 | $messagetext = '<p>'.get_string('email_body_recording_ready_for', 'bigbluebuttonbn'). |
| 2059 | - ' "' . $bigbluebuttonbn->name . '" '. |
|
| 2059 | + ' "'.$bigbluebuttonbn->name.'" '. |
|
| 2060 | 2060 | get_string('email_body_recording_ready_is_ready', 'bigbluebuttonbn').'.</p>'; |
| 2061 | 2061 | $context = context_course::instance($bigbluebuttonbn->course); |
| 2062 | 2062 | \mod_bigbluebuttonbn\locallib\notifier::notification_send($sender, $bigbluebuttonbn, $messagetext); |
@@ -2099,7 +2099,7 @@ discard block |
||
| 2099 | 2099 | } |
| 2100 | 2100 | $coursesforselect = []; |
| 2101 | 2101 | foreach ($courses as $course) { |
| 2102 | - $coursesforselect[$course->id] = $course->fullname . " (" . $course->shortname . ")"; |
|
| 2102 | + $coursesforselect[$course->id] = $course->fullname." (".$course->shortname.")"; |
|
| 2103 | 2103 | } |
| 2104 | 2104 | return $coursesforselect; |
| 2105 | 2105 | } |
@@ -2194,17 +2194,17 @@ discard block |
||
| 2194 | 2194 | * @return string containing the sql used for getting the target bigbluebuttonbn instances |
| 2195 | 2195 | */ |
| 2196 | 2196 | function bigbluebuttonbn_get_recordings_deleted_sql_select($courseid = 0, $bigbluebuttonbnid = null, $subset = true) { |
| 2197 | - $sql = "log = '" . BIGBLUEBUTTONBN_LOG_EVENT_DELETE . "' AND meta like '%has_recordings%' AND meta like '%true%'"; |
|
| 2197 | + $sql = "log = '".BIGBLUEBUTTONBN_LOG_EVENT_DELETE."' AND meta like '%has_recordings%' AND meta like '%true%'"; |
|
| 2198 | 2198 | if (empty($courseid)) { |
| 2199 | 2199 | $courseid = 0; |
| 2200 | 2200 | } |
| 2201 | 2201 | if (empty($bigbluebuttonbnid)) { |
| 2202 | - return $sql . " AND courseid = {$courseid}"; |
|
| 2202 | + return $sql." AND courseid = {$courseid}"; |
|
| 2203 | 2203 | } |
| 2204 | 2204 | if ($subset) { |
| 2205 | - return $sql . " AND bigbluebuttonbnid = '{$bigbluebuttonbnid}'"; |
|
| 2205 | + return $sql." AND bigbluebuttonbnid = '{$bigbluebuttonbnid}'"; |
|
| 2206 | 2206 | } |
| 2207 | - return $sql . " AND courseid = {$courseid} AND bigbluebuttonbnid <> '{$bigbluebuttonbnid}'"; |
|
| 2207 | + return $sql." AND courseid = {$courseid} AND bigbluebuttonbnid <> '{$bigbluebuttonbnid}'"; |
|
| 2208 | 2208 | } |
| 2209 | 2209 | |
| 2210 | 2210 | /** |
@@ -2218,17 +2218,17 @@ discard block |
||
| 2218 | 2218 | * @return string containing the sql used for getting the target bigbluebuttonbn instances |
| 2219 | 2219 | */ |
| 2220 | 2220 | function bigbluebuttonbn_get_recordings_imported_sql_select($courseid = 0, $bigbluebuttonbnid = null, $subset = true) { |
| 2221 | - $sql = "log = '" . BIGBLUEBUTTONBN_LOG_EVENT_IMPORT . "'"; |
|
| 2221 | + $sql = "log = '".BIGBLUEBUTTONBN_LOG_EVENT_IMPORT."'"; |
|
| 2222 | 2222 | if (empty($courseid)) { |
| 2223 | 2223 | $courseid = 0; |
| 2224 | 2224 | } |
| 2225 | 2225 | if (empty($bigbluebuttonbnid)) { |
| 2226 | - return $sql . " AND courseid = '{$courseid}'"; |
|
| 2226 | + return $sql." AND courseid = '{$courseid}'"; |
|
| 2227 | 2227 | } |
| 2228 | 2228 | if ($subset) { |
| 2229 | - return $sql . " AND bigbluebuttonbnid = '{$bigbluebuttonbnid}'"; |
|
| 2229 | + return $sql." AND bigbluebuttonbnid = '{$bigbluebuttonbnid}'"; |
|
| 2230 | 2230 | } |
| 2231 | - return $sql . " AND courseid = '{$courseid}' AND bigbluebuttonbnid <> '{$bigbluebuttonbnid}'"; |
|
| 2231 | + return $sql." AND courseid = '{$courseid}' AND bigbluebuttonbnid <> '{$bigbluebuttonbnid}'"; |
|
| 2232 | 2232 | } |
| 2233 | 2233 | |
| 2234 | 2234 | /** |
@@ -2554,7 +2554,7 @@ discard block |
||
| 2554 | 2554 | */ |
| 2555 | 2555 | function bigbluebuttonbn_settings_general(&$renderer) { |
| 2556 | 2556 | // Configuration for BigBlueButton. |
| 2557 | - if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_general_shown()) { |
|
| 2557 | + if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_general_shown()) { |
|
| 2558 | 2558 | $renderer->render_group_header('general'); |
| 2559 | 2559 | $renderer->render_group_element('server_url', |
| 2560 | 2560 | $renderer->render_group_element_text('server_url', BIGBLUEBUTTONBN_DEFAULT_SERVER_URL)); |
@@ -2572,7 +2572,7 @@ discard block |
||
| 2572 | 2572 | */ |
| 2573 | 2573 | function bigbluebuttonbn_settings_record(&$renderer) { |
| 2574 | 2574 | // Configuration for 'recording' feature. |
| 2575 | - if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_record_meeting_shown()) { |
|
| 2575 | + if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_record_meeting_shown()) { |
|
| 2576 | 2576 | $renderer->render_group_header('recording'); |
| 2577 | 2577 | $renderer->render_group_element('recording_default', |
| 2578 | 2578 | $renderer->render_group_element_checkbox('recording_default', 1)); |
@@ -2602,7 +2602,7 @@ discard block |
||
| 2602 | 2602 | */ |
| 2603 | 2603 | function bigbluebuttonbn_settings_importrecordings(&$renderer) { |
| 2604 | 2604 | // Configuration for 'import recordings' feature. |
| 2605 | - if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_import_recordings_shown()) { |
|
| 2605 | + if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_import_recordings_shown()) { |
|
| 2606 | 2606 | $renderer->render_group_header('importrecordings'); |
| 2607 | 2607 | $renderer->render_group_element('importrecordings_enabled', |
| 2608 | 2608 | $renderer->render_group_element_checkbox('importrecordings_enabled', 0)); |
@@ -2620,7 +2620,7 @@ discard block |
||
| 2620 | 2620 | */ |
| 2621 | 2621 | function bigbluebuttonbn_settings_showrecordings(&$renderer) { |
| 2622 | 2622 | // Configuration for 'show recordings' feature. |
| 2623 | - if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_show_recordings_shown()) { |
|
| 2623 | + if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_show_recordings_shown()) { |
|
| 2624 | 2624 | $renderer->render_group_header('recordings'); |
| 2625 | 2625 | $renderer->render_group_element('recordings_html_default', |
| 2626 | 2626 | $renderer->render_group_element_checkbox('recordings_html_default', 1)); |
@@ -2654,7 +2654,7 @@ discard block |
||
| 2654 | 2654 | */ |
| 2655 | 2655 | function bigbluebuttonbn_settings_waitmoderator(&$renderer) { |
| 2656 | 2656 | // Configuration for wait for moderator feature. |
| 2657 | - if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_wait_moderator_shown()) { |
|
| 2657 | + if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_wait_moderator_shown()) { |
|
| 2658 | 2658 | $renderer->render_group_header('waitformoderator'); |
| 2659 | 2659 | $renderer->render_group_element('waitformoderator_default', |
| 2660 | 2660 | $renderer->render_group_element_checkbox('waitformoderator_default', 0)); |
@@ -2676,7 +2676,7 @@ discard block |
||
| 2676 | 2676 | */ |
| 2677 | 2677 | function bigbluebuttonbn_settings_voicebridge(&$renderer) { |
| 2678 | 2678 | // Configuration for "static voice bridge" feature. |
| 2679 | - if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_static_voice_bridge_shown()) { |
|
| 2679 | + if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_static_voice_bridge_shown()) { |
|
| 2680 | 2680 | $renderer->render_group_header('voicebridge'); |
| 2681 | 2681 | $renderer->render_group_element('voicebridge_editable', |
| 2682 | 2682 | $renderer->render_group_element_checkbox('voicebridge_editable', 0)); |
@@ -2692,7 +2692,7 @@ discard block |
||
| 2692 | 2692 | */ |
| 2693 | 2693 | function bigbluebuttonbn_settings_preupload(&$renderer) { |
| 2694 | 2694 | // Configuration for "preupload presentation" feature. |
| 2695 | - if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_preupload_presentation_shown()) { |
|
| 2695 | + if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_preupload_presentation_shown()) { |
|
| 2696 | 2696 | // This feature only works if curl is installed. |
| 2697 | 2697 | $preuploaddescripion = get_string('config_preuploadpresentation_description', 'bigbluebuttonbn'); |
| 2698 | 2698 | if (!extension_loaded('curl')) { |
@@ -2718,7 +2718,7 @@ discard block |
||
| 2718 | 2718 | */ |
| 2719 | 2719 | function bigbluebuttonbn_settings_preupload_manage_default_file(&$renderer) { |
| 2720 | 2720 | // Configuration for "preupload presentation" feature. |
| 2721 | - if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_preupload_presentation_shown()) { |
|
| 2721 | + if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_preupload_presentation_shown()) { |
|
| 2722 | 2722 | if (extension_loaded('curl')) { |
| 2723 | 2723 | // This feature only works if curl is installed. |
| 2724 | 2724 | $renderer->render_filemanager_default_file_presentation("presentation_default"); |
@@ -2735,7 +2735,7 @@ discard block |
||
| 2735 | 2735 | */ |
| 2736 | 2736 | function bigbluebuttonbn_settings_userlimit(&$renderer) { |
| 2737 | 2737 | // Configuration for "user limit" feature. |
| 2738 | - if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_user_limit_shown()) { |
|
| 2738 | + if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_user_limit_shown()) { |
|
| 2739 | 2739 | $renderer->render_group_header('userlimit'); |
| 2740 | 2740 | $renderer->render_group_element('userlimit_default', |
| 2741 | 2741 | $renderer->render_group_element_text('userlimit_default', 0, PARAM_INT)); |
@@ -2753,7 +2753,7 @@ discard block |
||
| 2753 | 2753 | */ |
| 2754 | 2754 | function bigbluebuttonbn_settings_duration(&$renderer) { |
| 2755 | 2755 | // Configuration for "scheduled duration" feature. |
| 2756 | - if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_scheduled_duration_shown()) { |
|
| 2756 | + if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_scheduled_duration_shown()) { |
|
| 2757 | 2757 | $renderer->render_group_header('scheduled'); |
| 2758 | 2758 | $renderer->render_group_element('scheduled_duration_enabled', |
| 2759 | 2759 | $renderer->render_group_element_checkbox('scheduled_duration_enabled', 1)); |
@@ -2773,7 +2773,7 @@ discard block |
||
| 2773 | 2773 | */ |
| 2774 | 2774 | function bigbluebuttonbn_settings_participants(&$renderer) { |
| 2775 | 2775 | // Configuration for defining the default role/user that will be moderator on new activities. |
| 2776 | - if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_moderator_default_shown()) { |
|
| 2776 | + if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_moderator_default_shown()) { |
|
| 2777 | 2777 | $renderer->render_group_header('participant'); |
| 2778 | 2778 | // UI for 'participants' feature. |
| 2779 | 2779 | $roles = bigbluebuttonbn_get_roles(null, false); |
@@ -2796,7 +2796,7 @@ discard block |
||
| 2796 | 2796 | */ |
| 2797 | 2797 | function bigbluebuttonbn_settings_notifications(&$renderer) { |
| 2798 | 2798 | // Configuration for "send notifications" feature. |
| 2799 | - if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_send_notifications_shown()) { |
|
| 2799 | + if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_send_notifications_shown()) { |
|
| 2800 | 2800 | $renderer->render_group_header('sendnotifications'); |
| 2801 | 2801 | $renderer->render_group_element('sendnotifications_enabled', |
| 2802 | 2802 | $renderer->render_group_element_checkbox('sendnotifications_enabled', 1)); |
@@ -2812,12 +2812,12 @@ discard block |
||
| 2812 | 2812 | */ |
| 2813 | 2813 | function bigbluebuttonbn_settings_clienttype(&$renderer) { |
| 2814 | 2814 | // Configuration for "clienttype" feature. |
| 2815 | - if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_clienttype_shown()) { |
|
| 2815 | + if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_clienttype_shown()) { |
|
| 2816 | 2816 | $renderer->render_group_header('clienttype'); |
| 2817 | 2817 | $renderer->render_group_element('clienttype_editable', |
| 2818 | 2818 | $renderer->render_group_element_checkbox('clienttype_editable', 0)); |
| 2819 | 2819 | // Web Client default. |
| 2820 | - $default = intval((int)\mod_bigbluebuttonbn\locallib\config::get('clienttype_default')); |
|
| 2820 | + $default = intval((int) \mod_bigbluebuttonbn\locallib\config::get('clienttype_default')); |
|
| 2821 | 2821 | $choices = array(BIGBLUEBUTTON_CLIENTTYPE_FLASH => get_string('mod_form_block_clienttype_flash', 'bigbluebuttonbn'), |
| 2822 | 2822 | BIGBLUEBUTTON_CLIENTTYPE_HTML5 => get_string('mod_form_block_clienttype_html5', 'bigbluebuttonbn')); |
| 2823 | 2823 | $renderer->render_group_element('clienttype_default', |
@@ -2835,7 +2835,7 @@ discard block |
||
| 2835 | 2835 | */ |
| 2836 | 2836 | function bigbluebuttonbn_settings_muteonstart(&$renderer) { |
| 2837 | 2837 | // Configuration for BigBlueButton. |
| 2838 | - if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_muteonstart_shown()) { |
|
| 2838 | + if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_muteonstart_shown()) { |
|
| 2839 | 2839 | $renderer->render_group_header('muteonstart'); |
| 2840 | 2840 | $renderer->render_group_element('muteonstart_default', |
| 2841 | 2841 | $renderer->render_group_element_checkbox('muteonstart_default', 0)); |
@@ -2853,7 +2853,7 @@ discard block |
||
| 2853 | 2853 | */ |
| 2854 | 2854 | function bigbluebuttonbn_settings_extended(&$renderer) { |
| 2855 | 2855 | // Configuration for 'notify users when recording ready' feature. |
| 2856 | - if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_settings_extended_shown()) { |
|
| 2856 | + if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_settings_extended_shown()) { |
|
| 2857 | 2857 | $renderer->render_group_header('extended_capabilities'); |
| 2858 | 2858 | // UI for 'notify users when recording ready' feature. |
| 2859 | 2859 | $renderer->render_group_element('recordingready_enabled', |
@@ -2876,7 +2876,7 @@ discard block |
||
| 2876 | 2876 | global $DB; |
| 2877 | 2877 | do { |
| 2878 | 2878 | $encodedseed = sha1(bigbluebuttonbn_random_password(12)); |
| 2879 | - $meetingid = (string)$DB->get_field('bigbluebuttonbn', 'meetingid', array('meetingid' => $encodedseed)); |
|
| 2879 | + $meetingid = (string) $DB->get_field('bigbluebuttonbn', 'meetingid', array('meetingid' => $encodedseed)); |
|
| 2880 | 2880 | } while ($meetingid == $encodedseed); |
| 2881 | 2881 | return $encodedseed; |
| 2882 | 2882 | } |
@@ -2921,22 +2921,22 @@ discard block |
||
| 2921 | 2921 | * |
| 2922 | 2922 | * @return string |
| 2923 | 2923 | */ |
| 2924 | -function bigbluebuttonbn_render_warning($message, $type='info', $href='', $text='', $class='') { |
|
| 2924 | +function bigbluebuttonbn_render_warning($message, $type = 'info', $href = '', $text = '', $class = '') { |
|
| 2925 | 2925 | global $OUTPUT; |
| 2926 | 2926 | $output = "\n"; |
| 2927 | 2927 | // Evaluates if config_warning is enabled. |
| 2928 | 2928 | if (empty($message)) { |
| 2929 | 2929 | return $output; |
| 2930 | 2930 | } |
| 2931 | - $output .= $OUTPUT->box_start('box boxalignleft adminerror alert alert-' . $type . ' alert-block fade in', |
|
| 2932 | - 'bigbluebuttonbn_view_general_warning') . "\n"; |
|
| 2933 | - $output .= ' ' . $message . "\n"; |
|
| 2934 | - $output .= ' <div class="singlebutton pull-right">' . "\n"; |
|
| 2931 | + $output .= $OUTPUT->box_start('box boxalignleft adminerror alert alert-'.$type.' alert-block fade in', |
|
| 2932 | + 'bigbluebuttonbn_view_general_warning')."\n"; |
|
| 2933 | + $output .= ' '.$message."\n"; |
|
| 2934 | + $output .= ' <div class="singlebutton pull-right">'."\n"; |
|
| 2935 | 2935 | if (!empty($href)) { |
| 2936 | 2936 | $output .= bigbluebuttonbn_render_warning_button($href, $text, $class); |
| 2937 | 2937 | } |
| 2938 | - $output .= ' </div>' . "\n"; |
|
| 2939 | - $output .= $OUTPUT->box_end() . "\n"; |
|
| 2938 | + $output .= ' </div>'."\n"; |
|
| 2939 | + $output .= $OUTPUT->box_end()."\n"; |
|
| 2940 | 2940 | return $output; |
| 2941 | 2941 | } |
| 2942 | 2942 | |
@@ -2960,10 +2960,10 @@ discard block |
||
| 2960 | 2960 | if ($class == '') { |
| 2961 | 2961 | $class = 'btn btn-secondary'; |
| 2962 | 2962 | } |
| 2963 | - $output = ' <form method="post" action="' . $href . '" class="form-inline">'."\n"; |
|
| 2964 | - $output .= ' <button type="submit" class="' . $class . '"'."\n"; |
|
| 2965 | - $output .= ' title="' . $title . '"'."\n"; |
|
| 2966 | - $output .= ' >' . $text . '</button>'."\n"; |
|
| 2963 | + $output = ' <form method="post" action="'.$href.'" class="form-inline">'."\n"; |
|
| 2964 | + $output .= ' <button type="submit" class="'.$class.'"'."\n"; |
|
| 2965 | + $output .= ' title="'.$title.'"'."\n"; |
|
| 2966 | + $output .= ' >'.$text.'</button>'."\n"; |
|
| 2967 | 2967 | $output .= ' </form>'."\n"; |
| 2968 | 2968 | return $output; |
| 2969 | 2969 | } |
@@ -3030,7 +3030,7 @@ discard block |
||
| 3030 | 3030 | |
| 3031 | 3031 | // By default, use a meetingid without groups. |
| 3032 | 3032 | if (empty($mid)) { |
| 3033 | - $mid = $bigbluebuttonbn->meetingid . '-' . $bigbluebuttonbn->course . '-' . $bigbluebuttonbn->id; |
|
| 3033 | + $mid = $bigbluebuttonbn->meetingid.'-'.$bigbluebuttonbn->course.'-'.$bigbluebuttonbn->id; |
|
| 3034 | 3034 | } |
| 3035 | 3035 | |
| 3036 | 3036 | // When meeting is running, all authorized users can join right in. |
@@ -3091,7 +3091,7 @@ discard block |
||
| 3091 | 3091 | function bigbluebuttonbn_instance_ownerid($bigbluebuttonbn) { |
| 3092 | 3092 | global $DB; |
| 3093 | 3093 | $filters = array('bigbluebuttonbnid' => $bigbluebuttonbn->id, 'log' => 'Add'); |
| 3094 | - $ownerid = (integer)$DB->get_field('bigbluebuttonbn_logs', 'userid', $filters); |
|
| 3094 | + $ownerid = (integer) $DB->get_field('bigbluebuttonbn_logs', 'userid', $filters); |
|
| 3095 | 3095 | return $ownerid; |
| 3096 | 3096 | } |
| 3097 | 3097 | |
@@ -3101,7 +3101,7 @@ discard block |
||
| 3101 | 3101 | * @return boolean |
| 3102 | 3102 | */ |
| 3103 | 3103 | function bigbluebuttonbn_has_html5_client() { |
| 3104 | - $checkurl = \mod_bigbluebuttonbn\locallib\bigbluebutton::root() . "html5client/check"; |
|
| 3104 | + $checkurl = \mod_bigbluebuttonbn\locallib\bigbluebutton::root()."html5client/check"; |
|
| 3105 | 3105 | $curlinfo = bigbluebuttonbn_wrap_xml_load_file_curl_request($checkurl, 'HEAD'); |
| 3106 | 3106 | return (isset($curlinfo['http_code']) && $curlinfo['http_code'] == 200); |
| 3107 | 3107 | } |
@@ -3134,8 +3134,8 @@ discard block |
||
| 3134 | 3134 | $bbbsession['meetingname'] = $bbbsession['bigbluebuttonbn']->name; |
| 3135 | 3135 | $bbbsession['meetingdescription'] = $bbbsession['bigbluebuttonbn']->intro; |
| 3136 | 3136 | // Extra data for setting up the Meeting. |
| 3137 | - $bbbsession['userlimit'] = intval((int)\mod_bigbluebuttonbn\locallib\config::get('userlimit_default')); |
|
| 3138 | - if ((boolean)\mod_bigbluebuttonbn\locallib\config::get('userlimit_editable')) { |
|
| 3137 | + $bbbsession['userlimit'] = intval((int) \mod_bigbluebuttonbn\locallib\config::get('userlimit_default')); |
|
| 3138 | + if ((boolean) \mod_bigbluebuttonbn\locallib\config::get('userlimit_editable')) { |
|
| 3139 | 3139 | $bbbsession['userlimit'] = intval($bbbsession['bigbluebuttonbn']->userlimit); |
| 3140 | 3140 | } |
| 3141 | 3141 | $bbbsession['voicebridge'] = $bbbsession['bigbluebuttonbn']->voicebridge; |
@@ -3241,7 +3241,7 @@ discard block |
||
| 3241 | 3241 | ); |
| 3242 | 3242 | |
| 3243 | 3243 | // Check status and set extra values. |
| 3244 | - $activitystatus = bigbluebuttonbn_view_get_activity_status($bbbsession); // In locallib. |
|
| 3244 | + $activitystatus = bigbluebuttonbn_view_get_activity_status($bbbsession); // In locallib. |
|
| 3245 | 3245 | if ($activitystatus == 'ended') { |
| 3246 | 3246 | $bbbsession['presentation'] = bigbluebuttonbn_get_presentation_array( |
| 3247 | 3247 | $bbbsession['context'], $bbbsession['bigbluebuttonbn']->presentation); |