public static function create_from_category($category) {
        $event = self::create(array(
            'objectid' => $category->id,
            'context' => \context_system::instance(),
            'other' => array(
                'name' => $category->name,
            )
        ));

        $event->add_record_snapshot('user_info_category', $category);

        return $event;
    }