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.

Differences Between: [Versions 400 and 401]

(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