@@ -25,7 +25,7 @@ |
||
25 | 25 | |
26 | 26 | defined('MOODLE_INTERNAL') || die(); |
27 | 27 | |
28 | -require_once($CFG->dirroot.'/mod/bigbluebuttonbn/backup/moodle2/restore_bigbluebuttonbn_stepslib.php'); |
|
28 | +require_once($CFG->dirroot . '/mod/bigbluebuttonbn/backup/moodle2/restore_bigbluebuttonbn_stepslib.php'); |
|
29 | 29 | |
30 | 30 | /** |
31 | 31 | * Restore task that provides all the settings and steps to perform one complete restore of the activity. |
@@ -198,10 +198,10 @@ discard block |
||
198 | 198 | */ |
199 | 199 | function bigbluebutton_bbb_view_create_meeting_data(&$bbbsession) { |
200 | 200 | $data = ['meetingID' => $bbbsession['meetingid'], |
201 | - 'name' => bigbluebuttonbn_html2text($bbbsession['meetingname'], 64), |
|
202 | - 'attendeePW' => $bbbsession['viewerPW'], |
|
203 | - 'moderatorPW' => $bbbsession['modPW'], |
|
204 | - 'logoutURL' => $bbbsession['logoutURL'], |
|
201 | + 'name' => bigbluebuttonbn_html2text($bbbsession['meetingname'], 64), |
|
202 | + 'attendeePW' => $bbbsession['viewerPW'], |
|
203 | + 'moderatorPW' => $bbbsession['modPW'], |
|
204 | + 'logoutURL' => $bbbsession['logoutURL'], |
|
205 | 205 | ]; |
206 | 206 | $data['record'] = bigbluebutton_bbb_view_create_meeting_data_record($bbbsession['record']); |
207 | 207 | $data['welcome'] = trim($bbbsession['welcome']); |
@@ -214,7 +214,7 @@ discard block |
||
214 | 214 | '%duration%', |
215 | 215 | (string) $durationtime, |
216 | 216 | get_string('bbbdurationwarning', 'bigbluebuttonbn') |
217 | - ); |
|
217 | + ); |
|
218 | 218 | } |
219 | 219 | $voicebridge = intval($bbbsession['voicebridge']); |
220 | 220 | if ($voicebridge > 0 && $voicebridge < 79999) { |
@@ -253,22 +253,22 @@ discard block |
||
253 | 253 | function bigbluebutton_bbb_view_create_meeting_metadata(&$bbbsession) { |
254 | 254 | global $USER; |
255 | 255 | $metadata = ['bbb-origin' => $bbbsession['origin'], |
256 | - 'bbb-origin-version' => $bbbsession['originVersion'], |
|
257 | - 'bbb-origin-server-name' => $bbbsession['originServerName'], |
|
258 | - 'bbb-origin-server-common-name' => $bbbsession['originServerCommonName'], |
|
259 | - 'bbb-origin-tag' => $bbbsession['originTag'], |
|
260 | - 'bbb-context' => $bbbsession['course']->fullname, |
|
261 | - 'bbb-recording-name' => bigbluebuttonbn_html2text($bbbsession['meetingname'], 64), |
|
262 | - 'bbb-recording-description' => bigbluebuttonbn_html2text($bbbsession['meetingdescription'], 64), |
|
263 | - 'bbb-recording-tags' => bigbluebuttonbn_get_tags($bbbsession['cm']->id), // Same as $id. |
|
256 | + 'bbb-origin-version' => $bbbsession['originVersion'], |
|
257 | + 'bbb-origin-server-name' => $bbbsession['originServerName'], |
|
258 | + 'bbb-origin-server-common-name' => $bbbsession['originServerCommonName'], |
|
259 | + 'bbb-origin-tag' => $bbbsession['originTag'], |
|
260 | + 'bbb-context' => $bbbsession['course']->fullname, |
|
261 | + 'bbb-recording-name' => bigbluebuttonbn_html2text($bbbsession['meetingname'], 64), |
|
262 | + 'bbb-recording-description' => bigbluebuttonbn_html2text($bbbsession['meetingdescription'], 64), |
|
263 | + 'bbb-recording-tags' => bigbluebuttonbn_get_tags($bbbsession['cm']->id), // Same as $id. |
|
264 | 264 | ]; |
265 | 265 | if ((boolean)\mod_bigbluebuttonbn\locallib\config::get('recordingstatus_enabled')) { |
266 | 266 | $metadata["bn-recording-status"] = json_encode( |
267 | 267 | array( |
268 | 268 | 'email' => array('"' . fullname($USER) . '" <' . $USER->email . '>'), |
269 | 269 | 'context' => $bbbsession['bigbluebuttonbnURL'] |
270 | - ) |
|
271 | - ); |
|
270 | + ) |
|
271 | + ); |
|
272 | 272 | } |
273 | 273 | if ((boolean)\mod_bigbluebuttonbn\locallib\config::get('recordingready_enabled')) { |
274 | 274 | $metadata['bn-recording-ready-url'] = $bbbsession['recordingReadyURL']; |
@@ -62,91 +62,91 @@ |
||
62 | 62 | } |
63 | 63 | |
64 | 64 | switch (strtolower($action)) { |
65 | - case 'logout': |
|
66 | - if (isset($errors) && $errors != '') { |
|
67 | - bigbluebutton_bbb_view_errors($errors, $id); |
|
68 | - break; |
|
69 | - } |
|
70 | - if (is_null($bbbsession)) { |
|
71 | - bigbluebutton_bbb_view_close_window_manually(); |
|
72 | - break; |
|
73 | - } |
|
74 | - // Moodle event logger: Create an event for meeting left. |
|
75 | - bigbluebuttonbn_event_log(BIGBLUEBUTTON_EVENT_MEETING_LEFT, $bigbluebuttonbn, $cm); |
|
76 | - // Update the cache. |
|
77 | - $meetinginfo = bigbluebuttonbn_get_meeting_info($bbbsession['meetingid'], BIGBLUEBUTTONBN_UPDATE_CACHE); |
|
78 | - // Close the tab or window where BBB was opened. |
|
79 | - bigbluebutton_bbb_view_close_window(); |
|
80 | - break; |
|
81 | - case 'join': |
|
82 | - if (is_null($bbbsession)) { |
|
83 | - print_error('view_error_unable_join', 'bigbluebuttonbn'); |
|
84 | - break; |
|
85 | - } |
|
86 | - // See if the session is in progress. |
|
87 | - if (bigbluebuttonbn_is_meeting_running($bbbsession['meetingid'])) { |
|
88 | - // Since the meeting is already running, we just join the session. |
|
89 | - bigbluebutton_bbb_view_join_meeting($bbbsession, $cm, $bigbluebuttonbn); |
|
90 | - break; |
|
91 | - } |
|
92 | - // If user is not administrator nor moderator (user is steudent) and waiting is required. |
|
93 | - if (!$bbbsession['administrator'] && !$bbbsession['moderator'] && $bbbsession['wait']) { |
|
94 | - header('Location: '.$bbbsession['logoutURL']); |
|
65 | + case 'logout': |
|
66 | + if (isset($errors) && $errors != '') { |
|
67 | + bigbluebutton_bbb_view_errors($errors, $id); |
|
68 | + break; |
|
69 | + } |
|
70 | + if (is_null($bbbsession)) { |
|
71 | + bigbluebutton_bbb_view_close_window_manually(); |
|
72 | + break; |
|
73 | + } |
|
74 | + // Moodle event logger: Create an event for meeting left. |
|
75 | + bigbluebuttonbn_event_log(BIGBLUEBUTTON_EVENT_MEETING_LEFT, $bigbluebuttonbn, $cm); |
|
76 | + // Update the cache. |
|
77 | + $meetinginfo = bigbluebuttonbn_get_meeting_info($bbbsession['meetingid'], BIGBLUEBUTTONBN_UPDATE_CACHE); |
|
78 | + // Close the tab or window where BBB was opened. |
|
79 | + bigbluebutton_bbb_view_close_window(); |
|
95 | 80 | break; |
96 | - } |
|
97 | - // As the meeting doesn't exist, try to create it. |
|
98 | - $response = bigbluebuttonbn_get_create_meeting_array( |
|
99 | - bigbluebutton_bbb_view_create_meeting_data($bbbsession), |
|
100 | - bigbluebutton_bbb_view_create_meeting_metadata($bbbsession), |
|
101 | - $bbbsession['presentation']['name'], |
|
102 | - $bbbsession['presentation']['url'] |
|
103 | - ); |
|
104 | - if (empty($response)) { |
|
105 | - // The server is unreachable. |
|
106 | - if ($bbbsession['administrator']) { |
|
107 | - print_error('view_error_unable_join', 'bigbluebuttonbn', |
|
108 | - $CFG->wwwroot.'/admin/settings.php?section=modsettingbigbluebuttonbn'); |
|
81 | + case 'join': |
|
82 | + if (is_null($bbbsession)) { |
|
83 | + print_error('view_error_unable_join', 'bigbluebuttonbn'); |
|
84 | + break; |
|
85 | + } |
|
86 | + // See if the session is in progress. |
|
87 | + if (bigbluebuttonbn_is_meeting_running($bbbsession['meetingid'])) { |
|
88 | + // Since the meeting is already running, we just join the session. |
|
89 | + bigbluebutton_bbb_view_join_meeting($bbbsession, $cm, $bigbluebuttonbn); |
|
109 | 90 | break; |
110 | 91 | } |
111 | - if ($bbbsession['moderator']) { |
|
112 | - print_error('view_error_unable_join_teacher', 'bigbluebuttonbn', |
|
92 | + // If user is not administrator nor moderator (user is steudent) and waiting is required. |
|
93 | + if (!$bbbsession['administrator'] && !$bbbsession['moderator'] && $bbbsession['wait']) { |
|
94 | + header('Location: '.$bbbsession['logoutURL']); |
|
95 | + break; |
|
96 | + } |
|
97 | + // As the meeting doesn't exist, try to create it. |
|
98 | + $response = bigbluebuttonbn_get_create_meeting_array( |
|
99 | + bigbluebutton_bbb_view_create_meeting_data($bbbsession), |
|
100 | + bigbluebutton_bbb_view_create_meeting_metadata($bbbsession), |
|
101 | + $bbbsession['presentation']['name'], |
|
102 | + $bbbsession['presentation']['url'] |
|
103 | + ); |
|
104 | + if (empty($response)) { |
|
105 | + // The server is unreachable. |
|
106 | + if ($bbbsession['administrator']) { |
|
107 | + print_error('view_error_unable_join', 'bigbluebuttonbn', |
|
108 | + $CFG->wwwroot.'/admin/settings.php?section=modsettingbigbluebuttonbn'); |
|
109 | + break; |
|
110 | + } |
|
111 | + if ($bbbsession['moderator']) { |
|
112 | + print_error('view_error_unable_join_teacher', 'bigbluebuttonbn', |
|
113 | + $CFG->wwwroot.'/admin/settings.php?section=modsettingbigbluebuttonbn'); |
|
114 | + break; |
|
115 | + } |
|
116 | + print_error('view_error_unable_join_student', 'bigbluebuttonbn', |
|
113 | 117 | $CFG->wwwroot.'/admin/settings.php?section=modsettingbigbluebuttonbn'); |
114 | 118 | break; |
115 | 119 | } |
116 | - print_error('view_error_unable_join_student', 'bigbluebuttonbn', |
|
117 | - $CFG->wwwroot.'/admin/settings.php?section=modsettingbigbluebuttonbn'); |
|
118 | - break; |
|
119 | - } |
|
120 | - if ($response['returncode'] == 'FAILED') { |
|
121 | - // The meeting was not created. |
|
122 | - if (!$printerrorkey) { |
|
123 | - print_error($response['message'], 'bigbluebuttonbn'); |
|
120 | + if ($response['returncode'] == 'FAILED') { |
|
121 | + // The meeting was not created. |
|
122 | + if (!$printerrorkey) { |
|
123 | + print_error($response['message'], 'bigbluebuttonbn'); |
|
124 | + break; |
|
125 | + } |
|
126 | + $printerrorkey = bigbluebuttonbn_get_error_key($response['messageKey'], 'view_error_create'); |
|
127 | + print_error($printerrorkey, 'bigbluebuttonbn'); |
|
128 | + break; |
|
129 | + } |
|
130 | + if ($response['hasBeenForciblyEnded'] == 'true') { |
|
131 | + print_error(get_string('index_error_forciblyended', 'bigbluebuttonbn')); |
|
124 | 132 | break; |
125 | 133 | } |
126 | - $printerrorkey = bigbluebuttonbn_get_error_key($response['messageKey'], 'view_error_create'); |
|
127 | - print_error($printerrorkey, 'bigbluebuttonbn'); |
|
134 | + // Moodle event logger: Create an event for meeting created. |
|
135 | + bigbluebuttonbn_event_log(BIGBLUEBUTTON_EVENT_MEETING_CREATED, $bigbluebuttonbn, $cm); |
|
136 | + // Internal logger: Insert a record with the meeting created. |
|
137 | + bigbluebuttonbn_logs($bbbsession, BIGBLUEBUTTONBN_LOG_EVENT_CREATE); |
|
138 | + // Since the meeting is already running, we just join the session. |
|
139 | + bigbluebutton_bbb_view_join_meeting($bbbsession, $cm, $bigbluebuttonbn); |
|
128 | 140 | break; |
129 | - } |
|
130 | - if ($response['hasBeenForciblyEnded'] == 'true') { |
|
131 | - print_error(get_string('index_error_forciblyended', 'bigbluebuttonbn')); |
|
141 | + case 'play': |
|
142 | + $href = bigbluebutton_bbb_view_playback_href($href, $mid, $rid, $rtype); |
|
143 | + // Moodle event logger: Create an event for meeting left. |
|
144 | + bigbluebuttonbn_event_log(BIGBLUEBUTTON_EVENT_RECORDING_VIEWED, $bigbluebuttonbn, $cm, ['other' => $rid]); |
|
145 | + // Execute the redirect. |
|
146 | + header('Location: '.urldecode($href)); |
|
132 | 147 | break; |
133 | - } |
|
134 | - // Moodle event logger: Create an event for meeting created. |
|
135 | - bigbluebuttonbn_event_log(BIGBLUEBUTTON_EVENT_MEETING_CREATED, $bigbluebuttonbn, $cm); |
|
136 | - // Internal logger: Insert a record with the meeting created. |
|
137 | - bigbluebuttonbn_logs($bbbsession, BIGBLUEBUTTONBN_LOG_EVENT_CREATE); |
|
138 | - // Since the meeting is already running, we just join the session. |
|
139 | - bigbluebutton_bbb_view_join_meeting($bbbsession, $cm, $bigbluebuttonbn); |
|
140 | - break; |
|
141 | - case 'play': |
|
142 | - $href = bigbluebutton_bbb_view_playback_href($href, $mid, $rid, $rtype); |
|
143 | - // Moodle event logger: Create an event for meeting left. |
|
144 | - bigbluebuttonbn_event_log(BIGBLUEBUTTON_EVENT_RECORDING_VIEWED, $bigbluebuttonbn, $cm, ['other' => $rid]); |
|
145 | - // Execute the redirect. |
|
146 | - header('Location: '.urldecode($href)); |
|
147 | - break; |
|
148 | - default: |
|
149 | - bigbluebutton_bbb_view_close_window(); |
|
148 | + default: |
|
149 | + bigbluebutton_bbb_view_close_window(); |
|
150 | 150 | } |
151 | 151 | |
152 | 152 | /** |
@@ -23,8 +23,8 @@ discard block |
||
23 | 23 | * @author Jesus Federico (jesus [at] blindsidenetworks [dt] com) |
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 | $action = required_param('action', PARAM_TEXT); |
30 | 30 | $id = optional_param('id', 0, PARAM_INT); |
@@ -91,7 +91,7 @@ discard block |
||
91 | 91 | } |
92 | 92 | // If user is not administrator nor moderator (user is steudent) and waiting is required. |
93 | 93 | if (!$bbbsession['administrator'] && !$bbbsession['moderator'] && $bbbsession['wait']) { |
94 | - header('Location: '.$bbbsession['logoutURL']); |
|
94 | + header('Location: ' . $bbbsession['logoutURL']); |
|
95 | 95 | break; |
96 | 96 | } |
97 | 97 | // As the meeting doesn't exist, try to create it. |
@@ -105,16 +105,16 @@ discard block |
||
105 | 105 | // The server is unreachable. |
106 | 106 | if ($bbbsession['administrator']) { |
107 | 107 | print_error('view_error_unable_join', 'bigbluebuttonbn', |
108 | - $CFG->wwwroot.'/admin/settings.php?section=modsettingbigbluebuttonbn'); |
|
108 | + $CFG->wwwroot . '/admin/settings.php?section=modsettingbigbluebuttonbn'); |
|
109 | 109 | break; |
110 | 110 | } |
111 | 111 | if ($bbbsession['moderator']) { |
112 | 112 | print_error('view_error_unable_join_teacher', 'bigbluebuttonbn', |
113 | - $CFG->wwwroot.'/admin/settings.php?section=modsettingbigbluebuttonbn'); |
|
113 | + $CFG->wwwroot . '/admin/settings.php?section=modsettingbigbluebuttonbn'); |
|
114 | 114 | break; |
115 | 115 | } |
116 | 116 | print_error('view_error_unable_join_student', 'bigbluebuttonbn', |
117 | - $CFG->wwwroot.'/admin/settings.php?section=modsettingbigbluebuttonbn'); |
|
117 | + $CFG->wwwroot . '/admin/settings.php?section=modsettingbigbluebuttonbn'); |
|
118 | 118 | break; |
119 | 119 | } |
120 | 120 | if ($response['returncode'] == 'FAILED') { |
@@ -143,7 +143,7 @@ discard block |
||
143 | 143 | // Moodle event logger: Create an event for meeting left. |
144 | 144 | bigbluebuttonbn_event_log(BIGBLUEBUTTON_EVENT_RECORDING_VIEWED, $bigbluebuttonbn, $cm, ['other' => $rid]); |
145 | 145 | // Execute the redirect. |
146 | - header('Location: '.urldecode($href)); |
|
146 | + header('Location: ' . urldecode($href)); |
|
147 | 147 | break; |
148 | 148 | default: |
149 | 149 | bigbluebutton_bbb_view_close_window(); |
@@ -228,7 +228,7 @@ discard block |
||
228 | 228 | $data['welcome'] .= '<br><br>'; |
229 | 229 | $data['welcome'] .= str_replace( |
230 | 230 | '%duration%', |
231 | - (string) $durationtime, |
|
231 | + (string)$durationtime, |
|
232 | 232 | get_string('bbbdurationwarning', 'bigbluebuttonbn') |
233 | 233 | ); |
234 | 234 | } |
@@ -316,7 +316,7 @@ discard block |
||
316 | 316 | $meetinginfo = bigbluebuttonbn_get_meeting_info($bbbsession['meetingid'], BIGBLUEBUTTONBN_UPDATE_CACHE); |
317 | 317 | if ($bbbsession['userlimit'] > 0 && intval($meetinginfo['participantCount']) >= $bbbsession['userlimit']) { |
318 | 318 | // No more users allowed to join. |
319 | - header('Location: '.$bbbsession['logoutURL']); |
|
319 | + header('Location: ' . $bbbsession['logoutURL']); |
|
320 | 320 | return; |
321 | 321 | } |
322 | 322 | // Build the URL. |
@@ -334,7 +334,7 @@ discard block |
||
334 | 334 | bigbluebuttonbn_participant_joined($bbbsession['meetingid'], |
335 | 335 | ($bbbsession['administrator'] || $bbbsession['moderator'])); |
336 | 336 | // Execute the redirect. |
337 | - header('Location: '.$joinurl); |
|
337 | + header('Location: ' . $joinurl); |
|
338 | 338 | } |
339 | 339 | |
340 | 340 | /** |
@@ -346,13 +346,13 @@ discard block |
||
346 | 346 | */ |
347 | 347 | function bigbluebutton_bbb_view_errors($serrors, $id) { |
348 | 348 | global $CFG, $OUTPUT; |
349 | - $errors = (array) json_decode(urldecode($serrors)); |
|
349 | + $errors = (array)json_decode(urldecode($serrors)); |
|
350 | 350 | $msgerrors = ''; |
351 | 351 | foreach ($errors as $error) { |
352 | - $msgerrors .= html_writer::tag('p', $error->{'message'}, array('class' => 'alert alert-danger'))."\n"; |
|
352 | + $msgerrors .= html_writer::tag('p', $error->{'message'}, array('class' => 'alert alert-danger')) . "\n"; |
|
353 | 353 | } |
354 | 354 | echo $OUTPUT->header(); |
355 | 355 | print_error('view_error_bigbluebutton', 'bigbluebuttonbn', |
356 | - $CFG->wwwroot.'/mod/bigbluebuttonbn/view.php?id='.$id, $msgerrors, $serrors); |
|
356 | + $CFG->wwwroot . '/mod/bigbluebuttonbn/view.php?id=' . $id, $msgerrors, $serrors); |
|
357 | 357 | echo $OUTPUT->footer(); |
358 | 358 | } |
@@ -97,7 +97,7 @@ discard block |
||
97 | 97 | * @uses FEATURE_GRADE_OUTCOMES |
98 | 98 | * @uses FEATURE_SHOW_DESCRIPTION |
99 | 99 | * @param string $feature |
100 | - * @return mixed True if yes (some features may use other values) |
|
100 | + * @return null|boolean True if yes (some features may use other values) |
|
101 | 101 | */ |
102 | 102 | function bigbluebuttonbn_supports($feature) { |
103 | 103 | if (!$feature) { |
@@ -239,7 +239,7 @@ discard block |
||
239 | 239 | * @param object $mod |
240 | 240 | * @param object $bigbluebuttonbn |
241 | 241 | * |
242 | - * @return bool |
|
242 | + * @return string |
|
243 | 243 | */ |
244 | 244 | function bigbluebuttonbn_user_outline($course, $user, $mod, $bigbluebuttonbn) { |
245 | 245 | global $DB; |
@@ -542,7 +542,7 @@ discard block |
||
542 | 542 | * @param stdClass $context context object |
543 | 543 | * @param string $filearea file area |
544 | 544 | * |
545 | - * @return false|null false if file not valid |
|
545 | + * @return boolean false if file not valid |
|
546 | 546 | */ |
547 | 547 | function bigbluebuttonbn_pluginfile_valid($context, $filearea) { |
548 | 548 | if ($context->contextlevel != CONTEXT_MODULE) { |
@@ -61,7 +61,7 @@ discard block |
||
61 | 61 | * Remove this block when restored |
62 | 62 | */ |
63 | 63 | |
64 | - /** @var BIGBLUEBUTTONBN_DEFAULT_SERVER_URL string of default bigbluebutton server url */ |
|
64 | + /** @var BIGBLUEBUTTONBN_DEFAULT_SERVER_URL string of default bigbluebutton server url */ |
|
65 | 65 | const BIGBLUEBUTTONBN_DEFAULT_SERVER_URL = 'http://test-install.blindsidenetworks.com/bigbluebutton/'; |
66 | 66 | /** @var BIGBLUEBUTTONBN_DEFAULT_SHARED_SECRET string of default bigbluebutton server shared secret */ |
67 | 67 | const BIGBLUEBUTTONBN_DEFAULT_SHARED_SECRET = '8cd8ef52e8e101574e400365b55e11a6'; |
@@ -338,12 +338,12 @@ discard block |
||
338 | 338 | $str = '<div class="bigbluebuttonbn overview">'."\n"; |
339 | 339 | $str .= ' <div class="name">'.get_string('modulename', 'bigbluebuttonbn').': '."\n"; |
340 | 340 | $str .= ' <a '.$classes.'href="'.$CFG->wwwroot.'/mod/bigbluebuttonbn/view.php?id='.$bigbluebuttonbn->coursemodule. |
341 | - '">'.$bigbluebuttonbn->name.'</a>'."\n"; |
|
341 | + '">'.$bigbluebuttonbn->name.'</a>'."\n"; |
|
342 | 342 | $str .= ' </div>'."\n"; |
343 | 343 | $str .= ' <div class="info">'.get_string($start, 'bigbluebuttonbn').': '.userdate($bigbluebuttonbn->openingtime). |
344 | 344 | '</div>'."\n"; |
345 | 345 | $str .= ' <div class="info">'.get_string('ends_at', 'bigbluebuttonbn').': '.userdate($bigbluebuttonbn->closingtime) |
346 | - .'</div>'."\n"; |
|
346 | + .'</div>'."\n"; |
|
347 | 347 | $str .= '</div>'."\n"; |
348 | 348 | return $str; |
349 | 349 | } |
@@ -726,7 +726,7 @@ discard block |
||
726 | 726 | * @return \core_calendar\local\event\entities\action_interface|null |
727 | 727 | */ |
728 | 728 | function mod_bigbluebuttonbn_core_calendar_provide_event_action(calendar_event $event, |
729 | - \core_calendar\action_factory $factory) { |
|
729 | + \core_calendar\action_factory $factory) { |
|
730 | 730 | $cm = get_fast_modinfo($event->courseid)->instances['bigbluebuttonbn'][$event->instance]; |
731 | 731 | |
732 | 732 | $completion = new \completion_info($cm->get_course()); |
@@ -28,29 +28,29 @@ discard block |
||
28 | 28 | |
29 | 29 | global $CFG; |
30 | 30 | |
31 | -require_once($CFG->dirroot.'/calendar/lib.php'); |
|
32 | -require_once($CFG->dirroot.'/message/lib.php'); |
|
33 | -require_once($CFG->dirroot.'/mod/lti/OAuth.php'); |
|
34 | -require_once($CFG->dirroot.'/tag/lib.php'); |
|
35 | -require_once($CFG->libdir.'/accesslib.php'); |
|
36 | -require_once($CFG->libdir.'/completionlib.php'); |
|
37 | -require_once($CFG->libdir.'/datalib.php'); |
|
38 | -require_once($CFG->libdir.'/coursecatlib.php'); |
|
39 | -require_once($CFG->libdir.'/enrollib.php'); |
|
40 | -require_once($CFG->libdir.'/filelib.php'); |
|
41 | -require_once($CFG->libdir.'/formslib.php'); |
|
31 | +require_once($CFG->dirroot . '/calendar/lib.php'); |
|
32 | +require_once($CFG->dirroot . '/message/lib.php'); |
|
33 | +require_once($CFG->dirroot . '/mod/lti/OAuth.php'); |
|
34 | +require_once($CFG->dirroot . '/tag/lib.php'); |
|
35 | +require_once($CFG->libdir . '/accesslib.php'); |
|
36 | +require_once($CFG->libdir . '/completionlib.php'); |
|
37 | +require_once($CFG->libdir . '/datalib.php'); |
|
38 | +require_once($CFG->libdir . '/coursecatlib.php'); |
|
39 | +require_once($CFG->libdir . '/enrollib.php'); |
|
40 | +require_once($CFG->libdir . '/filelib.php'); |
|
41 | +require_once($CFG->libdir . '/formslib.php'); |
|
42 | 42 | |
43 | 43 | |
44 | -if (file_exists(dirname(__FILE__).'/vendor/firebase/php-jwt/src/JWT.php')) { |
|
45 | - require_once(dirname(__FILE__).'/vendor/firebase/php-jwt/src/JWT.php'); |
|
44 | +if (file_exists(dirname(__FILE__) . '/vendor/firebase/php-jwt/src/JWT.php')) { |
|
45 | + require_once(dirname(__FILE__) . '/vendor/firebase/php-jwt/src/JWT.php'); |
|
46 | 46 | } |
47 | 47 | |
48 | 48 | if (!isset($CFG->bigbluebuttonbn)) { |
49 | 49 | $CFG->bigbluebuttonbn = array(); |
50 | 50 | } |
51 | 51 | |
52 | -if (file_exists(dirname(__FILE__).'/config.php')) { |
|
53 | - require_once(dirname(__FILE__).'/config.php'); |
|
52 | +if (file_exists(dirname(__FILE__) . '/config.php')) { |
|
53 | + require_once(dirname(__FILE__) . '/config.php'); |
|
54 | 54 | } |
55 | 55 | |
56 | 56 | /* |
@@ -97,18 +97,18 @@ discard block |
||
97 | 97 | return null; |
98 | 98 | } |
99 | 99 | $features = array( |
100 | - (string) FEATURE_IDNUMBER => true, |
|
101 | - (string) FEATURE_GROUPS => true, |
|
102 | - (string) FEATURE_GROUPINGS => true, |
|
103 | - (string) FEATURE_GROUPMEMBERSONLY => true, |
|
104 | - (string) FEATURE_MOD_INTRO => true, |
|
105 | - (string) FEATURE_BACKUP_MOODLE2 => true, |
|
106 | - (string) FEATURE_COMPLETION_TRACKS_VIEWS => true, |
|
107 | - (string) FEATURE_GRADE_HAS_GRADE => false, |
|
108 | - (string) FEATURE_GRADE_OUTCOMES => false, |
|
109 | - (string) FEATURE_SHOW_DESCRIPTION => true, |
|
100 | + (string)FEATURE_IDNUMBER => true, |
|
101 | + (string)FEATURE_GROUPS => true, |
|
102 | + (string)FEATURE_GROUPINGS => true, |
|
103 | + (string)FEATURE_GROUPMEMBERSONLY => true, |
|
104 | + (string)FEATURE_MOD_INTRO => true, |
|
105 | + (string)FEATURE_BACKUP_MOODLE2 => true, |
|
106 | + (string)FEATURE_COMPLETION_TRACKS_VIEWS => true, |
|
107 | + (string)FEATURE_GRADE_HAS_GRADE => false, |
|
108 | + (string)FEATURE_GRADE_OUTCOMES => false, |
|
109 | + (string)FEATURE_SHOW_DESCRIPTION => true, |
|
110 | 110 | ); |
111 | - if (isset($features[(string) $feature])) { |
|
111 | + if (isset($features[(string)$feature])) { |
|
112 | 112 | return $features[$feature]; |
113 | 113 | } |
114 | 114 | return null; |
@@ -208,7 +208,7 @@ discard block |
||
208 | 208 | $log->timecreated = time(); |
209 | 209 | $log->log = BIGBLUEBUTTONBN_LOG_EVENT_DELETE; |
210 | 210 | $sql = "SELECT * FROM {bigbluebuttonbn_logs} "; |
211 | - $sql .= "WHERE bigbluebuttonbnid = ? AND log = ? AND ". $DB->sql_compare_text('meta') . " = ?"; |
|
211 | + $sql .= "WHERE bigbluebuttonbnid = ? AND log = ? AND " . $DB->sql_compare_text('meta') . " = ?"; |
|
212 | 212 | $logs = $DB->get_records_sql($sql, array($bigbluebuttonbn->id, BIGBLUEBUTTONBN_LOG_EVENT_CREATE, "{\"record\":true}")); |
213 | 213 | $log->meta = "{\"has_recordings\":false}"; |
214 | 214 | if (!empty($logs)) { |
@@ -237,10 +237,10 @@ discard block |
||
237 | 237 | function bigbluebuttonbn_user_outline($course, $user, $mod, $bigbluebuttonbn) { |
238 | 238 | global $DB; |
239 | 239 | $completed = $DB->count_records('bigbluebuttonbn_logs', array('courseid' => $course->id, |
240 | - 'bigbluebuttonbnid' => $bigbluebuttonbn->id, 'userid' => $user->id, 'log' => 'Join', ), '*'); |
|
240 | + 'bigbluebuttonbnid' => $bigbluebuttonbn->id, 'userid' => $user->id, 'log' => 'Join',), '*'); |
|
241 | 241 | if ($completed > 0) { |
242 | - return fullname($user).' '.get_string('view_message_has_joined', 'bigbluebuttonbn').' '. |
|
243 | - get_string('view_message_session_for', 'bigbluebuttonbn').' '.(string) $completed.' '. |
|
242 | + return fullname($user) . ' ' . get_string('view_message_has_joined', 'bigbluebuttonbn') . ' ' . |
|
243 | + get_string('view_message_session_for', 'bigbluebuttonbn') . ' ' . (string)$completed . ' ' . |
|
244 | 244 | get_string('view_message_times', 'bigbluebuttonbn'); |
245 | 245 | } |
246 | 246 | return ''; |
@@ -260,7 +260,7 @@ discard block |
||
260 | 260 | function bigbluebuttonbn_user_complete($course, $user, $mod, $bigbluebuttonbn) { |
261 | 261 | global $DB; |
262 | 262 | $completed = $DB->count_records('bigbluebuttonbn_logs', array('courseid' => $course->id, |
263 | - 'bigbluebuttonbnid' => $bigbluebuttonbn->id, 'userid' => $user->id, 'log' => 'Join', ), |
|
263 | + 'bigbluebuttonbnid' => $bigbluebuttonbn->id, 'userid' => $user->id, 'log' => 'Join',), |
|
264 | 264 | '*', IGNORE_MULTIPLE); |
265 | 265 | return $completed > 0; |
266 | 266 | } |
@@ -335,16 +335,16 @@ discard block |
||
335 | 335 | if ($bigbluebuttonbn->visible) { |
336 | 336 | $classes = 'class="dimmed" '; |
337 | 337 | } |
338 | - $str = '<div class="bigbluebuttonbn overview">'."\n"; |
|
339 | - $str .= ' <div class="name">'.get_string('modulename', 'bigbluebuttonbn').': '."\n"; |
|
340 | - $str .= ' <a '.$classes.'href="'.$CFG->wwwroot.'/mod/bigbluebuttonbn/view.php?id='.$bigbluebuttonbn->coursemodule. |
|
341 | - '">'.$bigbluebuttonbn->name.'</a>'."\n"; |
|
342 | - $str .= ' </div>'."\n"; |
|
343 | - $str .= ' <div class="info">'.get_string($start, 'bigbluebuttonbn').': '.userdate($bigbluebuttonbn->openingtime). |
|
344 | - '</div>'."\n"; |
|
345 | - $str .= ' <div class="info">'.get_string('ends_at', 'bigbluebuttonbn').': '.userdate($bigbluebuttonbn->closingtime) |
|
346 | - .'</div>'."\n"; |
|
347 | - $str .= '</div>'."\n"; |
|
338 | + $str = '<div class="bigbluebuttonbn overview">' . "\n"; |
|
339 | + $str .= ' <div class="name">' . get_string('modulename', 'bigbluebuttonbn') . ': ' . "\n"; |
|
340 | + $str .= ' <a ' . $classes . 'href="' . $CFG->wwwroot . '/mod/bigbluebuttonbn/view.php?id=' . $bigbluebuttonbn->coursemodule . |
|
341 | + '">' . $bigbluebuttonbn->name . '</a>' . "\n"; |
|
342 | + $str .= ' </div>' . "\n"; |
|
343 | + $str .= ' <div class="info">' . get_string($start, 'bigbluebuttonbn') . ': ' . userdate($bigbluebuttonbn->openingtime) . |
|
344 | + '</div>' . "\n"; |
|
345 | + $str .= ' <div class="info">' . get_string('ends_at', 'bigbluebuttonbn') . ': ' . userdate($bigbluebuttonbn->closingtime) |
|
346 | + .'</div>' . "\n"; |
|
347 | + $str .= '</div>' . "\n"; |
|
348 | 348 | return $str; |
349 | 349 | } |
350 | 350 | |
@@ -544,7 +544,7 @@ discard block |
||
544 | 544 | if (count($files) == 1) { |
545 | 545 | // Get the first (and only) file. |
546 | 546 | $file = reset($files); |
547 | - $filesrc = '/'.$file->get_filename(); |
|
547 | + $filesrc = '/' . $file->get_filename(); |
|
548 | 548 | } |
549 | 549 | return $filesrc; |
550 | 550 | } |
@@ -612,7 +612,7 @@ discard block |
||
612 | 612 | if (!$filename) { |
613 | 613 | return false; |
614 | 614 | } |
615 | - $fullpath = "/$context->id/mod_bigbluebuttonbn/$filearea/0/".$filename; |
|
615 | + $fullpath = "/$context->id/mod_bigbluebuttonbn/$filearea/0/" . $filename; |
|
616 | 616 | $fs = get_file_storage(); |
617 | 617 | $file = $fs->get_file_by_hash(sha1($fullpath)); |
618 | 618 | if (!$file || $file->is_directory()) { |
@@ -77,8 +77,8 @@ |
||
77 | 77 | $body .= html_writer::start_tag('br'); |
78 | 78 | $body .= html_writer::tag('input', '', |
79 | 79 | array('type' => 'button', 'class' => 'btn btn-secondary', |
80 | - 'value' => get_string('view_recording_button_return', 'bigbluebuttonbn'), |
|
81 | - 'onclick' => 'window.location=\''.$CFG->wwwroot.'/mod/bigbluebuttonbn/view.php?id='.$cm->id.'\'')); |
|
80 | + 'value' => get_string('view_recording_button_return', 'bigbluebuttonbn'), |
|
81 | + 'onclick' => 'window.location=\''.$CFG->wwwroot.'/mod/bigbluebuttonbn/view.php?id='.$cm->id.'\'')); |
|
82 | 82 | // JavaScript for locales. |
83 | 83 | $PAGE->requires->strings_for_js(array_keys(bigbluebuttonbn_get_strings_for_js()), 'bigbluebuttonbn'); |
84 | 84 | // Require JavaScript modules. |
@@ -23,8 +23,8 @@ discard block |
||
23 | 23 | * @author Jesus Federico (jesus [at] blindsidenetworks [dt] com) |
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 | $bn = required_param('bn', PARAM_INT); |
30 | 30 | $tc = optional_param('tc', 0, PARAM_INT); |
@@ -78,7 +78,7 @@ discard block |
||
78 | 78 | $body .= html_writer::tag('input', '', |
79 | 79 | array('type' => 'button', 'class' => 'btn btn-secondary', |
80 | 80 | 'value' => get_string('view_recording_button_return', 'bigbluebuttonbn'), |
81 | - 'onclick' => 'window.location=\''.$CFG->wwwroot.'/mod/bigbluebuttonbn/view.php?id='.$cm->id.'\'')); |
|
81 | + 'onclick' => 'window.location=\'' . $CFG->wwwroot . '/mod/bigbluebuttonbn/view.php?id=' . $cm->id . '\'')); |
|
82 | 82 | // JavaScript for locales. |
83 | 83 | $PAGE->requires->strings_for_js(array_keys(bigbluebuttonbn_get_strings_for_js()), 'bigbluebuttonbn'); |
84 | 84 | // Require JavaScript modules. |
@@ -26,8 +26,8 @@ discard block |
||
26 | 26 | |
27 | 27 | defined('MOODLE_INTERNAL') || die(); |
28 | 28 | |
29 | -require_once(dirname(__FILE__).'/locallib.php'); |
|
30 | -require_once($CFG->dirroot.'/course/moodleform_mod.php'); |
|
29 | +require_once(dirname(__FILE__) . '/locallib.php'); |
|
30 | +require_once($CFG->dirroot . '/course/moodleform_mod.php'); |
|
31 | 31 | |
32 | 32 | /** |
33 | 33 | * Moodle class for mod_form. |
@@ -48,7 +48,7 @@ discard block |
||
48 | 48 | $serverversion = bigbluebuttonbn_get_server_version(); |
49 | 49 | if (is_null($serverversion)) { |
50 | 50 | print_error('general_error_unable_connect', 'bigbluebuttonbn', |
51 | - $CFG->wwwroot.'/admin/settings.php?section=modsettingbigbluebuttonbn'); |
|
51 | + $CFG->wwwroot . '/admin/settings.php?section=modsettingbigbluebuttonbn'); |
|
52 | 52 | return; |
53 | 53 | } |
54 | 54 | // Context. |
@@ -127,7 +127,7 @@ discard block |
||
127 | 127 | ); |
128 | 128 | $defaultvalues['presentation'] = $draftitemid; |
129 | 129 | } catch (Exception $e) { |
130 | - debugging('Presentation could not be loaded: '.$e->getMessage(), DEBUG_DEVELOPER); |
|
130 | + debugging('Presentation could not be loaded: ' . $e->getMessage(), DEBUG_DEVELOPER); |
|
131 | 131 | return; |
132 | 132 | } |
133 | 133 | } |
@@ -423,7 +423,7 @@ discard block |
||
423 | 423 | return; |
424 | 424 | } |
425 | 425 | $mform->addElement($type, $name, get_string($descriptionkey, 'bigbluebuttonbn'), $options); |
426 | - if (get_string_manager()->string_exists($descriptionkey.'_help', 'bigbluebuttonbn')) { |
|
426 | + if (get_string_manager()->string_exists($descriptionkey . '_help', 'bigbluebuttonbn')) { |
|
427 | 427 | $mform->addHelpButton($name, $descriptionkey, 'bigbluebuttonbn'); |
428 | 428 | } |
429 | 429 | if (!empty($rule)) { |
@@ -213,8 +213,8 @@ discard block |
||
213 | 213 | $this->bigbluebuttonbn_mform_add_element($mform, $field['type'], $field['name'], $field['data_type'], |
214 | 214 | $field['description_key'], 0, ['maxlength' => 4, 'size' => 6], |
215 | 215 | ['message' => get_string('mod_form_field_voicebridge_format_error', 'bigbluebuttonbn'), |
216 | - 'type' => 'numeric', 'rule' => '####', 'validator' => 'server'] |
|
217 | - ); |
|
216 | + 'type' => 'numeric', 'rule' => '####', 'validator' => 'server'] |
|
217 | + ); |
|
218 | 218 | } else { |
219 | 219 | $this->bigbluebuttonbn_mform_add_element($mform, $field['type'], $field['name'], $field['data_type'], |
220 | 220 | $field['description_key'], 0, ['maxlength' => 4, 'size' => 6]); |
@@ -252,7 +252,7 @@ discard block |
||
252 | 252 | */ |
253 | 253 | private function bigbluebuttonbn_mform_add_block_room_recordings(&$mform, $cfg) { |
254 | 254 | $field = ['type' => 'hidden', 'name' => 'recordings_html', 'data_type' => PARAM_INT, |
255 | - 'description_key' => null]; |
|
255 | + 'description_key' => null]; |
|
256 | 256 | if ($cfg['recordings_html_editable']) { |
257 | 257 | $field['type'] = 'checkbox'; |
258 | 258 | $field['description_key'] = 'mod_form_field_recordings_html'; |
@@ -260,7 +260,7 @@ discard block |
||
260 | 260 | $this->bigbluebuttonbn_mform_add_element($mform, $field['type'], $field['name'], $field['data_type'], |
261 | 261 | $field['description_key'], $cfg['recordings_html_default']); |
262 | 262 | $field = ['type' => 'hidden', 'name' => 'recordings_deleted', 'data_type' => PARAM_INT, |
263 | - 'description_key' => null]; |
|
263 | + 'description_key' => null]; |
|
264 | 264 | if ($cfg['recordings_deleted_editable']) { |
265 | 265 | $field['type'] = 'checkbox'; |
266 | 266 | $field['description_key'] = 'mod_form_field_recordings_deleted'; |
@@ -268,7 +268,7 @@ discard block |
||
268 | 268 | $this->bigbluebuttonbn_mform_add_element($mform, $field['type'], $field['name'], $field['data_type'], |
269 | 269 | $field['description_key'], $cfg['recordings_deleted_default']); |
270 | 270 | $field = ['type' => 'hidden', 'name' => 'recordings_imported', 'data_type' => PARAM_INT, |
271 | - 'description_key' => null]; |
|
271 | + 'description_key' => null]; |
|
272 | 272 | if ($cfg['recordings_imported_editable']) { |
273 | 273 | $field['type'] = 'checkbox'; |
274 | 274 | $field['description_key'] = 'mod_form_field_recordings_imported'; |
@@ -276,7 +276,7 @@ discard block |
||
276 | 276 | $this->bigbluebuttonbn_mform_add_element($mform, $field['type'], $field['name'], $field['data_type'], |
277 | 277 | $field['description_key'], $cfg['recordings_imported_default']); |
278 | 278 | $field = ['type' => 'hidden', 'name' => 'recordings_preview', 'data_type' => PARAM_INT, |
279 | - 'description_key' => null]; |
|
279 | + 'description_key' => null]; |
|
280 | 280 | if ($cfg['recordings_preview_editable']) { |
281 | 281 | $field['type'] = 'checkbox'; |
282 | 282 | $field['description_key'] = 'mod_form_field_recordings_preview'; |
@@ -347,7 +347,7 @@ discard block |
||
347 | 347 | $htmlselectiontype = html_writer::select($participantselection['type_options'], |
348 | 348 | 'bigbluebuttonbn_participant_selection_type', $participantselection['type_selected'], array(), |
349 | 349 | array('id' => 'bigbluebuttonbn_participant_selection_type', |
350 | - 'onchange' => 'M.mod_bigbluebuttonbn.modform.participantSelectionSet(); return 0;')); |
|
350 | + 'onchange' => 'M.mod_bigbluebuttonbn.modform.participantSelectionSet(); return 0;')); |
|
351 | 351 | $htmlselectionoptions = html_writer::select($participantselection['options'], 'bigbluebuttonbn_participant_selection', |
352 | 352 | $participantselection['selected'], array(), |
353 | 353 | array('id' => 'bigbluebuttonbn_participant_selection', 'disabled' => 'disabled')); |
@@ -355,7 +355,7 @@ discard block |
||
355 | 355 | 'type' => 'button', 'class' => 'btn btn-secondary', |
356 | 356 | 'value' => get_string('mod_form_field_participant_list_action_add', 'bigbluebuttonbn'), |
357 | 357 | 'onclick' => 'M.mod_bigbluebuttonbn.modform.participantAdd(); return 0;' |
358 | - )); |
|
358 | + )); |
|
359 | 359 | $htmladdparticipant = html_writer::tag('div', |
360 | 360 | $htmlselectiontype . ' ' . $htmlselectionoptions . ' ' . $htmlselectioninput, null); |
361 | 361 | $mform->addElement('html', "\n\n"); |
@@ -55,8 +55,8 @@ discard block |
||
55 | 55 | */ |
56 | 56 | public static function defaultvalues() { |
57 | 57 | return array( |
58 | - 'server_url' => (string) BIGBLUEBUTTONBN_DEFAULT_SERVER_URL, |
|
59 | - 'shared_secret' => (string) BIGBLUEBUTTONBN_DEFAULT_SHARED_SECRET, |
|
58 | + 'server_url' => (string)BIGBLUEBUTTONBN_DEFAULT_SERVER_URL, |
|
59 | + 'shared_secret' => (string)BIGBLUEBUTTONBN_DEFAULT_SHARED_SECRET, |
|
60 | 60 | 'voicebridge_editable' => 'false', |
61 | 61 | 'importrecordings_enabled' => 'false', |
62 | 62 | 'importrecordings_from_deleted_enabled' => 'false', |
@@ -119,8 +119,8 @@ discard block |
||
119 | 119 | if (isset($CFG->bigbluebuttonbn[$setting])) { |
120 | 120 | return (string)$CFG->bigbluebuttonbn[$setting]; |
121 | 121 | } |
122 | - if (isset($CFG->{'bigbluebuttonbn_'.$setting})) { |
|
123 | - return (string)$CFG->{'bigbluebuttonbn_'.$setting}; |
|
122 | + if (isset($CFG->{'bigbluebuttonbn_' . $setting})) { |
|
123 | + return (string)$CFG->{'bigbluebuttonbn_' . $setting}; |
|
124 | 124 | } |
125 | 125 | return self::defaultvalue($setting); |
126 | 126 | } |
@@ -152,31 +152,31 @@ |
||
152 | 152 | */ |
153 | 153 | public static function get_options() { |
154 | 154 | return array( |
155 | - 'version_major' => self::get_moodle_version_major(), |
|
156 | - 'voicebridge_editable' => self::get('voicebridge_editable'), |
|
157 | - 'waitformoderator_default' => self::get('waitformoderator_default'), |
|
158 | - 'waitformoderator_editable' => self::get('waitformoderator_editable'), |
|
159 | - 'userlimit_default' => self::get('userlimit_default'), |
|
160 | - 'userlimit_editable' => self::get('userlimit_editable'), |
|
161 | - 'preuploadpresentation_enabled' => self::get('preuploadpresentation_enabled'), |
|
162 | - 'sendnotifications_enabled' => self::get('sendnotifications_enabled'), |
|
163 | - 'recordings_enabled' => self::get('recordings_enabled'), |
|
164 | - 'recordings_html_default' => self::get('recordings_html_default'), |
|
165 | - 'recordings_html_editable' => self::get('recordings_html_editable'), |
|
166 | - 'recordings_deleted_default' => self::get('recordings_deleted_default'), |
|
167 | - 'recordings_deleted_editable' => self::get('recordings_deleted_editable'), |
|
168 | - 'recordings_imported_default' => self::get('recordings_imported_default'), |
|
169 | - 'recordings_imported_editable' => self::get('recordings_imported_editable'), |
|
170 | - 'recordings_preview_default' => self::get('recordings_preview_default'), |
|
171 | - 'recordings_preview_editable' => self::get('recordings_preview_editable'), |
|
172 | - 'recording_default' => self::get('recording_default'), |
|
173 | - 'recording_editable' => self::get('recording_editable'), |
|
174 | - 'recording_icons_enabled' => self::get('recording_icons_enabled'), |
|
175 | - 'general_warning_message' => self::get('general_warning_message'), |
|
176 | - 'general_warning_box_type' => self::get('general_warning_box_type'), |
|
177 | - 'general_warning_button_text' => self::get('general_warning_button_text'), |
|
178 | - 'general_warning_button_href' => self::get('general_warning_button_href'), |
|
179 | - 'general_warning_button_class' => self::get('general_warning_button_class'), |
|
180 | - ); |
|
155 | + 'version_major' => self::get_moodle_version_major(), |
|
156 | + 'voicebridge_editable' => self::get('voicebridge_editable'), |
|
157 | + 'waitformoderator_default' => self::get('waitformoderator_default'), |
|
158 | + 'waitformoderator_editable' => self::get('waitformoderator_editable'), |
|
159 | + 'userlimit_default' => self::get('userlimit_default'), |
|
160 | + 'userlimit_editable' => self::get('userlimit_editable'), |
|
161 | + 'preuploadpresentation_enabled' => self::get('preuploadpresentation_enabled'), |
|
162 | + 'sendnotifications_enabled' => self::get('sendnotifications_enabled'), |
|
163 | + 'recordings_enabled' => self::get('recordings_enabled'), |
|
164 | + 'recordings_html_default' => self::get('recordings_html_default'), |
|
165 | + 'recordings_html_editable' => self::get('recordings_html_editable'), |
|
166 | + 'recordings_deleted_default' => self::get('recordings_deleted_default'), |
|
167 | + 'recordings_deleted_editable' => self::get('recordings_deleted_editable'), |
|
168 | + 'recordings_imported_default' => self::get('recordings_imported_default'), |
|
169 | + 'recordings_imported_editable' => self::get('recordings_imported_editable'), |
|
170 | + 'recordings_preview_default' => self::get('recordings_preview_default'), |
|
171 | + 'recordings_preview_editable' => self::get('recordings_preview_editable'), |
|
172 | + 'recording_default' => self::get('recording_default'), |
|
173 | + 'recording_editable' => self::get('recording_editable'), |
|
174 | + 'recording_icons_enabled' => self::get('recording_icons_enabled'), |
|
175 | + 'general_warning_message' => self::get('general_warning_message'), |
|
176 | + 'general_warning_box_type' => self::get('general_warning_box_type'), |
|
177 | + 'general_warning_button_text' => self::get('general_warning_button_text'), |
|
178 | + 'general_warning_button_href' => self::get('general_warning_button_href'), |
|
179 | + 'general_warning_button_class' => self::get('general_warning_button_class'), |
|
180 | + ); |
|
181 | 181 | } |
182 | 182 | } |
@@ -23,8 +23,8 @@ discard block |
||
23 | 23 | * @author Jesus Federico (jesus [at] blindsidenetworks [dt] com) |
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 | use \Firebase\JWT\JWT; |
30 | 30 | |
@@ -40,13 +40,13 @@ discard block |
||
40 | 40 | $params['meta'] = optional_param('meta', '', PARAM_TEXT); |
41 | 41 | |
42 | 42 | if (empty($params['action'])) { |
43 | - header('HTTP/1.0 400 Bad Request. Parameter ['.$params['action'].'] was not included'); |
|
43 | + header('HTTP/1.0 400 Bad Request. Parameter [' . $params['action'] . '] was not included'); |
|
44 | 44 | return; |
45 | 45 | } |
46 | 46 | |
47 | 47 | $error = bigbluebuttonbn_broker_validate_parameters($params); |
48 | 48 | if (!empty($error)) { |
49 | - header('HTTP/1.0 400 Bad Request. '.$error); |
|
49 | + header('HTTP/1.0 400 Bad Request. ' . $error); |
|
50 | 50 | return; |
51 | 51 | } |
52 | 52 | |
@@ -130,11 +130,11 @@ discard block |
||
130 | 130 | bigbluebuttonbn_broker_live_session_events($params, $bigbluebuttonbn, $cm); |
131 | 131 | return; |
132 | 132 | } |
133 | - header('HTTP/1.0 400 Bad request. The action '. $a . ' doesn\'t exist'); |
|
133 | + header('HTTP/1.0 400 Bad request. The action ' . $a . ' doesn\'t exist'); |
|
134 | 134 | return; |
135 | 135 | |
136 | 136 | } catch (Exception $e) { |
137 | - header('HTTP/1.0 500 Internal Server Error. '.$e->getMessage()); |
|
137 | + header('HTTP/1.0 500 Internal Server Error. ' . $e->getMessage()); |
|
138 | 138 | return; |
139 | 139 | } |
140 | 140 | |
@@ -320,7 +320,7 @@ discard block |
||
320 | 320 | function bigbluebuttonbn_broker_recording_info_current($recording, $params) { |
321 | 321 | $callbackresponse['status'] = true; |
322 | 322 | $callbackresponse['found'] = true; |
323 | - $callbackresponse['published'] = (string) $recording['published']; |
|
323 | + $callbackresponse['published'] = (string)$recording['published']; |
|
324 | 324 | if (!isset($params['meta']) || empty($params['meta'])) { |
325 | 325 | return $callbackresponse; |
326 | 326 | } |
@@ -650,8 +650,8 @@ discard block |
||
650 | 650 | $decodedparameters = JWT::decode($params['signed_parameters'], |
651 | 651 | \mod_bigbluebuttonbn\locallib\config::get('shared_secret'), array('HS256')); |
652 | 652 | } catch (Exception $e) { |
653 | - $error = 'Caught exception: '.$e->getMessage(); |
|
654 | - header('HTTP/1.0 400 Bad Request. '.$error); |
|
653 | + $error = 'Caught exception: ' . $e->getMessage(); |
|
654 | + header('HTTP/1.0 400 Bad Request. ' . $error); |
|
655 | 655 | return; |
656 | 656 | } |
657 | 657 | // Validate that the bigbluebuttonbn activity corresponds to the meeting_id received. |
@@ -667,8 +667,8 @@ discard block |
||
667 | 667 | bigbluebuttonbn_send_notification_recording_ready($bigbluebuttonbn); |
668 | 668 | header('HTTP/1.0 202 Accepted'); |
669 | 669 | } catch (Exception $e) { |
670 | - $error = 'Caught exception: '.$e->getMessage(); |
|
671 | - header('HTTP/1.0 503 Service Unavailable. '.$error); |
|
670 | + $error = 'Caught exception: ' . $e->getMessage(); |
|
671 | + header('HTTP/1.0 503 Service Unavailable. ' . $error); |
|
672 | 672 | } |
673 | 673 | } |
674 | 674 | |
@@ -689,13 +689,13 @@ discard block |
||
689 | 689 | $importrecordings = $SESSION->bigbluebuttonbn_importrecordings; |
690 | 690 | if (!isset($importrecordings[$params['id']])) { |
691 | 691 | $error = "Recording {$params['id']} could not be found. It can not be imported"; |
692 | - header('HTTP/1.0 404 Not found. '.$error); |
|
692 | + header('HTTP/1.0 404 Not found. ' . $error); |
|
693 | 693 | return; |
694 | 694 | } |
695 | 695 | $callbackresponse = array('status' => true); |
696 | 696 | $importrecordings[$params['id']]['imported'] = true; |
697 | 697 | $overrides = array('meetingid' => $importrecordings[$params['id']]['meetingID']); |
698 | - $meta = '{"recording":'.json_encode($importrecordings[$params['id']]).'}'; |
|
698 | + $meta = '{"recording":' . json_encode($importrecordings[$params['id']]) . '}'; |
|
699 | 699 | bigbluebuttonbn_logs($bbbsession, BIGBLUEBUTTONBN_LOG_EVENT_IMPORT, $overrides, $meta); |
700 | 700 | // Moodle event logger: Create an event for recording imported. |
701 | 701 | if (isset($bbbsession['bigbluebutton']) && isset($bbbsession['cm'])) { |
@@ -721,8 +721,8 @@ discard block |
||
721 | 721 | $decodedparameters = JWT::decode($params['signed_parameters'], |
722 | 722 | \mod_bigbluebuttonbn\locallib\config::get('shared_secret'), array('HS256')); |
723 | 723 | } catch (Exception $e) { |
724 | - $error = 'Caught exception: '.$e->getMessage(); |
|
725 | - header('HTTP/1.0 400 Bad Request. '.$error); |
|
724 | + $error = 'Caught exception: ' . $e->getMessage(); |
|
725 | + header('HTTP/1.0 400 Bad Request. ' . $error); |
|
726 | 726 | return; |
727 | 727 | } |
728 | 728 | // Validate that the bigbluebuttonbn activity corresponds to the meeting_id received. |
@@ -763,7 +763,7 @@ discard block |
||
763 | 763 | } |
764 | 764 | $action = strtolower($params['action']); |
765 | 765 | if (!array_key_exists($action, $requiredparams)) { |
766 | - return 'Action '.$params['action'].' can not be performed.'; |
|
766 | + return 'Action ' . $params['action'] . ' can not be performed.'; |
|
767 | 767 | } |
768 | 768 | return bigbluebuttonbn_broker_validate_parameters_message($params, $requiredparams[$action]); |
769 | 769 | } |
@@ -437,26 +437,26 @@ discard block |
||
437 | 437 | return array( |
438 | 438 | 'status' => false, |
439 | 439 | 'message' => get_string('view_recording_publish_link_deleted', 'bigbluebuttonbn') |
440 | - ); |
|
440 | + ); |
|
441 | 441 | } |
442 | 442 | if ($realrecordings[$params['id']]['published'] !== 'true') { |
443 | 443 | return array( |
444 | 444 | 'status' => false, |
445 | 445 | 'message' => get_string('view_recording_publish_link_not_published', 'bigbluebuttonbn') |
446 | - ); |
|
446 | + ); |
|
447 | 447 | } |
448 | 448 | return array( |
449 | 449 | 'status' => bigbluebuttonbn_publish_recording_imported( |
450 | 450 | $recordings[$params['id']]['imported'], true |
451 | 451 | ) |
452 | - ); |
|
452 | + ); |
|
453 | 453 | } |
454 | 454 | // As the recordingid was not identified as imported recording link, execute actual publish. |
455 | 455 | return array( |
456 | 456 | 'status' => bigbluebuttonbn_publish_recordings( |
457 | 457 | $params['id'], 'true' |
458 | 458 | ) |
459 | - ); |
|
459 | + ); |
|
460 | 460 | } |
461 | 461 | |
462 | 462 | /** |
@@ -477,26 +477,26 @@ discard block |
||
477 | 477 | return array( |
478 | 478 | 'status' => false, |
479 | 479 | 'message' => get_string('view_recording_unprotect_link_deleted', 'bigbluebuttonbn') |
480 | - ); |
|
480 | + ); |
|
481 | 481 | } |
482 | 482 | if ($realrecordings[$params['id']]['protected'] === 'true') { |
483 | 483 | return array( |
484 | 484 | 'status' => false, |
485 | 485 | 'message' => get_string('view_recording_unprotect_link_not_unprotected', 'bigbluebuttonbn') |
486 | - ); |
|
486 | + ); |
|
487 | 487 | } |
488 | 488 | return array( |
489 | 489 | 'status' => bigbluebuttonbn_protect_recording_imported( |
490 | 490 | $recordings[$params['id']]['imported'], false |
491 | 491 | ) |
492 | - ); |
|
492 | + ); |
|
493 | 493 | } |
494 | 494 | // As the recordingid was not identified as imported recording link, execute actual uprotect. |
495 | 495 | return array( |
496 | 496 | 'status' => bigbluebuttonbn_update_recordings( |
497 | 497 | $params['id'], array('protect' => 'false') |
498 | 498 | ) |
499 | - ); |
|
499 | + ); |
|
500 | 500 | } |
501 | 501 | |
502 | 502 | /** |
@@ -515,7 +515,7 @@ discard block |
||
515 | 515 | 'status' => bigbluebuttonbn_publish_recording_imported( |
516 | 516 | $recordings[$params['id']]['imported'], false |
517 | 517 | ) |
518 | - ); |
|
518 | + ); |
|
519 | 519 | } |
520 | 520 | // As the recordingid was not identified as imported recording link, execute unpublish on a real recording. |
521 | 521 | // First: Unpublish imported links associated to the recording. |
@@ -533,7 +533,7 @@ discard block |
||
533 | 533 | 'status' => bigbluebuttonbn_publish_recordings( |
534 | 534 | $params['id'], 'false' |
535 | 535 | ) |
536 | - ); |
|
536 | + ); |
|
537 | 537 | } |
538 | 538 | |
539 | 539 | /** |
@@ -552,7 +552,7 @@ discard block |
||
552 | 552 | 'status' => bigbluebuttonbn_protect_recording_imported( |
553 | 553 | $recordings[$params['id']]['imported'], true |
554 | 554 | ) |
555 | - ); |
|
555 | + ); |
|
556 | 556 | } |
557 | 557 | // As the recordingid was not identified as imported recording link, execute protect on a real recording. |
558 | 558 | // First: Protect imported links associated to the recording. |
@@ -570,7 +570,7 @@ discard block |
||
570 | 570 | 'status' => bigbluebuttonbn_update_recordings( |
571 | 571 | $params['id'], array('protect' => 'true') |
572 | 572 | ) |
573 | - ); |
|
573 | + ); |
|
574 | 574 | } |
575 | 575 | |
576 | 576 | /** |
@@ -589,7 +589,7 @@ discard block |
||
589 | 589 | 'status' => bigbluebuttonbn_delete_recording_imported( |
590 | 590 | $recordings[$params['id']]['imported'] |
591 | 591 | ) |
592 | - ); |
|
592 | + ); |
|
593 | 593 | } |
594 | 594 | // As the recordingid was not identified as imported recording link, execute delete on a real recording. |
595 | 595 | // First: Delete imported links associated to the recording. |
@@ -603,7 +603,7 @@ discard block |
||
603 | 603 | // Second: Execute the actual delete. |
604 | 604 | return array( |
605 | 605 | 'status' => bigbluebuttonbn_delete_recordings($params['id']) |
606 | - ); |
|
606 | + ); |
|
607 | 607 | } |
608 | 608 | |
609 | 609 | /** |
@@ -621,7 +621,7 @@ discard block |
||
621 | 621 | 'status' => bigbluebuttonbn_update_recording_imported( |
622 | 622 | $recordings[$params['id']]['imported'], json_decode($params['meta'], true) |
623 | 623 | ) |
624 | - ); |
|
624 | + ); |
|
625 | 625 | } |
626 | 626 | |
627 | 627 | // As the recordingid was not identified as imported recording link, execute update on a real recording. |
@@ -631,7 +631,7 @@ discard block |
||
631 | 631 | 'status' => bigbluebuttonbn_update_recordings( |
632 | 632 | $params['id'], json_decode($params['meta']) |
633 | 633 | ) |
634 | - ); |
|
634 | + ); |
|
635 | 635 | } |
636 | 636 | |
637 | 637 | /** |
@@ -802,10 +802,10 @@ discard block |
||
802 | 802 | $params['recording_import'] = ['id' => 'The recordingID must be specified.']; |
803 | 803 | $params['recording_ready'] = [ |
804 | 804 | 'signed_parameters' => 'A JWT encoded string must be included as [signed_parameters].' |
805 | - ]; |
|
805 | + ]; |
|
806 | 806 | $params['live_session_events'] = [ |
807 | 807 | 'signed_parameters' => 'A JWT encoded string must be included as [signed_parameters].' |
808 | - ]; |
|
808 | + ]; |
|
809 | 809 | return $params; |
810 | 810 | } |
811 | 811 |
@@ -47,7 +47,7 @@ discard block |
||
47 | 47 | public static function notification_process($context, $bigbluebuttonbn, $action) { |
48 | 48 | global $USER; |
49 | 49 | // Prepare message. |
50 | - $msg = (object) array(); |
|
50 | + $msg = (object)array(); |
|
51 | 51 | // Build the message_body. |
52 | 52 | $msg->action = $action; |
53 | 53 | $msg->activity_type = ''; |
@@ -72,26 +72,26 @@ discard block |
||
72 | 72 | * @return string |
73 | 73 | */ |
74 | 74 | public static function notification_msg_html($msg) { |
75 | - $messagetext = '<p>'.$msg->activity_type.' "'.$msg->activity_title.'" '. |
|
76 | - get_string('email_body_notification_meeting_has_been', 'bigbluebuttonbn').' '.$msg->action.'.</p>'."\n"; |
|
77 | - $messagetext .= '<p><b>'.$msg->activity_title.'</b> '. |
|
78 | - get_string('email_body_notification_meeting_details', 'bigbluebuttonbn').':'."\n"; |
|
79 | - $messagetext .= '<table border="0" style="margin: 5px 0 0 20px"><tbody>'."\n"; |
|
80 | - $messagetext .= '<tr><td style="font-weight:bold;color:#555;">'. |
|
81 | - get_string('email_body_notification_meeting_title', 'bigbluebuttonbn').': </td><td>'."\n"; |
|
82 | - $messagetext .= $msg->activity_title.'</td></tr>'."\n"; |
|
83 | - $messagetext .= '<tr><td style="font-weight:bold;color:#555;">'. |
|
84 | - get_string('email_body_notification_meeting_description', 'bigbluebuttonbn').': </td><td>'."\n"; |
|
85 | - $messagetext .= $msg->activity_description.'</td></tr>'."\n"; |
|
86 | - $messagetext .= '<tr><td style="font-weight:bold;color:#555;">'. |
|
87 | - get_string('email_body_notification_meeting_start_date', 'bigbluebuttonbn').': </td><td>'."\n"; |
|
88 | - $messagetext .= $msg->activity_openingtime.'</td></tr>'."\n"; |
|
89 | - $messagetext .= '<tr><td style="font-weight:bold;color:#555;">'. |
|
90 | - get_string('email_body_notification_meeting_end_date', 'bigbluebuttonbn').': </td><td>'."\n"; |
|
91 | - $messagetext .= $msg->activity_closingtime.'</td></tr>'."\n"; |
|
92 | - $messagetext .= '<tr><td style="font-weight:bold;color:#555;">'.$msg->action.' '. |
|
93 | - get_string('email_body_notification_meeting_by', 'bigbluebuttonbn').': </td><td>'."\n"; |
|
94 | - $messagetext .= $msg->activity_owner.'</td></tr></tbody></table></p>'."\n"; |
|
75 | + $messagetext = '<p>' . $msg->activity_type . ' "' . $msg->activity_title . '" ' . |
|
76 | + get_string('email_body_notification_meeting_has_been', 'bigbluebuttonbn') . ' ' . $msg->action . '.</p>' . "\n"; |
|
77 | + $messagetext .= '<p><b>' . $msg->activity_title . '</b> ' . |
|
78 | + get_string('email_body_notification_meeting_details', 'bigbluebuttonbn') . ':' . "\n"; |
|
79 | + $messagetext .= '<table border="0" style="margin: 5px 0 0 20px"><tbody>' . "\n"; |
|
80 | + $messagetext .= '<tr><td style="font-weight:bold;color:#555;">' . |
|
81 | + get_string('email_body_notification_meeting_title', 'bigbluebuttonbn') . ': </td><td>' . "\n"; |
|
82 | + $messagetext .= $msg->activity_title . '</td></tr>' . "\n"; |
|
83 | + $messagetext .= '<tr><td style="font-weight:bold;color:#555;">' . |
|
84 | + get_string('email_body_notification_meeting_description', 'bigbluebuttonbn') . ': </td><td>' . "\n"; |
|
85 | + $messagetext .= $msg->activity_description . '</td></tr>' . "\n"; |
|
86 | + $messagetext .= '<tr><td style="font-weight:bold;color:#555;">' . |
|
87 | + get_string('email_body_notification_meeting_start_date', 'bigbluebuttonbn') . ': </td><td>' . "\n"; |
|
88 | + $messagetext .= $msg->activity_openingtime . '</td></tr>' . "\n"; |
|
89 | + $messagetext .= '<tr><td style="font-weight:bold;color:#555;">' . |
|
90 | + get_string('email_body_notification_meeting_end_date', 'bigbluebuttonbn') . ': </td><td>' . "\n"; |
|
91 | + $messagetext .= $msg->activity_closingtime . '</td></tr>' . "\n"; |
|
92 | + $messagetext .= '<tr><td style="font-weight:bold;color:#555;">' . $msg->action . ' ' . |
|
93 | + get_string('email_body_notification_meeting_by', 'bigbluebuttonbn') . ': </td><td>' . "\n"; |
|
94 | + $messagetext .= $msg->activity_owner . '</td></tr></tbody></table></p>' . "\n"; |
|
95 | 95 | return $messagetext; |
96 | 96 | } |
97 | 97 | |
@@ -108,14 +108,14 @@ discard block |
||
108 | 108 | global $DB; |
109 | 109 | $course = $DB->get_record('course', array('id' => $bigbluebuttonbn->course), '*', MUST_EXIST); |
110 | 110 | // Complete message. |
111 | - $msg = (object) array(); |
|
111 | + $msg = (object)array(); |
|
112 | 112 | $msg->user_name = fullname($sender); |
113 | 113 | $msg->user_email = $sender->email; |
114 | 114 | $msg->course_name = "$course->fullname"; |
115 | - $message .= '<p><hr/><br/>'.get_string('email_footer_sent_by', 'bigbluebuttonbn').' '. |
|
116 | - $msg->user_name.'('.$msg->user_email.') '; |
|
117 | - $message .= get_string('email_footer_sent_from', 'bigbluebuttonbn').' '.$msg->course_name.'.</p>'; |
|
118 | - $users = (array) get_enrolled_users($context, '', 0, 'u.*', null, 0, 0, true); |
|
115 | + $message .= '<p><hr/><br/>' . get_string('email_footer_sent_by', 'bigbluebuttonbn') . ' ' . |
|
116 | + $msg->user_name . '(' . $msg->user_email . ') '; |
|
117 | + $message .= get_string('email_footer_sent_from', 'bigbluebuttonbn') . ' ' . $msg->course_name . '.</p>'; |
|
118 | + $users = (array)get_enrolled_users($context, '', 0, 'u.*', null, 0, 0, true); |
|
119 | 119 | foreach ($users as $user) { |
120 | 120 | if ($user->id != $sender->id) { |
121 | 121 | message_post_message($sender, $user, $message, FORMAT_HTML); |
@@ -98,7 +98,7 @@ discard block |
||
98 | 98 | * recordings from a different activity even from a different course. |
99 | 99 | **/ |
100 | 100 | |
101 | - /* |
|
101 | + /* |
|
102 | 102 | * When the value is set to 1 (checked) the bigbluebuttonbn rooms or |
103 | 103 | * activities will have the 'import recordings' capability enabled. |
104 | 104 | * $CFG->bigbluebuttonbn['importrecordings_enabled'] = 0; |
@@ -119,7 +119,7 @@ discard block |
||
119 | 119 | * 'Join session' button enabled |
120 | 120 | **/ |
121 | 121 | |
122 | - /* |
|
122 | + /* |
|
123 | 123 | * When the value is set to 1 (checked) the bigbluebuttonbn rooms or |
124 | 124 | * activities will have the 'wait for moderator' capability enabled by |
125 | 125 | * default. |
@@ -259,13 +259,13 @@ discard block |
||
259 | 259 | * $CFG->bigbluebuttonbn['recordings_imported_editable'] = 1; |
260 | 260 | */ |
261 | 261 | |
262 | - /* |
|
262 | + /* |
|
263 | 263 | * When the value is set to 1 (checked) the bigbluebuttonbn resources |
264 | 264 | * will show the recodings with thumbnails. |
265 | 265 | * $CFG->bigbluebuttonbn['recordings_preview_default'] = 1; |
266 | 266 | */ |
267 | 267 | |
268 | - /* |
|
268 | + /* |
|
269 | 269 | * When the value is set to 1 (checked) the 'preview ui' capability can be |
270 | 270 | * enabled/disabled by the user creating or editing the resource. |
271 | 271 | * $CFG->bigbluebuttonbn['recordings_preview_editable'] = 0; |
@@ -310,27 +310,27 @@ discard block |
||
310 | 310 | * $CFG->bigbluebuttonbn['general_warning_message'] = "Would you like to record your BigBlueButton sessions for later viewing? "; |
311 | 311 | */ |
312 | 312 | |
313 | - /* |
|
313 | + /* |
|
314 | 314 | * The warning box is always shown to administrators, but it is also possible to define other roles |
315 | 315 | * to whom the it will be shown. The roles are based on the shortnames defined by Moodle: |
316 | 316 | * 'manager,coursecreator,editingteacher,teacher,student,guest,user,frontpage' |
317 | 317 | * $CFG->bigbluebuttonbn['general_warning_roles'] = 'editingteacher,teacher'; |
318 | 318 | */ |
319 | 319 | |
320 | - /* |
|
320 | + /* |
|
321 | 321 | * As the general_warning_message is shown in a box, its type can be defined with general_warning_type |
322 | 322 | * The default type is 'info' which is normaly rendered in blue when using a bootstrap theme. |
323 | 323 | * All the modifiers for boxed in bootstrap can be used [info|success|warning|danger]. |
324 | 324 | * $CFG->bigbluebuttonbn['general_warning_box_type'] = 'info'; |
325 | 325 | */ |
326 | 326 | |
327 | - /* |
|
327 | + /* |
|
328 | 328 | * Additionally, when general_warning_button_href value is different than "", a button |
329 | 329 | * can also be shown right after the message. |
330 | 330 | * $CFG->bigbluebuttonbn['general_warning_button_href'] = "http://blindsidenetworks.com/"; |
331 | 331 | */ |
332 | 332 | |
333 | - /* |
|
333 | + /* |
|
334 | 334 | * Finally, the text and class for the button can be modified |
335 | 335 | * $CFG->bigbluebuttonbn['general_warning_button_text'] = "Upgrade your site"; |
336 | 336 | * $CFG->bigbluebuttonbn['general_warning_button_class'] = "btn btn-primary"; |