Search moodle.org's
Developer Documentation

See Release Notes
Long Term Support Release

  • Bug fixes for general core bugs in 4.1.x will end 13 November 2023 (12 months).
  • Bug fixes for security issues in 4.1.x will end 10 November 2025 (36 months).
  • PHP version: minimum PHP 7.4.0 Note: minimum PHP version has increased since Moodle 4.0. PHP 8.0.x is supported too.

(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.

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

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.

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

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.

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

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

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

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.

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

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.

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

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

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

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.

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

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