Moodle APIs 4.3
Moodle 4.3.6 (Build: 20240812)
lib.php File Reference

Functions

 core_message_can_edit_message_profile ($user)
 Checks if current user is allowed to edit messaging preferences of another user.
 
 core_message_standard_after_main_region_html ()
 Render the message drawer to be included in the top of the body of each page.
 
 core_message_user_preferences ()
 Implements callback user_preferences, lists preferences that users are allowed to update directly.
 
 get_message_output_default_preferences ()
 Get messaging outputs default (site) preferences.
 
 get_message_processor ($type)
 Get an instance of the message_output class for one of the output plugins.
 
 get_message_processors ($ready=false, $reset=false, $resetonly=false)
 Get all message processors, validate corresponding plugin existance and system configuration.
 
 get_message_providers ()
 Get all message providers, validate their plugin existance and system configuration.
 
 message_format_contexturl ($message)
 Format a the context url and context url name of a message for display.
 
 message_format_message ($message, $format='', $keywords='', $class='other')
 Format a message for display in the message history.
 
 message_get_messages ($useridto, $useridfrom=0, $notifications=-1, $read=MESSAGE_GET_READ, $sort='mr.timecreated DESC', $limitfrom=0, $limitnum=0)
 Get messages sent or/and received by the specified users.
 
 message_output_fragment_processor_settings ($args=[])
 Handles displaying processor settings in a fragment.
 
 message_page_type_list (string $pagetype, ?context $parentcontext, ?context $currentcontext)
 Return a list of page types.
 
 message_post_message ($userfrom, $userto, $message, $format)
 Send a message from one user to another.
 
 message_search_users ($courseids, $searchtext, $sort='', $exceptions='')
 Search through course users.
 
 translate_message_default_setting ($plugindefault, $processorname)
 Translate message default settings from binary value to the array of string representing the settings to be stored.
 

Variables

const MESSAGE_DEFAULT_ENABLED 0x01
 
const MESSAGE_DEFAULT_LOGGEDIN 0x01
 Define contants for messaging default settings population.
 
const MESSAGE_DEFAULT_LOGGEDOFF 0x02
 
const MESSAGE_DEFAULT_MAX_POLL_IN_SECONDS 2 * MINSECS
 
const MESSAGE_DEFAULT_MIN_POLL_IN_SECONDS 10
 Set default values for polling.
 
const MESSAGE_DEFAULT_PERMITTED 'permitted'
 Set default value for default outputs permitted setting.
 
const MESSAGE_DEFAULT_TIMEOUT_POLL_IN_SECONDS 5 * MINSECS
 
const MESSAGE_DISALLOWED 0x04
 
const MESSAGE_FORCED 0x0c
 
const MESSAGE_GET_READ 1
 
const MESSAGE_GET_READ_AND_UNREAD 2
 
const MESSAGE_GET_UNREAD 0
 To get only read, unread or both messages or notifications.
 
const MESSAGE_HISTORY_ALL 1
 
const MESSAGE_PERMITTED 0x08
 
const MESSAGE_PERMITTED_MASK 0x0c
 
const MESSAGE_SEARCH_MAX_RESULTS 200
 
const MESSAGE_SHORTLENGTH 300
 Library functions for messaging.
 
const MESSAGE_TYPE_MESSAGE 'message'
 
const MESSAGE_TYPE_NOTIFICATION 'notification'