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.

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.