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 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.