public static function list_evidence_in_course($userid = 0, $courseid = 0, $competencyid = 0, $sort = 'timecreated',
                                                   $order = 'DESC', $skip = 0, $limit = 0) {
        static::require_enabled();

        if (!user_competency::can_read_user_in_course($userid, $courseid)) {
            $context = context_user::instance($userid);
            throw new required_capability_exception($context, 'moodle/competency:usercompetencyview', 'nopermissions', '');
        }

        $usercompetency = user_competency::get_record(array('userid' => $userid, 'competencyid' => $competencyid));
        if (!$usercompetency) {
            return array();
        }

        $context = context_course::instance($courseid);
        return evidence::get_records_for_usercompetency($usercompetency->get('id'), $context, $sort, $order, $skip, $limit);
    }