Search moodle.org's
Developer Documentation

See Release Notes

  • Bug fixes for general core bugs in 4.2.x will end 22 April 2024 (12 months).
  • Bug fixes for security issues in 4.2.x will end 7 October 2024 (18 months).
  • PHP version: minimum PHP 8.0.0 Note: minimum PHP version has increased since Moodle 4.1. PHP 8.1.x is supported too.

Differences Between: [Versions 310 and 402] [Versions 311 and 402] [Versions 39 and 402] [Versions 400 and 402] [Versions 401 and 402]

Library of functions for chat outside of the core api

File Size: 254 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