public function get_participant($userid) {
        global $DB, $USER;

        if ($userid == $USER->id) {
            $participant = clone ($USER);
        } else {
            $participant = $DB->get_record('user', array('id' => $userid));
        }
        if (!$participant) {
            return null;
        }

        if (!is_enrolled($this->context, $participant, 'mod/assign:submit', $this->show_only_active_users())) {
            return null;
        }

        $result = $this->get_submission_info_for_participants(array($participant->id => $participant));
        return $result[$participant->id];
    }