Note:

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

Messaging custom components

From MoodleDocs

Intro

Since Moodle 2.0 it has been possible for custom components to send messages and to process a user's received messages via the Moodle messaging system. There are two types of components you may wish to implement.

  • message providers - These create new messages and send them via the message API.
  • message processors - These are optionally enabled by users receiving messages to process messages sent to that user.

Instructions on how to build a message provider and message processor as well as sample code are below.

Message provider

Any component may be a messages provider and send messages through the Moodle messaging API. Full details are provided at Message_API

Message processor

A message processor, also known as a message consumer, Messaging_consumers