/** * List all the related competencies. * * @param int $competencyid The id of the competency to check. * @return competency[] */ public static function list_related_competencies($competencyid) { static::require_enabled(); $competency = new competency($competencyid); if (!has_any_capability(array('moodle/competency:competencyview', 'moodle/competency:competencymanage'), $competency->get_context())) { throw new required_capability_exception($competency->get_context(), 'moodle/competency:competencyview', 'nopermissions', ''); } return $competency->get_related_competencies(); }