Search moodle.org's
Developer Documentation


  • Bug fixes for general core bugs in 2.8.x ended 9 November 2015 (12 months).
  • Bug fixes for security issues in 2.8.x ended 9 May 2016 (18 months).
  • minimum PHP 5.4.4 (always use latest PHP 5.4.x or 5.5.x on Windows - http://windows.php.net/download/), PHP 7 is NOT supported

  • Class: core_message_external  - X-Ref

    Message external functions

    send_instant_messages_parameters()   X-Ref
    Returns description of method parameters

    return: external_function_parameters

    send_instant_messages($messages = array()   X-Ref
    Send private messages from the current USER to other users

    return: array
    param: array $messages An array of message to send.

    send_instant_messages_returns()   X-Ref
    Returns description of method result value

    return: external_description

    create_contacts_parameters()   X-Ref
    Create contacts parameters description.

    return: external_function_parameters

    create_contacts($userids)   X-Ref
    Create contacts.

    return: external_description
    param: array $userids array of user IDs.

    create_contacts_returns()   X-Ref
    Create contacts return description.

    return: external_description

    delete_contacts_parameters()   X-Ref
    Delete contacts parameters description.

    return: external_function_parameters

    delete_contacts($userids)   X-Ref
    Delete contacts.

    return: null
    param: array $userids array of user IDs.

    delete_contacts_returns()   X-Ref
    Delete contacts return description.

    return: external_description

    block_contacts_parameters()   X-Ref
    Block contacts parameters description.

    return: external_function_parameters

    block_contacts($userids)   X-Ref
    Block contacts.

    return: external_description
    param: array $userids array of user IDs.

    block_contacts_returns()   X-Ref
    Block contacts return description.

    return: external_description

    unblock_contacts_parameters()   X-Ref
    Unblock contacts parameters description.

    return: external_function_parameters

    unblock_contacts($userids)   X-Ref
    Unblock contacts.

    return: null
    param: array $userids array of user IDs.

    unblock_contacts_returns()   X-Ref
    Unblock contacts return description.

    return: external_description

    get_contacts_parameters()   X-Ref
    Get contacts parameters description.

    return: external_function_parameters

    get_contacts()   X-Ref
    Get contacts.

    return: external_description
    param: array $userids array of user IDs.

    get_contacts_returns()   X-Ref
    Get contacts return description.

    return: external_description

    search_contacts_parameters()   X-Ref
    Search contacts parameters description.

    return: external_function_parameters

    search_contacts($searchtext, $onlymycourses = false)   X-Ref
    Search contacts.

    return: external_description
    param: string $searchtext query string.
    param: bool $onlymycourses limit the search to the user's courses only.

    search_contacts_returns()   X-Ref
    Search contacts return description.

    return: external_description

    get_messages_parameters()   X-Ref
    Get messages parameters description.

    return: external_function_parameters

    get_messages($useridto, $useridfrom = 0, $type = 'both', $read = true,$newestfirst = true, $limitfrom = 0, $limitnum = 0)   X-Ref
    Get messages function implementation.

    return: external_description
    param: int      $useridto       the user id who received the message
    param: int      $useridfrom     the user id who send the message. -10 or -20 for no-reply or support user
    param: string   $type           type of message to return, expected values: notifications, conversations and both
    param: bool     $read           true for retreiving read messages, false for unread
    param: bool     $newestfirst    true for ordering by newest first, false for oldest first
    param: int      $limitfrom      limit from
    param: int      $limitnum       limit num

    get_messages_returns()   X-Ref
    Get messages return description.

    return: external_single_structure

    Class: moodle_message_external  - X-Ref

    Deprecated message external functions

    send_instantmessages_parameters()   X-Ref
    Returns description of method parameters

    return: external_function_parameters

    send_instantmessages($messages = array()   X-Ref
    Send private messages from the current USER to other users

    return: array
    param: array $messages An array of message to send.

    send_instantmessages_returns()   X-Ref
    Returns description of method result value

    return: external_description

    Search This Site: