Search moodle.org's
Developer Documentation

See Release Notes

  • Bug fixes for general core bugs in 3.11.x will end 14 Nov 2022 (12 months plus 6 months extension).
  • Bug fixes for security issues in 3.11.x will end 13 Nov 2023 (18 months plus 12 months extension).
  • PHP version: minimum PHP 7.3.0 Note: minimum PHP version has increased since Moodle 3.10. PHP 7.4.x is supported too.

Differences Between: [Versions 311 and 402] [Versions 311 and 403]

Library of functions for chat outside of the core api

File Size: 249 lines (8 kb)
Included or required:0 times
Referenced: 1 time
Includes or requires: 0 files

Defines 3 classes

chat_portfolio_caller:: (9 methods):
  expected_callbackargs()
  load_data()
  base_supported_formats()
  expected_time()
  get_sha1()
  check_permissions()
  prepare_package()
  display_name()
  get_return_url()

event_message:: (1 method):
  __construct()

user_message:: (1 method):
  __construct()


Class: chat_portfolio_caller  - X-Ref


expected_callbackargs()   X-Ref

return: array

load_data()   X-Ref


base_supported_formats()   X-Ref

return: array

expected_time()   X-Ref
No description

get_sha1()   X-Ref

return: string

check_permissions()   X-Ref

return: bool

prepare_package()   X-Ref


display_name()   X-Ref

return: string

get_return_url()   X-Ref

return: string

Class: event_message  - X-Ref

A chat event such a user entering or leaving a chat activity

__construct($senderprofile, $sendername, $time, $event, $theme)   X-Ref
event_message constructor

param: string $senderprofile The URL of the profile of the user who caused the event
param: string $sendername The ready to display name of the user who caused the event
param: string $time Ready to display event time
param: string $theme The chat theme name

Class: user_message  - X-Ref

A chat message from a user

__construct($senderprofile, $sendername, $avatar, $mymessageclass, $time, $message, $theme)   X-Ref
user_message constructor

param: string $senderprofile The URL of the profile of the user sending the message
param: string $sendername The ready to display name of the user sending the message
param: string $avatar HTML for the avatar of the user sending the message
param: string $mymessageclass Empty or a html class definition to append to the html
param: string $time Ready to display message time
param: string $message The message
param: string $theme The name of the chat theme to use