@@ -103,7 +103,7 @@ discard block |
||
103 | 103 | * @uses FEATURE_GRADE_OUTCOMES |
104 | 104 | * @uses FEATURE_SHOW_DESCRIPTION |
105 | 105 | * @param string $feature |
106 | - * @return mixed True if yes (some features may use other values) |
|
106 | + * @return null|boolean True if yes (some features may use other values) |
|
107 | 107 | */ |
108 | 108 | function bigbluebuttonbn_supports($feature) { |
109 | 109 | if (!$feature) { |
@@ -272,7 +272,7 @@ discard block |
||
272 | 272 | * |
273 | 273 | * @param object $bigbluebuttonbn Id of the module instance |
274 | 274 | * |
275 | - * @return bool Success/Failure |
|
275 | + * @return boolean|null Success/Failure |
|
276 | 276 | */ |
277 | 277 | function bigbluebuttonbn_delete_instance_log($bigbluebuttonbn) { |
278 | 278 | global $DB; |
@@ -293,7 +293,7 @@ discard block |
||
293 | 293 | * @param object $mod |
294 | 294 | * @param object $bigbluebuttonbn |
295 | 295 | * |
296 | - * @return bool |
|
296 | + * @return string |
|
297 | 297 | */ |
298 | 298 | function bigbluebuttonbn_user_outline($course, $user, $mod, $bigbluebuttonbn) { |
299 | 299 | if ($completed = bigbluebuttonbn_user_complete($course, $user, $bigbluebuttonbn)) { |
@@ -869,7 +869,7 @@ discard block |
||
869 | 869 | * @param stdClass $context context object |
870 | 870 | * @param string $filearea file area |
871 | 871 | * |
872 | - * @return false|null false if file not valid |
|
872 | + * @return boolean false if file not valid |
|
873 | 873 | */ |
874 | 874 | function bigbluebuttonbn_pluginfile_valid($context, $filearea) { |
875 | 875 |
@@ -360,7 +360,7 @@ discard block |
||
360 | 360 | $sql = "SELECT COUNT(*) FROM {bigbluebuttonbn_logs} "; |
361 | 361 | $sql .= "WHERE courseid = ? AND bigbluebuttonbnid = ? AND userid = ? AND (log = ? OR log = ?)"; |
362 | 362 | $result = $DB->count_records_sql($sql, array($course->id, $bigbluebuttonbn->id, $user->id, |
363 | - BIGBLUEBUTTONBN_LOG_EVENT_JOIN, BIGBLUEBUTTONBN_LOG_EVENT_PLAYED)); |
|
363 | + BIGBLUEBUTTONBN_LOG_EVENT_JOIN, BIGBLUEBUTTONBN_LOG_EVENT_PLAYED)); |
|
364 | 364 | return $result; |
365 | 365 | } |
366 | 366 | |
@@ -593,7 +593,7 @@ discard block |
||
593 | 593 | $str = '<div class="bigbluebuttonbn overview">'."\n"; |
594 | 594 | $str .= ' <div class="name">'.get_string('modulename', 'bigbluebuttonbn').': '."\n"; |
595 | 595 | $str .= ' <a '.$classes.'href="'.$CFG->wwwroot.'/mod/bigbluebuttonbn/view.php?id='.$bigbluebuttonbn->coursemodule. |
596 | - '">'.$bigbluebuttonbn->name.'</a>'."\n"; |
|
596 | + '">'.$bigbluebuttonbn->name.'</a>'."\n"; |
|
597 | 597 | $str .= ' </div>'."\n"; |
598 | 598 | $str .= ' <div class="info">'.get_string($start, 'bigbluebuttonbn').': '.userdate($bigbluebuttonbn->openingtime). |
599 | 599 | '</div>'."\n"; |
@@ -846,7 +846,7 @@ discard block |
||
846 | 846 | 'bigbluebuttonbn', |
847 | 847 | $bigbluebuttonbn->id, |
848 | 848 | $bigbluebuttonbn->completionexpected |
849 | - ); |
|
849 | + ); |
|
850 | 850 | } |
851 | 851 | } |
852 | 852 |
@@ -30,10 +30,10 @@ discard block |
||
30 | 30 | |
31 | 31 | // JWT is included in Moodle 3.7 core, but a local package is still needed for backward compatibility. |
32 | 32 | if (!class_exists('\Firebase\JWT\JWT')) { |
33 | - if (file_exists($CFG->libdir.'/php-jwt/src/JWT.php')) { |
|
34 | - require_once($CFG->libdir.'/php-jwt/src/JWT.php'); |
|
33 | + if (file_exists($CFG->libdir . '/php-jwt/src/JWT.php')) { |
|
34 | + require_once($CFG->libdir . '/php-jwt/src/JWT.php'); |
|
35 | 35 | } else { |
36 | - require_once($CFG->dirroot.'/mod/bigbluebuttonbn/vendor/firebase/php-jwt/src/JWT.php'); |
|
36 | + require_once($CFG->dirroot . '/mod/bigbluebuttonbn/vendor/firebase/php-jwt/src/JWT.php'); |
|
37 | 37 | } |
38 | 38 | } |
39 | 39 | |
@@ -44,8 +44,8 @@ discard block |
||
44 | 44 | $CFG->bigbluebuttonbn = array(); |
45 | 45 | } |
46 | 46 | |
47 | - if (file_exists(dirname(__FILE__).'/config.php')) { |
|
48 | - require_once(dirname(__FILE__).'/config.php'); |
|
47 | + if (file_exists(dirname(__FILE__) . '/config.php')) { |
|
48 | + require_once(dirname(__FILE__) . '/config.php'); |
|
49 | 49 | } |
50 | 50 | |
51 | 51 | /* |
@@ -103,19 +103,19 @@ discard block |
||
103 | 103 | return null; |
104 | 104 | } |
105 | 105 | $features = array( |
106 | - (string) FEATURE_IDNUMBER => true, |
|
107 | - (string) FEATURE_GROUPS => true, |
|
108 | - (string) FEATURE_GROUPINGS => true, |
|
109 | - (string) FEATURE_GROUPMEMBERSONLY => true, |
|
110 | - (string) FEATURE_MOD_INTRO => true, |
|
111 | - (string) FEATURE_BACKUP_MOODLE2 => true, |
|
112 | - (string) FEATURE_COMPLETION_TRACKS_VIEWS => true, |
|
113 | - (string) FEATURE_COMPLETION_HAS_RULES => true, |
|
114 | - (string) FEATURE_GRADE_HAS_GRADE => false, |
|
115 | - (string) FEATURE_GRADE_OUTCOMES => false, |
|
116 | - (string) FEATURE_SHOW_DESCRIPTION => true, |
|
106 | + (string)FEATURE_IDNUMBER => true, |
|
107 | + (string)FEATURE_GROUPS => true, |
|
108 | + (string)FEATURE_GROUPINGS => true, |
|
109 | + (string)FEATURE_GROUPMEMBERSONLY => true, |
|
110 | + (string)FEATURE_MOD_INTRO => true, |
|
111 | + (string)FEATURE_BACKUP_MOODLE2 => true, |
|
112 | + (string)FEATURE_COMPLETION_TRACKS_VIEWS => true, |
|
113 | + (string)FEATURE_COMPLETION_HAS_RULES => true, |
|
114 | + (string)FEATURE_GRADE_HAS_GRADE => false, |
|
115 | + (string)FEATURE_GRADE_OUTCOMES => false, |
|
116 | + (string)FEATURE_SHOW_DESCRIPTION => true, |
|
117 | 117 | ); |
118 | - if (isset($features[(string) $feature])) { |
|
118 | + if (isset($features[(string)$feature])) { |
|
119 | 119 | return $features[$feature]; |
120 | 120 | } |
121 | 121 | return null; |
@@ -308,7 +308,7 @@ discard block |
||
308 | 308 | function bigbluebuttonbn_delete_instance_log($bigbluebuttonbn) { |
309 | 309 | global $DB; |
310 | 310 | $sql = "SELECT * FROM {bigbluebuttonbn_logs} "; |
311 | - $sql .= "WHERE bigbluebuttonbnid = ? AND log = ? AND ". $DB->sql_compare_text('meta') . " = ?"; |
|
311 | + $sql .= "WHERE bigbluebuttonbnid = ? AND log = ? AND " . $DB->sql_compare_text('meta') . " = ?"; |
|
312 | 312 | $logs = $DB->get_records_sql($sql, array($bigbluebuttonbn->id, BIGBLUEBUTTONBN_LOG_EVENT_CREATE, "{\"record\":true}")); |
313 | 313 | $meta = "{\"has_recordings\":" . empty($logs) ? "true" : "false" . "}"; |
314 | 314 | bigbluebuttonbn_log($bigbluebuttonbn, BIGBLUEBUTTONBN_LOG_EVENT_DELETE, [], $meta); |
@@ -329,7 +329,7 @@ discard block |
||
329 | 329 | function bigbluebuttonbn_user_outline($course, $user, $mod, $bigbluebuttonbn) { |
330 | 330 | if ($completed = bigbluebuttonbn_user_complete($course, $user, $bigbluebuttonbn)) { |
331 | 331 | return fullname($user) . ' ' . get_string('view_message_has_joined', 'bigbluebuttonbn') . ' ' . |
332 | - get_string('view_message_session_for', 'bigbluebuttonbn') . ' ' . (string) $completed . ' ' . |
|
332 | + get_string('view_message_session_for', 'bigbluebuttonbn') . ' ' . (string)$completed . ' ' . |
|
333 | 333 | get_string('view_message_times', 'bigbluebuttonbn'); |
334 | 334 | } |
335 | 335 | return ''; |
@@ -521,7 +521,7 @@ discard block |
||
521 | 521 | * @return array status array |
522 | 522 | */ |
523 | 523 | function bigbluebuttonbn_reset_recordings($courseid) { |
524 | - require_once(__DIR__.'/locallib.php'); |
|
524 | + require_once(__DIR__ . '/locallib.php'); |
|
525 | 525 | // Criteria for search [courseid | bigbluebuttonbn=null | subset=false | includedeleted=true]. |
526 | 526 | $recordings = bigbluebuttonbn_get_recordings($courseid, null, false, true); |
527 | 527 | // Remove all the recordings. |
@@ -590,18 +590,18 @@ discard block |
||
590 | 590 | if ($bigbluebuttonbn->visible) { |
591 | 591 | $classes = 'class="dimmed" '; |
592 | 592 | } |
593 | - $str = '<div class="bigbluebuttonbn overview">'."\n"; |
|
594 | - $str .= ' <div class="name">'.get_string('modulename', 'bigbluebuttonbn').': '."\n"; |
|
595 | - $str .= ' <a '.$classes.'href="'.$CFG->wwwroot.'/mod/bigbluebuttonbn/view.php?id='.$bigbluebuttonbn->coursemodule. |
|
596 | - '">'.$bigbluebuttonbn->name.'</a>'."\n"; |
|
597 | - $str .= ' </div>'."\n"; |
|
598 | - $str .= ' <div class="info">'.get_string($start, 'bigbluebuttonbn').': '.userdate($bigbluebuttonbn->openingtime). |
|
599 | - '</div>'."\n"; |
|
593 | + $str = '<div class="bigbluebuttonbn overview">' . "\n"; |
|
594 | + $str .= ' <div class="name">' . get_string('modulename', 'bigbluebuttonbn') . ': ' . "\n"; |
|
595 | + $str .= ' <a ' . $classes . 'href="' . $CFG->wwwroot . '/mod/bigbluebuttonbn/view.php?id=' . $bigbluebuttonbn->coursemodule . |
|
596 | + '">' . $bigbluebuttonbn->name . '</a>' . "\n"; |
|
597 | + $str .= ' </div>' . "\n"; |
|
598 | + $str .= ' <div class="info">' . get_string($start, 'bigbluebuttonbn') . ': ' . userdate($bigbluebuttonbn->openingtime) . |
|
599 | + '</div>' . "\n"; |
|
600 | 600 | if (!empty($bigbluebuttonbn->closingtime)) { |
601 | - $str .= ' <div class="info">'.get_string('ends_at', 'bigbluebuttonbn').': '.userdate($bigbluebuttonbn->closingtime) |
|
602 | - .'</div>'."\n"; |
|
601 | + $str .= ' <div class="info">' . get_string('ends_at', 'bigbluebuttonbn') . ': ' . userdate($bigbluebuttonbn->closingtime) |
|
602 | + .'</div>' . "\n"; |
|
603 | 603 | } |
604 | - $str .= '</div>'."\n"; |
|
604 | + $str .= '</div>' . "\n"; |
|
605 | 605 | return $str; |
606 | 606 | } |
607 | 607 | |
@@ -689,7 +689,7 @@ discard block |
||
689 | 689 | * @return void |
690 | 690 | **/ |
691 | 691 | function bigbluebuttonbn_process_pre_save_instance(&$bigbluebuttonbn) { |
692 | - require_once(__DIR__.'/locallib.php'); |
|
692 | + require_once(__DIR__ . '/locallib.php'); |
|
693 | 693 | $bigbluebuttonbn->timemodified = time(); |
694 | 694 | if ((integer)$bigbluebuttonbn->instance == 0) { |
695 | 695 | $bigbluebuttonbn->meetingid = 0; |
@@ -700,7 +700,7 @@ discard block |
||
700 | 700 | $bigbluebuttonbn->viewerpass = bigbluebuttonbn_random_password(12, $bigbluebuttonbn->moderatorpass); |
701 | 701 | $bigbluebuttonbn->guestlinkid = bigbluebuttonbn_random_password(12); |
702 | 702 | } |
703 | - if (!property_exists($bigbluebuttonbn, 'guestlinkid') ) { |
|
703 | + if (!property_exists($bigbluebuttonbn, 'guestlinkid')) { |
|
704 | 704 | $bigbluebuttonbn->guestlinkid = bigbluebuttonbn_random_password(12); |
705 | 705 | } |
706 | 706 | } |
@@ -826,7 +826,7 @@ discard block |
||
826 | 826 | **/ |
827 | 827 | function bigbluebuttonbn_process_post_save_event(&$bigbluebuttonbn) { |
828 | 828 | global $CFG, $DB; |
829 | - require_once($CFG->dirroot.'/calendar/lib.php'); |
|
829 | + require_once($CFG->dirroot . '/calendar/lib.php'); |
|
830 | 830 | $eventid = $DB->get_field('event', 'id', array('modulename' => 'bigbluebuttonbn', |
831 | 831 | 'instance' => $bigbluebuttonbn->id)); |
832 | 832 | // Delete the event from calendar when/if openingtime is NOT set. |
@@ -913,7 +913,7 @@ discard block |
||
913 | 913 | if (count($files) == 1) { |
914 | 914 | // Get the first (and only) file. |
915 | 915 | $file = reset($files); |
916 | - $filesrc = '/'.$file->get_filename(); |
|
916 | + $filesrc = '/' . $file->get_filename(); |
|
917 | 917 | } |
918 | 918 | return $filesrc; |
919 | 919 | } |
@@ -982,7 +982,7 @@ discard block |
||
982 | 982 | if (!$filename) { |
983 | 983 | return false; |
984 | 984 | } |
985 | - $fullpath = "/$context->id/mod_bigbluebuttonbn/$filearea/0/".$filename; |
|
985 | + $fullpath = "/$context->id/mod_bigbluebuttonbn/$filearea/0/" . $filename; |
|
986 | 986 | $fs = get_file_storage(); |
987 | 987 | $file = $fs->get_file_by_hash(sha1($fullpath)); |
988 | 988 | if (!$file || $file->is_directory()) { |
@@ -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'). |
@@ -47,29 +47,29 @@ discard block |
||
47 | 47 | * @return string |
48 | 48 | */ |
49 | 49 | public static function htmlmsg_instance_updated($msg) { |
50 | - $messagetext = '<p>'.get_string('pluginname', 'bigbluebuttonbn'). |
|
51 | - ' <b>'.$msg->activity_url.'</b> '. |
|
52 | - get_string('email_body_notification_meeting_has_been', 'bigbluebuttonbn').' '.$msg->action.'.</p>'."\n"; |
|
53 | - $messagetext .= '<p>'.get_string('email_body_notification_meeting_details', 'bigbluebuttonbn').':'."\n"; |
|
54 | - $messagetext .= '<table border="0" style="margin: 5px 0 0 20px"><tbody>'."\n"; |
|
55 | - $messagetext .= '<tr><td style="font-weight:bold;color:#555;">'. |
|
56 | - get_string('email_body_notification_meeting_title', 'bigbluebuttonbn').': </td><td>'."\n"; |
|
57 | - $messagetext .= $msg->activity_title.'</td></tr>'."\n"; |
|
58 | - $messagetext .= '<tr><td style="font-weight:bold;color:#555;">'. |
|
59 | - get_string('email_body_notification_meeting_description', 'bigbluebuttonbn').': </td><td>'."\n"; |
|
60 | - $messagetext .= $msg->activity_description.'</td></tr>'."\n"; |
|
61 | - $messagetext .= '<tr><td style="font-weight:bold;color:#555;">'. |
|
62 | - get_string('email_body_notification_meeting_start_date', 'bigbluebuttonbn').': </td><td>'."\n"; |
|
63 | - $messagetext .= $msg->activity_openingtime.'</td></tr>'."\n"; |
|
64 | - $messagetext .= '<tr><td style="font-weight:bold;color:#555;">'. |
|
65 | - get_string('email_body_notification_meeting_end_date', 'bigbluebuttonbn').': </td><td>'."\n"; |
|
66 | - $messagetext .= $msg->activity_closingtime.'</td></tr>'."\n"; |
|
67 | - $messagetext .= '<tr><td style="font-weight:bold;color:#555;">'.$msg->action.' '. |
|
68 | - get_string('email_body_notification_meeting_by', 'bigbluebuttonbn').': </td><td>'."\n"; |
|
69 | - $messagetext .= $msg->activity_owner.'</td></tr></tbody></table></p>'."\n"; |
|
70 | - $messagetext .= '<p><hr/><br/>'.get_string('email_footer_sent_by', 'bigbluebuttonbn').' '. |
|
71 | - $msg->user_name.' '; |
|
72 | - $messagetext .= get_string('email_footer_sent_from', 'bigbluebuttonbn').' '.$msg->course_name.'.</p>'; |
|
50 | + $messagetext = '<p>' . get_string('pluginname', 'bigbluebuttonbn') . |
|
51 | + ' <b>' . $msg->activity_url . '</b> ' . |
|
52 | + get_string('email_body_notification_meeting_has_been', 'bigbluebuttonbn') . ' ' . $msg->action . '.</p>' . "\n"; |
|
53 | + $messagetext .= '<p>' . get_string('email_body_notification_meeting_details', 'bigbluebuttonbn') . ':' . "\n"; |
|
54 | + $messagetext .= '<table border="0" style="margin: 5px 0 0 20px"><tbody>' . "\n"; |
|
55 | + $messagetext .= '<tr><td style="font-weight:bold;color:#555;">' . |
|
56 | + get_string('email_body_notification_meeting_title', 'bigbluebuttonbn') . ': </td><td>' . "\n"; |
|
57 | + $messagetext .= $msg->activity_title . '</td></tr>' . "\n"; |
|
58 | + $messagetext .= '<tr><td style="font-weight:bold;color:#555;">' . |
|
59 | + get_string('email_body_notification_meeting_description', 'bigbluebuttonbn') . ': </td><td>' . "\n"; |
|
60 | + $messagetext .= $msg->activity_description . '</td></tr>' . "\n"; |
|
61 | + $messagetext .= '<tr><td style="font-weight:bold;color:#555;">' . |
|
62 | + get_string('email_body_notification_meeting_start_date', 'bigbluebuttonbn') . ': </td><td>' . "\n"; |
|
63 | + $messagetext .= $msg->activity_openingtime . '</td></tr>' . "\n"; |
|
64 | + $messagetext .= '<tr><td style="font-weight:bold;color:#555;">' . |
|
65 | + get_string('email_body_notification_meeting_end_date', 'bigbluebuttonbn') . ': </td><td>' . "\n"; |
|
66 | + $messagetext .= $msg->activity_closingtime . '</td></tr>' . "\n"; |
|
67 | + $messagetext .= '<tr><td style="font-weight:bold;color:#555;">' . $msg->action . ' ' . |
|
68 | + get_string('email_body_notification_meeting_by', 'bigbluebuttonbn') . ': </td><td>' . "\n"; |
|
69 | + $messagetext .= $msg->activity_owner . '</td></tr></tbody></table></p>' . "\n"; |
|
70 | + $messagetext .= '<p><hr/><br/>' . get_string('email_footer_sent_by', 'bigbluebuttonbn') . ' ' . |
|
71 | + $msg->user_name . ' '; |
|
72 | + $messagetext .= get_string('email_footer_sent_from', 'bigbluebuttonbn') . ' ' . $msg->course_name . '.</p>'; |
|
73 | 73 | return $messagetext; |
74 | 74 | } |
75 | 75 | |
@@ -86,7 +86,7 @@ discard block |
||
86 | 86 | $course = $coursemodinfo->get_course($bigbluebuttonbn->course); |
87 | 87 | $sender = $USER; |
88 | 88 | // Prepare message. |
89 | - $msg = (object) array(); |
|
89 | + $msg = (object)array(); |
|
90 | 90 | // Build the message_body. |
91 | 91 | $msg->action = $action; |
92 | 92 | $msg->activity_url = html_writer::link( |
@@ -120,9 +120,9 @@ discard block |
||
120 | 120 | * @return void |
121 | 121 | */ |
122 | 122 | public static function htmlmsg_recording_ready($bigbluebuttonbn) { |
123 | - return '<p>'.get_string('email_body_recording_ready_for', 'bigbluebuttonbn'). |
|
124 | - ' "' . $bigbluebuttonbn->name . '" '. |
|
125 | - get_string('email_body_recording_ready_is_ready', 'bigbluebuttonbn').'.</p>'; |
|
123 | + return '<p>' . get_string('email_body_recording_ready_for', 'bigbluebuttonbn') . |
|
124 | + ' "' . $bigbluebuttonbn->name . '" ' . |
|
125 | + get_string('email_body_recording_ready_is_ready', 'bigbluebuttonbn') . '.</p>'; |
|
126 | 126 | } |
127 | 127 | |
128 | 128 | /** |
@@ -164,7 +164,7 @@ discard block |
||
164 | 164 | // Enqueue it. |
165 | 165 | \core\task\manager::queue_adhoc_task($task); |
166 | 166 | } catch (Exception $e) { |
167 | - mtrace("Error while enqueuing completion_uopdate_state task. " . (string) $e); |
|
167 | + mtrace("Error while enqueuing completion_uopdate_state task. " . (string)$e); |
|
168 | 168 | } |
169 | 169 | } |
170 | 170 | } |
@@ -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 |
@@ -796,7 +796,7 @@ discard block |
||
796 | 796 | $data['role'] = array( |
797 | 797 | 'name' => get_string('mod_form_field_participant_list_type_role', 'bigbluebuttonbn'), |
798 | 798 | 'children' => bigbluebuttonbn_get_roles_select($context, true) |
799 | - ); |
|
799 | + ); |
|
800 | 800 | $data['user'] = array( |
801 | 801 | 'name' => get_string('mod_form_field_participant_list_type_user', 'bigbluebuttonbn'), |
802 | 802 | 'children' => bigbluebuttonbn_get_users_select($context, $bbactivity), |
@@ -1704,7 +1704,7 @@ discard block |
||
1704 | 1704 | 'data-action' => 'play', |
1705 | 1705 | 'data-target' => $playback['type'], |
1706 | 1706 | 'data-href' => $href, |
1707 | - ); |
|
1707 | + ); |
|
1708 | 1708 | if ($CFG->bigbluebuttonbn_recordings_validate_url && !bigbluebuttonbn_is_bn_server() |
1709 | 1709 | && !bigbluebuttonbn_is_valid_resource(trim($playback['url']))) { |
1710 | 1710 | $linkattributes['class'] = 'btn btn-sm btn-warning'; |
@@ -152,8 +152,8 @@ discard block |
||
152 | 152 | $payload = null; |
153 | 153 | if (!is_null($pname) && !is_null($purl)) { |
154 | 154 | $method = 'POST'; |
155 | - $payload = "<?xml version='1.0' encoding='UTF-8'?><modules><module name='presentation'><document url='". |
|
156 | - $purl."' /></module></modules>"; |
|
155 | + $payload = "<?xml version='1.0' encoding='UTF-8'?><modules><module name='presentation'><document url='" . |
|
156 | + $purl . "' /></module></modules>"; |
|
157 | 157 | } |
158 | 158 | $xml = bigbluebuttonbn_wrap_xml_load_file($createmeetingurl, $method, $payload); |
159 | 159 | if ($xml) { |
@@ -197,7 +197,7 @@ discard block |
||
197 | 197 | } |
198 | 198 | if ($xml) { |
199 | 199 | // Either failure or success without meeting info. |
200 | - return (array) $xml; |
|
200 | + return (array)$xml; |
|
201 | 201 | } |
202 | 202 | // If the server is unreachable, then prompts the user of the necessary action. |
203 | 203 | return array('returncode' => 'FAILED', 'message' => 'unreachable', 'messageKey' => 'Server is unreachable'); |
@@ -290,7 +290,7 @@ discard block |
||
290 | 290 | foreach ($recordingxml->breakoutRooms->breakoutRoom as $breakoutroom) { |
291 | 291 | $url = \mod_bigbluebuttonbn\locallib\bigbluebutton::action_url( |
292 | 292 | 'getRecordings', |
293 | - ['recordID' => implode(',', (array) $breakoutroom)] |
|
293 | + ['recordID' => implode(',', (array)$breakoutroom)] |
|
294 | 294 | ); |
295 | 295 | $xml = bigbluebuttonbn_wrap_xml_load_file($url); |
296 | 296 | if ($xml && $xml->returncode == 'SUCCESS' && isset($xml->recordings)) { |
@@ -346,7 +346,7 @@ discard block |
||
346 | 346 | // Override imported flag with actual ID. |
347 | 347 | $recording['imported'] = $recordimported->id; |
348 | 348 | if (isset($recordimported->protected)) { |
349 | - $recording['protected'] = (string) $recordimported->protected; |
|
349 | + $recording['protected'] = (string)$recordimported->protected; |
|
350 | 350 | } |
351 | 351 | $recordsimportedarray[$recording['recordID']] = $recording; |
352 | 352 | } |
@@ -376,21 +376,21 @@ discard block |
||
376 | 376 | // Add formats. |
377 | 377 | $playbackarray = array(); |
378 | 378 | foreach ($recording->playback->format as $format) { |
379 | - $playbackarray[(string) $format->type] = array('type' => (string) $format->type, |
|
380 | - 'url' => trim((string) $format->url), 'length' => (string) $format->length); |
|
379 | + $playbackarray[(string)$format->type] = array('type' => (string)$format->type, |
|
380 | + 'url' => trim((string)$format->url), 'length' => (string)$format->length); |
|
381 | 381 | // Add preview per format when existing. |
382 | 382 | if ($format->preview) { |
383 | - $playbackarray[(string) $format->type]['preview'] = bigbluebuttonbn_get_recording_preview_images($format->preview); |
|
383 | + $playbackarray[(string)$format->type]['preview'] = bigbluebuttonbn_get_recording_preview_images($format->preview); |
|
384 | 384 | } |
385 | 385 | } |
386 | 386 | // Add the metadata to the recordings array. |
387 | 387 | $metadataarray = bigbluebuttonbn_get_recording_array_meta(get_object_vars($recording->metadata)); |
388 | - $recordingarray = array('recordID' => (string) $recording->recordID, |
|
389 | - 'meetingID' => (string) $recording->meetingID, 'meetingName' => (string) $recording->name, |
|
390 | - 'published' => (string) $recording->published, 'startTime' => (string) $recording->startTime, |
|
391 | - 'endTime' => (string) $recording->endTime, 'playbacks' => $playbackarray); |
|
388 | + $recordingarray = array('recordID' => (string)$recording->recordID, |
|
389 | + 'meetingID' => (string)$recording->meetingID, 'meetingName' => (string)$recording->name, |
|
390 | + 'published' => (string)$recording->published, 'startTime' => (string)$recording->startTime, |
|
391 | + 'endTime' => (string)$recording->endTime, 'playbacks' => $playbackarray); |
|
392 | 392 | if (isset($recording->protected)) { |
393 | - $recordingarray['protected'] = (string) $recording->protected; |
|
393 | + $recordingarray['protected'] = (string)$recording->protected; |
|
394 | 394 | } |
395 | 395 | return $recordingarray + $metadataarray; |
396 | 396 | } |
@@ -405,9 +405,9 @@ discard block |
||
405 | 405 | function bigbluebuttonbn_get_recording_preview_images($preview) { |
406 | 406 | $imagesarray = array(); |
407 | 407 | foreach ($preview->images->image as $image) { |
408 | - $imagearray = array('url' => trim((string) $image)); |
|
408 | + $imagearray = array('url' => trim((string)$image)); |
|
409 | 409 | foreach ($image->attributes() as $attkey => $attvalue) { |
410 | - $imagearray[$attkey] = (string) $attvalue; |
|
410 | + $imagearray[$attkey] = (string)$attvalue; |
|
411 | 411 | } |
412 | 412 | array_push($imagesarray, $imagearray); |
413 | 413 | } |
@@ -502,7 +502,7 @@ discard block |
||
502 | 502 | $ids = explode(',', $recordids); |
503 | 503 | foreach ($ids as $id) { |
504 | 504 | $xml = bigbluebuttonbn_wrap_xml_load_file( |
505 | - \mod_bigbluebuttonbn\locallib\bigbluebutton::action_url('updateRecordings', ['recordID' => $id] + (array) $params) |
|
505 | + \mod_bigbluebuttonbn\locallib\bigbluebutton::action_url('updateRecordings', ['recordID' => $id] + (array)$params) |
|
506 | 506 | ); |
507 | 507 | if ($xml && $xml->returncode != 'SUCCESS') { |
508 | 508 | return false; |
@@ -673,7 +673,7 @@ discard block |
||
673 | 673 | * @return array $users |
674 | 674 | */ |
675 | 675 | function bigbluebuttonbn_get_users(context $context = null) { |
676 | - $users = (array) get_enrolled_users($context, '', 0, 'u.*', null, 0, 0, true); |
|
676 | + $users = (array)get_enrolled_users($context, '', 0, 'u.*', null, 0, 0, true); |
|
677 | 677 | foreach ($users as $key => $value) { |
678 | 678 | $users[$key] = fullname($value); |
679 | 679 | } |
@@ -692,7 +692,7 @@ discard block |
||
692 | 692 | function bigbluebuttonbn_get_users_select(context_course $context, $bbactivity = null) { |
693 | 693 | // CONTRIB-7972, check the group of current user and course group mode. |
694 | 694 | $groups = null; |
695 | - $users = (array) get_enrolled_users($context, '', 0, 'u.*', null, 0, 0, true); |
|
695 | + $users = (array)get_enrolled_users($context, '', 0, 'u.*', null, 0, 0, true); |
|
696 | 696 | $course = get_course($context->instanceid); |
697 | 697 | $groupmode = groups_get_course_groupmode($course); |
698 | 698 | if ($bbactivity) { |
@@ -705,7 +705,7 @@ discard block |
||
705 | 705 | $groups = groups_get_all_groups($course->id, $USER->id); |
706 | 706 | $users = []; |
707 | 707 | foreach ($groups as $g) { |
708 | - $users += (array) get_enrolled_users($context, '', $g->id, 'u.*', null, 0, 0, true); |
|
708 | + $users += (array)get_enrolled_users($context, '', $g->id, 'u.*', null, 0, 0, true); |
|
709 | 709 | } |
710 | 710 | } |
711 | 711 | return array_map( |
@@ -727,12 +727,12 @@ discard block |
||
727 | 727 | global $CFG; |
728 | 728 | |
729 | 729 | if ($onlyviewableroles == true && $CFG->branch >= 35) { |
730 | - $roles = (array) get_viewable_roles($context); |
|
730 | + $roles = (array)get_viewable_roles($context); |
|
731 | 731 | foreach ($roles as $key => $value) { |
732 | 732 | $roles[$key] = $value; |
733 | 733 | } |
734 | 734 | } else { |
735 | - $roles = (array) role_get_names($context); |
|
735 | + $roles = (array)role_get_names($context); |
|
736 | 736 | foreach ($roles as $key => $value) { |
737 | 737 | $roles[$key] = $value->localname; |
738 | 738 | } |
@@ -753,12 +753,12 @@ discard block |
||
753 | 753 | global $CFG; |
754 | 754 | |
755 | 755 | if ($onlyviewableroles == true && $CFG->branch >= 35) { |
756 | - $roles = (array) get_viewable_roles($context); |
|
756 | + $roles = (array)get_viewable_roles($context); |
|
757 | 757 | foreach ($roles as $key => $value) { |
758 | 758 | $roles[$key] = array('id' => $key, 'name' => $value); |
759 | 759 | } |
760 | 760 | } else { |
761 | - $roles = (array) role_get_names($context); |
|
761 | + $roles = (array)role_get_names($context); |
|
762 | 762 | foreach ($roles as $key => $value) { |
763 | 763 | $roles[$key] = array('id' => $value->id, 'name' => $value->localname); |
764 | 764 | } |
@@ -775,9 +775,9 @@ discard block |
||
775 | 775 | * @return object $role |
776 | 776 | */ |
777 | 777 | function bigbluebuttonbn_get_role($id) { |
778 | - $roles = (array) role_get_names(); |
|
778 | + $roles = (array)role_get_names(); |
|
779 | 779 | if (is_numeric($id) && isset($roles[$id])) { |
780 | - return (object) $roles[$id]; |
|
780 | + return (object)$roles[$id]; |
|
781 | 781 | } |
782 | 782 | foreach ($roles as $role) { |
783 | 783 | if ($role->shortname == $id) { |
@@ -857,7 +857,7 @@ discard block |
||
857 | 857 | if (!empty($ownerid) && is_enrolled($context, $ownerid)) { |
858 | 858 | $participantlist[] = array( |
859 | 859 | 'selectiontype' => 'user', |
860 | - 'selectionid' => (string) $ownerid, |
|
860 | + 'selectionid' => (string)$ownerid, |
|
861 | 861 | 'role' => BIGBLUEBUTTONBN_ROLE_MODERATOR); |
862 | 862 | } |
863 | 863 | continue; |
@@ -1039,7 +1039,7 @@ discard block |
||
1039 | 1039 | $now = time(); |
1040 | 1040 | if ($closingtime > 0 && $now < $closingtime) { |
1041 | 1041 | $duration = ceil(($closingtime - $now) / 60); |
1042 | - $compensationtime = intval((int) \mod_bigbluebuttonbn\locallib\config::get('scheduled_duration_compensation')); |
|
1042 | + $compensationtime = intval((int)\mod_bigbluebuttonbn\locallib\config::get('scheduled_duration_compensation')); |
|
1043 | 1043 | $duration = intval($duration) + $compensationtime; |
1044 | 1044 | } |
1045 | 1045 | return $duration; |
@@ -1241,16 +1241,16 @@ discard block |
||
1241 | 1241 | * @return array |
1242 | 1242 | */ |
1243 | 1243 | function bigbluebuttonbn_get_meeting_info($meetingid, $updatecache = false) { |
1244 | - $cachettl = (int) \mod_bigbluebuttonbn\locallib\config::get('waitformoderator_cache_ttl'); |
|
1244 | + $cachettl = (int)\mod_bigbluebuttonbn\locallib\config::get('waitformoderator_cache_ttl'); |
|
1245 | 1245 | $cache = cache::make_from_params(cache_store::MODE_APPLICATION, 'mod_bigbluebuttonbn', 'meetings_cache'); |
1246 | 1246 | $result = $cache->get($meetingid); |
1247 | 1247 | $now = time(); |
1248 | 1248 | if (!$updatecache && !empty($result) && $now < ($result['creation_time'] + $cachettl)) { |
1249 | 1249 | // Use the value in the cache. |
1250 | - return (array) json_decode($result['meeting_info']); |
|
1250 | + return (array)json_decode($result['meeting_info']); |
|
1251 | 1251 | } |
1252 | 1252 | // Ping again and refresh the cache. |
1253 | - $meetinginfo = (array) bigbluebuttonbn_wrap_xml_load_file( |
|
1253 | + $meetinginfo = (array)bigbluebuttonbn_wrap_xml_load_file( |
|
1254 | 1254 | \mod_bigbluebuttonbn\locallib\bigbluebutton::action_url('getMeetingInfo', ['meetingID' => $meetingid]) |
1255 | 1255 | ); |
1256 | 1256 | $cache->set($meetingid, array('creation_time' => time(), 'meeting_info' => json_encode($meetinginfo))); |
@@ -1397,7 +1397,7 @@ discard block |
||
1397 | 1397 | */ |
1398 | 1398 | function bigbluebuttonbn_set_config_xml_array($meetingid, $configxml) { |
1399 | 1399 | $configxml = bigbluebuttonbn_set_config_xml($meetingid, $configxml); |
1400 | - $configxmlarray = (array) $configxml; |
|
1400 | + $configxmlarray = (array)$configxml; |
|
1401 | 1401 | if ($configxmlarray['returncode'] != 'SUCCESS') { |
1402 | 1402 | debugging('BigBlueButton was not able to set the custom config.xml file', DEBUG_DEVELOPER); |
1403 | 1403 | return ''; |
@@ -1450,7 +1450,7 @@ discard block |
||
1450 | 1450 | * @return boolean |
1451 | 1451 | */ |
1452 | 1452 | function bigbluebuttonbn_get_recording_data_row_editable($bbbsession) { |
1453 | - return ($bbbsession['managerecordings'] && ((double) $bbbsession['serverversion'] >= 1.0 || $bbbsession['bnserver'])); |
|
1453 | + return ($bbbsession['managerecordings'] && ((double)$bbbsession['serverversion'] >= 1.0 || $bbbsession['bnserver'])); |
|
1454 | 1454 | } |
1455 | 1455 | |
1456 | 1456 | /** |
@@ -1461,7 +1461,7 @@ discard block |
||
1461 | 1461 | * @return boolean |
1462 | 1462 | */ |
1463 | 1463 | function bigbluebuttonbn_get_recording_data_preview_enabled($bbbsession) { |
1464 | - return ((double) $bbbsession['serverversion'] >= 1.0 && $bbbsession['bigbluebuttonbn']->recordings_preview == '1'); |
|
1464 | + return ((double)$bbbsession['serverversion'] >= 1.0 && $bbbsession['bigbluebuttonbn']->recordings_preview == '1'); |
|
1465 | 1465 | } |
1466 | 1466 | |
1467 | 1467 | /** |
@@ -1887,7 +1887,7 @@ discard block |
||
1887 | 1887 | } |
1888 | 1888 | $id = 'recording-' . $target . '-' . $recording['recordID']; |
1889 | 1889 | $onclick = 'M.mod_bigbluebuttonbn.recordings.recording' . ucfirst($data['action']) . '(this); return false;'; |
1890 | - if ((boolean) \mod_bigbluebuttonbn\locallib\config::get('recording_icons_enabled')) { |
|
1890 | + if ((boolean)\mod_bigbluebuttonbn\locallib\config::get('recording_icons_enabled')) { |
|
1891 | 1891 | // With icon for $manageaction. |
1892 | 1892 | $iconattributes = array('id' => $id, 'class' => 'iconsmall'); |
1893 | 1893 | $linkattributes = array( |
@@ -2150,7 +2150,7 @@ discard block |
||
2150 | 2150 | // Enqueue it. |
2151 | 2151 | \core\task\manager::queue_adhoc_task($task); |
2152 | 2152 | } catch (Exception $e) { |
2153 | - mtrace("Error while enqueuing completion_update_state task. " . (string) $e); |
|
2153 | + mtrace("Error while enqueuing completion_update_state task. " . (string)$e); |
|
2154 | 2154 | } |
2155 | 2155 | } |
2156 | 2156 | |
@@ -2164,7 +2164,7 @@ discard block |
||
2164 | 2164 | */ |
2165 | 2165 | function bigbluebuttonbn_completion_update_state($bigbluebuttonbn, $userid) { |
2166 | 2166 | global $CFG; |
2167 | - require_once($CFG->libdir.'/completionlib.php'); |
|
2167 | + require_once($CFG->libdir . '/completionlib.php'); |
|
2168 | 2168 | list($course, $cm) = get_course_and_cm_from_instance($bigbluebuttonbn, 'bigbluebuttonbn'); |
2169 | 2169 | $completion = new completion_info($course); |
2170 | 2170 | if (!$completion->is_enabled($cm)) { |
@@ -2594,7 +2594,7 @@ discard block |
||
2594 | 2594 | */ |
2595 | 2595 | function bigbluebuttonbn_format_activity_time($time) { |
2596 | 2596 | global $CFG; |
2597 | - require_once($CFG->dirroot.'/calendar/lib.php'); |
|
2597 | + require_once($CFG->dirroot . '/calendar/lib.php'); |
|
2598 | 2598 | $activitytime = ''; |
2599 | 2599 | if ($time) { |
2600 | 2600 | $activitytime = calendar_day_representation($time) . ' ' . |
@@ -2692,7 +2692,7 @@ discard block |
||
2692 | 2692 | */ |
2693 | 2693 | function bigbluebuttonbn_settings_general(&$renderer) { |
2694 | 2694 | // Configuration for BigBlueButton. |
2695 | - if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_general_shown()) { |
|
2695 | + if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_general_shown()) { |
|
2696 | 2696 | $renderer->render_group_header('general'); |
2697 | 2697 | $renderer->render_group_element( |
2698 | 2698 | 'server_url', |
@@ -2714,7 +2714,7 @@ discard block |
||
2714 | 2714 | */ |
2715 | 2715 | function bigbluebuttonbn_settings_record(&$renderer) { |
2716 | 2716 | // Configuration for 'recording' feature. |
2717 | - if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_record_meeting_shown()) { |
|
2717 | + if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_record_meeting_shown()) { |
|
2718 | 2718 | $renderer->render_group_header('recording'); |
2719 | 2719 | $renderer->render_group_element( |
2720 | 2720 | 'recording_default', |
@@ -2758,7 +2758,7 @@ discard block |
||
2758 | 2758 | */ |
2759 | 2759 | function bigbluebuttonbn_settings_importrecordings(&$renderer) { |
2760 | 2760 | // Configuration for 'import recordings' feature. |
2761 | - if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_import_recordings_shown()) { |
|
2761 | + if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_import_recordings_shown()) { |
|
2762 | 2762 | $renderer->render_group_header('importrecordings'); |
2763 | 2763 | $renderer->render_group_element( |
2764 | 2764 | 'importrecordings_enabled', |
@@ -2780,7 +2780,7 @@ discard block |
||
2780 | 2780 | */ |
2781 | 2781 | function bigbluebuttonbn_settings_showrecordings(&$renderer) { |
2782 | 2782 | // Configuration for 'show recordings' feature. |
2783 | - if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_show_recordings_shown()) { |
|
2783 | + if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_show_recordings_shown()) { |
|
2784 | 2784 | $renderer->render_group_header('recordings'); |
2785 | 2785 | $renderer->render_group_element( |
2786 | 2786 | 'recordings_html_default', |
@@ -2834,7 +2834,7 @@ discard block |
||
2834 | 2834 | */ |
2835 | 2835 | function bigbluebuttonbn_settings_waitmoderator(&$renderer) { |
2836 | 2836 | // Configuration for wait for moderator feature. |
2837 | - if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_wait_moderator_shown()) { |
|
2837 | + if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_wait_moderator_shown()) { |
|
2838 | 2838 | $renderer->render_group_header('waitformoderator'); |
2839 | 2839 | $renderer->render_group_element( |
2840 | 2840 | 'waitformoderator_default', |
@@ -2864,7 +2864,7 @@ discard block |
||
2864 | 2864 | */ |
2865 | 2865 | function bigbluebuttonbn_settings_voicebridge(&$renderer) { |
2866 | 2866 | // Configuration for "static voice bridge" feature. |
2867 | - if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_static_voice_bridge_shown()) { |
|
2867 | + if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_static_voice_bridge_shown()) { |
|
2868 | 2868 | $renderer->render_group_header('voicebridge'); |
2869 | 2869 | $renderer->render_group_element( |
2870 | 2870 | 'voicebridge_editable', |
@@ -2882,7 +2882,7 @@ discard block |
||
2882 | 2882 | */ |
2883 | 2883 | function bigbluebuttonbn_settings_preupload(&$renderer) { |
2884 | 2884 | // Configuration for "preupload presentation" feature. |
2885 | - if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_preupload_presentation_shown()) { |
|
2885 | + if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_preupload_presentation_shown()) { |
|
2886 | 2886 | // This feature only works if curl is installed. |
2887 | 2887 | $preuploaddescripion = get_string('config_preuploadpresentation_description', 'bigbluebuttonbn'); |
2888 | 2888 | if (!extension_loaded('curl')) { |
@@ -2910,7 +2910,7 @@ discard block |
||
2910 | 2910 | */ |
2911 | 2911 | function bigbluebuttonbn_settings_preupload_manage_default_file(&$renderer) { |
2912 | 2912 | // Configuration for "preupload presentation" feature. |
2913 | - if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_preupload_presentation_shown()) { |
|
2913 | + if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_preupload_presentation_shown()) { |
|
2914 | 2914 | if (extension_loaded('curl')) { |
2915 | 2915 | // This feature only works if curl is installed. |
2916 | 2916 | $renderer->render_filemanager_default_file_presentation("presentation_default"); |
@@ -2927,7 +2927,7 @@ discard block |
||
2927 | 2927 | */ |
2928 | 2928 | function bigbluebuttonbn_settings_userlimit(&$renderer) { |
2929 | 2929 | // Configuration for "user limit" feature. |
2930 | - if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_user_limit_shown()) { |
|
2930 | + if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_user_limit_shown()) { |
|
2931 | 2931 | $renderer->render_group_header('userlimit'); |
2932 | 2932 | $renderer->render_group_element( |
2933 | 2933 | 'userlimit_default', |
@@ -2949,7 +2949,7 @@ discard block |
||
2949 | 2949 | */ |
2950 | 2950 | function bigbluebuttonbn_settings_duration(&$renderer) { |
2951 | 2951 | // Configuration for "scheduled duration" feature. |
2952 | - if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_scheduled_duration_shown()) { |
|
2952 | + if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_scheduled_duration_shown()) { |
|
2953 | 2953 | $renderer->render_group_header('scheduled'); |
2954 | 2954 | $renderer->render_group_element( |
2955 | 2955 | 'scheduled_duration_enabled', |
@@ -2975,7 +2975,7 @@ discard block |
||
2975 | 2975 | */ |
2976 | 2976 | function bigbluebuttonbn_settings_participants(&$renderer) { |
2977 | 2977 | // Configuration for defining the default role/user that will be moderator on new activities. |
2978 | - if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_moderator_default_shown()) { |
|
2978 | + if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_moderator_default_shown()) { |
|
2979 | 2979 | $renderer->render_group_header('participant'); |
2980 | 2980 | $renderer->render_group_element( |
2981 | 2981 | 'participant_guestlink', |
@@ -3004,7 +3004,7 @@ discard block |
||
3004 | 3004 | */ |
3005 | 3005 | function bigbluebuttonbn_settings_notifications(&$renderer) { |
3006 | 3006 | // Configuration for "send notifications" feature. |
3007 | - if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_send_notifications_shown()) { |
|
3007 | + if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_send_notifications_shown()) { |
|
3008 | 3008 | $renderer->render_group_header('sendnotifications'); |
3009 | 3009 | $renderer->render_group_element( |
3010 | 3010 | 'sendnotifications_enabled', |
@@ -3022,14 +3022,14 @@ discard block |
||
3022 | 3022 | */ |
3023 | 3023 | function bigbluebuttonbn_settings_clienttype(&$renderer) { |
3024 | 3024 | // Configuration for "clienttype" feature. |
3025 | - if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_clienttype_shown()) { |
|
3025 | + if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_clienttype_shown()) { |
|
3026 | 3026 | $renderer->render_group_header('clienttype'); |
3027 | 3027 | $renderer->render_group_element( |
3028 | 3028 | 'clienttype_editable', |
3029 | 3029 | $renderer->render_group_element_checkbox('clienttype_editable', 0) |
3030 | 3030 | ); |
3031 | 3031 | // Web Client default. |
3032 | - $default = intval((int) \mod_bigbluebuttonbn\locallib\config::get('clienttype_default')); |
|
3032 | + $default = intval((int)\mod_bigbluebuttonbn\locallib\config::get('clienttype_default')); |
|
3033 | 3033 | $choices = array(BIGBLUEBUTTON_CLIENTTYPE_FLASH => get_string('mod_form_block_clienttype_flash', 'bigbluebuttonbn'), |
3034 | 3034 | BIGBLUEBUTTON_CLIENTTYPE_HTML5 => get_string('mod_form_block_clienttype_html5', 'bigbluebuttonbn')); |
3035 | 3035 | $renderer->render_group_element( |
@@ -3052,7 +3052,7 @@ discard block |
||
3052 | 3052 | */ |
3053 | 3053 | function bigbluebuttonbn_settings_muteonstart(&$renderer) { |
3054 | 3054 | // Configuration for BigBlueButton. |
3055 | - if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_muteonstart_shown()) { |
|
3055 | + if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_muteonstart_shown()) { |
|
3056 | 3056 | $renderer->render_group_header('muteonstart'); |
3057 | 3057 | $renderer->render_group_element( |
3058 | 3058 | 'muteonstart_default', |
@@ -3095,7 +3095,7 @@ discard block |
||
3095 | 3095 | */ |
3096 | 3096 | function bigbluebuttonbn_settings_disablecam(&$renderer) { |
3097 | 3097 | // Configuration for BigBlueButton. |
3098 | - if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_disablecam_shown()) { |
|
3098 | + if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_disablecam_shown()) { |
|
3099 | 3099 | $renderer->render_group_element( |
3100 | 3100 | 'disablecam_default', |
3101 | 3101 | $renderer->render_group_element_checkbox('disablecam_default', 0) |
@@ -3116,7 +3116,7 @@ discard block |
||
3116 | 3116 | */ |
3117 | 3117 | function bigbluebuttonbn_settings_disablemic(&$renderer) { |
3118 | 3118 | // Configuration for BigBlueButton. |
3119 | - if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_disablemic_shown()) { |
|
3119 | + if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_disablemic_shown()) { |
|
3120 | 3120 | $renderer->render_group_element( |
3121 | 3121 | 'disablemic_default', |
3122 | 3122 | $renderer->render_group_element_checkbox('disablemic_default', 0) |
@@ -3137,7 +3137,7 @@ discard block |
||
3137 | 3137 | */ |
3138 | 3138 | function bigbluebuttonbn_settings_disableprivatechat(&$renderer) { |
3139 | 3139 | // Configuration for BigBlueButton. |
3140 | - if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_disableprivatechat_shown()) { |
|
3140 | + if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_disableprivatechat_shown()) { |
|
3141 | 3141 | $renderer->render_group_element( |
3142 | 3142 | 'disableprivatechat_default', |
3143 | 3143 | $renderer->render_group_element_checkbox('disableprivatechat_default', 0) |
@@ -3158,7 +3158,7 @@ discard block |
||
3158 | 3158 | */ |
3159 | 3159 | function bigbluebuttonbn_settings_disablepublicchat(&$renderer) { |
3160 | 3160 | // Configuration for BigBlueButton. |
3161 | - if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_disablepublicchat_shown()) { |
|
3161 | + if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_disablepublicchat_shown()) { |
|
3162 | 3162 | $renderer->render_group_element( |
3163 | 3163 | 'disablepublicchat_default', |
3164 | 3164 | $renderer->render_group_element_checkbox('disablepublicchat_default', 0) |
@@ -3179,7 +3179,7 @@ discard block |
||
3179 | 3179 | */ |
3180 | 3180 | function bigbluebuttonbn_settings_disablenote(&$renderer) { |
3181 | 3181 | // Configuration for BigBlueButton. |
3182 | - if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_disablenote_shown()) { |
|
3182 | + if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_disablenote_shown()) { |
|
3183 | 3183 | $renderer->render_group_element( |
3184 | 3184 | 'disablenote_default', |
3185 | 3185 | $renderer->render_group_element_checkbox('disablenote_default', 0) |
@@ -3200,7 +3200,7 @@ discard block |
||
3200 | 3200 | */ |
3201 | 3201 | function bigbluebuttonbn_settings_hideuserlist(&$renderer) { |
3202 | 3202 | // Configuration for BigBlueButton. |
3203 | - if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_hideuserlist_shown()) { |
|
3203 | + if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_hideuserlist_shown()) { |
|
3204 | 3204 | $renderer->render_group_element( |
3205 | 3205 | 'hideuserlist_default', |
3206 | 3206 | $renderer->render_group_element_checkbox('hideuserlist_default', 0) |
@@ -3221,7 +3221,7 @@ discard block |
||
3221 | 3221 | */ |
3222 | 3222 | function bigbluebuttonbn_settings_lockedlayout(&$renderer) { |
3223 | 3223 | // Configuration for BigBlueButton. |
3224 | - if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_lockedlayout_shown()) { |
|
3224 | + if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_lockedlayout_shown()) { |
|
3225 | 3225 | $renderer->render_group_element( |
3226 | 3226 | 'lockedlayout_default', |
3227 | 3227 | $renderer->render_group_element_checkbox('lockedlayout_default', 0) |
@@ -3242,7 +3242,7 @@ discard block |
||
3242 | 3242 | */ |
3243 | 3243 | function bigbluebuttonbn_settings_lockonjoin(&$renderer) { |
3244 | 3244 | // Configuration for BigBlueButton. |
3245 | - if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_lockonjoin_shown()) { |
|
3245 | + if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_lockonjoin_shown()) { |
|
3246 | 3246 | $renderer->render_group_element( |
3247 | 3247 | 'lockonjoin_default', |
3248 | 3248 | $renderer->render_group_element_checkbox('lockonjoin_default', 0) |
@@ -3263,7 +3263,7 @@ discard block |
||
3263 | 3263 | */ |
3264 | 3264 | function bigbluebuttonbn_settings_lockonjoinconfigurable(&$renderer) { |
3265 | 3265 | // Configuration for BigBlueButton. |
3266 | - if ((boolean) \mod_bigbluebuttonbn\settings\validator::section_lockonjoinconfigurable_shown()) { |
|
3266 | + if ((boolean)\mod_bigbluebuttonbn\settings\validator::section_lockonjoinconfigurable_shown()) { |
|
3267 | 3267 | $renderer->render_group_element( |
3268 | 3268 | 'lockonjoinconfigurable_default', |
3269 | 3269 | $renderer->render_group_element_checkbox('lockonjoinconfigurable_default', 0) |
@@ -3299,7 +3299,7 @@ discard block |
||
3299 | 3299 | */ |
3300 | 3300 | function bigbluebuttonbn_settings_extended(&$renderer) { |
3301 | 3301 | // Configuration for extended capabilities. |
3302 | - if (!(boolean) \mod_bigbluebuttonbn\settings\validator::section_settings_extended_shown()) { |
|
3302 | + if (!(boolean)\mod_bigbluebuttonbn\settings\validator::section_settings_extended_shown()) { |
|
3303 | 3303 | return; |
3304 | 3304 | } |
3305 | 3305 | $renderer->render_group_header('extended_capabilities'); |
@@ -3337,7 +3337,7 @@ discard block |
||
3337 | 3337 | global $DB; |
3338 | 3338 | do { |
3339 | 3339 | $encodedseed = sha1(bigbluebuttonbn_random_password(12)); |
3340 | - $meetingid = (string) $DB->get_field('bigbluebuttonbn', 'meetingid', array('meetingid' => $encodedseed)); |
|
3340 | + $meetingid = (string)$DB->get_field('bigbluebuttonbn', 'meetingid', array('meetingid' => $encodedseed)); |
|
3341 | 3341 | } while ($meetingid == $encodedseed); |
3342 | 3342 | return $encodedseed; |
3343 | 3343 | } |
@@ -3550,7 +3550,7 @@ discard block |
||
3550 | 3550 | function bigbluebuttonbn_instance_ownerid($bigbluebuttonbn) { |
3551 | 3551 | global $DB; |
3552 | 3552 | $filters = array('bigbluebuttonbnid' => $bigbluebuttonbn->id, 'log' => 'Add'); |
3553 | - $ownerid = (integer) $DB->get_field('bigbluebuttonbn_logs', 'userid', $filters); |
|
3553 | + $ownerid = (integer)$DB->get_field('bigbluebuttonbn_logs', 'userid', $filters); |
|
3554 | 3554 | return $ownerid; |
3555 | 3555 | } |
3556 | 3556 | |
@@ -3657,7 +3657,7 @@ discard block |
||
3657 | 3657 | 'bbb-recording-tags' => bigbluebuttonbn_get_tags($bbbsession['cm']->id), // Same as $id. |
3658 | 3658 | ]; |
3659 | 3659 | // Special metadata for recording processing. |
3660 | - if ((boolean) \mod_bigbluebuttonbn\locallib\config::get('recordingstatus_enabled')) { |
|
3660 | + if ((boolean)\mod_bigbluebuttonbn\locallib\config::get('recordingstatus_enabled')) { |
|
3661 | 3661 | $metadata["bn-recording-status"] = json_encode( |
3662 | 3662 | array( |
3663 | 3663 | 'email' => array('"' . fullname($USER) . '" <' . $USER->email . '>'), |
@@ -3665,10 +3665,10 @@ discard block |
||
3665 | 3665 | ) |
3666 | 3666 | ); |
3667 | 3667 | } |
3668 | - if ((boolean) \mod_bigbluebuttonbn\locallib\config::get('recordingready_enabled')) { |
|
3668 | + if ((boolean)\mod_bigbluebuttonbn\locallib\config::get('recordingready_enabled')) { |
|
3669 | 3669 | $metadata['bn-recording-ready-url'] = $bbbsession['recordingReadyURL']; |
3670 | 3670 | } |
3671 | - if ((boolean) \mod_bigbluebuttonbn\locallib\config::get('meetingevents_enabled')) { |
|
3671 | + if ((boolean)\mod_bigbluebuttonbn\locallib\config::get('meetingevents_enabled')) { |
|
3672 | 3672 | $metadata['analytics-callback-url'] = $bbbsession['meetingEventsURL']; |
3673 | 3673 | } |
3674 | 3674 | return $metadata; |
@@ -3686,7 +3686,7 @@ discard block |
||
3686 | 3686 | $meetinginfo = bigbluebuttonbn_get_meeting_info($bbbsession['meetingid'], BIGBLUEBUTTONBN_UPDATE_CACHE); |
3687 | 3687 | if ($bbbsession['userlimit'] > 0 && intval($meetinginfo['participantCount']) >= $bbbsession['userlimit']) { |
3688 | 3688 | // No more users allowed to join. |
3689 | - header('Location: '.$bbbsession['logoutURL']); |
|
3689 | + header('Location: ' . $bbbsession['logoutURL']); |
|
3690 | 3690 | return; |
3691 | 3691 | } |
3692 | 3692 | // Mark guests (from external guestlink) |
@@ -3705,13 +3705,13 @@ discard block |
||
3705 | 3705 | bigbluebuttonbn_event_log(\mod_bigbluebuttonbn\event\events::$events['meeting_join'], $bigbluebuttonbn); |
3706 | 3706 | // Internal logger: Instert a record with the meeting created. |
3707 | 3707 | $overrides = array('meetingid' => $bbbsession['meetingid']); |
3708 | - $meta = '{"origin":'.$origin.'}'; |
|
3708 | + $meta = '{"origin":' . $origin . '}'; |
|
3709 | 3709 | bigbluebuttonbn_log($bbbsession['bigbluebuttonbn'], BIGBLUEBUTTONBN_LOG_EVENT_JOIN, $overrides, $meta); |
3710 | 3710 | // Before executing the redirect, increment the number of participants. |
3711 | 3711 | bigbluebuttonbn_participant_joined($bbbsession['meetingid'], |
3712 | 3712 | ($bbbsession['administrator'] || $bbbsession['moderator'])); |
3713 | 3713 | // Execute the redirect. |
3714 | - header('Location: '.$joinurl); |
|
3714 | + header('Location: ' . $joinurl); |
|
3715 | 3715 | } |
3716 | 3716 | |
3717 | 3717 | /** |
@@ -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 | } |
@@ -208,7 +208,7 @@ discard block |
||
208 | 208 | function bigbluebuttonbn_broker_recording_info_current($recording, $params) { |
209 | 209 | $callbackresponse['status'] = true; |
210 | 210 | $callbackresponse['found'] = true; |
211 | - $callbackresponse['published'] = (string) $recording['published']; |
|
211 | + $callbackresponse['published'] = (string)$recording['published']; |
|
212 | 212 | if (!isset($params['meta']) || empty($params['meta'])) { |
213 | 213 | return $callbackresponse; |
214 | 214 | } |
@@ -559,8 +559,8 @@ discard block |
||
559 | 559 | array('HS256') |
560 | 560 | ); |
561 | 561 | } catch (Exception $e) { |
562 | - $error = 'Caught exception: '.$e->getMessage(); |
|
563 | - header('HTTP/1.0 400 Bad Request. '.$error); |
|
562 | + $error = 'Caught exception: ' . $e->getMessage(); |
|
563 | + header('HTTP/1.0 400 Bad Request. ' . $error); |
|
564 | 564 | return; |
565 | 565 | } |
566 | 566 | // Validate that the bigbluebuttonbn activity corresponds to the meeting_id received. |
@@ -590,8 +590,8 @@ discard block |
||
590 | 590 | bigbluebuttonbn_log($bigbluebuttonbn, BIGBLUEBUTTON_LOG_EVENT_CALLBACK, $overrides, json_encode($meta)); |
591 | 591 | header('HTTP/1.0 202 Accepted'); |
592 | 592 | } catch (Exception $e) { |
593 | - $error = 'Caught exception: '.$e->getMessage(); |
|
594 | - header('HTTP/1.0 503 Service Unavailable. '.$error); |
|
593 | + $error = 'Caught exception: ' . $e->getMessage(); |
|
594 | + header('HTTP/1.0 503 Service Unavailable. ' . $error); |
|
595 | 595 | } |
596 | 596 | } |
597 | 597 | |
@@ -612,13 +612,13 @@ discard block |
||
612 | 612 | $importrecordings = $SESSION->bigbluebuttonbn_importrecordings; |
613 | 613 | if (!isset($importrecordings[$params['id']])) { |
614 | 614 | $error = "Recording {$params['id']} could not be found. It can not be imported"; |
615 | - header('HTTP/1.0 404 Not found. '.$error); |
|
615 | + header('HTTP/1.0 404 Not found. ' . $error); |
|
616 | 616 | return; |
617 | 617 | } |
618 | 618 | $callbackresponse = array('status' => true); |
619 | 619 | $importrecordings[$params['id']]['imported'] = true; |
620 | 620 | $overrides = array('meetingid' => $importrecordings[$params['id']]['meetingID']); |
621 | - $meta = '{"recording":'.json_encode($importrecordings[$params['id']]).'}'; |
|
621 | + $meta = '{"recording":' . json_encode($importrecordings[$params['id']]) . '}'; |
|
622 | 622 | bigbluebuttonbn_log($bbbsession['bigbluebuttonbn'], BIGBLUEBUTTONBN_LOG_EVENT_IMPORT, $overrides, $meta); |
623 | 623 | // Moodle event logger: Create an event for recording imported. |
624 | 624 | if (isset($bbbsession['bigbluebutton']) && isset($bbbsession['cm'])) { |
@@ -712,7 +712,7 @@ discard block |
||
712 | 712 | $action = strtolower($params['action']); |
713 | 713 | $requiredparams = bigbluebuttonbn_broker_required_parameters(); |
714 | 714 | if (!array_key_exists($action, $requiredparams)) { |
715 | - return 'Action '.$params['action'].' can not be performed.'; |
|
715 | + return 'Action ' . $params['action'] . ' can not be performed.'; |
|
716 | 716 | } |
717 | 717 | return bigbluebuttonbn_broker_validate_parameters_message($params, $requiredparams[$action]); |
718 | 718 | } |
@@ -858,7 +858,7 @@ discard block |
||
858 | 858 | $tabledata = array(); |
859 | 859 | $typeprofiles = bigbluebuttonbn_get_instance_type_profiles(); |
860 | 860 | $tabledata['activity'] = bigbluebuttonbn_view_get_activity_status($bbbsession); |
861 | - $tabledata['ping_interval'] = (int) \mod_bigbluebuttonbn\locallib\config::get('waitformoderator_ping_interval') * 1000; |
|
861 | + $tabledata['ping_interval'] = (int)\mod_bigbluebuttonbn\locallib\config::get('waitformoderator_ping_interval') * 1000; |
|
862 | 862 | $tabledata['locale'] = bigbluebuttonbn_get_localcode(); |
863 | 863 | $tabledata['profile_features'] = $typeprofiles[0]['features']; |
864 | 864 | $tabledata['recordings_html'] = $bbbsession['bigbluebuttonbn']->recordings_html == '1'; |
@@ -103,7 +103,7 @@ discard block |
||
103 | 103 | * recordings from a different activity even from a different course. |
104 | 104 | **/ |
105 | 105 | |
106 | - /* |
|
106 | + /* |
|
107 | 107 | * When the value is set to 1 (checked) the bigbluebuttonbn rooms or |
108 | 108 | * activities will have the 'import recordings' capability enabled. |
109 | 109 | * $CFG->bigbluebuttonbn['importrecordings_enabled'] = 0; |
@@ -124,7 +124,7 @@ discard block |
||
124 | 124 | * 'Join session' button enabled |
125 | 125 | **/ |
126 | 126 | |
127 | - /* |
|
127 | + /* |
|
128 | 128 | * When the value is set to 1 (checked) the bigbluebuttonbn rooms or |
129 | 129 | * activities will have the 'wait for moderator' capability enabled by |
130 | 130 | * default. |
@@ -276,7 +276,7 @@ discard block |
||
276 | 276 | * $CFG->bigbluebuttonbn['recordings_preview_editable'] = 0; |
277 | 277 | */ |
278 | 278 | |
279 | - /* When the value is set to 1 (checked) the playback URLs will be validated |
|
279 | + /* When the value is set to 1 (checked) the playback URLs will be validated |
|
280 | 280 | * before the user access it. |
281 | 281 | * $CFG->bigbluebuttonbn['recordings_validate_url'] = 1; |
282 | 282 | */ |
@@ -347,7 +347,7 @@ discard block |
||
347 | 347 | * $CFG->bigbluebuttonbn['disablecam_editable'] = 0; |
348 | 348 | */ |
349 | 349 | |
350 | - /* |
|
350 | + /* |
|
351 | 351 | * When the value is set to 1 (checked) the bigbluebuttonbn rooms or |
352 | 352 | * activities will have user microphones disabled. |
353 | 353 | * default. |
@@ -360,7 +360,7 @@ discard block |
||
360 | 360 | * $CFG->bigbluebuttonbn['disablemic_editable'] = 0; |
361 | 361 | */ |
362 | 362 | |
363 | - /* |
|
363 | + /* |
|
364 | 364 | * When the value is set to 1 (checked) the bigbluebuttonbn rooms or |
365 | 365 | * activities will have private chat disabled. |
366 | 366 | * default. |
@@ -373,7 +373,7 @@ discard block |
||
373 | 373 | * $CFG->bigbluebuttonbn['disableprivatechat_editable'] = 0; |
374 | 374 | */ |
375 | 375 | |
376 | - /* |
|
376 | + /* |
|
377 | 377 | * When the value is set to 1 (checked) the bigbluebuttonbn rooms or |
378 | 378 | * activities will have public chat disabled. |
379 | 379 | * default. |
@@ -386,7 +386,7 @@ discard block |
||
386 | 386 | * $CFG->bigbluebuttonbn['disablepublicchat_editable'] = 0; |
387 | 387 | */ |
388 | 388 | |
389 | - /* |
|
389 | + /* |
|
390 | 390 | * When the value is set to 1 (checked) the bigbluebuttonbn rooms or |
391 | 391 | * activities will have shared notes disabled. |
392 | 392 | * default. |
@@ -399,7 +399,7 @@ discard block |
||
399 | 399 | * $CFG->bigbluebuttonbn['disablenote_editable'] = 0; |
400 | 400 | */ |
401 | 401 | |
402 | - /* |
|
402 | + /* |
|
403 | 403 | * When the value is set to 1 (checked) the bigbluebuttonbn rooms or |
404 | 404 | * activities will have the user list hidden. |
405 | 405 | * default. |
@@ -412,7 +412,7 @@ discard block |
||
412 | 412 | * $CFG->bigbluebuttonbn['hideuserlist_editable'] = 0; |
413 | 413 | */ |
414 | 414 | |
415 | - /* |
|
415 | + /* |
|
416 | 416 | * When the value is set to 1 (checked) the bigbluebuttonbn rooms or |
417 | 417 | * activities will have a locked layout. |
418 | 418 | * default. |
@@ -425,7 +425,7 @@ discard block |
||
425 | 425 | * $CFG->bigbluebuttonbn['lockedlayout_editable'] = 0; |
426 | 426 | */ |
427 | 427 | |
428 | - /* |
|
428 | + /* |
|
429 | 429 | * When the value is set to 1 (checked) the bigbluebuttonbn rooms or |
430 | 430 | * activities will ignore the locking settings. |
431 | 431 | * default. |
@@ -438,7 +438,7 @@ discard block |
||
438 | 438 | * $CFG->bigbluebuttonbn['lockonjoin_editable'] = 0; |
439 | 439 | */ |
440 | 440 | |
441 | - /* |
|
441 | + /* |
|
442 | 442 | * When the value is set to 1 (checked) the capability to ignore |
443 | 443 | * locking settings is enabled. |
444 | 444 | * $CFG->bigbluebuttonbn['lockonjoinconfigurable_default'] = 0; |
@@ -489,27 +489,27 @@ discard block |
||
489 | 489 | * $CFG->bigbluebuttonbn['general_warning_message'] = "Would you like to record your BigBlueButton sessions for later viewing? "; |
490 | 490 | */ |
491 | 491 | |
492 | - /* |
|
492 | + /* |
|
493 | 493 | * The warning box is always shown to administrators, but it is also possible to define other roles |
494 | 494 | * to whom the it will be shown. The roles are based on the shortnames defined by Moodle: |
495 | 495 | * 'manager,coursecreator,editingteacher,teacher,student,guest,user,frontpage' |
496 | 496 | * $CFG->bigbluebuttonbn['general_warning_roles'] = 'editingteacher,teacher'; |
497 | 497 | */ |
498 | 498 | |
499 | - /* |
|
499 | + /* |
|
500 | 500 | * As the general_warning_message is shown in a box, its type can be defined with general_warning_type |
501 | 501 | * The default type is 'info' which is normaly rendered in blue when using a bootstrap theme. |
502 | 502 | * All the modifiers for boxed in bootstrap can be used [info|success|warning|danger]. |
503 | 503 | * $CFG->bigbluebuttonbn['general_warning_box_type'] = 'info'; |
504 | 504 | */ |
505 | 505 | |
506 | - /* |
|
506 | + /* |
|
507 | 507 | * Additionally, when general_warning_button_href value is different than "", a button |
508 | 508 | * can also be shown right after the message. |
509 | 509 | * $CFG->bigbluebuttonbn['general_warning_button_href'] = "http://blindsidenetworks.com/"; |
510 | 510 | */ |
511 | 511 | |
512 | - /* |
|
512 | + /* |
|
513 | 513 | * Finally, the text and class for the button can be modified |
514 | 514 | * $CFG->bigbluebuttonbn['general_warning_button_text'] = "Upgrade your site"; |
515 | 515 | * $CFG->bigbluebuttonbn['general_warning_button_class'] = "btn btn-primary"; |
@@ -28,7 +28,7 @@ discard block |
||
28 | 28 | defined('MOODLE_INTERNAL') || die(); |
29 | 29 | |
30 | 30 | require_once($CFG->dirroot . '/mod/bigbluebuttonbn/locallib.php'); |
31 | -require_once($CFG->libdir.'/adminlib.php'); |
|
31 | +require_once($CFG->libdir . '/adminlib.php'); |
|
32 | 32 | |
33 | 33 | /** |
34 | 34 | * Helper class for rendering HTML for settings.php. |
@@ -66,7 +66,7 @@ discard block |
||
66 | 66 | $itemname = get_string('config_' . $name, 'bigbluebuttonbn'); |
67 | 67 | } |
68 | 68 | if ($itemdescription === null) { |
69 | - $itemdescription = get_string('config_' .$name . '_description', 'bigbluebuttonbn'); |
|
69 | + $itemdescription = get_string('config_' . $name . '_description', 'bigbluebuttonbn'); |
|
70 | 70 | } |
71 | 71 | $item = new \admin_setting_heading('bigbluebuttonbn_config_' . $name, $itemname, $itemdescription); |
72 | 72 | $this->settings->add($item); |
@@ -166,7 +166,7 @@ discard block |
||
166 | 166 | */ |
167 | 167 | public function render_warning_message($name, $message, $type = 'warning', $closable = true) { |
168 | 168 | $output = $this->output->box_start('box boxalignleft adminerror alert alert-' . $type . ' alert-block fade in', |
169 | - 'bigbluebuttonbn_' . $name)."\n"; |
|
169 | + 'bigbluebuttonbn_' . $name) . "\n"; |
|
170 | 170 | if ($closable) { |
171 | 171 | $output .= ' <button type="button" class="close" data-dismiss="alert">×</button>' . "\n"; |
172 | 172 | } |
@@ -27,7 +27,6 @@ |
||
27 | 27 | |
28 | 28 | defined('MOODLE_INTERNAL') || die(); |
29 | 29 | |
30 | -use context_module; |
|
31 | 30 | use mod_bigbluebuttonbn\locallib\bigbluebutton; |
32 | 31 | |
33 | 32 | require_once($CFG->dirroot . '/mod/bigbluebuttonbn/locallib.php'); |
@@ -56,7 +56,7 @@ discard block |
||
56 | 56 | |
57 | 57 | global $OUTPUT, $SESSION; |
58 | 58 | |
59 | - $args = (object) $args; |
|
59 | + $args = (object)$args; |
|
60 | 60 | $viewinstance = bigbluebuttonbn_view_validator($args->cmid, null); |
61 | 61 | if (!$viewinstance) { |
62 | 62 | $error = get_string('view_error_url_missing_parameters', 'bigbluebuttonbn'); |
@@ -164,7 +164,7 @@ discard block |
||
164 | 164 | } |
165 | 165 | if ($response['returncode'] == 'FAILED') { |
166 | 166 | // The meeting could not be created. |
167 | - $errorkey = bigbluebuttonbn_get_error_key($response['messageKey'], 'view_error_create'); |
|
167 | + $errorkey = bigbluebuttonbn_get_error_key($response['messageKey'], 'view_error_create'); |
|
168 | 168 | $e = get_string($errorkey, 'bigbluebuttonbn'); |
169 | 169 | return(self::mobile_print_error($e)); |
170 | 170 | } |
@@ -177,7 +177,7 @@ discard block |
||
177 | 177 | bigbluebuttonbn_event_log(\mod_bigbluebuttonbn\event\events::$events['meeting_create'], $bigbluebuttonbn); |
178 | 178 | // Insert a record that meeting was created. |
179 | 179 | $overrides = array('meetingid' => $bbbsession['meetingid']); |
180 | - $meta = '{"record":'.($bbbsession['record'] ? 'true' : 'false').'}'; |
|
180 | + $meta = '{"record":' . ($bbbsession['record'] ? 'true' : 'false') . '}'; |
|
181 | 181 | bigbluebuttonbn_log($bbbsession['bigbluebuttonbn'], BIGBLUEBUTTONBN_LOG_EVENT_CREATE, $overrides, $meta); |
182 | 182 | } |
183 | 183 | |
@@ -203,7 +203,7 @@ discard block |
||
203 | 203 | |
204 | 204 | $data = array( |
205 | 205 | 'bigbluebuttonbn' => $bigbluebuttonbn, |
206 | - 'bbbsession' => (object) $bbbsession, |
|
206 | + 'bbbsession' => (object)$bbbsession, |
|
207 | 207 | 'msjgroup' => $msjgroup, |
208 | 208 | 'urltojoin' => $urltojoin, |
209 | 209 | 'cmid' => $cm->id, |
@@ -27,9 +27,9 @@ discard block |
||
27 | 27 | |
28 | 28 | use mod_bigbluebuttonbn\plugin; |
29 | 29 | |
30 | -require(__DIR__.'/../../config.php'); |
|
31 | -require_once(__DIR__.'/locallib.php'); |
|
32 | -require_once(__DIR__.'/viewlib.php'); |
|
30 | +require(__DIR__ . '/../../config.php'); |
|
31 | +require_once(__DIR__ . '/locallib.php'); |
|
32 | +require_once(__DIR__ . '/viewlib.php'); |
|
33 | 33 | |
34 | 34 | $id = required_param('id', PARAM_INT); |
35 | 35 | $bn = optional_param('bn', 0, PARAM_INT); |
@@ -58,7 +58,7 @@ discard block |
||
58 | 58 | mod_bigbluebuttonbn\locallib\bigbluebutton::view_bbbsession_set($PAGE->context, $bbbsession); |
59 | 59 | |
60 | 60 | // Validates if the BigBlueButton server is working. |
61 | -$serverversion = bigbluebuttonbn_get_server_version(); // In locallib. |
|
61 | +$serverversion = bigbluebuttonbn_get_server_version(); // In locallib. |
|
62 | 62 | if ($serverversion === null) { |
63 | 63 | $errmsg = 'view_error_unable_join_student'; |
64 | 64 | $errurl = '/course/view.php'; |
@@ -72,7 +72,7 @@ discard block |
||
72 | 72 | } |
73 | 73 | print_error($errmsg, plugin::COMPONENT, new moodle_url($errurl, $errurlparams)); |
74 | 74 | } |
75 | -$bbbsession['serverversion'] = (string) $serverversion; |
|
75 | +$bbbsession['serverversion'] = (string)$serverversion; |
|
76 | 76 | |
77 | 77 | // Mark viewed by user (if required). |
78 | 78 | $completion = new completion_info($course); |
@@ -116,7 +116,7 @@ discard block |
||
116 | 116 | echo $OUTPUT->footer(); |
117 | 117 | |
118 | 118 | // Shows version as a comment. |
119 | -echo '<!-- '.$bbbsession['originTag'].' -->'."\n"; |
|
119 | +echo '<!-- ' . $bbbsession['originTag'] . ' -->' . "\n"; |
|
120 | 120 | |
121 | 121 | // Initialize session variable used across views. |
122 | 122 | $SESSION->bigbluebuttonbn_bbbsession = $bbbsession; |
123 | 123 | \ No newline at end of file |