original_string: 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;
      }
code: 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;
      }
code_tokens: 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 ; }
docstring: Create event from record.
  
  @param stdClass $record
  @return acceptance_created
docstring_tokens: Create event from record .