message_support
class message_support
| internal |
Utility functions for Moodle messaging and emails.
Constants
| CONVERSATION_TYPE_SELF |
|
| CONVERSATION_TYPE_INDIVIDUAL |
|
Methods
Creates a new Moodle message object.
Sends a message using Moodle's message API.
Retrieves the Moodle no-reply user record.
Creates a temporary attachment from a stored file.
Retrieves the conversation ID for a given message.
Creates an HTML link for use in messages.
Retrieves the self-conversation object for a user.
Creates a new conversation between users.
Retrieves the ID of a conversation between specific users.
Details
at line 45
static message
create_message()
Creates a new Moodle message object.
at line 57
static false|int
send(message $msg)
Sends a message using Moodle's message API.
at line 75
static bool
email(stdClass $to, stdClass $from, string $subject, string $html, string $text, string $attachment = '', string $name = '')
Sends an email to a user.
at line 85
static stdClass
get_noreply_user()
Retrieves the Moodle no-reply user record.
at line 97
static array
create_temp_attachment(stored_file $file)
Creates a temporary attachment from a stored file.
at line 114
static int
get_conversation_id(message $message)
Retrieves the conversation ID for a given message.
at line 149
static string
create_link(moodle_url $url, string $text)
Creates an HTML link for use in messages.
at line 161
static false|stdClass
get_self_conversation(int $userid)
Retrieves the self-conversation object for a user.
at line 174
static stdClass
create_conversation(int $type, array $userids)
Creates a new conversation between users.
at line 186
static false|int
get_conversation_between_users(array $userids)
Retrieves the ID of a conversation between specific users.