@@ -27,7 +27,7 @@ |
||
27 | 27 | |
28 | 28 | global $CFG; |
29 | 29 | |
30 | -require_once(dirname(__FILE__).'/locallib.php'); |
|
30 | +require_once(dirname(__FILE__) . '/locallib.php'); |
|
31 | 31 | |
32 | 32 | if ($ADMIN->fulltree) { |
33 | 33 | // Configuration for BigBlueButton. |
@@ -25,7 +25,7 @@ discard block |
||
25 | 25 | |
26 | 26 | defined('MOODLE_INTERNAL') || die; |
27 | 27 | |
28 | -require_once($CFG->dirroot.'/mod/bigbluebuttonbn/backup/moodle2/backup_bigbluebuttonbn_stepslib.php'); |
|
28 | +require_once($CFG->dirroot . '/mod/bigbluebuttonbn/backup/moodle2/backup_bigbluebuttonbn_stepslib.php'); |
|
29 | 29 | |
30 | 30 | /** |
31 | 31 | * Backup task that provides all the settings and steps to perform one complete backup of the activity. |
@@ -62,14 +62,14 @@ discard block |
||
62 | 62 | public static function encode_content_links($content) { |
63 | 63 | global $CFG; |
64 | 64 | |
65 | - $base = preg_quote($CFG->wwwroot.'/mod/bigbluebuttonbn', '#'); |
|
65 | + $base = preg_quote($CFG->wwwroot . '/mod/bigbluebuttonbn', '#'); |
|
66 | 66 | |
67 | 67 | // Link to the list of bigbluebuttonbns. |
68 | - $pattern = '#('.$base."\/index.php\?id\=)([0-9]+)#"; |
|
68 | + $pattern = '#(' . $base . "\/index.php\?id\=)([0-9]+)#"; |
|
69 | 69 | $content = preg_replace($pattern, '$@BIGBLUEBUTTONBNINDEX*$2@$', $content); |
70 | 70 | |
71 | 71 | // Link to bigbluebuttonbn view by moduleid. |
72 | - $pattern = '#('.$base."\/view.php\?id\=)([0-9]+)#"; |
|
72 | + $pattern = '#(' . $base . "\/view.php\?id\=)([0-9]+)#"; |
|
73 | 73 | $content = preg_replace($pattern, '$@BIGBLUEBUTTONBNVIEWBYID*$2@$', $content); |
74 | 74 | |
75 | 75 | return $content; |
@@ -48,7 +48,7 @@ |
||
48 | 48 | $logs = new backup_nested_element('logs'); |
49 | 49 | |
50 | 50 | $log = new backup_nested_element('log', array('id'), array( |
51 | - 'courseid', 'bigbluebuttonbnid', 'userid', 'timecreated', 'meetingid', 'log', 'meta', )); |
|
51 | + 'courseid', 'bigbluebuttonbnid', 'userid', 'timecreated', 'meetingid', 'log', 'meta',)); |
|
52 | 52 | |
53 | 53 | // Build the tree. |
54 | 54 | $bigbluebuttonbn->add_child($logs); |
@@ -49,7 +49,7 @@ discard block |
||
49 | 49 | */ |
50 | 50 | protected function process_bigbluebuttonbn($data) { |
51 | 51 | global $DB; |
52 | - $data = (object) $data; |
|
52 | + $data = (object)$data; |
|
53 | 53 | $data->course = $this->get_courseid(); |
54 | 54 | $data->timemodified = $this->apply_date_offset($data->timemodified); |
55 | 55 | // Insert the bigbluebuttonbn record. |
@@ -65,7 +65,7 @@ discard block |
||
65 | 65 | */ |
66 | 66 | protected function process_bigbluebuttonbn_logs($data) { |
67 | 67 | global $DB; |
68 | - $data = (object) $data; |
|
68 | + $data = (object)$data; |
|
69 | 69 | // Apply modifications. |
70 | 70 | $data->courseid = $this->get_mappingid('course', $data->courseid); |
71 | 71 | $data->bigbluebuttonbnid = $this->get_new_parentid('bigbluebuttonbn'); |
@@ -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']; |
@@ -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 | global $SESSION; |
30 | 30 | |
@@ -68,23 +68,23 @@ discard block |
||
68 | 68 | if (is_null($serverversion)) { |
69 | 69 | if ($bbbsession['administrator']) { |
70 | 70 | print_error('view_error_unable_join', 'bigbluebuttonbn', |
71 | - $CFG->wwwroot.'/admin/settings.php?section=modsettingbigbluebuttonbn'); |
|
71 | + $CFG->wwwroot . '/admin/settings.php?section=modsettingbigbluebuttonbn'); |
|
72 | 72 | exit; |
73 | 73 | } |
74 | 74 | if ($bbbsession['moderator']) { |
75 | 75 | print_error('view_error_unable_join_teacher', 'bigbluebuttonbn', |
76 | - $CFG->wwwroot.'/course/view.php?id='.$bigbluebuttonbn->course); |
|
76 | + $CFG->wwwroot . '/course/view.php?id=' . $bigbluebuttonbn->course); |
|
77 | 77 | exit; |
78 | 78 | } |
79 | 79 | print_error('view_error_unable_join_student', 'bigbluebuttonbn', |
80 | - $CFG->wwwroot.'/course/view.php?id='.$bigbluebuttonbn->course); |
|
80 | + $CFG->wwwroot . '/course/view.php?id=' . $bigbluebuttonbn->course); |
|
81 | 81 | exit; |
82 | 82 | } |
83 | - $bbbsession['serverversion'] = (string) $serverversion; |
|
83 | + $bbbsession['serverversion'] = (string)$serverversion; |
|
84 | 84 | |
85 | 85 | // Operation URLs. |
86 | 86 | $bbbsession['bigbluebuttonbnURL'] = $CFG->wwwroot . '/mod/bigbluebuttonbn/view.php?id=' . $bbbsession['cm']->id; |
87 | - $bbbsession['logoutURL'] = $CFG->wwwroot . '/mod/bigbluebuttonbn/bbb_view.php?action=logout&id='.$id . |
|
87 | + $bbbsession['logoutURL'] = $CFG->wwwroot . '/mod/bigbluebuttonbn/bbb_view.php?action=logout&id=' . $id . |
|
88 | 88 | '&bn=' . $bbbsession['bigbluebuttonbn']->id; |
89 | 89 | $bbbsession['recordingReadyURL'] = $CFG->wwwroot . '/mod/bigbluebuttonbn/bbb_broker.php?action=recording_' . |
90 | 90 | 'ready&bigbluebuttonbn=' . $bbbsession['bigbluebuttonbn']->id; |
@@ -161,7 +161,7 @@ discard block |
||
161 | 161 | } |
162 | 162 | // If user is not administrator nor moderator (user is steudent) and waiting is required. |
163 | 163 | if (!$bbbsession['administrator'] && !$bbbsession['moderator'] && $bbbsession['wait']) { |
164 | - header('Location: '.$bbbsession['logoutURL']); |
|
164 | + header('Location: ' . $bbbsession['logoutURL']); |
|
165 | 165 | break; |
166 | 166 | } |
167 | 167 | // As the meeting doesn't exist, try to create it. |
@@ -175,16 +175,16 @@ discard block |
||
175 | 175 | // The server is unreachable. |
176 | 176 | if ($bbbsession['administrator']) { |
177 | 177 | print_error('view_error_unable_join', 'bigbluebuttonbn', |
178 | - $CFG->wwwroot.'/admin/settings.php?section=modsettingbigbluebuttonbn'); |
|
178 | + $CFG->wwwroot . '/admin/settings.php?section=modsettingbigbluebuttonbn'); |
|
179 | 179 | break; |
180 | 180 | } |
181 | 181 | if ($bbbsession['moderator']) { |
182 | 182 | print_error('view_error_unable_join_teacher', 'bigbluebuttonbn', |
183 | - $CFG->wwwroot.'/admin/settings.php?section=modsettingbigbluebuttonbn'); |
|
183 | + $CFG->wwwroot . '/admin/settings.php?section=modsettingbigbluebuttonbn'); |
|
184 | 184 | break; |
185 | 185 | } |
186 | 186 | print_error('view_error_unable_join_student', 'bigbluebuttonbn', |
187 | - $CFG->wwwroot.'/admin/settings.php?section=modsettingbigbluebuttonbn'); |
|
187 | + $CFG->wwwroot . '/admin/settings.php?section=modsettingbigbluebuttonbn'); |
|
188 | 188 | break; |
189 | 189 | } |
190 | 190 | if ($response['returncode'] == 'FAILED') { |
@@ -205,7 +205,7 @@ discard block |
||
205 | 205 | bigbluebuttonbn_event_log(\mod_bigbluebuttonbn\event\events::$events['meeting_create'], $bigbluebuttonbn); |
206 | 206 | // Internal logger: Insert a record with the meeting created. |
207 | 207 | $overrides = array('meetingid' => $bbbsession['meetingid']); |
208 | - $meta = '{"record":'.($bbbsession['record'] ? 'true' : 'false').'}'; |
|
208 | + $meta = '{"record":' . ($bbbsession['record'] ? 'true' : 'false') . '}'; |
|
209 | 209 | bigbluebuttonbn_log($bbbsession['bigbluebuttonbn'], BIGBLUEBUTTONBN_LOG_EVENT_CREATE, $overrides, $meta); |
210 | 210 | // Since the meeting is already running, we just join the session. |
211 | 211 | bigbluebutton_bbb_view_join_meeting($bbbsession, $bigbluebuttonbn, $origin); |
@@ -216,7 +216,7 @@ discard block |
||
216 | 216 | bigbluebuttonbn_event_log(\mod_bigbluebuttonbn\event\events::$events['recording_play'], $bigbluebuttonbn, |
217 | 217 | ['other' => $rid]); |
218 | 218 | // Execute the redirect. |
219 | - header('Location: '.urldecode($href)); |
|
219 | + header('Location: ' . urldecode($href)); |
|
220 | 220 | break; |
221 | 221 | default: |
222 | 222 | bigbluebutton_bbb_view_close_window(); |
@@ -301,7 +301,7 @@ discard block |
||
301 | 301 | $data['welcome'] .= '<br><br>'; |
302 | 302 | $data['welcome'] .= str_replace( |
303 | 303 | '%duration%', |
304 | - (string) $durationtime, |
|
304 | + (string)$durationtime, |
|
305 | 305 | get_string('bbbdurationwarning', 'bigbluebuttonbn') |
306 | 306 | ); |
307 | 307 | } |
@@ -391,7 +391,7 @@ discard block |
||
391 | 391 | $meetinginfo = bigbluebuttonbn_get_meeting_info($bbbsession['meetingid'], BIGBLUEBUTTONBN_UPDATE_CACHE); |
392 | 392 | if ($bbbsession['userlimit'] > 0 && intval($meetinginfo['participantCount']) >= $bbbsession['userlimit']) { |
393 | 393 | // No more users allowed to join. |
394 | - header('Location: '.$bbbsession['logoutURL']); |
|
394 | + header('Location: ' . $bbbsession['logoutURL']); |
|
395 | 395 | return; |
396 | 396 | } |
397 | 397 | // Build the URL. |
@@ -405,13 +405,13 @@ discard block |
||
405 | 405 | bigbluebuttonbn_event_log(\mod_bigbluebuttonbn\event\events::$events['meeting_join'], $bigbluebuttonbn); |
406 | 406 | // Internal logger: Instert a record with the meeting created. |
407 | 407 | $overrides = array('meetingid' => $bbbsession['meetingid']); |
408 | - $meta = '{"origin":'.$origin.'}'; |
|
408 | + $meta = '{"origin":' . $origin . '}'; |
|
409 | 409 | bigbluebuttonbn_log($bbbsession['bigbluebuttonbn'], BIGBLUEBUTTONBN_LOG_EVENT_JOIN, $overrides, $meta); |
410 | 410 | // Before executing the redirect, increment the number of participants. |
411 | 411 | bigbluebuttonbn_participant_joined($bbbsession['meetingid'], |
412 | 412 | ($bbbsession['administrator'] || $bbbsession['moderator'])); |
413 | 413 | // Execute the redirect. |
414 | - header('Location: '.$joinurl); |
|
414 | + header('Location: ' . $joinurl); |
|
415 | 415 | } |
416 | 416 | |
417 | 417 | /** |
@@ -423,13 +423,13 @@ discard block |
||
423 | 423 | */ |
424 | 424 | function bigbluebutton_bbb_view_errors($serrors, $id) { |
425 | 425 | global $CFG, $OUTPUT; |
426 | - $errors = (array) json_decode(urldecode($serrors)); |
|
426 | + $errors = (array)json_decode(urldecode($serrors)); |
|
427 | 427 | $msgerrors = ''; |
428 | 428 | foreach ($errors as $error) { |
429 | - $msgerrors .= html_writer::tag('p', $error->{'message'}, array('class' => 'alert alert-danger'))."\n"; |
|
429 | + $msgerrors .= html_writer::tag('p', $error->{'message'}, array('class' => 'alert alert-danger')) . "\n"; |
|
430 | 430 | } |
431 | 431 | echo $OUTPUT->header(); |
432 | 432 | print_error('view_error_bigbluebutton', 'bigbluebuttonbn', |
433 | - $CFG->wwwroot.'/mod/bigbluebuttonbn/view.php?id='.$id, $msgerrors, $serrors); |
|
433 | + $CFG->wwwroot . '/mod/bigbluebuttonbn/view.php?id=' . $id, $msgerrors, $serrors); |
|
434 | 434 | echo $OUTPUT->footer(); |
435 | 435 | } |
@@ -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. |
@@ -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. |
@@ -298,27 +298,27 @@ discard block |
||
298 | 298 | * $CFG->bigbluebuttonbn['general_warning_message'] = "Would you like to record your BigBlueButton sessions for later viewing? "; |
299 | 299 | */ |
300 | 300 | |
301 | - /* |
|
301 | + /* |
|
302 | 302 | * The warning box is always shown to administrators, but it is also possible to define other roles |
303 | 303 | * to whom the it will be shown. The roles are based on the shortnames defined by Moodle: |
304 | 304 | * 'manager,coursecreator,editingteacher,teacher,student,guest,user,frontpage' |
305 | 305 | * $CFG->bigbluebuttonbn['general_warning_roles'] = 'editingteacher,teacher'; |
306 | 306 | */ |
307 | 307 | |
308 | - /* |
|
308 | + /* |
|
309 | 309 | * As the general_warning_message is shown in a box, its type can be defined with general_warning_type |
310 | 310 | * The default type is 'info' which is normaly rendered in blue when using a bootstrap theme. |
311 | 311 | * All the modifiers for boxed in bootstrap can be used [info|success|warning|danger]. |
312 | 312 | * $CFG->bigbluebuttonbn['general_warning_box_type'] = 'info'; |
313 | 313 | */ |
314 | 314 | |
315 | - /* |
|
315 | + /* |
|
316 | 316 | * Additionally, when general_warning_button_href value is different than "", a button |
317 | 317 | * can also be shown right after the message. |
318 | 318 | * $CFG->bigbluebuttonbn['general_warning_button_href'] = "http://blindsidenetworks.com/"; |
319 | 319 | */ |
320 | 320 | |
321 | - /* |
|
321 | + /* |
|
322 | 322 | * Finally, the text and class for the button can be modified |
323 | 323 | * $CFG->bigbluebuttonbn['general_warning_button_text'] = "Upgrade your site"; |
324 | 324 | * $CFG->bigbluebuttonbn['general_warning_button_class'] = "btn btn-primary"; |
@@ -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); |