@@ -178,14 +178,14 @@ |
||
| 178 | 178 | $bbbrectags = $tags; |
| 179 | 179 | } |
| 180 | 180 | $metadata = array('bbb-origin' => $bbbsession['origin'], |
| 181 | - 'bbb-origin-version' => $bbbsession['originVersion'], |
|
| 182 | - 'bbb-origin-server-name' => $bbbsession['originServerName'], |
|
| 183 | - 'bbb-origin-server-common-name' => $bbbsession['originServerCommonName'], |
|
| 184 | - 'bbb-origin-tag' => $bbbsession['originTag'], |
|
| 185 | - 'bbb-context' => $bbbsession['course']->fullname, |
|
| 186 | - 'bbb-recording-name' => $bbbrecname, |
|
| 187 | - 'bbb-recording-description' => $bbbrecdescription, |
|
| 188 | - 'bbb-recording-tags' => $bbbrectags, |
|
| 181 | + 'bbb-origin-version' => $bbbsession['originVersion'], |
|
| 182 | + 'bbb-origin-server-name' => $bbbsession['originServerName'], |
|
| 183 | + 'bbb-origin-server-common-name' => $bbbsession['originServerCommonName'], |
|
| 184 | + 'bbb-origin-tag' => $bbbsession['originTag'], |
|
| 185 | + 'bbb-context' => $bbbsession['course']->fullname, |
|
| 186 | + 'bbb-recording-name' => $bbbrecname, |
|
| 187 | + 'bbb-recording-description' => $bbbrecdescription, |
|
| 188 | + 'bbb-recording-tags' => $bbbrectags, |
|
| 189 | 189 | ); |
| 190 | 190 | |
| 191 | 191 | if (bigbluebuttonbn_is_bn_server()) { |
@@ -63,91 +63,91 @@ |
||
| 63 | 63 | } |
| 64 | 64 | |
| 65 | 65 | switch (strtolower($action)) { |
| 66 | - case 'logout': |
|
| 67 | - if (isset($errors) && $errors != '') { |
|
| 68 | - bigbluebutton_bbb_view_errors($errors, $id); |
|
| 69 | - break; |
|
| 70 | - } |
|
| 71 | - |
|
| 72 | - if (is_null($bbbsession)) { |
|
| 73 | - bigbluebutton_bbb_view_close_window_manually(); |
|
| 74 | - break; |
|
| 75 | - } |
|
| 76 | - |
|
| 77 | - // Moodle event logger: Create an event for meeting left. |
|
| 78 | - bigbluebuttonbn_event_log(BIGBLUEBUTTON_EVENT_MEETING_LEFT, $bigbluebuttonbn, $cm); |
|
| 66 | + case 'logout': |
|
| 67 | + if (isset($errors) && $errors != '') { |
|
| 68 | + bigbluebutton_bbb_view_errors($errors, $id); |
|
| 69 | + break; |
|
| 70 | + } |
|
| 79 | 71 | |
| 80 | - // Update the cache. |
|
| 81 | - $meetinginfo = bigbluebuttonbn_get_meeting_info($bbbsession['meetingid'], BIGBLUEBUTTONBN_FORCED); |
|
| 72 | + if (is_null($bbbsession)) { |
|
| 73 | + bigbluebutton_bbb_view_close_window_manually(); |
|
| 74 | + break; |
|
| 75 | + } |
|
| 82 | 76 | |
| 83 | - // Close the tab or window where BBB was opened. |
|
| 84 | - bigbluebutton_bbb_view_close_window(); |
|
| 85 | - break; |
|
| 86 | - case 'join': |
|
| 87 | - if (is_null($bbbsession)) { |
|
| 88 | - print_error('view_error_unable_join', 'bigbluebuttonbn'); |
|
| 89 | - break; |
|
| 90 | - } |
|
| 77 | + // Moodle event logger: Create an event for meeting left. |
|
| 78 | + bigbluebuttonbn_event_log(BIGBLUEBUTTON_EVENT_MEETING_LEFT, $bigbluebuttonbn, $cm); |
|
| 91 | 79 | |
| 92 | - // See if the session is in progress. |
|
| 93 | - if (bigbluebuttonbn_is_meeting_running($bbbsession['meetingid'])) { |
|
| 94 | - // Since the meeting is already running, we just join the session. |
|
| 95 | - bigbluebutton_bbb_view_join_meeting($bbbsession, $cm, $bigbluebuttonbn); |
|
| 96 | - break; |
|
| 97 | - } |
|
| 80 | + // Update the cache. |
|
| 81 | + $meetinginfo = bigbluebuttonbn_get_meeting_info($bbbsession['meetingid'], BIGBLUEBUTTONBN_FORCED); |
|
| 98 | 82 | |
| 99 | - // If user is not administrator nor moderator (user is steudent) and waiting is required. |
|
| 100 | - if (!$bbbsession['administrator'] && !$bbbsession['moderator'] && $bbbsession['wait']) { |
|
| 101 | - header('Location: '.$bbbsession['logoutURL']); |
|
| 83 | + // Close the tab or window where BBB was opened. |
|
| 84 | + bigbluebutton_bbb_view_close_window(); |
|
| 102 | 85 | break; |
| 103 | - } |
|
| 86 | + case 'join': |
|
| 87 | + if (is_null($bbbsession)) { |
|
| 88 | + print_error('view_error_unable_join', 'bigbluebuttonbn'); |
|
| 89 | + break; |
|
| 90 | + } |
|
| 104 | 91 | |
| 105 | - // As the meeting doesn't exist, try to create it. |
|
| 106 | - $response = bigbluebutton_bbb_view_create_meeting($bbbsession, $bigbluebuttonbn, $name, $description, $tags); |
|
| 92 | + // See if the session is in progress. |
|
| 93 | + if (bigbluebuttonbn_is_meeting_running($bbbsession['meetingid'])) { |
|
| 94 | + // Since the meeting is already running, we just join the session. |
|
| 95 | + bigbluebutton_bbb_view_join_meeting($bbbsession, $cm, $bigbluebuttonbn); |
|
| 96 | + break; |
|
| 97 | + } |
|
| 107 | 98 | |
| 108 | - if (!$response) { |
|
| 109 | - // The server is unreachable. |
|
| 110 | - if ($bbbsession['administrator']) { |
|
| 111 | - print_error('view_error_unable_join', 'bigbluebuttonbn', |
|
| 112 | - $CFG->wwwroot.'/admin/settings.php?section=modsettingbigbluebuttonbn'); |
|
| 99 | + // If user is not administrator nor moderator (user is steudent) and waiting is required. |
|
| 100 | + if (!$bbbsession['administrator'] && !$bbbsession['moderator'] && $bbbsession['wait']) { |
|
| 101 | + header('Location: '.$bbbsession['logoutURL']); |
|
| 113 | 102 | break; |
| 114 | 103 | } |
| 115 | - if ($bbbsession['moderator']) { |
|
| 116 | - print_error('view_error_unable_join_teacher', 'bigbluebuttonbn', |
|
| 104 | + |
|
| 105 | + // As the meeting doesn't exist, try to create it. |
|
| 106 | + $response = bigbluebutton_bbb_view_create_meeting($bbbsession, $bigbluebuttonbn, $name, $description, $tags); |
|
| 107 | + |
|
| 108 | + if (!$response) { |
|
| 109 | + // The server is unreachable. |
|
| 110 | + if ($bbbsession['administrator']) { |
|
| 111 | + print_error('view_error_unable_join', 'bigbluebuttonbn', |
|
| 112 | + $CFG->wwwroot.'/admin/settings.php?section=modsettingbigbluebuttonbn'); |
|
| 113 | + break; |
|
| 114 | + } |
|
| 115 | + if ($bbbsession['moderator']) { |
|
| 116 | + print_error('view_error_unable_join_teacher', 'bigbluebuttonbn', |
|
| 117 | + $CFG->wwwroot.'/admin/settings.php?section=modsettingbigbluebuttonbn'); |
|
| 118 | + break; |
|
| 119 | + } |
|
| 120 | + |
|
| 121 | + print_error('view_error_unable_join_student', 'bigbluebuttonbn', |
|
| 117 | 122 | $CFG->wwwroot.'/admin/settings.php?section=modsettingbigbluebuttonbn'); |
| 118 | 123 | break; |
| 119 | 124 | } |
| 120 | 125 | |
| 121 | - print_error('view_error_unable_join_student', 'bigbluebuttonbn', |
|
| 122 | - $CFG->wwwroot.'/admin/settings.php?section=modsettingbigbluebuttonbn'); |
|
| 123 | - break; |
|
| 124 | - } |
|
| 126 | + if ($response['returncode'] == 'FAILED') { |
|
| 127 | + // The meeting was not created. |
|
| 128 | + if (!$printerrorkey) { |
|
| 129 | + print_error($response['message'], 'bigbluebuttonbn'); |
|
| 130 | + break; |
|
| 131 | + } |
|
| 132 | + $printerrorkey = bigbluebuttonbn_get_error_key($response['messageKey'], 'view_error_create'); |
|
| 133 | + print_error($printerrorkey, 'bigbluebuttonbn'); |
|
| 134 | + break; |
|
| 135 | + } |
|
| 125 | 136 | |
| 126 | - if ($response['returncode'] == 'FAILED') { |
|
| 127 | - // The meeting was not created. |
|
| 128 | - if (!$printerrorkey) { |
|
| 129 | - print_error($response['message'], 'bigbluebuttonbn'); |
|
| 137 | + if ($response['hasBeenForciblyEnded'] == 'true') { |
|
| 138 | + print_error(get_string('index_error_forciblyended', 'bigbluebuttonbn')); |
|
| 130 | 139 | break; |
| 131 | 140 | } |
| 132 | - $printerrorkey = bigbluebuttonbn_get_error_key($response['messageKey'], 'view_error_create'); |
|
| 133 | - print_error($printerrorkey, 'bigbluebuttonbn'); |
|
| 134 | - break; |
|
| 135 | - } |
|
| 136 | 141 | |
| 137 | - if ($response['hasBeenForciblyEnded'] == 'true') { |
|
| 138 | - print_error(get_string('index_error_forciblyended', 'bigbluebuttonbn')); |
|
| 142 | + // Moodle event logger: Create an event for meeting created. |
|
| 143 | + bigbluebuttonbn_event_log(BIGBLUEBUTTON_EVENT_MEETING_CREATED, $bigbluebuttonbn, $cm); |
|
| 144 | + // Internal logger: Insert a record with the meeting created. |
|
| 145 | + bigbluebuttonbn_logs($bbbsession, BIGBLUEBUTTONBN_LOG_EVENT_CREATE); |
|
| 146 | + // Since the meeting is already running, we just join the session. |
|
| 147 | + bigbluebutton_bbb_view_join_meeting($bbbsession, $cm, $bigbluebuttonbn); |
|
| 139 | 148 | break; |
| 140 | - } |
|
| 141 | - |
|
| 142 | - // Moodle event logger: Create an event for meeting created. |
|
| 143 | - bigbluebuttonbn_event_log(BIGBLUEBUTTON_EVENT_MEETING_CREATED, $bigbluebuttonbn, $cm); |
|
| 144 | - // Internal logger: Insert a record with the meeting created. |
|
| 145 | - bigbluebuttonbn_logs($bbbsession, BIGBLUEBUTTONBN_LOG_EVENT_CREATE); |
|
| 146 | - // Since the meeting is already running, we just join the session. |
|
| 147 | - bigbluebutton_bbb_view_join_meeting($bbbsession, $cm, $bigbluebuttonbn); |
|
| 148 | - break; |
|
| 149 | - default: |
|
| 150 | - bigbluebutton_bbb_view_close_window(); |
|
| 149 | + default: |
|
| 150 | + bigbluebutton_bbb_view_close_window(); |
|
| 151 | 151 | } |
| 152 | 152 | |
| 153 | 153 | function bigbluebutton_bbb_view_close_window() { |
@@ -22,8 +22,8 @@ discard block |
||
| 22 | 22 | * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v2 or later |
| 23 | 23 | */ |
| 24 | 24 | |
| 25 | -require_once(dirname(dirname(dirname(__FILE__))).'/config.php'); |
|
| 26 | -require_once(dirname(__FILE__).'/locallib.php'); |
|
| 25 | +require_once(dirname(dirname(dirname(__FILE__))) . '/config.php'); |
|
| 26 | +require_once(dirname(__FILE__) . '/locallib.php'); |
|
| 27 | 27 | |
| 28 | 28 | $id = optional_param('id', 0, PARAM_INT); |
| 29 | 29 | $bn = optional_param('bn', 0, PARAM_INT); |
@@ -98,7 +98,7 @@ discard block |
||
| 98 | 98 | |
| 99 | 99 | // If user is not administrator nor moderator (user is steudent) and waiting is required. |
| 100 | 100 | if (!$bbbsession['administrator'] && !$bbbsession['moderator'] && $bbbsession['wait']) { |
| 101 | - header('Location: '.$bbbsession['logoutURL']); |
|
| 101 | + header('Location: ' . $bbbsession['logoutURL']); |
|
| 102 | 102 | break; |
| 103 | 103 | } |
| 104 | 104 | |
@@ -109,17 +109,17 @@ discard block |
||
| 109 | 109 | // The server is unreachable. |
| 110 | 110 | if ($bbbsession['administrator']) { |
| 111 | 111 | print_error('view_error_unable_join', 'bigbluebuttonbn', |
| 112 | - $CFG->wwwroot.'/admin/settings.php?section=modsettingbigbluebuttonbn'); |
|
| 112 | + $CFG->wwwroot . '/admin/settings.php?section=modsettingbigbluebuttonbn'); |
|
| 113 | 113 | break; |
| 114 | 114 | } |
| 115 | 115 | if ($bbbsession['moderator']) { |
| 116 | 116 | print_error('view_error_unable_join_teacher', 'bigbluebuttonbn', |
| 117 | - $CFG->wwwroot.'/admin/settings.php?section=modsettingbigbluebuttonbn'); |
|
| 117 | + $CFG->wwwroot . '/admin/settings.php?section=modsettingbigbluebuttonbn'); |
|
| 118 | 118 | break; |
| 119 | 119 | } |
| 120 | 120 | |
| 121 | 121 | print_error('view_error_unable_join_student', 'bigbluebuttonbn', |
| 122 | - $CFG->wwwroot.'/admin/settings.php?section=modsettingbigbluebuttonbn'); |
|
| 122 | + $CFG->wwwroot . '/admin/settings.php?section=modsettingbigbluebuttonbn'); |
|
| 123 | 123 | break; |
| 124 | 124 | } |
| 125 | 125 | |
@@ -202,7 +202,7 @@ discard block |
||
| 202 | 202 | if (bigbluebuttonbn_get_cfg_scheduled_duration_enabled()) { |
| 203 | 203 | $durationtime = bigbluebuttonbn_get_duration($bigbluebuttonbn->closingtime); |
| 204 | 204 | if ($durationtime > 0) { |
| 205 | - $bbbsession['welcome'] .= '<br><br>'.str_replace('%duration%', ''.$durationtime, |
|
| 205 | + $bbbsession['welcome'] .= '<br><br>' . str_replace('%duration%', '' . $durationtime, |
|
| 206 | 206 | get_string('bbbdurationwarning', 'bigbluebuttonbn')); |
| 207 | 207 | } |
| 208 | 208 | } |
@@ -230,7 +230,7 @@ discard block |
||
| 230 | 230 | |
| 231 | 231 | if ($bbbsession['userlimit'] > 0 && intval($meetinginfo['participantCount']) >= $bbbsession['userlimit']) { |
| 232 | 232 | // No more users allowed to join. |
| 233 | - header('Location: '.$bbbsession['logoutURL']); |
|
| 233 | + header('Location: ' . $bbbsession['logoutURL']); |
|
| 234 | 234 | |
| 235 | 235 | return; |
| 236 | 236 | } |
@@ -250,20 +250,20 @@ discard block |
||
| 250 | 250 | bigbluebuttonbn_participant_joined($bbbsession['meetingid'], |
| 251 | 251 | ($bbbsession['administrator'] || $bbbsession['moderator'])); |
| 252 | 252 | // Execute the redirect. |
| 253 | - header('Location: '.$joinurl); |
|
| 253 | + header('Location: ' . $joinurl); |
|
| 254 | 254 | } |
| 255 | 255 | |
| 256 | 256 | function bigbluebutton_bbb_view_errors($serrors, $id) { |
| 257 | 257 | global $CFG, $OUTPUT; |
| 258 | 258 | |
| 259 | - $errors = (array) json_decode(urldecode($serrors)); |
|
| 259 | + $errors = (array)json_decode(urldecode($serrors)); |
|
| 260 | 260 | $msgerrors = ''; |
| 261 | 261 | foreach ($errors as $error) { |
| 262 | - $msgerrors .= html_writer::tag('p', $error->{'message'}, array('class' => 'alert alert-danger'))."\n"; |
|
| 262 | + $msgerrors .= html_writer::tag('p', $error->{'message'}, array('class' => 'alert alert-danger')) . "\n"; |
|
| 263 | 263 | } |
| 264 | 264 | |
| 265 | 265 | echo $OUTPUT->header(); |
| 266 | 266 | print_error('view_error_bigbluebutton', 'bigbluebuttonbn', |
| 267 | - $CFG->wwwroot.'/mod/bigbluebuttonbn/view.php?id='.$id, $msgerrors, $serrors); |
|
| 267 | + $CFG->wwwroot . '/mod/bigbluebuttonbn/view.php?id=' . $id, $msgerrors, $serrors); |
|
| 268 | 268 | echo $OUTPUT->footer(); |
| 269 | 269 | } |
@@ -94,7 +94,7 @@ discard block |
||
| 94 | 94 | * recordings from a different activity even from a different course. |
| 95 | 95 | **/ |
| 96 | 96 | |
| 97 | - /* |
|
| 97 | + /* |
|
| 98 | 98 | * When the value is set to 1 (checked) the bigbluebuttonbn rooms or |
| 99 | 99 | * activities will have the 'import recordings' capability enabled. |
| 100 | 100 | */ |
@@ -115,7 +115,7 @@ discard block |
||
| 115 | 115 | * 'Join session' button enabled |
| 116 | 116 | **/ |
| 117 | 117 | |
| 118 | - /* |
|
| 118 | + /* |
|
| 119 | 119 | * When the value is set to 1 (checked) the bigbluebuttonbn rooms or |
| 120 | 120 | * activities will have the 'wait for moderator' capability enabled by |
| 121 | 121 | * default. |
@@ -149,7 +149,7 @@ discard block |
||
| 149 | 149 | * 5. CONFIGURATION FOR "STATIC VOICE BRIDGE" FEATURE |
| 150 | 150 | * |
| 151 | 151 | **/ |
| 152 | - /* |
|
| 152 | + /* |
|
| 153 | 153 | * A conference voice bridge number can be permanently assigned to a room |
| 154 | 154 | * or activity. |
| 155 | 155 | */ |
@@ -159,7 +159,7 @@ discard block |
||
| 159 | 159 | * 6. CONFIGURATION FOR "PRE-UPLOAD PRESENTATION" FEATURE |
| 160 | 160 | * |
| 161 | 161 | **/ |
| 162 | - /* |
|
| 162 | + /* |
|
| 163 | 163 | * Since version 0.8, BigBluebutton has an implementation for allowing |
| 164 | 164 | * preuploading presentation. When this feature is enabled, users creating or |
| 165 | 165 | * editing a room or activity can upload a PDF or Office document to the |
@@ -176,7 +176,7 @@ discard block |
||
| 176 | 176 | * applied to each room or activity, or globally. |
| 177 | 177 | **/ |
| 178 | 178 | |
| 179 | - /* |
|
| 179 | + /* |
|
| 180 | 180 | * The number of users allowed in a session by default when a new room or |
| 181 | 181 | * conference is added. If the number is set to 0, no limit is established. |
| 182 | 182 | * $CFG->bigbluebuttonbn['userlimit_default'] = 0; |
@@ -197,7 +197,7 @@ discard block |
||
| 197 | 197 | * By default only the owner is assigned. |
| 198 | 198 | **/ |
| 199 | 199 | |
| 200 | - /* |
|
| 200 | + /* |
|
| 201 | 201 | * The values for this parameter can be 'owner' and/or any of the roles defined in |
| 202 | 202 | * Moodle (including the custom parameters). The value used will be the key for the role. |
| 203 | 203 | * [owner|manager|coursecreator|editingteacher|teacher|student|guest|user|frontpage|ANY_CUSTOM_ROLE] |
@@ -208,7 +208,7 @@ discard block |
||
| 208 | 208 | * 9. CONFIGURATION FOR "NOTIFICATION SENDING" FEATURE |
| 209 | 209 | * |
| 210 | 210 | **/ |
| 211 | - /* |
|
| 211 | + /* |
|
| 212 | 212 | * When the value is set to 1 (checked) the 'notification sending' |
| 213 | 213 | * capability can be used by the user creating or editing the room or |
| 214 | 214 | * activity. |
@@ -222,7 +222,7 @@ discard block |
||
| 222 | 222 | * 10. CONFIGURATION FOR "RECORDING READY" FEATURE |
| 223 | 223 | * |
| 224 | 224 | **/ |
| 225 | - /* |
|
| 225 | + /* |
|
| 226 | 226 | * When the value is set to 1 (checked) the 'notify users when recording ready' |
| 227 | 227 | * capability is enabled, meaning that a message will be sent to all enrolled |
| 228 | 228 | * users in a course when a recording is ready |
@@ -245,7 +245,7 @@ discard block |
||
| 245 | 245 | * 12. GENERAL CONFIGURATION FOR RECORDINGS UI |
| 246 | 246 | * |
| 247 | 247 | **/ |
| 248 | - /* |
|
| 248 | + /* |
|
| 249 | 249 | * When the value is set to 1 (checked) the bigbluebuttonbn resources |
| 250 | 250 | * will show the recodings in an html table by default. |
| 251 | 251 | * $CFG->bigbluebuttonbn['recordings_html_default'] = 0; |
@@ -23,8 +23,8 @@ discard block |
||
| 23 | 23 | * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v2 or later |
| 24 | 24 | */ |
| 25 | 25 | |
| 26 | -require_once(dirname(dirname(dirname(__FILE__))).'/config.php'); |
|
| 27 | -require_once(dirname(__FILE__).'/locallib.php'); |
|
| 26 | +require_once(dirname(dirname(dirname(__FILE__))) . '/config.php'); |
|
| 27 | +require_once(dirname(__FILE__) . '/locallib.php'); |
|
| 28 | 28 | |
| 29 | 29 | $id = required_param('id', PARAM_INT); |
| 30 | 30 | $a = optional_param('a', 0, PARAM_INT); |
@@ -92,12 +92,12 @@ discard block |
||
| 92 | 92 | |
| 93 | 93 | echo get_string('index_ending', 'bigbluebuttonbn'); |
| 94 | 94 | |
| 95 | - $meetingid = $bigbluebuttonbn->meetingid.'-'.$course->id.'-'.$bigbluebuttonbn->id; |
|
| 95 | + $meetingid = $bigbluebuttonbn->meetingid . '-' . $course->id . '-' . $bigbluebuttonbn->id; |
|
| 96 | 96 | if ($g != '0') { |
| 97 | - $meetingid .= '['.$g.']'; |
|
| 97 | + $meetingid .= '[' . $g . ']'; |
|
| 98 | 98 | } |
| 99 | 99 | bigbluebuttonbn_wrap_xml_load_file(bigbluebuttonbn_getEndMeetingURL($meetingid)); |
| 100 | - redirect('index.php?id='.$id); |
|
| 100 | + redirect('index.php?id=' . $id); |
|
| 101 | 101 | } |
| 102 | 102 | } |
| 103 | 103 | |
@@ -114,7 +114,7 @@ discard block |
||
| 114 | 114 | // Add a the data for the bigbluebuttonbn instance. |
| 115 | 115 | $groupobj = null; |
| 116 | 116 | if (groups_get_activity_groupmode($cm) > 0) { |
| 117 | - $groupobj = (object) array('id' => 0, 'name' => get_string('allparticipants')); |
|
| 117 | + $groupobj = (object)array('id' => 0, 'name' => get_string('allparticipants')); |
|
| 118 | 118 | } |
| 119 | 119 | $table->data[] = bigbluebuttonbn_index_display_room($canmoderate, $course, $bigbluebuttonbn, $groupobj); |
| 120 | 120 | |
@@ -135,13 +135,13 @@ discard block |
||
| 135 | 135 | |
| 136 | 136 | // Functions. |
| 137 | 137 | function bigbluebuttonbn_index_display_room($moderator, $course, $bigbluebuttonbn, $groupobj = null) { |
| 138 | - $meetingid = $bigbluebuttonbn->meetingid.'-'.$course->id.'-'.$bigbluebuttonbn->id; |
|
| 138 | + $meetingid = $bigbluebuttonbn->meetingid . '-' . $course->id . '-' . $bigbluebuttonbn->id; |
|
| 139 | 139 | $paramgroup = ''; |
| 140 | 140 | $groupname = ''; |
| 141 | 141 | |
| 142 | 142 | if ($groupobj) { |
| 143 | - $meetingid .= '['.$groupobj->id.']'; |
|
| 144 | - $paramgroup = '&group='.$groupobj->id; |
|
| 143 | + $meetingid .= '[' . $groupobj->id . ']'; |
|
| 144 | + $paramgroup = '&group=' . $groupobj->id; |
|
| 145 | 145 | $groupname = $groupobj->name; |
| 146 | 146 | } |
| 147 | 147 | |
@@ -160,7 +160,7 @@ discard block |
||
| 160 | 160 | } |
| 161 | 161 | |
| 162 | 162 | // Output Users in the meeting. |
| 163 | - $joinurl = '<a href="view.php?id='.$bigbluebuttonbn->coursemodule.$paramgroup.'">'.format_string($bigbluebuttonbn->name).'</a>'; |
|
| 163 | + $joinurl = '<a href="view.php?id=' . $bigbluebuttonbn->coursemodule . $paramgroup . '">' . format_string($bigbluebuttonbn->name) . '</a>'; |
|
| 164 | 164 | $group = $groupname; |
| 165 | 165 | $users = ''; |
| 166 | 166 | $viewerlist = ''; |
@@ -197,7 +197,7 @@ discard block |
||
| 197 | 197 | $attendeecount = 0; |
| 198 | 198 | foreach ($meetinginfo['attendees']->attendee as $attendee) { |
| 199 | 199 | if ($attendee->role == $role) { |
| 200 | - $attendeelist .= ($attendeecount++ > 0 ? ', ' : '').$attendee->fullName; |
|
| 200 | + $attendeelist .= ($attendeecount++ > 0 ? ', ' : '') . $attendee->fullName; |
|
| 201 | 201 | } |
| 202 | 202 | } |
| 203 | 203 | } |
@@ -220,15 +220,15 @@ discard block |
||
| 220 | 220 | $actions = ''; |
| 221 | 221 | |
| 222 | 222 | if ($moderator) { |
| 223 | - $actions .= '<form name="form1" method="post" action="">'.'/n'; |
|
| 224 | - $actions .= ' <INPUT type="hidden" name="id" value="'.$course->id.'">'.'/n'; |
|
| 225 | - $actions .= ' <INPUT type="hidden" name="a" value="'.$bigbluebuttonbn->id.'">'.'/n'; |
|
| 223 | + $actions .= '<form name="form1" method="post" action="">' . '/n'; |
|
| 224 | + $actions .= ' <INPUT type="hidden" name="id" value="' . $course->id . '">' . '/n'; |
|
| 225 | + $actions .= ' <INPUT type="hidden" name="a" value="' . $bigbluebuttonbn->id . '">' . '/n'; |
|
| 226 | 226 | if ($groupobj != null) { |
| 227 | - $actions .= ' <INPUT type="hidden" name="g" value="'.$groupobj->id.'">'.'/n'; |
|
| 227 | + $actions .= ' <INPUT type="hidden" name="g" value="' . $groupobj->id . '">' . '/n'; |
|
| 228 | 228 | } |
| 229 | - $actions .= ' <INPUT type="submit" name="submit" value="end" onclick="return confirm(\''. |
|
| 230 | - get_string('index_confirm_end', 'bigbluebuttonbn').'\')">'.'/n'; |
|
| 231 | - $actions .= '</form>'.'/n'; |
|
| 229 | + $actions .= ' <INPUT type="submit" name="submit" value="end" onclick="return confirm(\'' . |
|
| 230 | + get_string('index_confirm_end', 'bigbluebuttonbn') . '\')">' . '/n'; |
|
| 231 | + $actions .= '</form>' . '/n'; |
|
| 232 | 232 | } |
| 233 | 233 | |
| 234 | 234 | return $actions; |
@@ -93,8 +93,8 @@ |
||
| 93 | 93 | $output .= html_writer::start_tag('br'); |
| 94 | 94 | $output .= html_writer::tag('input', '', |
| 95 | 95 | array('type' => 'button', 'class' => 'btn btn-secondary', |
| 96 | - 'value' => get_string('view_recording_button_return', 'bigbluebuttonbn'), |
|
| 97 | - 'onclick' => 'window.location=\''.$CFG->wwwroot.'/mod/bigbluebuttonbn/view.php?id='.$cm->id.'\'')); |
|
| 96 | + 'value' => get_string('view_recording_button_return', 'bigbluebuttonbn'), |
|
| 97 | + 'onclick' => 'window.location=\''.$CFG->wwwroot.'/mod/bigbluebuttonbn/view.php?id='.$cm->id.'\'')); |
|
| 98 | 98 | |
| 99 | 99 | // JavaScript for locales. |
| 100 | 100 | $stringman = get_string_manager(); |
@@ -22,8 +22,8 @@ discard block |
||
| 22 | 22 | * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v2 or later |
| 23 | 23 | */ |
| 24 | 24 | |
| 25 | -require_once(dirname(dirname(dirname(__FILE__))).'/config.php'); |
|
| 26 | -require_once(dirname(__FILE__).'/locallib.php'); |
|
| 25 | +require_once(dirname(dirname(dirname(__FILE__))) . '/config.php'); |
|
| 26 | +require_once(dirname(__FILE__) . '/locallib.php'); |
|
| 27 | 27 | |
| 28 | 28 | $bn = required_param('bn', PARAM_INT); |
| 29 | 29 | $tc = optional_param('tc', 0, PARAM_INT); |
@@ -94,7 +94,7 @@ discard block |
||
| 94 | 94 | $output .= html_writer::tag('input', '', |
| 95 | 95 | array('type' => 'button', 'class' => 'btn btn-secondary', |
| 96 | 96 | 'value' => get_string('view_recording_button_return', 'bigbluebuttonbn'), |
| 97 | - 'onclick' => 'window.location=\''.$CFG->wwwroot.'/mod/bigbluebuttonbn/view.php?id='.$cm->id.'\'')); |
|
| 97 | + 'onclick' => 'window.location=\'' . $CFG->wwwroot . '/mod/bigbluebuttonbn/view.php?id=' . $cm->id . '\'')); |
|
| 98 | 98 | |
| 99 | 99 | // JavaScript for locales. |
| 100 | 100 | $stringman = get_string_manager(); |
@@ -36,23 +36,23 @@ discard block |
||
| 36 | 36 | |
| 37 | 37 | // Change welcome, allow null. |
| 38 | 38 | $fielddefinition = array('type' => XMLDB_TYPE_TEXT, |
| 39 | - 'precision' => null, |
|
| 40 | - 'unsigned' => null, |
|
| 41 | - 'notnull' => XMLDB_NOTNULL, |
|
| 42 | - 'sequence' => null, |
|
| 43 | - 'default' => null, |
|
| 44 | - 'previous' => 'type'); |
|
| 39 | + 'precision' => null, |
|
| 40 | + 'unsigned' => null, |
|
| 41 | + 'notnull' => XMLDB_NOTNULL, |
|
| 42 | + 'sequence' => null, |
|
| 43 | + 'default' => null, |
|
| 44 | + 'previous' => 'type'); |
|
| 45 | 45 | xmldb_bigbluebuttonbn_add_change_field($dbman, 'bigbluebuttonbn', 'welcome', |
| 46 | 46 | $fielddefinition); |
| 47 | 47 | |
| 48 | 48 | // Change userid definition in bigbluebuttonbn_log. |
| 49 | 49 | $fielddefinition = array('type' => XMLDB_TYPE_INTEGER, |
| 50 | - 'precision' => '10', |
|
| 51 | - 'unsigned' => null, |
|
| 52 | - 'notnull' => XMLDB_NOTNULL, |
|
| 53 | - 'sequence' => null, |
|
| 54 | - 'default' => null, |
|
| 55 | - 'previous' => 'bigbluebuttonbnid'); |
|
| 50 | + 'precision' => '10', |
|
| 51 | + 'unsigned' => null, |
|
| 52 | + 'notnull' => XMLDB_NOTNULL, |
|
| 53 | + 'sequence' => null, |
|
| 54 | + 'default' => null, |
|
| 55 | + 'previous' => 'bigbluebuttonbnid'); |
|
| 56 | 56 | xmldb_bigbluebuttonbn_add_change_field($dbman, 'bigbluebuttonbn_log', 'userid', |
| 57 | 57 | $fielddefinition); |
| 58 | 58 | |
@@ -78,34 +78,34 @@ discard block |
||
| 78 | 78 | |
| 79 | 79 | // Add field type. |
| 80 | 80 | $fielddefinition = array('type' => XMLDB_TYPE_INTEGER, |
| 81 | - 'precision' => '2', |
|
| 82 | - 'unsigned' => null, |
|
| 83 | - 'notnull' => XMLDB_NOTNULL, |
|
| 84 | - 'sequence' => null, |
|
| 85 | - 'default' => 0, |
|
| 86 | - 'previous' => 'id'); |
|
| 81 | + 'precision' => '2', |
|
| 82 | + 'unsigned' => null, |
|
| 83 | + 'notnull' => XMLDB_NOTNULL, |
|
| 84 | + 'sequence' => null, |
|
| 85 | + 'default' => 0, |
|
| 86 | + 'previous' => 'id'); |
|
| 87 | 87 | xmldb_bigbluebuttonbn_add_change_field($dbman, 'bigbluebuttonbn', 'type', |
| 88 | 88 | $fielddefinition); |
| 89 | 89 | |
| 90 | 90 | // Add field recordings_html. |
| 91 | 91 | $fielddefinition = array('type' => XMLDB_TYPE_INTEGER, |
| 92 | - 'precision' => '1', |
|
| 93 | - 'unsigned' => null, |
|
| 94 | - 'notnull' => XMLDB_NOTNULL, |
|
| 95 | - 'sequence' => null, |
|
| 96 | - 'default' => 0, |
|
| 97 | - 'previous' => null); |
|
| 92 | + 'precision' => '1', |
|
| 93 | + 'unsigned' => null, |
|
| 94 | + 'notnull' => XMLDB_NOTNULL, |
|
| 95 | + 'sequence' => null, |
|
| 96 | + 'default' => 0, |
|
| 97 | + 'previous' => null); |
|
| 98 | 98 | xmldb_bigbluebuttonbn_add_change_field($dbman, 'bigbluebuttonbn', 'recordings_html', |
| 99 | 99 | $fielddefinition); |
| 100 | 100 | |
| 101 | 101 | // Add field recordings_deleted_activities. |
| 102 | 102 | $fielddefinition = array('type' => XMLDB_TYPE_INTEGER, |
| 103 | - 'precision' => '1', |
|
| 104 | - 'unsigned' => null, |
|
| 105 | - 'notnull' => XMLDB_NOTNULL, |
|
| 106 | - 'sequence' => null, |
|
| 107 | - 'default' => 1, |
|
| 108 | - 'previous' => null); |
|
| 103 | + 'precision' => '1', |
|
| 104 | + 'unsigned' => null, |
|
| 105 | + 'notnull' => XMLDB_NOTNULL, |
|
| 106 | + 'sequence' => null, |
|
| 107 | + 'default' => 1, |
|
| 108 | + 'previous' => null); |
|
| 109 | 109 | xmldb_bigbluebuttonbn_add_change_field($dbman, 'bigbluebuttonbn', 'recordings_deleted_activities', |
| 110 | 110 | $fielddefinition); |
| 111 | 111 | |
@@ -122,12 +122,12 @@ discard block |
||
| 122 | 122 | $table = new xmldb_table($tablename); |
| 123 | 123 | $field = new xmldb_field($fieldname); |
| 124 | 124 | $field->set_attributes($fielddefinition['type'], |
| 125 | - $fielddefinition['precision'], |
|
| 126 | - $fielddefinition['unsigned'], |
|
| 127 | - $fielddefinition['notnull'], |
|
| 128 | - $fielddefinition['sequence'], |
|
| 129 | - $fielddefinition['default'], |
|
| 130 | - $fielddefinition['previous']); |
|
| 125 | + $fielddefinition['precision'], |
|
| 126 | + $fielddefinition['unsigned'], |
|
| 127 | + $fielddefinition['notnull'], |
|
| 128 | + $fielddefinition['sequence'], |
|
| 129 | + $fielddefinition['default'], |
|
| 130 | + $fielddefinition['previous']); |
|
| 131 | 131 | if ($dbman->field_exists($table, $field)) { |
| 132 | 132 | $dbman->change_field_type($table, $field, true, true); |
| 133 | 133 | $dbman->change_field_precision($table, $field, true, true); |
@@ -84,9 +84,9 @@ discard block |
||
| 84 | 84 | // BigBlueButton API Calls. |
| 85 | 85 | function bigbluebuttonbn_get_join_url($meetingid, $username, $pw, $logouturl, $configtoken = null, $userid = null) { |
| 86 | 86 | $data = ['meetingID' => $meetingid, |
| 87 | - 'fullName' => $username, |
|
| 88 | - 'password' => $pw, |
|
| 89 | - 'logoutURL' => $logouturl, |
|
| 87 | + 'fullName' => $username, |
|
| 88 | + 'password' => $pw, |
|
| 89 | + 'logoutURL' => $logouturl, |
|
| 90 | 90 | ]; |
| 91 | 91 | |
| 92 | 92 | if (!is_null($configtoken)) { |
@@ -102,11 +102,11 @@ discard block |
||
| 102 | 102 | function bigbluebuttonbn_get_create_meeting_url($name, $meetingid, $attendeepw, $moderatorpw, $welcome, |
| 103 | 103 | $logouturl, $record = 'false', $duration = 0, $voicebridge = 0, $maxparticipants = 0, $metadata = array()) { |
| 104 | 104 | $data = ['meetingID' => $meetingid, |
| 105 | - 'name' => $name, |
|
| 106 | - 'attendeePW' => $attendeepw, |
|
| 107 | - 'moderatorPW' => $moderatorpw, |
|
| 108 | - 'logoutURL' => $logouturl, |
|
| 109 | - 'record' => $record, |
|
| 105 | + 'name' => $name, |
|
| 106 | + 'attendeePW' => $attendeepw, |
|
| 107 | + 'moderatorPW' => $moderatorpw, |
|
| 108 | + 'logoutURL' => $logouturl, |
|
| 109 | + 'record' => $record, |
|
| 110 | 110 | ]; |
| 111 | 111 | |
| 112 | 112 | $voicebridge = intval($voicebridge); |
@@ -238,24 +238,24 @@ discard block |
||
| 238 | 238 | function bigbluebuttonbn_get_meeting_info_array($meetingid) { |
| 239 | 239 | $xml = bigbluebuttonbn_wrap_xml_load_file( |
| 240 | 240 | bigbluebuttonbn_bigbluebutton_action_url('getMeetingInfo', ['meetingID' => $meetingid]) |
| 241 | - ); |
|
| 241 | + ); |
|
| 242 | 242 | |
| 243 | 243 | if ($xml && $xml->returncode == 'SUCCESS' && empty($xml->messageKey)) { |
| 244 | 244 | // Meeting info was returned. |
| 245 | 245 | return array('returncode' => $xml->returncode, |
| 246 | - 'meetingID' => $xml->meetingID, |
|
| 247 | - 'moderatorPW' => $xml->moderatorPW, |
|
| 248 | - 'attendeePW' => $xml->attendeePW, |
|
| 249 | - 'hasBeenForciblyEnded' => $xml->hasBeenForciblyEnded, |
|
| 250 | - 'running' => $xml->running, |
|
| 251 | - 'recording' => $xml->recording, |
|
| 252 | - 'startTime' => $xml->startTime, |
|
| 253 | - 'endTime' => $xml->endTime, |
|
| 254 | - 'participantCount' => $xml->participantCount, |
|
| 255 | - 'moderatorCount' => $xml->moderatorCount, |
|
| 256 | - 'attendees' => $xml->attendees, |
|
| 257 | - 'metadata' => $xml->metadata, |
|
| 258 | - ); |
|
| 246 | + 'meetingID' => $xml->meetingID, |
|
| 247 | + 'moderatorPW' => $xml->moderatorPW, |
|
| 248 | + 'attendeePW' => $xml->attendeePW, |
|
| 249 | + 'hasBeenForciblyEnded' => $xml->hasBeenForciblyEnded, |
|
| 250 | + 'running' => $xml->running, |
|
| 251 | + 'recording' => $xml->recording, |
|
| 252 | + 'startTime' => $xml->startTime, |
|
| 253 | + 'endTime' => $xml->endTime, |
|
| 254 | + 'participantCount' => $xml->participantCount, |
|
| 255 | + 'moderatorCount' => $xml->moderatorCount, |
|
| 256 | + 'attendees' => $xml->attendees, |
|
| 257 | + 'metadata' => $xml->metadata, |
|
| 258 | + ); |
|
| 259 | 259 | } |
| 260 | 260 | |
| 261 | 261 | if ($xml) { |
@@ -321,7 +321,7 @@ discard block |
||
| 321 | 321 | // Do getRecordings is executed using a method GET (supported by all versions of BBB). |
| 322 | 322 | $xml = bigbluebuttonbn_wrap_xml_load_file( |
| 323 | 323 | bigbluebuttonbn_bigbluebutton_action_url('getRecordings', ['meetingID' => implode(',', $mids)]) |
| 324 | - ); |
|
| 324 | + ); |
|
| 325 | 325 | if ($xml && $xml->returncode == 'SUCCESS' && isset($xml->recordings)) { |
| 326 | 326 | // If there were meetings already created. |
| 327 | 327 | foreach ($xml->recordings->recording as $recording) { |
@@ -392,7 +392,7 @@ discard block |
||
| 392 | 392 | function bigbluebuttonbn_get_default_config_xml() { |
| 393 | 393 | $xml = bigbluebuttonbn_wrap_xml_load_file( |
| 394 | 394 | bigbluebuttonbn_bigbluebutton_action_url('getDefaultConfigXML') |
| 395 | - ); |
|
| 395 | + ); |
|
| 396 | 396 | |
| 397 | 397 | return $xml; |
| 398 | 398 | } |
@@ -459,7 +459,7 @@ discard block |
||
| 459 | 459 | foreach ($ids as $id) { |
| 460 | 460 | $xml = bigbluebuttonbn_wrap_xml_load_file( |
| 461 | 461 | bigbluebuttonbn_bigbluebutton_action_url('deleteRecordings', ['recordID' => $id]) |
| 462 | - ); |
|
| 462 | + ); |
|
| 463 | 463 | if ($xml && $xml->returncode != 'SUCCESS') { |
| 464 | 464 | return false; |
| 465 | 465 | } |
@@ -477,7 +477,7 @@ discard block |
||
| 477 | 477 | foreach ($ids as $id) { |
| 478 | 478 | $xml = bigbluebuttonbn_wrap_xml_load_file( |
| 479 | 479 | bigbluebuttonbn_bigbluebutton_action_url('publishRecordings', ['recordID' => $id, 'publish' => $publish]) |
| 480 | - ); |
|
| 480 | + ); |
|
| 481 | 481 | if ($xml && $xml->returncode != 'SUCCESS') { |
| 482 | 482 | return false; |
| 483 | 483 | } |
@@ -495,7 +495,7 @@ discard block |
||
| 495 | 495 | foreach ($ids as $id) { |
| 496 | 496 | $xml = bigbluebuttonbn_wrap_xml_load_file( |
| 497 | 497 | bigbluebuttonbn_bigbluebutton_action_url('updateRecordings', ['recordID' => $id] + (array) $params) |
| 498 | - ); |
|
| 498 | + ); |
|
| 499 | 499 | if ($xml && $xml->returncode != 'SUCCESS') { |
| 500 | 500 | return false; |
| 501 | 501 | } |
@@ -511,7 +511,7 @@ discard block |
||
| 511 | 511 | function bigbluebuttonbn_end_meeting($meetingid, $modpw) { |
| 512 | 512 | $xml = bigbluebuttonbn_wrap_xml_load_file( |
| 513 | 513 | bigbluebuttonbn_bigbluebutton_action_url('end', ['meetingID' => $meetingid, 'password' => $modpw]) |
| 514 | - ); |
|
| 514 | + ); |
|
| 515 | 515 | |
| 516 | 516 | if ($xml) { |
| 517 | 517 | // If the xml packet returned failure it displays the message to the user. |
@@ -528,7 +528,7 @@ discard block |
||
| 528 | 528 | function bigbluebuttonbn_is_meeting_running($meetingid) { |
| 529 | 529 | $xml = bigbluebuttonbn_wrap_xml_load_file( |
| 530 | 530 | bigbluebuttonbn_bigbluebutton_action_url('isMeetingRunning', ['meetingID' => $meetingid]) |
| 531 | - ); |
|
| 531 | + ); |
|
| 532 | 532 | |
| 533 | 533 | if ($xml && $xml->returncode == 'SUCCESS') { |
| 534 | 534 | return ($xml->running == 'true'); |
@@ -540,7 +540,7 @@ discard block |
||
| 540 | 540 | function bigbluebuttonbn_get_server_version() { |
| 541 | 541 | $xml = bigbluebuttonbn_wrap_xml_load_file( |
| 542 | 542 | bigbluebuttonbn_bigbluebutton_action_url() |
| 543 | - ); |
|
| 543 | + ); |
|
| 544 | 544 | |
| 545 | 545 | if ($xml && $xml->returncode == 'SUCCESS') { |
| 546 | 546 | return $xml->version; |
@@ -606,10 +606,10 @@ discard block |
||
| 606 | 606 | |
| 607 | 607 | $options = array(); |
| 608 | 608 | $options['CURLOPT_HTTPHEADER'] = array( |
| 609 | - 'Content-Type: '.$contenttype, |
|
| 610 | - 'Content-Length: '.strlen($data), |
|
| 611 | - 'Content-Language: en-US', |
|
| 612 | - ); |
|
| 609 | + 'Content-Type: '.$contenttype, |
|
| 610 | + 'Content-Length: '.strlen($data), |
|
| 611 | + 'Content-Language: en-US', |
|
| 612 | + ); |
|
| 613 | 613 | |
| 614 | 614 | return $c->post($url, $data, $options); |
| 615 | 615 | } |
@@ -668,7 +668,7 @@ discard block |
||
| 668 | 668 | $roles[$key] = array('id' => $value->id, 'name' => $value->localname); |
| 669 | 669 | } |
| 670 | 670 | return $roles; |
| 671 | - } |
|
| 671 | + } |
|
| 672 | 672 | |
| 673 | 673 | function bigbluebuttonbn_get_role($id) { |
| 674 | 674 | $roles = (array) role_get_names(); |
@@ -688,18 +688,18 @@ discard block |
||
| 688 | 688 | 'all' => array( |
| 689 | 689 | 'name' => get_string('mod_form_field_participant_list_type_all', 'bigbluebuttonbn'), |
| 690 | 690 | 'children' => [] |
| 691 | - ) |
|
| 692 | - ); |
|
| 691 | + ) |
|
| 692 | + ); |
|
| 693 | 693 | |
| 694 | 694 | $data['role'] = array( |
| 695 | 695 | 'name' => get_string('mod_form_field_participant_list_type_role', 'bigbluebuttonbn'), |
| 696 | 696 | 'children' => bigbluebuttonbn_get_roles_select($context) |
| 697 | - ); |
|
| 697 | + ); |
|
| 698 | 698 | |
| 699 | 699 | $data['user'] = array( |
| 700 | 700 | 'name' => get_string('mod_form_field_participant_list_type_user', 'bigbluebuttonbn'), |
| 701 | 701 | 'children' => bigbluebuttonbn_get_users_select($context) |
| 702 | - ); |
|
| 702 | + ); |
|
| 703 | 703 | |
| 704 | 704 | return $data; |
| 705 | 705 | } |
@@ -746,9 +746,9 @@ discard block |
||
| 746 | 746 | } |
| 747 | 747 | |
| 748 | 748 | $participantlistarray[] = array( |
| 749 | - 'selectiontype' => 'role', |
|
| 750 | - 'selectionid' => $moderatordefault, |
|
| 751 | - 'role' => BIGBLUEBUTTONBN_ROLE_MODERATOR); |
|
| 749 | + 'selectiontype' => 'role', |
|
| 750 | + 'selectionid' => $moderatordefault, |
|
| 751 | + 'role' => BIGBLUEBUTTONBN_ROLE_MODERATOR); |
|
| 752 | 752 | } |
| 753 | 753 | |
| 754 | 754 | return $participantlistarray; |
@@ -760,11 +760,11 @@ discard block |
||
| 760 | 760 | 'all' => get_string('mod_form_field_participant_list_type_all', 'bigbluebuttonbn'), |
| 761 | 761 | 'role' => get_string('mod_form_field_participant_list_type_role', 'bigbluebuttonbn'), |
| 762 | 762 | 'user' => get_string('mod_form_field_participant_list_type_user', 'bigbluebuttonbn'), |
| 763 | - ], |
|
| 763 | + ], |
|
| 764 | 764 | 'type_selected' => 'all', |
| 765 | 765 | 'options' => ['all' => '---------------'], |
| 766 | 766 | 'selected' => 'all', |
| 767 | - ]; |
|
| 767 | + ]; |
|
| 768 | 768 | } |
| 769 | 769 | |
| 770 | 770 | function bigbluebuttonbn_is_moderator($context, $participants, $userid = null, $userroles = null) { |
@@ -896,8 +896,8 @@ discard block |
||
| 896 | 896 | } |
| 897 | 897 | |
| 898 | 898 | $parray = array('url' => $purl, 'name' => $pname, |
| 899 | - 'icon' => $picon, |
|
| 900 | - 'mimetype_description' => $pmimetypedescrip); |
|
| 899 | + 'icon' => $picon, |
|
| 900 | + 'mimetype_description' => $pmimetypedescrip); |
|
| 901 | 901 | |
| 902 | 902 | return $parray; |
| 903 | 903 | } |
@@ -961,7 +961,7 @@ discard block |
||
| 961 | 961 | $eventproperties['other'] = $eventsubtype; |
| 962 | 962 | } |
| 963 | 963 | $event = call_user_func_array('\mod_bigbluebuttonbn\event\bigbluebuttonbn_'.$eventtype.'::create', |
| 964 | - array($eventproperties)); |
|
| 964 | + array($eventproperties)); |
|
| 965 | 965 | $event->trigger(); |
| 966 | 966 | } |
| 967 | 967 | |
@@ -1008,7 +1008,7 @@ discard block |
||
| 1008 | 1008 | // Ping again and refresh the cache. |
| 1009 | 1009 | $meetinginfo = (array) bigbluebuttonbn_wrap_xml_load_file( |
| 1010 | 1010 | bigbluebuttonbn_bigbluebutton_action_url('getMeetingInfo', ['meetingID' => $meetingid]) |
| 1011 | - ); |
|
| 1011 | + ); |
|
| 1012 | 1012 | $cache->set($meetingid, array('creation_time' => time(), 'meeting_info' => json_encode($meetinginfo))); |
| 1013 | 1013 | |
| 1014 | 1014 | return $meetinginfo; |
@@ -1146,7 +1146,7 @@ discard block |
||
| 1146 | 1146 | $actionbar .= bigbluebuttonbn_actionbar_render_button( |
| 1147 | 1147 | $recording, |
| 1148 | 1148 | bigbluebuttonbn_get_recording_data_row_actionbar_payload($recording, $tool) |
| 1149 | - ); |
|
| 1149 | + ); |
|
| 1150 | 1150 | } |
| 1151 | 1151 | |
| 1152 | 1152 | $head = html_writer::start_tag('div', array( |
@@ -1232,7 +1232,7 @@ discard block |
||
| 1232 | 1232 | |
| 1233 | 1233 | $recordingtypes = html_writer::start_tag('div', |
| 1234 | 1234 | array('id' => 'playbacks-'.$recording['recordID'], 'data-imported' => $dataimported, |
| 1235 | - 'title' => $title, $visibility => $visibility)); |
|
| 1235 | + 'title' => $title, $visibility => $visibility)); |
|
| 1236 | 1236 | foreach ($recording['playbacks'] as $playback) { |
| 1237 | 1237 | $recordingtypes .= $OUTPUT->action_link($playback['url'], get_string('view_recording_format_'.$playback['type'], |
| 1238 | 1238 | 'bigbluebuttonbn'), null, array('title' => get_string('view_recording_format_'.$playback['type'], |
@@ -1274,7 +1274,7 @@ discard block |
||
| 1274 | 1274 | $payload['source'] = 'meta_contextactivitydescription'; |
| 1275 | 1275 | $metadescription = trim($recording[$payload['source']]); |
| 1276 | 1276 | if (!empty($metadescription)) { |
| 1277 | - return bigbluebuttonbn_get_recording_data_row_text($recording, $metadescription, $payload); |
|
| 1277 | + return bigbluebuttonbn_get_recording_data_row_text($recording, $metadescription, $payload); |
|
| 1278 | 1278 | } |
| 1279 | 1279 | } |
| 1280 | 1280 | |
@@ -1331,7 +1331,7 @@ discard block |
||
| 1331 | 1331 | 'onclick' => $onclick, |
| 1332 | 1332 | 'data-action' => $data['action'], |
| 1333 | 1333 | 'data-links' => bigbluebuttonbn_get_count_recording_imported_instances($recording['recordID']) |
| 1334 | - ); |
|
| 1334 | + ); |
|
| 1335 | 1335 | return $OUTPUT->action_icon('#', $icon, null, $linkattributes, false); |
| 1336 | 1336 | } |
| 1337 | 1337 | |
@@ -1932,22 +1932,22 @@ discard block |
||
| 1932 | 1932 | */ |
| 1933 | 1933 | function bigbluebuttonbn_get_cfg_options() { |
| 1934 | 1934 | return [ |
| 1935 | - 'voicebridge_editable' => bigbluebuttonbn_get_cfg_voicebridge_editable(), |
|
| 1936 | - 'recording_default' => bigbluebuttonbn_get_cfg_recording_default(), |
|
| 1937 | - 'recording_editable' => bigbluebuttonbn_get_cfg_recording_editable(), |
|
| 1938 | - 'waitformoderator_default' => bigbluebuttonbn_get_cfg_waitformoderator_default(), |
|
| 1939 | - 'waitformoderator_editable' => bigbluebuttonbn_get_cfg_waitformoderator_editable(), |
|
| 1940 | - 'userlimit_default' => bigbluebuttonbn_get_cfg_userlimit_default(), |
|
| 1941 | - 'userlimit_editable' => bigbluebuttonbn_get_cfg_userlimit_editable(), |
|
| 1942 | - 'preuploadpresentation_enabled' => bigbluebuttonbn_get_cfg_preuploadpresentation_enabled(), |
|
| 1943 | - 'sendnotifications_enabled' => bigbluebuttonbn_get_cfg_sendnotifications_enabled(), |
|
| 1944 | - 'recordings_html_default' => bigbluebuttonbn_get_cfg_recordings_html_default(), |
|
| 1945 | - 'recordings_html_editable' => bigbluebuttonbn_get_cfg_recordings_html_editable(), |
|
| 1946 | - 'recordings_deleted_activities_default' => bigbluebuttonbn_get_cfg_recordings_deleted_activities_default(), |
|
| 1947 | - 'recordings_deleted_activities_editable' => bigbluebuttonbn_get_cfg_recordings_deleted_activities_editable(), |
|
| 1948 | - 'recording_icons_enabled' => bigbluebuttonbn_get_cfg_recording_icons_enabled(), |
|
| 1949 | - 'instance_type_enabled' => bigbluebuttonbn_recordings_enabled(), |
|
| 1950 | - 'instance_type_default' => BIGBLUEBUTTONBN_TYPE_ALL, |
|
| 1935 | + 'voicebridge_editable' => bigbluebuttonbn_get_cfg_voicebridge_editable(), |
|
| 1936 | + 'recording_default' => bigbluebuttonbn_get_cfg_recording_default(), |
|
| 1937 | + 'recording_editable' => bigbluebuttonbn_get_cfg_recording_editable(), |
|
| 1938 | + 'waitformoderator_default' => bigbluebuttonbn_get_cfg_waitformoderator_default(), |
|
| 1939 | + 'waitformoderator_editable' => bigbluebuttonbn_get_cfg_waitformoderator_editable(), |
|
| 1940 | + 'userlimit_default' => bigbluebuttonbn_get_cfg_userlimit_default(), |
|
| 1941 | + 'userlimit_editable' => bigbluebuttonbn_get_cfg_userlimit_editable(), |
|
| 1942 | + 'preuploadpresentation_enabled' => bigbluebuttonbn_get_cfg_preuploadpresentation_enabled(), |
|
| 1943 | + 'sendnotifications_enabled' => bigbluebuttonbn_get_cfg_sendnotifications_enabled(), |
|
| 1944 | + 'recordings_html_default' => bigbluebuttonbn_get_cfg_recordings_html_default(), |
|
| 1945 | + 'recordings_html_editable' => bigbluebuttonbn_get_cfg_recordings_html_editable(), |
|
| 1946 | + 'recordings_deleted_activities_default' => bigbluebuttonbn_get_cfg_recordings_deleted_activities_default(), |
|
| 1947 | + 'recordings_deleted_activities_editable' => bigbluebuttonbn_get_cfg_recordings_deleted_activities_editable(), |
|
| 1948 | + 'recording_icons_enabled' => bigbluebuttonbn_get_cfg_recording_icons_enabled(), |
|
| 1949 | + 'instance_type_enabled' => bigbluebuttonbn_recordings_enabled(), |
|
| 1950 | + 'instance_type_default' => BIGBLUEBUTTONBN_TYPE_ALL, |
|
| 1951 | 1951 | ]; |
| 1952 | 1952 | } |
| 1953 | 1953 | |
@@ -2148,8 +2148,8 @@ discard block |
||
| 2148 | 2148 | $activitytime = ''; |
| 2149 | 2149 | if ($time) { |
| 2150 | 2150 | $activitytime = calendar_day_representation($time).' '. |
| 2151 | - get_string('mod_form_field_notification_msg_at', 'bigbluebuttonbn').' '. |
|
| 2152 | - calendar_time_representation($time); |
|
| 2151 | + get_string('mod_form_field_notification_msg_at', 'bigbluebuttonbn').' '. |
|
| 2152 | + calendar_time_representation($time); |
|
| 2153 | 2153 | } |
| 2154 | 2154 | |
| 2155 | 2155 | return $activitytime; |
@@ -27,7 +27,7 @@ discard block |
||
| 27 | 27 | |
| 28 | 28 | global $CFG; |
| 29 | 29 | |
| 30 | -require_once(dirname(__FILE__).'/lib.php'); |
|
| 30 | +require_once(dirname(__FILE__) . '/lib.php'); |
|
| 31 | 31 | |
| 32 | 32 | const BIGBLUEBUTTONBN_FORCED = true; |
| 33 | 33 | |
@@ -75,7 +75,7 @@ discard block |
||
| 75 | 75 | if (isset($meta)) { |
| 76 | 76 | $log->meta = $meta; |
| 77 | 77 | } else if ($event == BIGBLUEBUTTONBN_LOG_EVENT_CREATE) { |
| 78 | - $log->meta = '{"record":'.($bbbsession['record'] ? 'true' : 'false').'}'; |
|
| 78 | + $log->meta = '{"record":' . ($bbbsession['record'] ? 'true' : 'false') . '}'; |
|
| 79 | 79 | } |
| 80 | 80 | |
| 81 | 81 | $DB->insert_record('bigbluebuttonbn_logs', $log); |
@@ -145,19 +145,19 @@ discard block |
||
| 145 | 145 | * @param array $metadata |
| 146 | 146 | */ |
| 147 | 147 | function bigbluebuttonbn_bigbluebutton_action_url($action = '', $data = array(), $metadata = array()) { |
| 148 | - $baseurl = bigbluebuttonbn_get_cfg_server_url().'api/'.$action.'?'; |
|
| 148 | + $baseurl = bigbluebuttonbn_get_cfg_server_url() . 'api/' . $action . '?'; |
|
| 149 | 149 | |
| 150 | 150 | $params = ''; |
| 151 | 151 | |
| 152 | 152 | foreach ($data as $key => $value) { |
| 153 | - $params .= '&'.$key.'='.urlencode($value); |
|
| 153 | + $params .= '&' . $key . '=' . urlencode($value); |
|
| 154 | 154 | } |
| 155 | 155 | |
| 156 | 156 | foreach ($metadata as $key => $value) { |
| 157 | - $params .= '&'.'meta_'.$key.'='.urlencode($value); |
|
| 157 | + $params .= '&' . 'meta_' . $key . '=' . urlencode($value); |
|
| 158 | 158 | } |
| 159 | 159 | |
| 160 | - return $baseurl.$params.'&checksum='.sha1($action.$params.bigbluebuttonbn_get_cfg_shared_secret()); |
|
| 160 | + return $baseurl . $params . '&checksum=' . sha1($action . $params . bigbluebuttonbn_get_cfg_shared_secret()); |
|
| 161 | 161 | } |
| 162 | 162 | |
| 163 | 163 | function bigbluebuttonbn_get_create_meeting_array($meetingname, $meetingid, $welcomestring, $mpw, $apw, |
@@ -171,8 +171,8 @@ discard block |
||
| 171 | 171 | |
| 172 | 172 | if (!is_null($pname) && !is_null($purl)) { |
| 173 | 173 | $method = BIGBLUEBUTTONBN_METHOD_POST; |
| 174 | - $data = "<?xml version='1.0' encoding='UTF-8'?><modules><module name='presentation'><document url='". |
|
| 175 | - $purl."' /></module></modules>"; |
|
| 174 | + $data = "<?xml version='1.0' encoding='UTF-8'?><modules><module name='presentation'><document url='" . |
|
| 175 | + $purl . "' /></module></modules>"; |
|
| 176 | 176 | } |
| 177 | 177 | |
| 178 | 178 | $xml = bigbluebuttonbn_wrap_xml_load_file($createmeetingurl, $method, $data); |
@@ -217,7 +217,7 @@ discard block |
||
| 217 | 217 | 'moderatorPW' => $meeting->moderatorPW, |
| 218 | 218 | 'attendeePW' => $meeting->attendeePW, |
| 219 | 219 | 'hasBeenForciblyEnded' => $meeting->hasBeenForciblyEnded, |
| 220 | - 'running' => $meeting->running, ); |
|
| 220 | + 'running' => $meeting->running,); |
|
| 221 | 221 | } |
| 222 | 222 | |
| 223 | 223 | return $meetings; |
@@ -360,12 +360,12 @@ discard block |
||
| 360 | 360 | function bigbluebuttonbn_get_recordings_imported_array($courseid, $bigbluebuttonbnid = null, $subset = true) { |
| 361 | 361 | global $DB; |
| 362 | 362 | |
| 363 | - $select = "courseid = '{$courseid}' AND bigbluebuttonbnid <> '{$bigbluebuttonbnid}' AND log = '". |
|
| 364 | - BIGBLUEBUTTONBN_LOG_EVENT_IMPORT."'"; |
|
| 363 | + $select = "courseid = '{$courseid}' AND bigbluebuttonbnid <> '{$bigbluebuttonbnid}' AND log = '" . |
|
| 364 | + BIGBLUEBUTTONBN_LOG_EVENT_IMPORT . "'"; |
|
| 365 | 365 | if ($bigbluebuttonbnid === null) { |
| 366 | - $select = "courseid = '{$courseid}' AND log = '".BIGBLUEBUTTONBN_LOG_EVENT_IMPORT."'"; |
|
| 366 | + $select = "courseid = '{$courseid}' AND log = '" . BIGBLUEBUTTONBN_LOG_EVENT_IMPORT . "'"; |
|
| 367 | 367 | } else if ($subset) { |
| 368 | - $select = "bigbluebuttonbnid = '{$bigbluebuttonbnid}' AND log = '".BIGBLUEBUTTONBN_LOG_EVENT_IMPORT."'"; |
|
| 368 | + $select = "bigbluebuttonbnid = '{$bigbluebuttonbnid}' AND log = '" . BIGBLUEBUTTONBN_LOG_EVENT_IMPORT . "'"; |
|
| 369 | 369 | } |
| 370 | 370 | $recordsimported = $DB->get_records_select('bigbluebuttonbn_logs', $select); |
| 371 | 371 | |
@@ -400,26 +400,26 @@ discard block |
||
| 400 | 400 | function bigbluebuttonbn_get_default_config_xml_array() { |
| 401 | 401 | $defaultconfigxml = bigbluebuttonbn_getDefaultConfigXML(); |
| 402 | 402 | |
| 403 | - return (array) $defaultconfigxml; |
|
| 403 | + return (array)$defaultconfigxml; |
|
| 404 | 404 | } |
| 405 | 405 | |
| 406 | 406 | function bigbluebuttonbn_get_recording_array_value($recording) { |
| 407 | 407 | // Add formats. |
| 408 | 408 | $playbackarray = array(); |
| 409 | 409 | foreach ($recording->playback->format as $format) { |
| 410 | - $playbackarray[(string) $format->type] = array('type' => (string) $format->type, |
|
| 411 | - 'url' => (string) $format->url, 'length' => (string) $format->length); |
|
| 410 | + $playbackarray[(string)$format->type] = array('type' => (string)$format->type, |
|
| 411 | + 'url' => (string)$format->url, 'length' => (string)$format->length); |
|
| 412 | 412 | // Add preview per format when existing. |
| 413 | 413 | if ($format->preview) { |
| 414 | 414 | $imagesarray = array(); |
| 415 | 415 | foreach ($format->preview->images->image as $image) { |
| 416 | - $imagearray = array('url' => (string) $image); |
|
| 416 | + $imagearray = array('url' => (string)$image); |
|
| 417 | 417 | foreach ($image->attributes() as $attkey => $attvalue) { |
| 418 | - $imagearray[$attkey] = (string) $attvalue; |
|
| 418 | + $imagearray[$attkey] = (string)$attvalue; |
|
| 419 | 419 | } |
| 420 | 420 | array_push($imagesarray, $imagearray); |
| 421 | 421 | } |
| 422 | - $playbackarray[(string) $format->type]['preview'] = $imagesarray; |
|
| 422 | + $playbackarray[(string)$format->type]['preview'] = $imagesarray; |
|
| 423 | 423 | } |
| 424 | 424 | } |
| 425 | 425 | |
@@ -430,13 +430,13 @@ discard block |
||
| 430 | 430 | if (is_object($value)) { |
| 431 | 431 | $value = ''; |
| 432 | 432 | } |
| 433 | - $metadataarray['meta_'.$key] = $value; |
|
| 433 | + $metadataarray['meta_' . $key] = $value; |
|
| 434 | 434 | } |
| 435 | 435 | |
| 436 | - $recordingarrayvalue = array('recordID' => (string) $recording->recordID, |
|
| 437 | - 'meetingID' => (string) $recording->meetingID, 'meetingName' => (string) $recording->name, |
|
| 438 | - 'published' => (string) $recording->published, 'startTime' => (string) $recording->startTime, |
|
| 439 | - 'endTime' => (string) $recording->endTime, 'playbacks' => $playbackarray) + $metadataarray; |
|
| 436 | + $recordingarrayvalue = array('recordID' => (string)$recording->recordID, |
|
| 437 | + 'meetingID' => (string)$recording->meetingID, 'meetingName' => (string)$recording->name, |
|
| 438 | + 'published' => (string)$recording->published, 'startTime' => (string)$recording->startTime, |
|
| 439 | + 'endTime' => (string)$recording->endTime, 'playbacks' => $playbackarray) + $metadataarray; |
|
| 440 | 440 | |
| 441 | 441 | return $recordingarrayvalue; |
| 442 | 442 | } |
@@ -494,7 +494,7 @@ discard block |
||
| 494 | 494 | $ids = explode(',', $recordids); |
| 495 | 495 | foreach ($ids as $id) { |
| 496 | 496 | $xml = bigbluebuttonbn_wrap_xml_load_file( |
| 497 | - bigbluebuttonbn_bigbluebutton_action_url('updateRecordings', ['recordID' => $id] + (array) $params) |
|
| 497 | + bigbluebuttonbn_bigbluebutton_action_url('updateRecordings', ['recordID' => $id] + (array)$params) |
|
| 498 | 498 | ); |
| 499 | 499 | if ($xml && $xml->returncode != 'SUCCESS') { |
| 500 | 500 | return false; |
@@ -606,8 +606,8 @@ discard block |
||
| 606 | 606 | |
| 607 | 607 | $options = array(); |
| 608 | 608 | $options['CURLOPT_HTTPHEADER'] = array( |
| 609 | - 'Content-Type: '.$contenttype, |
|
| 610 | - 'Content-Length: '.strlen($data), |
|
| 609 | + 'Content-Type: ' . $contenttype, |
|
| 610 | + 'Content-Length: ' . strlen($data), |
|
| 611 | 611 | 'Content-Language: en-US', |
| 612 | 612 | ); |
| 613 | 613 | |
@@ -624,9 +624,9 @@ discard block |
||
| 624 | 624 | if ($userroles) { |
| 625 | 625 | $where = ''; |
| 626 | 626 | foreach ($userroles as $value) { |
| 627 | - $where .= (empty($where) ? ' WHERE' : ' AND').' id='.$value->roleid; |
|
| 627 | + $where .= (empty($where) ? ' WHERE' : ' AND') . ' id=' . $value->roleid; |
|
| 628 | 628 | } |
| 629 | - $userroles = $DB->get_records_sql('SELECT * FROM {role}'.$where); |
|
| 629 | + $userroles = $DB->get_records_sql('SELECT * FROM {role}' . $where); |
|
| 630 | 630 | } |
| 631 | 631 | |
| 632 | 632 | return $userroles; |
@@ -639,7 +639,7 @@ discard block |
||
| 639 | 639 | } |
| 640 | 640 | |
| 641 | 641 | function bigbluebuttonbn_get_users(context $context = null) { |
| 642 | - $users = (array) get_enrolled_users($context); |
|
| 642 | + $users = (array)get_enrolled_users($context); |
|
| 643 | 643 | foreach ($users as $key => $value) { |
| 644 | 644 | $users[$key] = fullname($value); |
| 645 | 645 | } |
@@ -647,7 +647,7 @@ discard block |
||
| 647 | 647 | } |
| 648 | 648 | |
| 649 | 649 | function bigbluebuttonbn_get_users_select(context $context = null) { |
| 650 | - $users = (array) get_enrolled_users($context); |
|
| 650 | + $users = (array)get_enrolled_users($context); |
|
| 651 | 651 | foreach ($users as $key => $value) { |
| 652 | 652 | $users[$key] = array('id' => $value->id, 'name' => fullname($value)); |
| 653 | 653 | } |
@@ -655,7 +655,7 @@ discard block |
||
| 655 | 655 | } |
| 656 | 656 | |
| 657 | 657 | function bigbluebuttonbn_get_roles(context $context = null) { |
| 658 | - $roles = (array) role_get_names($context); |
|
| 658 | + $roles = (array)role_get_names($context); |
|
| 659 | 659 | foreach ($roles as $key => $value) { |
| 660 | 660 | $roles[$key] = $value->localname; |
| 661 | 661 | } |
@@ -663,7 +663,7 @@ discard block |
||
| 663 | 663 | } |
| 664 | 664 | |
| 665 | 665 | function bigbluebuttonbn_get_roles_select(context $context = null) { |
| 666 | - $roles = (array) role_get_names($context); |
|
| 666 | + $roles = (array)role_get_names($context); |
|
| 667 | 667 | foreach ($roles as $key => $value) { |
| 668 | 668 | $roles[$key] = array('id' => $value->id, 'name' => $value->localname); |
| 669 | 669 | } |
@@ -671,7 +671,7 @@ discard block |
||
| 671 | 671 | } |
| 672 | 672 | |
| 673 | 673 | function bigbluebuttonbn_get_role($id) { |
| 674 | - $roles = (array) role_get_names(); |
|
| 674 | + $roles = (array)role_get_names(); |
|
| 675 | 675 | if (is_numeric($id)) { |
| 676 | 676 | return $roles[$id]; |
| 677 | 677 | } |
@@ -836,9 +836,9 @@ discard block |
||
| 836 | 836 | $isunique = true; |
| 837 | 837 | if ($voicebridge != 0) { |
| 838 | 838 | $table = 'bigbluebuttonbn'; |
| 839 | - $select = 'voicebridge = '.$voicebridge; |
|
| 839 | + $select = 'voicebridge = ' . $voicebridge; |
|
| 840 | 840 | if ($id) { |
| 841 | - $select .= ' AND id <> '.$id; |
|
| 841 | + $select .= ' AND id <> ' . $id; |
|
| 842 | 842 | } |
| 843 | 843 | if ($DB->get_records_select($table, $select)) { |
| 844 | 844 | $isunique = false; |
@@ -906,7 +906,7 @@ discard block |
||
| 906 | 906 | $mt = microtime(); |
| 907 | 907 | $rand = mt_rand(); |
| 908 | 908 | |
| 909 | - return md5($mt.$rand); |
|
| 909 | + return md5($mt . $rand); |
|
| 910 | 910 | } |
| 911 | 911 | |
| 912 | 912 | function bigbluebuttonbn_random_password($length = 8) { |
@@ -926,19 +926,19 @@ discard block |
||
| 926 | 926 | |
| 927 | 927 | function bigbluebuttonbn_events() { |
| 928 | 928 | return array( |
| 929 | - (string) BIGBLUEBUTTON_EVENT_ACTIVITY_VIEWED, |
|
| 930 | - (string) BIGBLUEBUTTON_EVENT_ACTIVITY_MANAGEMENT_VIEWED, |
|
| 931 | - (string) BIGBLUEBUTTON_EVENT_LIVE_SESSION, |
|
| 932 | - (string) BIGBLUEBUTTON_EVENT_MEETING_CREATED, |
|
| 933 | - (string) BIGBLUEBUTTON_EVENT_MEETING_ENDED, |
|
| 934 | - (string) BIGBLUEBUTTON_EVENT_MEETING_JOINED, |
|
| 935 | - (string) BIGBLUEBUTTON_EVENT_MEETING_LEFT, |
|
| 936 | - (string) BIGBLUEBUTTON_EVENT_RECORDING_DELETED, |
|
| 937 | - (string) BIGBLUEBUTTON_EVENT_RECORDING_IMPORTED, |
|
| 938 | - (string) BIGBLUEBUTTON_EVENT_RECORDING_PROTECTED, |
|
| 939 | - (string) BIGBLUEBUTTON_EVENT_RECORDING_PUBLISHED, |
|
| 940 | - (string) BIGBLUEBUTTON_EVENT_RECORDING_UNPROTECTED, |
|
| 941 | - (string) BIGBLUEBUTTON_EVENT_RECORDING_UNPUBLISHED |
|
| 929 | + (string)BIGBLUEBUTTON_EVENT_ACTIVITY_VIEWED, |
|
| 930 | + (string)BIGBLUEBUTTON_EVENT_ACTIVITY_MANAGEMENT_VIEWED, |
|
| 931 | + (string)BIGBLUEBUTTON_EVENT_LIVE_SESSION, |
|
| 932 | + (string)BIGBLUEBUTTON_EVENT_MEETING_CREATED, |
|
| 933 | + (string)BIGBLUEBUTTON_EVENT_MEETING_ENDED, |
|
| 934 | + (string)BIGBLUEBUTTON_EVENT_MEETING_JOINED, |
|
| 935 | + (string)BIGBLUEBUTTON_EVENT_MEETING_LEFT, |
|
| 936 | + (string)BIGBLUEBUTTON_EVENT_RECORDING_DELETED, |
|
| 937 | + (string)BIGBLUEBUTTON_EVENT_RECORDING_IMPORTED, |
|
| 938 | + (string)BIGBLUEBUTTON_EVENT_RECORDING_PROTECTED, |
|
| 939 | + (string)BIGBLUEBUTTON_EVENT_RECORDING_PUBLISHED, |
|
| 940 | + (string)BIGBLUEBUTTON_EVENT_RECORDING_UNPROTECTED, |
|
| 941 | + (string)BIGBLUEBUTTON_EVENT_RECORDING_UNPUBLISHED |
|
| 942 | 942 | ); |
| 943 | 943 | } |
| 944 | 944 | |
@@ -960,7 +960,7 @@ discard block |
||
| 960 | 960 | $eventproperties['timecreated'] = $timecreated; |
| 961 | 961 | $eventproperties['other'] = $eventsubtype; |
| 962 | 962 | } |
| 963 | - $event = call_user_func_array('\mod_bigbluebuttonbn\event\bigbluebuttonbn_'.$eventtype.'::create', |
|
| 963 | + $event = call_user_func_array('\mod_bigbluebuttonbn\event\bigbluebuttonbn_' . $eventtype . '::create', |
|
| 964 | 964 | array($eventproperties)); |
| 965 | 965 | $event->trigger(); |
| 966 | 966 | } |
@@ -1002,11 +1002,11 @@ discard block |
||
| 1002 | 1002 | $now = time(); |
| 1003 | 1003 | if (!$forced && isset($result) && $now < ($result['creation_time'] + $cachettl)) { |
| 1004 | 1004 | // Use the value in the cache. |
| 1005 | - return (array) json_decode($result['meeting_info']); |
|
| 1005 | + return (array)json_decode($result['meeting_info']); |
|
| 1006 | 1006 | } |
| 1007 | 1007 | |
| 1008 | 1008 | // Ping again and refresh the cache. |
| 1009 | - $meetinginfo = (array) bigbluebuttonbn_wrap_xml_load_file( |
|
| 1009 | + $meetinginfo = (array)bigbluebuttonbn_wrap_xml_load_file( |
|
| 1010 | 1010 | bigbluebuttonbn_bigbluebutton_action_url('getMeetingInfo', ['meetingID' => $meetingid]) |
| 1011 | 1011 | ); |
| 1012 | 1012 | $cache->set($meetingid, array('creation_time' => time(), 'meeting_info' => json_encode($meetinginfo))); |
@@ -1060,8 +1060,8 @@ discard block |
||
| 1060 | 1060 | * @param string $configxml |
| 1061 | 1061 | */ |
| 1062 | 1062 | function bigbluebuttonbn_set_config_xml_params($meetingid, $configxml) { |
| 1063 | - $params = 'configXML='.urlencode($configxml).'&meetingID='.urlencode($meetingid); |
|
| 1064 | - $configxmlparams = $params.'&checksum='.sha1('setConfigXML'.$params.bigbluebuttonbn_get_cfg_shared_secret()); |
|
| 1063 | + $params = 'configXML=' . urlencode($configxml) . '&meetingID=' . urlencode($meetingid); |
|
| 1064 | + $configxmlparams = $params . '&checksum=' . sha1('setConfigXML' . $params . bigbluebuttonbn_get_cfg_shared_secret()); |
|
| 1065 | 1065 | |
| 1066 | 1066 | return $configxmlparams; |
| 1067 | 1067 | } |
@@ -1071,7 +1071,7 @@ discard block |
||
| 1071 | 1071 | * @param string $configxml |
| 1072 | 1072 | */ |
| 1073 | 1073 | function bigbluebuttonbn_set_config_xml($meetingid, $configxml) { |
| 1074 | - $urldefaultconfig = bigbluebuttonbn_get_cfg_server_url().'api/setConfigXML?'; |
|
| 1074 | + $urldefaultconfig = bigbluebuttonbn_get_cfg_server_url() . 'api/setConfigXML?'; |
|
| 1075 | 1075 | $configxmlparams = bigbluebuttonbn_set_config_xml_params($meetingid, $configxml); |
| 1076 | 1076 | $xml = bigbluebuttonbn_wrap_xml_load_file($urldefaultconfig, BIGBLUEBUTTONBN_METHOD_POST, |
| 1077 | 1077 | $configxmlparams, 'application/x-www-form-urlencoded'); |
@@ -1085,7 +1085,7 @@ discard block |
||
| 1085 | 1085 | */ |
| 1086 | 1086 | function bigbluebuttonbn_set_config_xml_array($meetingid, $configxml) { |
| 1087 | 1087 | $configxml = bigbluebuttonbn_setConfigXML($meetingid, $configxml); |
| 1088 | - $configxmlarray = (array) $configxml; |
|
| 1088 | + $configxmlarray = (array)$configxml; |
|
| 1089 | 1089 | if ($configxmlarray['returncode'] != 'SUCCESS') { |
| 1090 | 1090 | //debugging('BigBlueButton was not able to set the custom config.xml file', DEBUG_DEVELOPER); |
| 1091 | 1091 | return ''; |
@@ -1122,7 +1122,7 @@ discard block |
||
| 1122 | 1122 | $starttime = $starttime - ($starttime % 1000); |
| 1123 | 1123 | |
| 1124 | 1124 | // Set formatted date. |
| 1125 | - $dateformat = get_string('strftimerecentfull', 'langconfig').' %Z'; |
|
| 1125 | + $dateformat = get_string('strftimerecentfull', 'langconfig') . ' %Z'; |
|
| 1126 | 1126 | $row->date_formatted = userdate($starttime / 1000, $dateformat, usertimezone($USER->timezone)); |
| 1127 | 1127 | |
| 1128 | 1128 | // Set formatted duration. |
@@ -1197,7 +1197,7 @@ discard block |
||
| 1197 | 1197 | } |
| 1198 | 1198 | |
| 1199 | 1199 | $recordingpreview = html_writer::start_tag('div', |
| 1200 | - array('id' => 'preview-'.$recording['recordID'], $visibility => $visibility)); |
|
| 1200 | + array('id' => 'preview-' . $recording['recordID'], $visibility => $visibility)); |
|
| 1201 | 1201 | foreach ($recording['playbacks'] as $playback) { |
| 1202 | 1202 | if (isset($playback['preview'])) { |
| 1203 | 1203 | foreach ($playback['preview'] as $image) { |
@@ -1231,12 +1231,12 @@ discard block |
||
| 1231 | 1231 | } |
| 1232 | 1232 | |
| 1233 | 1233 | $recordingtypes = html_writer::start_tag('div', |
| 1234 | - array('id' => 'playbacks-'.$recording['recordID'], 'data-imported' => $dataimported, |
|
| 1234 | + array('id' => 'playbacks-' . $recording['recordID'], 'data-imported' => $dataimported, |
|
| 1235 | 1235 | 'title' => $title, $visibility => $visibility)); |
| 1236 | 1236 | foreach ($recording['playbacks'] as $playback) { |
| 1237 | - $recordingtypes .= $OUTPUT->action_link($playback['url'], get_string('view_recording_format_'.$playback['type'], |
|
| 1238 | - 'bigbluebuttonbn'), null, array('title' => get_string('view_recording_format_'.$playback['type'], |
|
| 1239 | - 'bigbluebuttonbn'), 'target' => '_new')).' '; |
|
| 1237 | + $recordingtypes .= $OUTPUT->action_link($playback['url'], get_string('view_recording_format_' . $playback['type'], |
|
| 1238 | + 'bigbluebuttonbn'), null, array('title' => get_string('view_recording_format_' . $playback['type'], |
|
| 1239 | + 'bigbluebuttonbn'), 'target' => '_new')) . ' '; |
|
| 1240 | 1240 | } |
| 1241 | 1241 | $recordingtypes .= html_writer::end_tag('div'); |
| 1242 | 1242 | |
@@ -1319,11 +1319,11 @@ discard block |
||
| 1319 | 1319 | $target .= '-' . $data['target']; |
| 1320 | 1320 | } |
| 1321 | 1321 | $id = 'recording-' . $target . '-' . $recording['recordID']; |
| 1322 | - $onclick = 'M.mod_bigbluebuttonbn.recordings.recording_'.$data['action'].'(this);'; |
|
| 1322 | + $onclick = 'M.mod_bigbluebuttonbn.recordings.recording_' . $data['action'] . '(this);'; |
|
| 1323 | 1323 | if (bigbluebuttonbn_get_cfg_recording_icons_enabled()) { |
| 1324 | 1324 | // With icon for $manageaction. |
| 1325 | 1325 | $iconattributes = array('id' => $id, 'class' => 'iconsmall'); |
| 1326 | - $icon = new pix_icon('i/'.$data['tag'], |
|
| 1326 | + $icon = new pix_icon('i/' . $data['tag'], |
|
| 1327 | 1327 | get_string('view_recording_list_actionbar_' . $data['action'], 'bigbluebuttonbn'), |
| 1328 | 1328 | 'moodle', $iconattributes); |
| 1329 | 1329 | $linkattributes = array( |
@@ -1414,7 +1414,7 @@ discard block |
||
| 1414 | 1414 | // There are recordings for this meeting. |
| 1415 | 1415 | foreach ($recordings as $recording) { |
| 1416 | 1416 | $row = new html_table_row(); |
| 1417 | - $row->id = 'recording-td-'.$recording['recordID']; |
|
| 1417 | + $row->id = 'recording-td-' . $recording['recordID']; |
|
| 1418 | 1418 | $row->attributes['data-imported'] = 'false'; |
| 1419 | 1419 | $texthead = ''; |
| 1420 | 1420 | $texttail = ''; |
@@ -1428,9 +1428,9 @@ discard block |
||
| 1428 | 1428 | $rowdata = bigbluebuttonbn_get_recording_data_row($bbbsession, $recording, $tools); |
| 1429 | 1429 | if ($rowdata != null) { |
| 1430 | 1430 | $rowdata->date_formatted = str_replace(' ', ' ', $rowdata->date_formatted); |
| 1431 | - $row->cells = array($texthead.$rowdata->recording.$texttail, |
|
| 1432 | - $texthead.$rowdata->activity.$texttail, $texthead.$rowdata->description.$texttail, |
|
| 1433 | - $rowdata->preview, $texthead.$rowdata->date_formatted.$texttail, |
|
| 1431 | + $row->cells = array($texthead . $rowdata->recording . $texttail, |
|
| 1432 | + $texthead . $rowdata->activity . $texttail, $texthead . $rowdata->description . $texttail, |
|
| 1433 | + $rowdata->preview, $texthead . $rowdata->date_formatted . $texttail, |
|
| 1434 | 1434 | $rowdata->duration_formatted); |
| 1435 | 1435 | if ($bbbsession['managerecordings']) { |
| 1436 | 1436 | $row->cells[] = $rowdata->actionbar; |
@@ -1452,9 +1452,9 @@ discard block |
||
| 1452 | 1452 | // Build the message_body. |
| 1453 | 1453 | $msg->activity_type = ''; |
| 1454 | 1454 | $msg->activity_title = $bigbluebuttonbn->name; |
| 1455 | - $messagetext = '<p>'.get_string('email_body_recording_ready_for', 'bigbluebuttonbn').' '. |
|
| 1456 | - $msg->activity_type.' "'.$msg->activity_title.'" '. |
|
| 1457 | - get_string('email_body_recording_ready_is_ready', 'bigbluebuttonbn').'.</p>'; |
|
| 1455 | + $messagetext = '<p>' . get_string('email_body_recording_ready_for', 'bigbluebuttonbn') . ' ' . |
|
| 1456 | + $msg->activity_type . ' "' . $msg->activity_title . '" ' . |
|
| 1457 | + get_string('email_body_recording_ready_is_ready', 'bigbluebuttonbn') . '.</p>'; |
|
| 1458 | 1458 | |
| 1459 | 1459 | bigbluebuttonbn_send_notification($sender, $bigbluebuttonbn, $messagetext); |
| 1460 | 1460 | } |
@@ -1480,15 +1480,15 @@ discard block |
||
| 1480 | 1480 | global $CFG; |
| 1481 | 1481 | |
| 1482 | 1482 | if (isset($CFG->bigbluebuttonbn['server_url'])) { |
| 1483 | - return trim(trim($CFG->bigbluebuttonbn['server_url']), '/').'/'; |
|
| 1483 | + return trim(trim($CFG->bigbluebuttonbn['server_url']), '/') . '/'; |
|
| 1484 | 1484 | } |
| 1485 | 1485 | |
| 1486 | 1486 | if (isset($CFG->bigbluebuttonbn_server_url)) { |
| 1487 | - return trim(trim($CFG->bigbluebuttonbn_server_url), '/').'/'; |
|
| 1487 | + return trim(trim($CFG->bigbluebuttonbn_server_url), '/') . '/'; |
|
| 1488 | 1488 | } |
| 1489 | 1489 | |
| 1490 | 1490 | if (isset($CFG->BigBlueButtonBNServerURL)) { |
| 1491 | - return trim(trim($CFG->BigBlueButtonBNServerURL), '/').'/'; |
|
| 1491 | + return trim(trim($CFG->BigBlueButtonBNServerURL), '/') . '/'; |
|
| 1492 | 1492 | } |
| 1493 | 1493 | |
| 1494 | 1494 | return BIGBLUEBUTTONBN_DEFAULT_SERVER_URL; |
@@ -2025,15 +2025,15 @@ discard block |
||
| 2025 | 2025 | |
| 2026 | 2026 | // Gather the bigbluebuttonbnids whose meetingids should be included in the getRecordings request'. |
| 2027 | 2027 | $select = "id <> '{$bigbluebuttonbnid}' AND course = '{$courseid}'"; |
| 2028 | - $selectdeleted = "courseid = '{$courseid}' AND bigbluebuttonbnid <> '{$bigbluebuttonbnid}' AND log = '". |
|
| 2029 | - BIGBLUEBUTTONBN_LOG_EVENT_DELETE."' AND meta like '%has_recordings%' AND meta like '%true%'"; |
|
| 2028 | + $selectdeleted = "courseid = '{$courseid}' AND bigbluebuttonbnid <> '{$bigbluebuttonbnid}' AND log = '" . |
|
| 2029 | + BIGBLUEBUTTONBN_LOG_EVENT_DELETE . "' AND meta like '%has_recordings%' AND meta like '%true%'"; |
|
| 2030 | 2030 | if ($bigbluebuttonbnid === null) { |
| 2031 | 2031 | $select = "course = '{$courseid}'"; |
| 2032 | - $selectdeleted = "courseid = '{$courseid}' AND log = '".BIGBLUEBUTTONBN_LOG_EVENT_DELETE. |
|
| 2032 | + $selectdeleted = "courseid = '{$courseid}' AND log = '" . BIGBLUEBUTTONBN_LOG_EVENT_DELETE . |
|
| 2033 | 2033 | "' AND meta like '%has_recordings%' AND meta like '%true%'"; |
| 2034 | 2034 | } else if ($subset) { |
| 2035 | 2035 | $select = "id = '{$bigbluebuttonbnid}'"; |
| 2036 | - $selectdeleted = "bigbluebuttonbnid = '{$bigbluebuttonbnid}' AND log = '".BIGBLUEBUTTONBN_LOG_EVENT_DELETE. |
|
| 2036 | + $selectdeleted = "bigbluebuttonbnid = '{$bigbluebuttonbnid}' AND log = '" . BIGBLUEBUTTONBN_LOG_EVENT_DELETE . |
|
| 2037 | 2037 | "' AND meta like '%has_recordings%' AND meta like '%true%'"; |
| 2038 | 2038 | } |
| 2039 | 2039 | $bigbluebuttonbns = $DB->get_records_select_menu('bigbluebuttonbn', $select, null, 'id', 'id, meetingid'); |
@@ -2055,7 +2055,7 @@ discard block |
||
| 2055 | 2055 | if (!empty($bigbluebuttonbns)) { |
| 2056 | 2056 | // Prepare select for loading records based on existent bigbluebuttonbns. |
| 2057 | 2057 | $sql = 'SELECT DISTINCT meetingid, bigbluebuttonbnid FROM {bigbluebuttonbn_logs} WHERE '; |
| 2058 | - $sql .= '(bigbluebuttonbnid='.implode(' OR bigbluebuttonbnid=', array_keys($bigbluebuttonbns)).')'; |
|
| 2058 | + $sql .= '(bigbluebuttonbnid=' . implode(' OR bigbluebuttonbnid=', array_keys($bigbluebuttonbns)) . ')'; |
|
| 2059 | 2059 | // Include only Create events and exclude those with record not true. |
| 2060 | 2060 | $sql .= ' AND log = ? AND meta LIKE ? AND meta LIKE ?'; |
| 2061 | 2061 | // Execute select for loading records based on existent bigbluebuttonbns. |
@@ -2147,8 +2147,8 @@ discard block |
||
| 2147 | 2147 | function bigbluebuttonbn_format_activity_time($time) { |
| 2148 | 2148 | $activitytime = ''; |
| 2149 | 2149 | if ($time) { |
| 2150 | - $activitytime = calendar_day_representation($time).' '. |
|
| 2151 | - get_string('mod_form_field_notification_msg_at', 'bigbluebuttonbn').' '. |
|
| 2150 | + $activitytime = calendar_day_representation($time) . ' ' . |
|
| 2151 | + get_string('mod_form_field_notification_msg_at', 'bigbluebuttonbn') . ' ' . |
|
| 2152 | 2152 | calendar_time_representation($time); |
| 2153 | 2153 | } |
| 2154 | 2154 | |
@@ -272,11 +272,11 @@ discard block |
||
| 272 | 272 | |
| 273 | 273 | echo $OUTPUT->box_start('generalbox boxaligncenter'); |
| 274 | 274 | echo '<br><div class="alert alert-warning">'.get_string('view_groups_selection_warning', 'bigbluebuttonbn'). |
| 275 | - '</div>'; |
|
| 275 | + '</div>'; |
|
| 276 | 276 | echo $OUTPUT->box_end(); |
| 277 | 277 | |
| 278 | 278 | groups_print_activity_menu( |
| 279 | - $bbbsession['cm'], $CFG->wwwroot.'/mod/bigbluebuttonbn/view.php?id='.$bbbsession['cm']->id, false, $onlyexistentgroups); |
|
| 279 | + $bbbsession['cm'], $CFG->wwwroot.'/mod/bigbluebuttonbn/view.php?id='.$bbbsession['cm']->id, false, $onlyexistentgroups); |
|
| 280 | 280 | echo '<br><br>'; |
| 281 | 281 | } |
| 282 | 282 | |
@@ -388,7 +388,7 @@ discard block |
||
| 388 | 388 | // JavaScript variables for recordings. |
| 389 | 389 | $jsvars += array( |
| 390 | 390 | 'recordings_html' => $bbbsession['bigbluebuttonbn']->recordings_html == '1', |
| 391 | - ); |
|
| 391 | + ); |
|
| 392 | 392 | |
| 393 | 393 | // If there are meetings with recordings load the data to the table. |
| 394 | 394 | if ($bbbsession['bigbluebuttonbn']->recordings_html) { |
@@ -400,7 +400,7 @@ discard block |
||
| 400 | 400 | $jsvars += array( |
| 401 | 401 | 'columns' => bigbluebuttonbn_get_recording_columns($bbbsession), |
| 402 | 402 | 'data' => bigbluebuttonbn_get_recording_data($bbbsession, $recordings), |
| 403 | - ); |
|
| 403 | + ); |
|
| 404 | 404 | |
| 405 | 405 | // Render a YUI table. |
| 406 | 406 | return html_writer::div('', '', array('id' => 'bigbluebuttonbn_yui_table')); |
@@ -411,10 +411,10 @@ discard block |
||
| 411 | 411 | |
| 412 | 412 | $button = html_writer::tag('input', '', |
| 413 | 413 | array('type' => 'button', |
| 414 | - 'value' => get_string('view_recording_button_import', 'bigbluebuttonbn'), |
|
| 415 | - 'class' => 'btn btn-secondary', |
|
| 416 | - 'onclick' => 'window.location=\''.$CFG->wwwroot.'/mod/bigbluebuttonbn/import_view.php?bn='. |
|
| 417 | - $bbbsession['bigbluebuttonbn']->id.'\'')); |
|
| 414 | + 'value' => get_string('view_recording_button_import', 'bigbluebuttonbn'), |
|
| 415 | + 'class' => 'btn btn-secondary', |
|
| 416 | + 'onclick' => 'window.location=\''.$CFG->wwwroot.'/mod/bigbluebuttonbn/import_view.php?bn='. |
|
| 417 | + $bbbsession['bigbluebuttonbn']->id.'\'')); |
|
| 418 | 418 | $output = html_writer::start_tag('br'); |
| 419 | 419 | $output .= html_writer::tag('span', $button, array('id' => 'import_recording_links_button')); |
| 420 | 420 | $output .= html_writer::tag('span', '', array('id' => 'import_recording_links_table')); |
@@ -432,7 +432,7 @@ discard block |
||
| 432 | 432 | return '<h4>'.get_string('view_section_title_presentation', 'bigbluebuttonbn').'</h4>'. |
| 433 | 433 | ''.$OUTPUT->action_icon($bbbsession['presentation']['url'], $icon, null, array(), false).''. |
| 434 | 434 | ''.$OUTPUT->action_link($bbbsession['presentation']['url'], |
| 435 | - $bbbsession['presentation']['name'], null, $attributes).'<br><br>'; |
|
| 435 | + $bbbsession['presentation']['name'], null, $attributes).'<br><br>'; |
|
| 436 | 436 | } |
| 437 | 437 | |
| 438 | 438 | return ''; |
@@ -23,8 +23,8 @@ discard block |
||
| 23 | 23 | * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v2 or later |
| 24 | 24 | */ |
| 25 | 25 | |
| 26 | -require_once(dirname(dirname(dirname(__FILE__))).'/config.php'); |
|
| 27 | -require_once(dirname(__FILE__).'/locallib.php'); |
|
| 26 | +require_once(dirname(dirname(dirname(__FILE__))) . '/config.php'); |
|
| 27 | +require_once(dirname(__FILE__) . '/locallib.php'); |
|
| 28 | 28 | |
| 29 | 29 | $id = required_param('id', PARAM_INT); |
| 30 | 30 | $b = optional_param('n', 0, PARAM_INT); |
@@ -59,18 +59,18 @@ discard block |
||
| 59 | 59 | if (is_null($serverversion)) { |
| 60 | 60 | if ($bbbsession['administrator']) { |
| 61 | 61 | print_error('view_error_unable_join', 'bigbluebuttonbn', |
| 62 | - $CFG->wwwroot.'/admin/settings.php?section=modsettingbigbluebuttonbn'); |
|
| 62 | + $CFG->wwwroot . '/admin/settings.php?section=modsettingbigbluebuttonbn'); |
|
| 63 | 63 | exit; |
| 64 | 64 | } |
| 65 | 65 | |
| 66 | 66 | if ($bbbsession['moderator']) { |
| 67 | 67 | print_error('view_error_unable_join_teacher', 'bigbluebuttonbn', |
| 68 | - $CFG->wwwroot.'/course/view.php?id='.$bigbluebuttonbn->course); |
|
| 68 | + $CFG->wwwroot . '/course/view.php?id=' . $bigbluebuttonbn->course); |
|
| 69 | 69 | exit; |
| 70 | 70 | } |
| 71 | 71 | |
| 72 | 72 | print_error('view_error_unable_join_student', 'bigbluebuttonbn', |
| 73 | - $CFG->wwwroot.'/course/view.php?id='.$bigbluebuttonbn->course); |
|
| 73 | + $CFG->wwwroot . '/course/view.php?id=' . $bigbluebuttonbn->course); |
|
| 74 | 74 | exit; |
| 75 | 75 | } |
| 76 | 76 | |
@@ -80,7 +80,7 @@ discard block |
||
| 80 | 80 | |
| 81 | 81 | // Print the page header. |
| 82 | 82 | $PAGE->set_context($context); |
| 83 | -$PAGE->set_url($CFG->wwwroot.'/mod/bigbluebuttonbn/view.php', array('id' => $cm->id)); |
|
| 83 | +$PAGE->set_url($CFG->wwwroot . '/mod/bigbluebuttonbn/view.php', array('id' => $cm->id)); |
|
| 84 | 84 | $PAGE->set_title(format_string($bigbluebuttonbn->name)); |
| 85 | 85 | $PAGE->set_cacheable(false); |
| 86 | 86 | $PAGE->set_heading($course->fullname); |
@@ -90,26 +90,26 @@ discard block |
||
| 90 | 90 | if (!has_capability('moodle/category:manage', $context) && !has_capability('mod/bigbluebuttonbn:join', $context)) { |
| 91 | 91 | echo $OUTPUT->header(); |
| 92 | 92 | if (isguestuser()) { |
| 93 | - echo $OUTPUT->confirm('<p>'.get_string('view_noguests', 'bigbluebuttonbn').'</p>'.get_string('liketologin'), |
|
| 94 | - get_login_url(), $CFG->wwwroot.'/course/view.php?id='.$course->id); |
|
| 93 | + echo $OUTPUT->confirm('<p>' . get_string('view_noguests', 'bigbluebuttonbn') . '</p>' . get_string('liketologin'), |
|
| 94 | + get_login_url(), $CFG->wwwroot . '/course/view.php?id=' . $course->id); |
|
| 95 | 95 | } else { |
| 96 | - echo $OUTPUT->confirm('<p>'.get_string('view_nojoin', 'bigbluebuttonbn').'</p>'.get_string('liketologin'), |
|
| 97 | - get_login_url(), $CFG->wwwroot.'/course/view.php?id='.$course->id); |
|
| 96 | + echo $OUTPUT->confirm('<p>' . get_string('view_nojoin', 'bigbluebuttonbn') . '</p>' . get_string('liketologin'), |
|
| 97 | + get_login_url(), $CFG->wwwroot . '/course/view.php?id=' . $course->id); |
|
| 98 | 98 | } |
| 99 | 99 | echo $OUTPUT->footer(); |
| 100 | 100 | exit; |
| 101 | 101 | } |
| 102 | 102 | |
| 103 | 103 | // Operation URLs. |
| 104 | -$bbbsession['courseURL'] = $CFG->wwwroot.'/course/view.php?id='.$bigbluebuttonbn->course; |
|
| 105 | -$bbbsession['logoutURL'] = $CFG->wwwroot.'/mod/bigbluebuttonbn/bbb_view.php?action=logout&id='.$id. |
|
| 106 | - '&bn='.$bbbsession['bigbluebuttonbn']->id; |
|
| 107 | -$bbbsession['recordingReadyURL'] = $CFG->wwwroot.'/mod/bigbluebuttonbn/bbb_broker.php?action=recording_'. |
|
| 108 | - 'ready&bigbluebuttonbn='.$bbbsession['bigbluebuttonbn']->id; |
|
| 109 | -$bbbsession['meetingEventsURL'] = $CFG->wwwroot.'/mod/bigbluebuttonbn/bbb_broker.php?action=meeting'. |
|
| 110 | - '_events&bigbluebuttonbn='.$bbbsession['bigbluebuttonbn']->id; |
|
| 111 | -$bbbsession['joinURL'] = $CFG->wwwroot.'/mod/bigbluebuttonbn/bbb_view.php?action=join&id='.$id. |
|
| 112 | - '&bigbluebuttonbn='.$bbbsession['bigbluebuttonbn']->id; |
|
| 104 | +$bbbsession['courseURL'] = $CFG->wwwroot . '/course/view.php?id=' . $bigbluebuttonbn->course; |
|
| 105 | +$bbbsession['logoutURL'] = $CFG->wwwroot . '/mod/bigbluebuttonbn/bbb_view.php?action=logout&id=' . $id . |
|
| 106 | + '&bn=' . $bbbsession['bigbluebuttonbn']->id; |
|
| 107 | +$bbbsession['recordingReadyURL'] = $CFG->wwwroot . '/mod/bigbluebuttonbn/bbb_broker.php?action=recording_' . |
|
| 108 | + 'ready&bigbluebuttonbn=' . $bbbsession['bigbluebuttonbn']->id; |
|
| 109 | +$bbbsession['meetingEventsURL'] = $CFG->wwwroot . '/mod/bigbluebuttonbn/bbb_broker.php?action=meeting' . |
|
| 110 | + '_events&bigbluebuttonbn=' . $bbbsession['bigbluebuttonbn']->id; |
|
| 111 | +$bbbsession['joinURL'] = $CFG->wwwroot . '/mod/bigbluebuttonbn/bbb_view.php?action=join&id=' . $id . |
|
| 112 | + '&bigbluebuttonbn=' . $bbbsession['bigbluebuttonbn']->id; |
|
| 113 | 113 | |
| 114 | 114 | // Output starts. |
| 115 | 115 | echo $OUTPUT->header(); |
@@ -122,7 +122,7 @@ discard block |
||
| 122 | 122 | echo $OUTPUT->footer(); |
| 123 | 123 | |
| 124 | 124 | // Shows version as a comment. |
| 125 | -echo '<!-- '.$bbbsession['originTag'].' -->'."\n"; |
|
| 125 | +echo '<!-- ' . $bbbsession['originTag'] . ' -->' . "\n"; |
|
| 126 | 126 | |
| 127 | 127 | // Initialize session variable used across views. |
| 128 | 128 | $SESSION->bigbluebuttonbn_bbbsession = $bbbsession; |
@@ -156,7 +156,7 @@ discard block |
||
| 156 | 156 | $bbbsession['viewerPW'] = $bigbluebuttonbn->viewerpass; |
| 157 | 157 | |
| 158 | 158 | // Database info related to the activity. |
| 159 | - $bbbsession['meetingid'] = $bbbsession['bigbluebuttonbn']->meetingid.'-'.$bbbsession['course']->id.'-'. |
|
| 159 | + $bbbsession['meetingid'] = $bbbsession['bigbluebuttonbn']->meetingid . '-' . $bbbsession['course']->id . '-' . |
|
| 160 | 160 | $bbbsession['bigbluebuttonbn']->id; |
| 161 | 161 | $bbbsession['meetingname'] = $bbbsession['bigbluebuttonbn']->name; |
| 162 | 162 | $bbbsession['meetingdescription'] = $bigbluebuttonbn->intro; |
@@ -177,7 +177,7 @@ discard block |
||
| 177 | 177 | $bbbsession['welcome'] = get_string('mod_form_field_welcome_default', 'bigbluebuttonbn'); |
| 178 | 178 | } |
| 179 | 179 | if ($bigbluebuttonbn->record) { |
| 180 | - $bbbsession['welcome'] .= '<br><br>'.get_string('bbbrecordwarning', 'bigbluebuttonbn'); |
|
| 180 | + $bbbsession['welcome'] .= '<br><br>' . get_string('bbbrecordwarning', 'bigbluebuttonbn'); |
|
| 181 | 181 | } |
| 182 | 182 | |
| 183 | 183 | $bbbsession['openingtime'] = $bigbluebuttonbn->openingtime; |
@@ -193,7 +193,7 @@ discard block |
||
| 193 | 193 | $bbbsession['originServerName'] = $parsedurl['host']; |
| 194 | 194 | $bbbsession['originServerUrl'] = $CFG->wwwroot; |
| 195 | 195 | $bbbsession['originServerCommonName'] = ''; |
| 196 | - $bbbsession['originTag'] = 'moodle-mod_bigbluebuttonbn ('.get_config('mod_bigbluebuttonbn', 'version').')'; |
|
| 196 | + $bbbsession['originTag'] = 'moodle-mod_bigbluebuttonbn (' . get_config('mod_bigbluebuttonbn', 'version') . ')'; |
|
| 197 | 197 | } |
| 198 | 198 | |
| 199 | 199 | function bigbluebuttonbn_view_get_activity_status(&$bbbsession, $bigbluebuttonbn) { |
@@ -245,10 +245,10 @@ discard block |
||
| 245 | 245 | $bbbsession['group'] = groups_get_activity_group($bbbsession['cm'], true); |
| 246 | 246 | |
| 247 | 247 | // Assign group default values. |
| 248 | - $bbbsession['meetingid'] = $bbbsession['bigbluebuttonbn']->meetingid.'-'.$bbbsession['course']->id.'-'. |
|
| 249 | - $bbbsession['bigbluebuttonbn']->id.'['.$bbbsession['group'].']'; |
|
| 248 | + $bbbsession['meetingid'] = $bbbsession['bigbluebuttonbn']->meetingid . '-' . $bbbsession['course']->id . '-' . |
|
| 249 | + $bbbsession['bigbluebuttonbn']->id . '[' . $bbbsession['group'] . ']'; |
|
| 250 | 250 | $groupname = get_string('allparticipants'); |
| 251 | - $bbbsession['meetingname'] = $bbbsession['bigbluebuttonbn']->name.' ('.$groupname.')'; |
|
| 251 | + $bbbsession['meetingname'] = $bbbsession['bigbluebuttonbn']->name . ' (' . $groupname . ')'; |
|
| 252 | 252 | |
| 253 | 253 | |
| 254 | 254 | if (sizeof($groups) == 0) { |
@@ -260,10 +260,10 @@ discard block |
||
| 260 | 260 | $bbbsession['group'] = array_values($groups)[0]->id; |
| 261 | 261 | } |
| 262 | 262 | |
| 263 | - $bbbsession['meetingid'] = $bbbsession['bigbluebuttonbn']->meetingid.'-'.$bbbsession['course']->id.'-'. |
|
| 264 | - $bbbsession['bigbluebuttonbn']->id.'['.$bbbsession['group'].']'; |
|
| 263 | + $bbbsession['meetingid'] = $bbbsession['bigbluebuttonbn']->meetingid . '-' . $bbbsession['course']->id . '-' . |
|
| 264 | + $bbbsession['bigbluebuttonbn']->id . '[' . $bbbsession['group'] . ']'; |
|
| 265 | 265 | $groupname = groups_get_group_name($bbbsession['group']); |
| 266 | - $bbbsession['meetingname'] = $bbbsession['bigbluebuttonbn']->name.' ('.$groupname.')'; |
|
| 266 | + $bbbsession['meetingname'] = $bbbsession['bigbluebuttonbn']->name . ' (' . $groupname . ')'; |
|
| 267 | 267 | |
| 268 | 268 | if (sizeof($groups) == 1) { |
| 269 | 269 | // There only one group and the user has access to. |
@@ -271,12 +271,12 @@ discard block |
||
| 271 | 271 | } |
| 272 | 272 | |
| 273 | 273 | echo $OUTPUT->box_start('generalbox boxaligncenter'); |
| 274 | - echo '<br><div class="alert alert-warning">'.get_string('view_groups_selection_warning', 'bigbluebuttonbn'). |
|
| 274 | + echo '<br><div class="alert alert-warning">' . get_string('view_groups_selection_warning', 'bigbluebuttonbn') . |
|
| 275 | 275 | '</div>'; |
| 276 | 276 | echo $OUTPUT->box_end(); |
| 277 | 277 | |
| 278 | 278 | groups_print_activity_menu( |
| 279 | - $bbbsession['cm'], $CFG->wwwroot.'/mod/bigbluebuttonbn/view.php?id='.$bbbsession['cm']->id, false, $onlyexistentgroups); |
|
| 279 | + $bbbsession['cm'], $CFG->wwwroot . '/mod/bigbluebuttonbn/view.php?id=' . $bbbsession['cm']->id, false, $onlyexistentgroups); |
|
| 280 | 280 | echo '<br><br>'; |
| 281 | 281 | } |
| 282 | 282 | |
@@ -322,7 +322,7 @@ discard block |
||
| 322 | 322 | 'M.mod_bigbluebuttonbn.recordings.init', array($jsvars)); |
| 323 | 323 | } |
| 324 | 324 | |
| 325 | - $output .= html_writer::empty_tag('br').html_writer::empty_tag('br').html_writer::empty_tag('br'); |
|
| 325 | + $output .= html_writer::empty_tag('br') . html_writer::empty_tag('br') . html_writer::empty_tag('br'); |
|
| 326 | 326 | |
| 327 | 327 | echo $output; |
| 328 | 328 | |
@@ -335,12 +335,12 @@ discard block |
||
| 335 | 335 | // JavaScript variables for room. |
| 336 | 336 | $openingtime = ''; |
| 337 | 337 | if ($bbbsession['openingtime']) { |
| 338 | - $openingtime = get_string('mod_form_field_openingtime', 'bigbluebuttonbn').': '. |
|
| 338 | + $openingtime = get_string('mod_form_field_openingtime', 'bigbluebuttonbn') . ': ' . |
|
| 339 | 339 | userdate($bbbsession['openingtime']); |
| 340 | 340 | } |
| 341 | 341 | $closingtime = ''; |
| 342 | 342 | if ($bbbsession['closingtime']) { |
| 343 | - $closingtime = get_string('mod_form_field_closingtime', 'bigbluebuttonbn').': '. |
|
| 343 | + $closingtime = get_string('mod_form_field_closingtime', 'bigbluebuttonbn') . ': ' . |
|
| 344 | 344 | userdate($bbbsession['closingtime']); |
| 345 | 345 | } |
| 346 | 346 | $jsvars += array( |
@@ -357,7 +357,7 @@ discard block |
||
| 357 | 357 | $output .= $OUTPUT->box_end(); |
| 358 | 358 | |
| 359 | 359 | $output .= $OUTPUT->box_start('generalbox boxaligncenter', 'bigbluebuttonbn_view_action_button_box'); |
| 360 | - $output .= '<br><br><span id="join_button"></span> <span id="end_button"></span>'."\n"; |
|
| 360 | + $output .= '<br><br><span id="join_button"></span> <span id="end_button"></span>' . "\n"; |
|
| 361 | 361 | $output .= $OUTPUT->box_end(); |
| 362 | 362 | |
| 363 | 363 | if ($activity == 'ended') { |
@@ -393,7 +393,7 @@ discard block |
||
| 393 | 393 | // If there are meetings with recordings load the data to the table. |
| 394 | 394 | if ($bbbsession['bigbluebuttonbn']->recordings_html) { |
| 395 | 395 | // Render a plain html table. |
| 396 | - return bigbluebutton_output_recording_table($bbbsession, $recordings)."\n"; |
|
| 396 | + return bigbluebutton_output_recording_table($bbbsession, $recordings) . "\n"; |
|
| 397 | 397 | } |
| 398 | 398 | |
| 399 | 399 | // JavaScript variables for recordings with YUI. |
@@ -413,8 +413,8 @@ discard block |
||
| 413 | 413 | array('type' => 'button', |
| 414 | 414 | 'value' => get_string('view_recording_button_import', 'bigbluebuttonbn'), |
| 415 | 415 | 'class' => 'btn btn-secondary', |
| 416 | - 'onclick' => 'window.location=\''.$CFG->wwwroot.'/mod/bigbluebuttonbn/import_view.php?bn='. |
|
| 417 | - $bbbsession['bigbluebuttonbn']->id.'\'')); |
|
| 416 | + 'onclick' => 'window.location=\'' . $CFG->wwwroot . '/mod/bigbluebuttonbn/import_view.php?bn=' . |
|
| 417 | + $bbbsession['bigbluebuttonbn']->id . '\'')); |
|
| 418 | 418 | $output = html_writer::start_tag('br'); |
| 419 | 419 | $output .= html_writer::tag('span', $button, array('id' => 'import_recording_links_button')); |
| 420 | 420 | $output .= html_writer::tag('span', '', array('id' => 'import_recording_links_table')); |
@@ -429,10 +429,10 @@ discard block |
||
| 429 | 429 | $attributes = array('title' => $bbbsession['presentation']['name']); |
| 430 | 430 | $icon = new pix_icon($bbbsession['presentation']['icon'], $bbbsession['presentation']['mimetype_description']); |
| 431 | 431 | |
| 432 | - return '<h4>'.get_string('view_section_title_presentation', 'bigbluebuttonbn').'</h4>'. |
|
| 433 | - ''.$OUTPUT->action_icon($bbbsession['presentation']['url'], $icon, null, array(), false).''. |
|
| 434 | - ''.$OUTPUT->action_link($bbbsession['presentation']['url'], |
|
| 435 | - $bbbsession['presentation']['name'], null, $attributes).'<br><br>'; |
|
| 432 | + return '<h4>' . get_string('view_section_title_presentation', 'bigbluebuttonbn') . '</h4>' . |
|
| 433 | + '' . $OUTPUT->action_icon($bbbsession['presentation']['url'], $icon, null, array(), false) . '' . |
|
| 434 | + '' . $OUTPUT->action_link($bbbsession['presentation']['url'], |
|
| 435 | + $bbbsession['presentation']['name'], null, $attributes) . '<br><br>'; |
|
| 436 | 436 | } |
| 437 | 437 | |
| 438 | 438 | return ''; |