Special thanks to Josh Davis for sharing this interesting approach. Just last month, I found myself wishing for an easy way to read all the messages students were sending to each other in our middle school situation, and this solution would have been handy to implement!
Just thought I’d share with you some PHP I wrote to help solve a problem I was having. I am running a moodle for my middle school classes and I want them to be able to use the messaging feature, but not abuse the system. So I wrote a quick and dirty php file to allow me to see all the messages on the system at a glance. Yes, I am a bit of a control freak in my class. My moodle only has 150 users who aren’t super active with messaging (yet) so this works fine for me but may not work so well for larger ones. This isn’t secure, because anyone who guesses the URL of this php file can read every message, but I plan on fixing that as I improve it. Also, I know VERY LITTLE about PHP coding so I’m sure there are better ways to do this
Here’s the code he shared as a link you can download. Note you’ll need to edit out everything but the code.
Update: Be sure to read the comments and check out Rusty Meyners tip without any special coding:
http://YOURmoodle.YOURdomain.net/message/listall.php?sortorder=0&days=1&user&sender&recipient
Rusty provided another link with more details. Give it a shot!
Update #2: Jeff Kitterman pointed out there is a Moodle Admin report that does this same thing without coding, etc. You can read about the Admin->Report->Message Log Report online.
Enter your email address:
Delivered by FeedBurner
Discover more from Another Think Coming
Subscribe to get the latest posts sent to your email.



Miguel, try the following URL, adjusted for your Moodle. No PHP tricks needed – only Role with privilege to read chats.http://YOURmoodle.YOURdomain.net/message/listall.php?sortorder=0&days=1&user=&sender=&recipient=
Miguel, try the following URL, adjusted for your Moodle. No PHP tricks needed – only Role with privilege to read chats.http://YOURmoodle.YOURdomain.net/message/listall.php?sortorder=0&days=1&user=&sender=&recipient=
Wow, that could have saved me some time!
Wow, that could have saved me some time!
Oopsie! Turns out not quite that simple. Here is a link to forum discussion and PHP script that I apparently installed and forgot:http://moodle.org/mod/forum/discuss.php?d=27559Link to the file in question:http://moodle.org/pluginfile.php/192/mod_forum/attachment/470329/listall.phpI seem to have dropped it into my /var/www/moodle/messagefolder two years ago and forgotten it.My bad 🙂
Oopsie! Turns out not quite that simple. Here is a link to forum discussion and PHP script that I apparently installed and forgot:http://moodle.org/mod/forum/discuss.php?d=27559Link to the file in question:http://moodle.org/pluginfile.php/192/mod_forum/attachment/470329/listall.phpI seem to have dropped it into my /var/www/moodle/messagefolder two years ago and forgotten it.My bad 🙂