|
@@ -46,7 +46,7 @@ discard block |
|
|
block discarded – undo |
|
46
|
46
|
public static function notification_process($bigbluebuttonbn, $action) { |
|
47
|
47
|
global $USER; |
|
48
|
48
|
// Prepare message. |
|
49
|
|
- $msg = (object) array(); |
|
|
49
|
+ $msg = (object)array(); |
|
50
|
50
|
// Build the message_body. |
|
51
|
51
|
$msg->action = $action; |
|
52
|
52
|
$msg->activity_type = ''; |
|
@@ -71,26 +71,26 @@ discard block |
|
|
block discarded – undo |
|
71
|
71
|
* @return string |
|
72
|
72
|
*/ |
|
73
|
73
|
public static function notification_msg_html($msg) { |
|
74
|
|
- $messagetext = '<p>'.$msg->activity_type.' "'.$msg->activity_title.'" '. |
|
75
|
|
- get_string('email_body_notification_meeting_has_been', 'bigbluebuttonbn').' '.$msg->action.'.</p>'."\n"; |
|
76
|
|
- $messagetext .= '<p><b>'.$msg->activity_title.'</b> '. |
|
77
|
|
- get_string('email_body_notification_meeting_details', 'bigbluebuttonbn').':'."\n"; |
|
78
|
|
- $messagetext .= '<table border="0" style="margin: 5px 0 0 20px"><tbody>'."\n"; |
|
79
|
|
- $messagetext .= '<tr><td style="font-weight:bold;color:#555;">'. |
|
80
|
|
- get_string('email_body_notification_meeting_title', 'bigbluebuttonbn').': </td><td>'."\n"; |
|
81
|
|
- $messagetext .= $msg->activity_title.'</td></tr>'."\n"; |
|
82
|
|
- $messagetext .= '<tr><td style="font-weight:bold;color:#555;">'. |
|
83
|
|
- get_string('email_body_notification_meeting_description', 'bigbluebuttonbn').': </td><td>'."\n"; |
|
84
|
|
- $messagetext .= $msg->activity_description.'</td></tr>'."\n"; |
|
85
|
|
- $messagetext .= '<tr><td style="font-weight:bold;color:#555;">'. |
|
86
|
|
- get_string('email_body_notification_meeting_start_date', 'bigbluebuttonbn').': </td><td>'."\n"; |
|
87
|
|
- $messagetext .= $msg->activity_openingtime.'</td></tr>'."\n"; |
|
88
|
|
- $messagetext .= '<tr><td style="font-weight:bold;color:#555;">'. |
|
89
|
|
- get_string('email_body_notification_meeting_end_date', 'bigbluebuttonbn').': </td><td>'."\n"; |
|
90
|
|
- $messagetext .= $msg->activity_closingtime.'</td></tr>'."\n"; |
|
91
|
|
- $messagetext .= '<tr><td style="font-weight:bold;color:#555;">'.$msg->action.' '. |
|
92
|
|
- get_string('email_body_notification_meeting_by', 'bigbluebuttonbn').': </td><td>'."\n"; |
|
93
|
|
- $messagetext .= $msg->activity_owner.'</td></tr></tbody></table></p>'."\n"; |
|
|
74
|
+ $messagetext = '<p>' . $msg->activity_type . ' "' . $msg->activity_title . '" ' . |
|
|
75
|
+ get_string('email_body_notification_meeting_has_been', 'bigbluebuttonbn') . ' ' . $msg->action . '.</p>' . "\n"; |
|
|
76
|
+ $messagetext .= '<p><b>' . $msg->activity_title . '</b> ' . |
|
|
77
|
+ get_string('email_body_notification_meeting_details', 'bigbluebuttonbn') . ':' . "\n"; |
|
|
78
|
+ $messagetext .= '<table border="0" style="margin: 5px 0 0 20px"><tbody>' . "\n"; |
|
|
79
|
+ $messagetext .= '<tr><td style="font-weight:bold;color:#555;">' . |
|
|
80
|
+ get_string('email_body_notification_meeting_title', 'bigbluebuttonbn') . ': </td><td>' . "\n"; |
|
|
81
|
+ $messagetext .= $msg->activity_title . '</td></tr>' . "\n"; |
|
|
82
|
+ $messagetext .= '<tr><td style="font-weight:bold;color:#555;">' . |
|
|
83
|
+ get_string('email_body_notification_meeting_description', 'bigbluebuttonbn') . ': </td><td>' . "\n"; |
|
|
84
|
+ $messagetext .= $msg->activity_description . '</td></tr>' . "\n"; |
|
|
85
|
+ $messagetext .= '<tr><td style="font-weight:bold;color:#555;">' . |
|
|
86
|
+ get_string('email_body_notification_meeting_start_date', 'bigbluebuttonbn') . ': </td><td>' . "\n"; |
|
|
87
|
+ $messagetext .= $msg->activity_openingtime . '</td></tr>' . "\n"; |
|
|
88
|
+ $messagetext .= '<tr><td style="font-weight:bold;color:#555;">' . |
|
|
89
|
+ get_string('email_body_notification_meeting_end_date', 'bigbluebuttonbn') . ': </td><td>' . "\n"; |
|
|
90
|
+ $messagetext .= $msg->activity_closingtime . '</td></tr>' . "\n"; |
|
|
91
|
+ $messagetext .= '<tr><td style="font-weight:bold;color:#555;">' . $msg->action . ' ' . |
|
|
92
|
+ get_string('email_body_notification_meeting_by', 'bigbluebuttonbn') . ': </td><td>' . "\n"; |
|
|
93
|
+ $messagetext .= $msg->activity_owner . '</td></tr></tbody></table></p>' . "\n"; |
|
94
|
94
|
return $messagetext; |
|
95
|
95
|
} |
|
96
|
96
|
|
|
@@ -106,13 +106,13 @@ discard block |
|
|
block discarded – undo |
|
106
|
106
|
$coursemodinfo = \course_modinfo::instance($bigbluebuttonbn->course); |
|
107
|
107
|
$course = $coursemodinfo->get_course($bigbluebuttonbn->course); |
|
108
|
108
|
// Complete message. |
|
109
|
|
- $msg = (object) array(); |
|
|
109
|
+ $msg = (object)array(); |
|
110
|
110
|
$msg->user_name = fullname($sender); |
|
111
|
111
|
$msg->user_email = $sender->email; |
|
112
|
112
|
$msg->course_name = $course->fullname; |
|
113
|
|
- $message .= '<p><hr/><br/>'.get_string('email_footer_sent_by', 'bigbluebuttonbn').' '. |
|
114
|
|
- $msg->user_name.'('.$msg->user_email.') '; |
|
115
|
|
- $message .= get_string('email_footer_sent_from', 'bigbluebuttonbn').' '.$msg->course_name.'.</p>'; |
|
|
113
|
+ $message .= '<p><hr/><br/>' . get_string('email_footer_sent_by', 'bigbluebuttonbn') . ' ' . |
|
|
114
|
+ $msg->user_name . '(' . $msg->user_email . ') '; |
|
|
115
|
+ $message .= get_string('email_footer_sent_from', 'bigbluebuttonbn') . ' ' . $msg->course_name . '.</p>'; |
|
116
|
116
|
// Process the message sending. |
|
117
|
117
|
foreach (self::users_to_notify($bigbluebuttonbn->course) as $user) { |
|
118
|
118
|
if ($user->id != $sender->id) { |