Moodle APIs 3.9
Moodle 3.9.13+ (Build: 20220325)
|
Competency rule base abstract class. More...
Public Member Functions | |
__construct (competency $competency) | |
Constructor. More... | |
matches (user_competency $usercompetency) | |
Whether or not the rule is matched. More... | |
validate_config ($value) | |
Validate the rule config. More... | |
Static Public Member Functions | |
static | get_name () |
The name of the rule. More... | |
static | migrate_config ($config, $mappings) |
Migrate rule config from one set of competencies to another. More... | |
Protected Member Functions | |
get_config () | |
Get the rule config. More... | |
Protected Attributes | |
competency | $competency |
The competency. | |
Competency rule base abstract class.
Rules are attached to a competency and then tested against a user competency to determine whether or not it matches.
core_competency\competency_rule::__construct | ( | competency | $competency | ) |
Constructor.
competency | $competency | The competency. |
|
protected |
|
static |
The name of the rule.
lang_string |
Reimplemented in core_competency\competency_rule_all, and core_competency\competency_rule_points.
|
abstract |
Whether or not the rule is matched.
user_competency | $usercompetency | The user competency to test against. |
bool |
Reimplemented in core_competency\competency_rule_all, and core_competency\competency_rule_points.
|
static |
Migrate rule config from one set of competencies to another.
Exceptions should be thrown when the migration can not be performed.
string | $config | Original config rule of a competency. |
array | $mappings | Array that matches the original competency IDs with the new competencies objects. |
string | New configuration. |
Exception |
Reimplemented in core_competency\competency_rule_points.
|
abstract |
Validate the rule config.
string | $value | The value to validate. |
bool |
Reimplemented in core_competency\competency_rule_all, and core_competency\competency_rule_points.