Moodle APIs  3.8
Moodle 3.8.6 (Build: 20201109)
Functions | Variables
lib.php File Reference

Library functions for messaging. More...

Functions

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

Variables

const MESSAGE_DEFAULT_LOGGEDIN 0x01
 Define contants for messaging default settings population. More...
 
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_HISTORY_ALL 1
 
const MESSAGE_PERMITTED 0x08
 
const MESSAGE_PERMITTED_MASK 0x0c
 
const MESSAGE_SEARCH_MAX_RESULTS 200
 
const MESSAGE_SHORTLENGTH 300
 
const MESSAGE_TYPE_MESSAGE 'message'
 
const MESSAGE_TYPE_NOTIFICATION 'notification'
 

Detailed Description

Library functions for messaging.

License
http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later