Moodle PHP Documentation 4.2
Moodle 4.2.8 (Build: 20240610) (2d41ac46f45)
mod_bigbluebuttonbn\logger Class Reference

Static Public Member Functions

static get_printable_event_name (object $log)
 Get the event name (human friendly version)
 
static get_user_completion_logs (instance $instance, ?int $userid, ?array $filters, ?int $timestart=0)
 Get the user event logs related to completion, for the specified user in the named instance.
 
static get_user_completion_logs_max_timestamp (instance $instance, ?int $userid, ?array $filters, ?int $timestart=0)
 Get the latest timestamp for any event logs related to completion, for the specified user in the named instance.
 
static get_user_completion_logs_with_userfields (instance $instance, ?int $userid, ?array $filters, ?int $timestart=0)
 Get the user event logs related to completion, for the specified user in the named instance.
 
static log_event_callback (instance $instance, array $overrides, array $meta)
 Log an event callback.
 
static log_event_summary (instance $instance, array $overrides=[], array $meta=[])
 Log an event summary event.
 
static log_instance_created (stdClass $instancedata)
 Log that an instance was created.
 
static log_instance_deleted (instance $instance)
 Log an instance deleted event.
 
static log_instance_updated (instance $instance)
 Log that an instance was updated.
 
static log_instance_viewed (instance $instance)
 Log that an instance was viewed.
 
static log_meeting_ended_event (instance $instance)
 Log the events for when a meeting was ended.
 
static log_meeting_joined_event (instance $instance, int $origin)
 Log the relevant events for when a meeting was joined.
 
static log_meeting_left_event (instance $instance)
 Log the relevant events for when a user left a meeting.
 
static log_recording_played_event (instance $instance, int $rid)
 Log the relevant events for when a recording has been played.
 

Public Attributes

string const EVENT_ADD = 'Add'
 The bigbluebuttonbn Add event.
 
string const EVENT_CALLBACK = 'Callback'
 The bigbluebuttonbn Callback event.
 
string const EVENT_CREATE = 'Create'
 The bigbluebuttonbn Create event.
 
string const EVENT_CREATE_MIGRATED = 'create-migrated'
 This is a specific log to mark this log as upgraded: used only in the upgrade process from 2.4.
 
string const EVENT_DELETE = 'Delete'
 The bigbluebuttonbn Delete event.
 
string const EVENT_EDIT = 'Edit'
 The bigbluebuttonbn Edit event.
 
string const EVENT_IMPORT = 'Import'
 The bigbluebuttonbn Import event.
 
string const EVENT_IMPORT_MIGRATED = 'import-migrated'
 This is a specific log to mark this log as upgraded: used only in the upgrade process from 2.4.
 
string const EVENT_JOIN = 'Join'
 The bigbluebuttonbn Join event.
 
string const EVENT_LOGOUT = 'Logout'
 The bigbluebuttonbn Logout event.
 
string const EVENT_MEETING_START = 'meeting_start'
 The bigbluebuttonbn meeting_start event.
 
string const EVENT_PLAYED = 'Played'
 The bigbluebuttonbn Playback event.
 
string const EVENT_SUMMARY = 'Summary'
 The bigbluebuttonbn Summary event.
 
const LOG_TO_STRING
 Log event to string that can be internationalised via get_string.
 
int const ORIGIN_BASE = 0
 The user accessed the session from activity page.
 
int const ORIGIN_INDEX = 2
 The user accessed the session from Index.
 
int const ORIGIN_TIMELINE = 1
 The user accessed the session from Timeline.
 

Static Protected Member Functions

static count_callback_events (string $id, string $callbacktype='recording_ready')
 Helper function to count the number of callback logs matching the supplied specifications.
 
static get_user_completion_sql_params (instance $instance, ?int $userid, ?array $filters, ?int $timestart, ?string $logtablealias=null)
 Helper method to get the right SQL query for completion.
 
static log (instance $instance, string $event, array $overrides=[], ?string $meta=null)
 Register a bigbluebuttonbn event from an instance.
 
static log_moodle_event (instance $instance, string $type, array $options=[])
 Helper register a bigbluebuttonbn event.
 
static raw_log (string $event, int $instanceid, int $courseid, string $meetingid, array $overrides=[], ?string $meta=null)
 Register a bigbluebuttonbn event from raw data.
 

Member Function Documentation

◆ count_callback_events()

static mod_bigbluebuttonbn\logger::count_callback_events ( string $id,
string $callbacktype = 'recording_ready' )
staticprotected

Helper function to count the number of callback logs matching the supplied specifications.

Parameters
string$id
string$callbacktype
Return values
int

◆ get_printable_event_name()

static mod_bigbluebuttonbn\logger::get_printable_event_name ( object $log)
static

Get the event name (human friendly version)

Parameters
object$logobject as returned by get_user_completion_logs_with_userfields

◆ get_user_completion_logs()

static mod_bigbluebuttonbn\logger::get_user_completion_logs ( instance $instance,
?int $userid,
?array $filters,
?int $timestart = 0 )
static

Get the user event logs related to completion, for the specified user in the named instance.

Parameters
instance$instance
int | null$userid
array | null$filters
int | null$timestart
Return values
array

◆ get_user_completion_logs_max_timestamp()

