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. param: int $competencyid The competency id param: bool $onlyvisible If true, only count visible templates using this competency. return: int |
list_templates($competencyid, $onlyvisible) X-Ref |
List the templates using a competency. param: int $competencyid The competency id param: bool $onlyvisible If true, only count visible templates using this competency. return: array[competency] |
count_competencies($templateid) X-Ref |
Count the competencies in a template. param: int $templateid The template id return: int |
count_competencies_with_no_courses($templateid) X-Ref |
Count the competencies in a template with no links to courses. param: int $templateid The template id return: int |
get_competency($templateid, $competencyid) X-Ref |
Get a single competency from the template (only if it is really in the template). param: int $templateid The template id param: int $competencyid The competency id return: competency |
list_competencies($templateid) X-Ref |
List the competencies in this template. param: int $templateid The template id return: array[competency] |
delete_by_templateid($templateid) X-Ref |
Remove the competencies in this template. param: int $templateid The template id return: boolen |
before_validate() X-Ref |
Hook to execute before validate. return: void |
validate_competencyid($value) X-Ref |
Validate competencyid. param: int $value ID. return: true|lang_string |
validate_templateid($value) X-Ref |
Validate templateid. param: int $value ID. return: true|lang_string |
after_delete($result) X-Ref |
Hook to execute after delete. param: bool $result Whether or not the delete was successful. return: void |
has_records_for_competencies($competencyids) X-Ref |
Check if template competency has records for competencies. param: array $competencyids Array of competencies ids. return: boolean Return true if competencies were found in template_competency. |