Search moodle.org's
Developer Documentation

See Release Notes

  • Bug fixes for general core bugs in 3.10.x will end 8 November 2021 (12 months).
  • Bug fixes for security issues in 3.10.x will end 9 May 2022 (18 months).
  • PHP version: minimum PHP 7.2.0 Note: minimum PHP version has increased since Moodle 3.8. PHP 7.3.x and 7.4.x are supported too.

Competency rule base.

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

Defines 1 class

competency_rule:: (4 methods):
  __construct()
  get_config()
  get_name()
  migrate_config()


Class: competency_rule  - X-Ref

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.

__construct(competency $competency)   X-Ref
Constructor.

param: competency $competency The competency.

get_config()   X-Ref
Get the rule config.

return: mixed

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

return: lang_string

migrate_config($config, $mappings)   X-Ref
Migrate rule config from one set of competencies to another.

Exceptions should be thrown when the migration can not be performed.

param: string $config Original config rule of a competency.
param: array $mappings Array that matches the original competency IDs with the new competencies objects.
return: string New configuration.