|  | @@ -47,7 +47,7 @@  discard block | 
                                                    
                                                        |  |  |  block discarded – undo | 
                                                                                                                                                                                                                    
                                                            | 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 | 
                                                    
                                                        |  |  |  block discarded – undo | 
                                                                                                                                                                                                                    
                                                            | 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 | 
                                                    
                                                        |  |  |  block discarded – undo | 
                                                                                                                                                                                                                    
                                                            | 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); |