Search moodle.org's
Developer Documentation

See Release Notes

  • Bug fixes for general core bugs in 3.11.x will end 14 Nov 2022 (12 months plus 6 months extension).
  • Bug fixes for security issues in 3.11.x will end 13 Nov 2023 (18 months plus 12 months extension).
  • PHP version: minimum PHP 7.3.0 Note: minimum PHP version has increased since Moodle 3.10. PHP 7.4.x is supported too.

Competency rule points based.

Copyright: 2015 Frédéric Massart - FMCorz.net
License: http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
File Size: 218 lines (7 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class

competency_rule_points:: (5 methods):
  get_config()
  matches()
  validate_config()
  get_name()
  migrate_config()


Class: competency_rule_points  - X-Ref

Competency rule points based class.

This rule matches when related competencies contribute for a required number of points.

get_config()   X-Ref
Get the rule config.

return: mixed

matches(user_competency $usercompetency)   X-Ref
Whether or not the rule is matched.

param: user_competency $usercompetency The user competency.
return: bool

validate_config($value)   X-Ref
Validate the rule config.

param: string $value The value to validate.
return: bool

get_name()   X-Ref
The name of the rule.

return: lang_string

migrate_config($config, $mappings)   X-Ref
Migrate rule config when duplicate competency based on mapping competencies ids.

param: string $config the config rule of a competency
param: array $mappings array that match the old competency ids with the new competencies
return: string