Search moodle.org's
Developer Documentation

See Release Notes

  • Bug fixes for general core bugs in 4.0.x will end 8 May 2023 (12 months).
  • Bug fixes for security issues in 4.0.x will end 13 November 2023 (18 months).
  • PHP version: minimum PHP 7.3.0 Note: the minimum PHP version has increased since Moodle 3.10. PHP 7.4.x is also supported.

(no description)

File Size: 500 lines (17 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class


Class: logger  - X-Ref

Utility class for all logs routines helper.

get_user_completion_logs(instance $instance,?int $userid,?array $filters,?int $timestart = 0)   X-Ref
Get the user event logs related to completion, for the specified user in the named instance.

return: array
param: instance $instance
param: int|null $userid
param: array|null $filters
param: int|null $timestart

get_user_completion_logs_with_userfields(instance $instance,?int $userid,?array $filters,?int $timestart = 0)   X-Ref
Get the user event logs related to completion, for the specified user in the named instance.

return: array
param: instance $instance
param: int|null $userid
param: array|null $filters
param: int|null $timestart

get_user_completion_logs_max_timestamp(instance $instance,?int $userid,?array $filters,?int $timestart = 0)   X-Ref
Get the latest timestamp for any event logs related to completion, for the specified user in the named instance.

return: int
param: instance $instance
param: int|null $userid
param: array|null $filters
param: int|null $timestart

get_user_completion_sql_params(instance $instance, ?int $userid, ?array $filters, ?int $timestart,?string $logtablealias = null)   X-Ref
Helper method to get the right SQL query for completion

return: array
param: instance $instance
param: int|null $userid
param: array|null $filters
param: int|null $timestart
param: string|null $logtablealias

log_instance_created(stdClass $instancedata)   X-Ref
Log that an instance was created.

Note: This event cannot take the instance class as it is typically called before the cm has been configured.

param: stdClass $instancedata

log_instance_updated(instance $instance)   X-Ref
Log that an instance was updated.

param: instance $instance

log_instance_deleted(instance $instance)   X-Ref
Log an instance deleted event.

param: instance $instance

log_event_callback(instance $instance, array $overrides, array $meta)   X-Ref
Log an event callback.

return: int The new count of callback events
param: instance $instance
param: array $overrides
param: array $meta

log_event_summary(instance $instance, array $overrides = [], array $meta = [])   X-Ref
Log an event summary event.

param: instance $instance
param: array $overrides
param: array $meta

log_instance_viewed(instance $instance)   X-Ref
Log that an instance was viewed.

param: instance $instance

log_meeting_ended_event(instance $instance)   X-Ref
Log the events for when a meeting was ended.

param: instance $instance

log_meeting_joined_event(instance $instance, int $origin)   X-Ref
Log the relevant events for when a meeting was joined.

param: instance $instance
param: int $origin

log_meeting_left_event(instance $instance)   X-Ref
Log the relevant events for when a user left a meeting.

param: instance $instance

log_recording_played_event(instance $instance, int $rid)   X-Ref
Log the relevant events for when a recording has been played.

param: instance $instance
param: int $rid RecordID

log(instance $instance, string $event, array $overrides = [], ?string $meta = null)   X-Ref
Register a bigbluebuttonbn event from an instance.

return: bool
param: instance $instance
param: string $event
param: array $overrides
param: string|null $meta

raw_log(string $event,int $instanceid,int $courseid,string $meetingid,array $overrides = [],?string $meta = null)   X-Ref
Register a bigbluebuttonbn event from raw data.

return: bool
param: string $event
param: int $instanceid
param: int $courseid
param: string $meetingid
param: array $overrides
param: string|null $meta

log_moodle_event(instance $instance, string $type, array $options = [])   X-Ref
Helper register a bigbluebuttonbn event.

param: instance $instance
param: string $type
param: array $options [timecreated, userid, other]

count_callback_events(string $id, string $callbacktype = 'recording_ready')   X-Ref
Helper function to count the number of callback logs matching the supplied specifications.

return: int
param: string $id
param: string $callbacktype

get_printable_event_name(object $log)   X-Ref
Get the event name (human friendly version)

param: object $log object as returned by get_user_completion_logs_with_userfields