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