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 400 and 402]

(no description)

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

Defines 1 class


Class: custom_completion  - X-Ref

Class custom_completion

get_state(string $rule)   X-Ref
Get current state

param: string $rule
return: int

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

param: array $logs
param: callable $logvaluegetter
return: int the sum of all values for this particular event (it can be a duration or a number of hits)

get_defined_custom_rules()   X-Ref
Fetch the list of custom completion rules that this module defines.

return: array

get_custom_rule_descriptions()   X-Ref
Returns an associative array of the descriptions of custom completion rules.

return: array

get_sort_order()   X-Ref
Returns an array of all completion rules, in the order they should be displayed to users.

return: array

get_printable_states()   X-Ref
Get current states of completion in a human-friendly version

return: string[]

get_printable_state(string $rule)   X-Ref
Get current states of completion for a rule in a human-friendly version

param: string $rule
return: string

get_last_log_timestamp(string $rule)   X-Ref
Get current state in a friendly version

param: string $rule
return: string

get_completionattendance_value(stdClass $log)   X-Ref
Get attendance summary value

param: stdClass $log
return: int

get_completionengagementchats_value(stdClass $log)   X-Ref
Get general completion engagement value

param: stdClass $log
return: int

get_completionengagementtalks_value(stdClass $log)   X-Ref
Get general completion engagement value

param: stdClass $log
return: int

get_completionengagementraisehand_value(stdClass $log)   X-Ref
Get general completion engagement value

param: stdClass $log
return: int

get_completionengagementpollvotes_value(stdClass $log)   X-Ref
Get general completion engagement value

param: stdClass $log
return: int

get_completionengagementemojis_value(stdClass $log)   X-Ref
Get general completion engagement value

param: stdClass $log
return: int

get_completionengagement_value(stdClass $log, string $type)   X-Ref
Get general completion engagement value

param: stdClass $log
param: string $type
return: int