public static function get_competencies_by_userevidenceid($userevidenceid) {
        global $DB;
        $sql = "SELECT c.*
                  FROM {" . self::TABLE . "} uec
                  JOIN {" . competency::TABLE . "} c
                    ON uec.userevidenceid = ?
                   AND uec.competencyid = c.id
              ORDER BY c.shortname";
        $competencies = array();
        $records = $DB->get_recordset_sql($sql, array($userevidenceid));
        foreach ($records as $record) {
            $competencies[] = new competency(0, $record);
        }
        $records->close();
        return $competencies;
    }