|
|
(29 intermediate revisions by 13 users not shown) |
Line 1: |
Line 1: |
| TODO: delete https://docs.moodle.org/dev/Messaging, this document replaces it.
| | {{Template:Migrated|newDocId=/docs/apis/core/message/}} |
| | |
| :: No, don't bother. Start with [[Messaging_2.0]] - rename it here if you must, clean it up a bit, and you are done. Much time saved. It really worries me that I have seen you guys launch into new documentation pages without finding the existing good documentation.--[[User:Tim Hunt|Tim Hunt]] 17:01, 12 January 2012 (WST)
| |
| | |
| ==What is this document?==
| |
| | |
| This document describes how to make use of the Moodle messaging API to send messages to Moodle users.
| |
| | |
| If you are after a general introduction on using the Moodle messaging system go to https://docs.moodle.org/en/Messaging
| |
| | |
| If you are looking for implementation details of the messaging system's internal structure go to https://docs.moodle.org/dev/Messaging_2.0
| |
| | |
| If you are looking for instructions on the implementation of a custom message processor (a component that receives messages sent to a user) go to https://docs.moodle.org/dev/Messaging_custom_components
| |
| | |
| If you are looking for instructions on sending messages programatically within Moodle then read on...
| |
| | |
| ==Overview==
| |
| | |
| Moodle components have the ability to send message to users via the Moodle messaging system. Any type of component, for example a plugin or block, can register as a message producer then send messages to users.
| |
| | |
| ==File locations==
| |
| | |
| The Message API is all in lib/messagelib.php and is automatically included for you during the page setup.
| |
| | |
| ==Functions==
| |
| | |
| message_send() is the primary point of contact for the message API. Call it to send a message to a user. You can find a full description of the arguments that must be supplied at (link to phpdocs)
| |
| | |
| ==Examples==
| |
| | |
| ===How to register as a message producer===
| |
| | |
| ===How to send a message===
| |