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: | 297 lines (9 kb) |
Included or required: | 0 times |
Referenced: | 0 times |
Includes or requires: | 0 files |
template_competency:: (13 methods):
define_properties()
count_templates()
list_templates()
count_competencies()
count_competencies_with_no_courses()
get_competency()
list_competencies()
delete_by_templateid()
before_validate()
validate_competencyid()
validate_templateid()
after_delete()
has_records_for_competencies()
Class: template_competency - X-Ref
Class for loading/storing template_competencies from the DB.define_properties() X-Ref |
Return the definition of the properties of this model. return: array |
count_templates($competencyid, $onlyvisible) X-Ref |
Count the templates using a competency. return: int param: int $competencyid The competency id param: bool $onlyvisible If true, only count visible templates using this competency. |
list_templates($competencyid, $onlyvisible) X-Ref |
List the templates using a competency. return: array[competency] param: int $competencyid The competency id param: bool $onlyvisible If true, only count visible templates using this competency. |
count_competencies($templateid) X-Ref |
Count the competencies in a template. return: int param: int $templateid The template id |
count_competencies_with_no_courses($templateid) X-Ref |
Count the competencies in a template with no links to courses. return: int param: int $templateid The template id |
get_competency($templateid, $competencyid) X-Ref |
Get a single competency from the template (only if it is really in the template). return: competency param: int $templateid The template id param: int $competencyid The competency id |
list_competencies($templateid) X-Ref |
List the competencies in this template. return: array[competency] param: int $templateid The template id |
delete_by_templateid($templateid) X-Ref |
Remove the competencies in this template. return: boolen param: int $templateid The template id |
before_validate() X-Ref |
Hook to execute before validate. return: void |
validate_competencyid($value) X-Ref |
Validate competencyid. return: true|lang_string param: int $value ID. |
validate_templateid($value) X-Ref |
Validate templateid. return: true|lang_string param: int $value ID. |
after_delete($result) X-Ref |
Hook to execute after delete. return: void param: bool $result Whether or not the delete was successful. |
has_records_for_competencies($competencyids) X-Ref |
Check if template competency has records for competencies. return: boolean Return true if competencies were found in template_competency. param: array $competencyids Array of competencies ids. |