original_string: 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();
      }
code: 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();
      }
code_tokens: 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 ( ) ; }
docstring: List all the related competencies.
  
  @param int $competencyid The id of the competency to check.
  @return competency[]
docstring_tokens: List all the related competencies .