static mod_bigbluebuttonbn\logger::get_user_completion_logs_max_timestamp ( instance $instance,
?int $userid,
?array $filters,
?int $timestart = 0 )
static

Get the latest timestamp for any event logs related to completion, for the specified user in the named instance.

Parameters
instance$instance
int | null$userid
array | null$filters
int | null$timestart
Return values
int

◆ get_user_completion_logs_with_userfields()

static mod_bigbluebuttonbn\logger::get_user_completion_logs_with_userfields ( instance $instance,
?int $userid,
?array $filters,
?int $timestart = 0 )
static

Get the user event logs related to completion, for the specified user in the named instance.

Parameters
instance$instance
int | null$userid
array | null$filters
int | null$timestart
Return values
array

◆ get_user_completion_sql_params()

static mod_bigbluebuttonbn\logger::get_user_completion_sql_params ( instance $instance,
?int $userid,
?array $filters,
?int $timestart,
?string $logtablealias = null )
staticprotected

Helper method to get the right SQL query for completion.

Parameters
instance$instance
int | null$userid
array | null$filters
int | null$timestart
string | null$logtablealias
Return values
array

◆ log()

static mod_bigbluebuttonbn\logger::log ( instance $instance,
string $event,
array $overrides = [],
?string $meta = null )
staticprotected

Register a bigbluebuttonbn event from an instance.

Parameters
instance$instance
string$event
array$overrides
string | null$meta
Return values
bool

◆ log_event_callback()

static mod_bigbluebuttonbn\logger::log_event_callback ( instance $instance,
array $overrides,
array $meta )
static

Log an event callback.

Parameters
instance$instance
array$overrides
array$meta
Return values
intThe new count of callback events

◆ log_event_summary()

static mod_bigbluebuttonbn\logger::log_event_summary ( instance $instance,
array $overrides = [],
array $meta = [] )
static

Log an event summary event.

Parameters
instance$instance
array$overrides
array$meta

◆ log_instance_created()

static mod_bigbluebuttonbn\logger::log_instance_created ( stdClass $instancedata)
static

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.

Parameters
stdClass$instancedata

◆ log_instance_deleted()

static mod_bigbluebuttonbn\logger::log_instance_deleted ( instance $instance)
static

Log an instance deleted event.

Parameters
instance$instance

◆ log_instance_updated()

static mod_bigbluebuttonbn\logger::log_instance_updated ( instance $instance)
static

Log that an instance was updated.

Parameters
instance$instance

◆ log_instance_viewed()

static mod_bigbluebuttonbn\logger::log_instance_viewed ( instance $instance)
static

Log that an instance was viewed.

Parameters
instance$instance

◆ log_meeting_ended_event()

static mod_bigbluebuttonbn\logger::log_meeting_ended_event ( instance $instance)
static

Log the events for when a meeting was ended.

Parameters
instance$instance

◆ log_meeting_joined_event()

static mod_bigbluebuttonbn\logger::log_meeting_joined_event ( instance $instance,
int $origin )
static

Log the relevant events for when a meeting was joined.

Parameters
instance$instance
int$origin

◆ log_meeting_left_event()

static mod_bigbluebuttonbn\logger::log_meeting_left_event ( instance $instance)
static

Log the relevant events for when a user left a meeting.

Parameters
instance$instance

◆ log_moodle_event()

static mod_bigbluebuttonbn\logger::log_moodle_event ( instance $instance,
string $type,
array $options = [] )
staticprotected

Helper register a bigbluebuttonbn event.

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

◆ log_recording_played_event()

static mod_bigbluebuttonbn\logger::log_recording_played_event ( instance $instance,
int $rid )
static

Log the relevant events for when a recording has been played.

Parameters
instance$instance
int$ridRecordID

◆ raw_log()

static mod_bigbluebuttonbn\logger::raw_log ( string $event,
int $instanceid,
int $courseid,
string $meetingid,
array $overrides = [],
?string $meta = null )
staticprotected

Register a bigbluebuttonbn event from raw data.

Parameters
string$event
int$instanceid
int$courseid
string$meetingid
array$overrides
string | null$meta
Return values
bool

Member Data Documentation

◆ EVENT_IMPORT_MIGRATED

string const mod_bigbluebuttonbn\logger::EVENT_IMPORT_MIGRATED = 'import-migrated'

This is a specific log to mark this log as upgraded: used only in the upgrade process from 2.4.

Note: Migrated event name change: once a log has been migrated we mark it as migrated by changing its log name. This will help to recover manually if we have an issue in the migration process.

◆ LOG_TO_STRING

const mod_bigbluebuttonbn\logger::LOG_TO_STRING
Initial value:
= [
self::EVENT_JOIN => 'event_meeting_joined',
self::EVENT_PLAYED => 'event_recording_viewed',
self::EVENT_IMPORT => 'event_recording_imported',
self::EVENT_ADD => 'event_activity_created',
self::EVENT_DELETE => 'event_activity_deleted',
self::EVENT_EDIT => 'event_activity_updated',
self::EVENT_SUMMARY => 'event_meeting_summary',
self::EVENT_LOGOUT => 'event_meeting_left',
self::EVENT_MEETING_START => 'event_meeting_joined',
]

Log event to string that can be internationalised via get_string.


The documentation for this class was generated from the following file: