Moodle PHP Documentation 4.5
Moodle 4.5dev (Build: 20240606) (d3ae1391abe)
mod_bigbluebuttonbn\completion\custom_completion Class Reference
Inheritance diagram for mod_bigbluebuttonbn\completion\custom_completion:
core_completion\activity_custom_completion

Public Member Functions

 __construct (cm_info $cm, int $userid, ?array $completionstate=null)
 activity_custom_completion constructor.
 
 get_available_custom_rules ()
 Fetches the list of custom completion rules that are being used by this activity module instance.
 
 get_custom_rule_description (string $rule)
 Fetches the description for a given custom completion rule.
 
 get_custom_rule_descriptions ()
 Returns an associative array of the descriptions of custom completion rules.
 
 get_last_log_timestamp (string $rule)
 Get current state in a friendly version.
 
 get_overall_completion_state ()
 Fetches the overall completion status of this activity instance for a user based on its available custom completion rules.
 
 get_printable_states ()
 Get current states of completion in a human-friendly version.
 
 get_sort_order ()
 Returns an array of all completion rules, in the order they should be displayed to users.
 
 get_state (string $rule)
 Get current state.
 
 is_available (string $rule)
 Checks whether the custom completion rule is being used by the activity module instance.
 
 is_defined (string $rule)
 Whether this module defines this custom rule.
 
 manual_completion_always_shown ()
 Show the manual completion or not regardless of the course's showcompletionconditions setting.
 
 validate_rule (string $rule)
 Validates that the custom rule is defined by this plugin and is enabled for this activity instance.
 

Static Public Member Functions

static get_cm_completion_class (string $modname)
 Fetches the module's custom completion class implementation if it's available.
 
static get_defined_custom_rules ()
 Fetch the list of custom completion rules that this module defines.
 

Public Attributes

const FILTERS
 Filters for logs.
 

Protected Member Functions

 aggregate_values (array $logs, callable $logvaluegetter)
 Compute current state from logs.
 

Static Protected Member Functions

static get_completionattendance_value (stdClass $log)
 Get attendance summary value.
 
static get_completionengagement_value (stdClass $log, string $type)
 Get general completion engagement value.
 
static get_completionengagementchats_value (stdClass $log)
 Get general completion engagement value.
 
static get_completionengagementemojis_value (stdClass $log)
 Get general completion engagement value.
 
static get_completionengagementpollvotes_value (stdClass $log)
 Get general completion engagement value.
 
static get_completionengagementraisehand_value (stdClass $log)
 Get general completion engagement value.
 
static get_completionengagementtalks_value (stdClass $log)
 Get general completion engagement value.
 

Protected Attributes

cm_info $cm
 The course module information object.
 
array $completionstate
 The current state of core completion.
 
int $userid
 The user's ID.
 

Constructor & Destructor Documentation

◆ __construct()

mod_bigbluebuttonbn\completion\custom_completion::__construct ( cm_info $cm,
int $userid,
?array $completionstate = null )

activity_custom_completion constructor.

Parameters
cm_info$cm
int$userid
array | null$completionstateThe current state of the core completion criteria

Reimplemented from core_completion\activity_custom_completion.

Member Function Documentation

◆ aggregate_values()

mod_bigbluebuttonbn\completion\custom_completion::aggregate_values ( array $logs,
callable $logvaluegetter )
protected

Compute current state from logs.

Parameters
array$logs
callable$logvaluegetter
Return values
intthe sum of all values for this particular event (it can be a duration or a number of hits)

◆ get_available_custom_rules()

core_completion\activity_custom_completion::get_available_custom_rules ( )
inherited

Fetches the list of custom completion rules that are being used by this activity module instance.

Return values
array

◆ get_cm_completion_class()

static core_completion\activity_custom_completion::get_cm_completion_class ( string $modname)
staticinherited

Fetches the module's custom completion class implementation if it's available.

Parameters
string$modnameThe activity module name. Usually from cm_info\modname.
Return values
string|null

◆ get_completionattendance_value()

static mod_bigbluebuttonbn\completion\custom_completion::get_completionattendance_value ( stdClass $log)
staticprotected

Get attendance summary value.

Parameters
stdClass$log
Return values
int

◆ get_completionengagement_value()

static mod_bigbluebuttonbn\completion\custom_completion::get_completionengagement_value ( stdClass $log,
string $type )
staticprotected

Get general completion engagement value.

Parameters
stdClass$log
string$type
Return values
int

◆ get_completionengagementchats_value()

static mod_bigbluebuttonbn\completion\custom_completion::get_completionengagementchats_value ( stdClass $log)
staticprotected

Get general completion engagement value.

Parameters
stdClass$log
Return values
int

◆ get_completionengagementemojis_value()

static mod_bigbluebuttonbn\completion\custom_completion::get_completionengagementemojis_value ( stdClass $log)
staticprotected

Get general completion engagement value.

Parameters
stdClass$log
Return values
int

◆ get_completionengagementpollvotes_value()

static mod_bigbluebuttonbn\completion\custom_completion::get_completionengagementpollvotes_value ( stdClass $log)
staticprotected

Get general completion engagement value.

Parameters
stdClass$log
Return values
int

◆ get_completionengagementraisehand_value()

static mod_bigbluebuttonbn\completion\custom_completion::get_completionengagementraisehand_value ( stdClass $log)
staticprotected

Get general completion engagement value.

Parameters
stdClass$log
Return values
int

◆ get_completionengagementtalks_value()

static mod_bigbluebuttonbn\completion\custom_completion::get_completionengagementtalks_value ( stdClass $log)
staticprotected

Get general completion engagement value.

Parameters
stdClass$log
Return values
int

◆ get_custom_rule_description()

core_completion\activity_custom_completion::get_custom_rule_description ( string $rule)
inherited

Fetches the description for a given custom completion rule.

Parameters
string$ruleThe custom completion rule.
Return values
string

◆ get_custom_rule_descriptions()

mod_bigbluebuttonbn\completion\custom_completion::get_custom_rule_descriptions ( )

Returns an associative array of the descriptions of custom completion rules.

Return values
array

Reimplemented from core_completion\activity_custom_completion.

◆ get_defined_custom_rules()

static mod_bigbluebuttonbn\completion\custom_completion::get_defined_custom_rules ( )
static

Fetch the list of custom completion rules that this module defines.

Return values
array

Reimplemented from core_completion\activity_custom_completion.

◆ get_last_log_timestamp()

mod_bigbluebuttonbn\completion\custom_completion::get_last_log_timestamp ( string $rule)

Get current state in a friendly version.

Parameters
string$rule
Return values
string

◆ get_overall_completion_state()

core_completion\activity_custom_completion::get_overall_completion_state ( )
inherited

Fetches the overall completion status of this activity instance for a user based on its available custom completion rules.

Return values
intThe completion state (e.g. COMPLETION_COMPLETE, COMPLETION_INCOMPLETE, COMPLETION_COMPLETE_FAIL).

◆ get_printable_states()

mod_bigbluebuttonbn\completion\custom_completion::get_printable_states ( )

Get current states of completion in a human-friendly version.

Return values
string[]

◆ get_sort_order()

mod_bigbluebuttonbn\completion\custom_completion::get_sort_order ( )

Returns an array of all completion rules, in the order they should be displayed to users.

Return values
array

Reimplemented from core_completion\activity_custom_completion.

◆ get_state()

mod_bigbluebuttonbn\completion\custom_completion::get_state ( string $rule)

Get current state.

Parameters
string$rule
Return values
int

Reimplemented from core_completion\activity_custom_completion.

◆ is_available()

core_completion\activity_custom_completion::is_available ( string $rule)
inherited

Checks whether the custom completion rule is being used by the activity module instance.

Parameters
string$ruleThe custom completion rule.
Return values
bool

◆ is_defined()

core_completion\activity_custom_completion::is_defined ( string $rule)
inherited

Whether this module defines this custom rule.

Parameters
string$ruleThe custom completion rule.
Return values
bool

◆ manual_completion_always_shown()

core_completion\activity_custom_completion::manual_completion_always_shown ( )
inherited

Show the manual completion or not regardless of the course's showcompletionconditions setting.

Returns false by default for plugins that don't need to override the course's showcompletionconditions setting. Activity plugins that need to always show manual completion need to override this function.

Return values
bool

Reimplemented in mod_folder\completion\custom_completion, mod_label\completion\custom_completion, mod_resource\completion\custom_completion, and mod_url\completion\custom_completion.

◆ validate_rule()

core_completion\activity_custom_completion::validate_rule ( string $rule)
inherited

Validates that the custom rule is defined by this plugin and is enabled for this activity instance.

Parameters
string$ruleThe custom completion rule.

Member Data Documentation

◆ FILTERS

const mod_bigbluebuttonbn\completion\custom_completion::FILTERS
Initial value:
= [
'completionattendance' => [logger::EVENT_SUMMARY],
'completionengagementchats' => [logger::EVENT_SUMMARY],
'completionengagementtalks' => [logger::EVENT_SUMMARY],
'completionengagementraisehand' => [logger::EVENT_SUMMARY],
'completionengagementpollvotes' => [logger::EVENT_SUMMARY],
'completionengagementemojis' => [logger::EVENT_SUMMARY],
]
string const EVENT_SUMMARY
The bigbluebuttonbn Summary event.
Definition logger.php:60

Filters for logs.


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