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.

Differences Between: [Versions 311 and 401] [Versions 311 and 402] [Versions 311 and 403]

Class for loading/storing competencies from the DB.

Copyright: 2015 Damyon Wiese
License: http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
File Size: 330 lines (11 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class


Class: course_module_competency  - X-Ref

Class for loading/storing course_module_competencies from the DB.

define_properties()   X-Ref
Return the definition of the properties of this model.

return: array

before_validate()   X-Ref
Hook to execute before validate.

return: void

get_ruleoutcome_list()   X-Ref
Return a list of rules.

return: array Indexed by outcome value.

get_ruleoutcome_name($ruleoutcome)   X-Ref
Human readable rule name.

param: int $ruleoutcome The value of ruleoutcome.
return: lang_string

validate_cmid($data)   X-Ref
Validate cmid ID.

param: int $data The CM ID.
return: true|lang_string

validate_competencyid($data)   X-Ref
Validate competency ID.

param: int $data The competency ID.
return: true|lang_string

list_course_modules($competencyid, $courseid)   X-Ref
Return the module IDs and visible flags that include this competency in a single course.

param: int $competencyid The competency id
param: int $courseid The course ID.
return: array of ints (cmids)

count_competencies($cmid)   X-Ref
Count the competencies in this course module.

param: int $cmid The course module id.
return: int

list_competencies($cmid)   X-Ref
List the competencies in this course module.

param: int $cmid The course module id
return: competency[] Indexed by competency ID.

get_competency($cmid, $competencyid)   X-Ref
Get a single competency from the course module (only if it is really in the course module).

param: int $cmid The course module id
param: int $competencyid The competency id
return: competency

after_delete($result)   X-Ref
Hook to execute after delete.

param: bool $result Whether or not the delete was successful.
return: void

list_course_module_competencies($cmid)   X-Ref
List the course_module_competencies in this course module.

param: int $cmid The course module id
return: course_module_competency[]

get_records_by_competencyid_in_course($competencyid, $courseid)   X-Ref
List the relationship objects for a competency in a course.

param: int $competencyid The competency ID.
param: int $courseid The course ID.
return: course_module_competency[]