app/lib/export_notes_sample.rb
# This doesn't do any authorization checks.
This doesn't do any authorization checks.
This doesn ' t do any authorization checks .
def unsafe_csv_without_authorization_checks(options = {})
    sampled_event_notes, total_count = query(options)
    CSV.generate do |csv|
      csv << [
        'options:',
        options.inspect,
        'sampled_event_notes.size:',
        sampled_event_notes.size,
        'total_count:',
        total_count,
      ]
      csv << []
      csv << [
        'event_note.id',
        'event_note.is_restricted',
        'event_note.event_note_type.name',
        'event_note.text',
        'hash(event_note.educator_id)',
        'hash(event_note.student.id)',
        'hash(event_note.student.school_id)',
        'event_note.student.id'
      ]
      sampled_event_notes.each do |event_note|
        csv << [
          event_note.id,
          event_note.is_restricted,
          event_note.event_note_type.name,
          event_note.text.gsub(/\n/, ' '),
          hash(event_note.educator_id),
          hash(event_note.student.id),
          hash(event_note.student.school_id),
          event_note.student.id
        ]
      end
    end
  end
def unsafe_csv_without_authorization_checks ( options = { } ) sampled_event_notes , total_count = query ( options ) CSV . generate do | csv | csv << [ 'options:' , options . inspect , 'sampled_event_notes.size:' , sampled_event_notes . size , 'total_count:' , total_count , ] csv << [ ] csv << [ 'event_note.id' , 'event_note.is_restricted' , 'event_note.event_note_type.name' , 'event_note.text' , 'hash(event_note.educator_id)' , 'hash(event_note.student.id)' , 'hash(event_note.student.school_id)' , 'event_note.student.id' ] sampled_event_notes . each do | event_note | csv << [ event_note . id , event_note . is_restricted , event_note . event_note_type . name , event_note . text . gsub ( / \n / , ' ' ) , hash ( event_note . educator_id ) , hash ( event_note . student . id ) , hash ( event_note . student . school_id ) , event_note . student . id ] end end end
This doesn't do any authorization checks.
This doesn ' t do any authorization checks .
options
<not_specific>