public static function create_from_record($completed, $cm) {
        $event = self::create(array(
            'relateduserid' => $completed->userid,
            'objectid' => $completed->id,
            'context' => \context_module::instance($cm->id),
            'anonymous' => ($completed->anonymous_response == FEEDBACK_ANONYMOUS_YES),
            'other' => array(
                'cmid' => $cm->id,
                'instanceid' => $completed->feedback,
                'anonymous' => $completed->anonymous_response // Deprecated.
            )
        ));
        $event->add_record_snapshot('feedback_completed', $completed);
        return $event;
    }