Messaging: I want to delete old messages - how to do that?

Messaging: I want to delete old messages - how to do that?

by Melissa Wert -
Number of replies: 3
I have several old messages sent to me by students when we were learning how to use Moodle last spring. How can I delete them? Is it possible to delete messages after they've been read?
Also, we have deleted several accounts of users who left the school; however, their messages still appear in my messages box even though they are not enrolled in any courses and do not have a profile. How do we clean out deleted users' messages?
Average of ratings: -
In reply to Melissa Wert

Re: Messaging: I want to delete old messages - how to do that?

by Helen Foster -
Picture of Core developers Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers Picture of Translators
Hi Melissa,

Unfortunately there's not yet a way of deleting old messages through Moodle, however if you have MySQL Admin you can search and delete old messages directly in the message table. Please be careful - a database backup is recommended before doing anything in the database. wink
In reply to Melissa Wert

Re: Messaging: I want to delete old messages - how to do that?

by Anthony Borrow -
Picture of Core developers Picture of Plugin developers Picture of Testers
Melissa - I am just curious what version of Moodle you have because there was an issue a while back where the messages of deleted users were being orphaned (MDL-16824). After messages are read they should be transferred to a separate table where you will have access to the message history but really only if you are searching for messages or looking up your message history with a particular student. It sounds like you may have some messages that are lingering in your unread messages section. If so, updating the the latest version of Moodle should resolve the issue. Peace - Anthony
In reply to Anthony Borrow

Re: Messaging: I want to delete old messages - how to do that?

by john o'connor -

I presume that like others we would like to look at some student messages and check that students are doing the right thing and I'm just wondering if you cannot delete old messages? Will they take up a lot of room in MSQL or do they stay there forever?

If the messages take up little to no room will they be deleted as the student leaves the course or is unenrolled.? Maybe that would solve the issue for some?