Note:

This site is no longer used and is in read-only mode. Instead please go to our new Moodle Developer Resource site.

Messaging custom components: Difference between revisions

From MoodleDocs
No edit summary
No edit summary
 
(16 intermediate revisions by one other user not shown)
Line 1: Line 1:
{{Work in progress}}
==Intro==
=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.
Since Moodle 2.0 it has been possible to easily integrate your own custom components into 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 messaging system.
* message providers - These create new messages and send them via the message API.
* message processors - These are optionally used by message recipients and receive and process messages sent to that user.
* 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 or message processor as well as sample implementations of each are below.
Instructions on how to build a message provider and message processor as well as sample code are below.


=Message provider=
==Message provider==


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


=Message processor=
==Message processor==


work in progress...
It is possible to create custom components called message processors or message consumer that are notified when a user receives a message. The component can then notify the user via a communication means outside of Moodle or perform some other automated action. Full details of how to create a custom message processor are available at [[Messaging_consumers]]
 
[[Category:Messaging]]

Latest revision as of 12:17, 26 November 2012

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

It is possible to create custom components called message processors or message consumer that are notified when a user receives a message. The component can then notify the user via a communication means outside of Moodle or perform some other automated action. Full details of how to create a custom message processor are available at Messaging_consumers