public static function create_from_record($record) {
        $event = static::create([
            'objectid' => $record->id,
            'relateduserid' => $record->userid,
            'context' => \context_user::instance($record->userid),
            'other' => [
                'policyversionid' => $record->policyversionid,
                'note' => $record->note,
                'status' => $record->status,
            ],
        ]);
        $event->add_record_snapshot($event->objecttable, $record);
        return $event;
    }
public static function create_from_record($record) {
        $event = static::create([
            'objectid' => $record->id,
            'relateduserid' => $record->userid,
            'context' => \context_user::instance($record->userid),
            'other' => [
                'policyversionid' => $record->policyversionid,
                'note' => $record->note,
                'status' => $record->status,
            ],
        ]);
        $event->add_record_snapshot($event->objecttable, $record);
        return $event;
    }
public static function create_from_record ( $ record ) { $ event = static :: create ( [ 'objectid' => $ record -> id , 'relateduserid' => $ record -> userid , 'context' => \ context_user :: instance ( $ record -> userid ) , 'other' => [ 'policyversionid' => $ record -> policyversionid , 'note' => $ record -> note , 'status' => $ record -> status , ] , ] ) ; $ event -> add_record_snapshot ( $ event -> objecttable , $ record ) ; return $ event ; }
Create event from record.

@param stdClass $record
@return acceptance_created
Create event from record .