Note:

If you want to create a new page for developers, you should create it on the Moodle Developer Resource site.

Forum notifications as messages

From MoodleDocs

Moodle 2.0


WARNING: Under construction RIGHT NOW!

The problems

Forum notifications are now done via the messaging system rather than by the forum sending out emails itself. Unfortunately forum notifications then appear on /message/index.php which is proving to be annoying and confusing on a site with busy forums. There two closely related problems:

Forumnotificationsinmessaging.gif

  • Each forum post notification consumes a lot of screen real estate. See the screenshot for an example. This makes the whole interface less usable as it requires lots of scrolling past unnecessary and repeated text.
  • Forum notifications appear to be coming from the author of the forum post and so are displayed among personal messages exchanged by the two users. For example if two users, Mary and John, are having a conversation via personal messages and Mary posts in a forum, John's notification of that post will appear among their personal messages as if it were a personal message from Mary. This is potentially confusing and interrupts the flow of conversation.

Possible solutions

  1. Reduce the real estate consumed by forum notifications. The notification message could be reviewed to reduce its overall size. Additionally, with IMs the version that is displayed on /message/index.php doesn't include the footer that is appended to the emailed version. This condenses their display and prevents the inclusion of standard boilerplate like "This is a copy of a message posted on the CF101 website" on the messaging screen. The messaging system could be enhanced to allow the calling code to supply a header and footer which could be included in the emails but then discarded. Ideally the forum posts notifications on the messaging page could be reduced to something like the following:


Andrew posted in (forum name)

(Andrew's post content)

To reply: (link to the post)


with the version being emailed looking something like this:


This is a copy of a message posted in CF101 -> Forums -> (forum name) -> (discussion name)

Andrew posted in (forum name)

(Andrew's post content)

To reply: (link to the post)

To unsubscribe from this forum: (unsubscribe link)


  1. Differentiate messages and notifications. Add a new column called notification to the message table (and maybe message_read) to flag messages that are notifications rather than a message from another user. Messages continue to be read and then moved to message_read and displayed on /message/index.php as they are now. However, messages that are marked as notifications could be dealt with then either deleted or moved to message_read and ignored by the code that retrieves the messages to display on /message/index.php Alternatively, once we can tell notifications from personal messages, notifications could continue to be displayed on /message/index.php but css could be used to visually differentiate between messages and notifications. If we were going to do this we'd most like want to also do #1.
  1. Try to avoid putting forum notifications through the messaging system. When the forum cron code is constructing the forum post notifications instead of handing them over to the messaging system it could check the user's messaging preferences and if they have selected ONLY email as handler for forum posts it could send the emails itself and simply not use the messaging system. Popup and Jabber notifications would still need to be handled by the messaging code so this measure would mitigate but not fully resolve the issue.
  1. Are there any other alternatives?