Story #87 Convert calendar events to exportable format for download and export - cseseniordesign/reservations GitHub Wiki

End User Documentation

Dev Testing Instructions

  1. Make sure you are on the most recent version of the Development branch.
  2. Start your dev environment.
  3. On the home screen, at the bottom of the page, there is a heading "Export Trainings & Events"
  4. Navigate to the admin/events screen and assign yourself as a trainer to an event.
  5. Navigate to the trainings or workshops page and sign up for an event.
  6. Click on the "Export" button under the "Export Trainings & Events"
  7. Verify that the CSV file served to the user matches the information for the trainings and events the user is signed up for.

Production Testing Instructions

  1. Go to https://innovationstudio-manager.unl.edu/home/
  2. Follow steps 3 and up from the dev testing instructions above.

Technical Documentation

views/home.erb

  • Added "Export Trainings & Events" sub section
  • Added "Export" button which directs the user to "/export/"

routes/export.rb

  • Added a GET method for "/export/" which takes the current logged in user and gathers their trainings and events from the database
  • Using the CSV library, generates a CSV file which contains the user's training and event information in the standard calendar CSV format.
  • Serves the CSV file to the user with the filename "NIS_Trainings_and_Events"