Unfortunately, I think there is no automatic way to do it
I see you're planning to use Recent Activity a lot, so there is one little glitch in it which you should be aware of. The "Recent Activity" shows new messages
since you last displayed any page in the current course, so in some circumstances you may actually miss a message. Suppose you enter a course at 10:00 and look at the recent Activity Box, where you notice a few messages that you would like to reply to. So you open these messages and post replies, which takes you 20 minutes, and then you log off. Unfortunately, if any messages were posted by somebody else between 10:00 and 10:20, you will never see them in the "Recent Activity"
- just something to keep in mind.
A workaround which I use is to visit the course homepage again
just before logging out and check if there have been any new messages posted while I was using the course. (But then I might again see some messages which I would like to respond to, so I open them, post replies and redisplay the homepage before logging out... and I might again see some messages which I would like to respond to...
)