Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Merge branch 'MDL-26119_message_logging' of git://github.com/andyjdav…

…is/moodle
  • Loading branch information...
commit d44327efd9864497641f2597a87553f17f4961c8 2 parents 89652ed + 88c9987
@samhemelryk samhemelryk authored
Showing with 7 additions and 1 deletion.
  1. +7 −1 message/index.php
View
8 message/index.php
@@ -158,7 +158,13 @@
$messageid = message_post_message($user1, $user2, $data->message, FORMAT_MOODLE, 'direct');
if (!empty($messageid)) {
- redirect($CFG->wwwroot . '/message/index.php?usergroup='.$usergroup.'&id='.$user2->id);
+ //Not including message ID as the ID may change when its moved to message_read
+ //.'#m'.$messageid;
+ $returnurl = '/message/index.php?usergroup='.$usergroup.'&id='.$user2->id;
+
+ //including the id of the user sending the message in the logged URL
+ add_to_log(SITEID, 'message', 'write', $returnurl.'&user='.$user1->id, $user1->id);
+ redirect($CFG->wwwroot.$returnurl);
}
}
}
Please sign in to comment.
Something went wrong with that request. Please try again.