Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

message MDL-26119 now logs when a user sends a message

  • Loading branch information...
commit 88c9987e8909d345e72c31a93cbfda61005a3cc5 1 parent eef3578
Andrew Davis authored February 02, 2011

Showing 1 changed file with 7 additions and 1 deletion. Show diff stats Hide diff stats

  1. 8  message/index.php
8  message/index.php
@@ -158,7 +158,13 @@
158 158
 
159 159
             $messageid = message_post_message($user1, $user2, $data->message, FORMAT_MOODLE, 'direct');
160 160
             if (!empty($messageid)) {
161  
-                redirect($CFG->wwwroot . '/message/index.php?usergroup='.$usergroup.'&id='.$user2->id);
  161
+                //Not including message ID as the ID may change when its moved to message_read
  162
+                //.'#m'.$messageid;
  163
+                $returnurl = '/message/index.php?usergroup='.$usergroup.'&id='.$user2->id;
  164
+
  165
+                //including the id of the user sending the message in the logged URL
  166
+                add_to_log(SITEID, 'message', 'write', $returnurl.'&user='.$user1->id, $user1->id);
  167
+                redirect($CFG->wwwroot.$returnurl);
162 168
             }
163 169
         }
164 170
     }

0 notes on commit 88c9987

Please sign in to comment.
Something went wrong with that request. Please try again.