We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Session Export CSV does not include all data 
The Session Export should export all data sets that are available e.g. including:
* Submission time
* All speakers
* Proposed length
* Type (Workshop, Talk)
* Level (e.g. Intermediate)
* Status (e.g. pending, accepted etc.)

![screenshot from 2019-01-17 00-04-14](https://user-images.githubusercontent.com/1583873/51284380-a3f0ff80-19eb-11e9-9a1c-3b37c6ad36ad.png)

--- END ISSUE ---

Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
--- BEGIN FILES ---
Path: `app/api/helpers/csv_jobs_util.py`
Content:
```
1 from app.models.helpers.versioning import strip_tags
2 
3 
4 def export_orders_csv(orders):
5     headers = ['Order#', 'Order Date', 'Status', 'Payment Type', 'Total Amount', 'Quantity',
6                'Discount Code', 'First Name', 'Last Name', 'Email']
7 
8     rows = [headers]
9     for order in orders:
10         if order.status != "deleted":
11             column = [str(order.get_invoice_number()), str(order.created_at) if order.created_at else '',
12                       str(order.status) if order.status else '', str(order.paid_via) if order.paid_via else '',
13                       str(order.amount) if order.amount else '', str(order.tickets_count),
14                       str(order.discount_code.code) if order.discount_code else '',
15                       str(order.user.first_name)
16                       if order.user and order.user.first_name else '',
17                       str(order.user.last_name)
18                       if order.user and order.user.last_name else '',
19                       str(order.user.email) if order.user and order.user.email else '']
20             rows.append(column)
21 
22     return rows
23 
24 
25 def export_attendees_csv(attendees):
26     headers = ['Order#', 'Order Date', 'Status', 'First Name', 'Last Name', 'Email',
27                'Country', 'Payment Type', 'Ticket Name', 'Ticket Price', 'Ticket Type']
28 
29     rows = [headers]
30     for attendee in attendees:
31         column = [str(attendee.order.get_invoice_number()) if attendee.order else '-',
32                   str(attendee.order.created_at) if attendee.order and attendee.order.created_at else '-',
33                   str(attendee.order.status) if attendee.order and attendee.order.status else '-',
34                   str(attendee.firstname) if attendee.firstname else '',
35                   str(attendee.lastname) if attendee.lastname else '',
36                   str(attendee.email) if attendee.email else '',
37                   str(attendee.country) if attendee.country else '',
38                   str(attendee.order.payment_mode) if attendee.order and attendee.order.payment_mode else '',
39                   str(attendee.ticket.name) if attendee.ticket and attendee.ticket.name else '',
40                   str(attendee.ticket.price) if attendee.ticket and attendee.ticket.price else '0',
41                   str(attendee.ticket.type) if attendee.ticket and attendee.ticket.type else '']
42 
43         rows.append(column)
44 
45     return rows
46 
47 
48 def export_sessions_csv(sessions):
49     headers = ['Session Title', 'Session Speakers',
50                'Session Track', 'Session Abstract', 'Created At', 'Email Sent']
51     rows = [headers]
52     for session in sessions:
53         if not session.deleted_at:
54             column = [session.title + ' (' + session.state + ')' if session.title else '']
55             if session.speakers:
56                 in_session = ''
57                 for speaker in session.speakers:
58                     if speaker.name:
59                         in_session += (speaker.name + '; ')
60                 column.append(in_session[:-2])
61             else:
62                 column.append('')
63             column.append(session.track.name if session.track and session.track.name else '')
64             column.append(strip_tags(session.short_abstract) if session.short_abstract else '')
65             column.append(session.created_at if session.created_at else '')
66             column.append('Yes' if session.is_mail_sent else 'No')
67             rows.append(column)
68 
69     return rows
70 
71 
72 def export_speakers_csv(speakers):
73     headers = ['Speaker Name', 'Speaker Email', 'Speaker Session(s)',
74                'Speaker Mobile', 'Speaker Bio', 'Speaker Organisation', 'Speaker Position']
75     rows = [headers]
76     for speaker in speakers:
77         column = [speaker.name if speaker.name else '', speaker.email if speaker.email else '']
78         if speaker.sessions:
79             session_details = ''
80             for session in speaker.sessions:
81                 if not session.deleted_at:
82                     session_details += session.title + ' (' + session.state + '); '
83             column.append(session_details[:-2])
84         else:
85             column.append('')
86         column.append(speaker.mobile if speaker.mobile else '')
87         column.append(speaker.short_biography if speaker.short_biography else '')
88         column.append(speaker.organisation if speaker.organisation else '')
89         column.append(speaker.position if speaker.position else '')
90         rows.append(column)
91 
92     return rows
93
```
--- END FILES ---

Please first localize the bug based on the issue statement, and then generate a patch according to the `git diff` format fenced by three backticks.

Here is an example:

```diff
diff --git a/examples/server_async.py b/examples/server_async.py
--- a/examples/server_async.py
+++ b/examples/server_async.py
@@ -313,4 +313,4 @@
 
 
 if __name__ == "__main__":
-    asyncio.run(run_async_server("."), debug=True)
+    asyncio.run(run_async_server(), debug=True)
diff --git a/examples/server_sync.py b/examples/server_sync.py
--- a/examples/server_sync.py
+++ b/examples/server_sync.py
@@ -313,5 +313,5 @@
 
 
 if __name__ == "__main__":
-    server = run_sync_server(".")
+    server = run_sync_server()
     server.shutdown()

```

diff --git a/app/api/helpers/csv_jobs_util.py b/app/api/helpers/csv_jobs_util.py
--- a/app/api/helpers/csv_jobs_util.py
+++ b/app/api/helpers/csv_jobs_util.py
@@ -47,7 +47,8 @@
 
 def export_sessions_csv(sessions):
     headers = ['Session Title', 'Session Speakers',
-               'Session Track', 'Session Abstract', 'Created At', 'Email Sent']
+               'Session Track', 'Session Abstract', 'Created At', 'Email Sent',
+               'Level', 'Status', 'Session Type', 'Talk Length']
     rows = [headers]
     for session in sessions:
         if not session.deleted_at:
@@ -64,6 +65,10 @@
             column.append(strip_tags(session.short_abstract) if session.short_abstract else '')
             column.append(session.created_at if session.created_at else '')
             column.append('Yes' if session.is_mail_sent else 'No')
+            column.append(session.level)
+            column.append(session.state)
+            column.append(session.type)
+            column.append(len(session.long_abstract))
             rows.append(column)
 
     return rows

{"golden_diff": "diff --git a/app/api/helpers/csv_jobs_util.py b/app/api/helpers/csv_jobs_util.py\n--- a/app/api/helpers/csv_jobs_util.py\n+++ b/app/api/helpers/csv_jobs_util.py\n@@ -47,7 +47,8 @@\n \n def export_sessions_csv(sessions):\n     headers = ['Session Title', 'Session Speakers',\n-               'Session Track', 'Session Abstract', 'Created At', 'Email Sent']\n+               'Session Track', 'Session Abstract', 'Created At', 'Email Sent',\n+               'Level', 'Status', 'Session Type', 'Talk Length']\n     rows = [headers]\n     for session in sessions:\n         if not session.deleted_at:\n@@ -64,6 +65,10 @@\n             column.append(strip_tags(session.short_abstract) if session.short_abstract else '')\n             column.append(session.created_at if session.created_at else '')\n             column.append('Yes' if session.is_mail_sent else 'No')\n+            column.append(session.level)\n+            column.append(session.state)\n+            column.append(session.type)\n+            column.append(len(session.long_abstract))\n             rows.append(column)\n \n     return rows\n", "issue": "Session Export CSV does not include all data \nThe Session Export should export all data sets that are available e.g. including:\r\n* Submission time\r\n* All speakers\r\n* Proposed length\r\n* Type (Workshop, Talk)\r\n* Level (e.g. Intermediate)\r\n* Status (e.g. pending, accepted etc.)\r\n\r\n![screenshot from 2019-01-17 00-04-14](https://user-images.githubusercontent.com/1583873/51284380-a3f0ff80-19eb-11e9-9a1c-3b37c6ad36ad.png)\n", "before_files": [{"content": "from app.models.helpers.versioning import strip_tags\n\n\ndef export_orders_csv(orders):\n    headers = ['Order#', 'Order Date', 'Status', 'Payment Type', 'Total Amount', 'Quantity',\n               'Discount Code', 'First Name', 'Last Name', 'Email']\n\n    rows = [headers]\n    for order in orders:\n        if order.status != \"deleted\":\n            column = [str(order.get_invoice_number()), str(order.created_at) if order.created_at else '',\n                      str(order.status) if order.status else '', str(order.paid_via) if order.paid_via else '',\n                      str(order.amount) if order.amount else '', str(order.tickets_count),\n                      str(order.discount_code.code) if order.discount_code else '',\n                      str(order.user.first_name)\n                      if order.user and order.user.first_name else '',\n                      str(order.user.last_name)\n                      if order.user and order.user.last_name else '',\n                      str(order.user.email) if order.user and order.user.email else '']\n            rows.append(column)\n\n    return rows\n\n\ndef export_attendees_csv(attendees):\n    headers = ['Order#', 'Order Date', 'Status', 'First Name', 'Last Name', 'Email',\n               'Country', 'Payment Type', 'Ticket Name', 'Ticket Price', 'Ticket Type']\n\n    rows = [headers]\n    for attendee in attendees:\n        column = [str(attendee.order.get_invoice_number()) if attendee.order else '-',\n                  str(attendee.order.created_at) if attendee.order and attendee.order.created_at else '-',\n                  str(attendee.order.status) if attendee.order and attendee.order.status else '-',\n                  str(attendee.firstname) if attendee.firstname else '',\n                  str(attendee.lastname) if attendee.lastname else '',\n                  str(attendee.email) if attendee.email else '',\n                  str(attendee.country) if attendee.country else '',\n                  str(attendee.order.payment_mode) if attendee.order and attendee.order.payment_mode else '',\n                  str(attendee.ticket.name) if attendee.ticket and attendee.ticket.name else '',\n                  str(attendee.ticket.price) if attendee.ticket and attendee.ticket.price else '0',\n                  str(attendee.ticket.type) if attendee.ticket and attendee.ticket.type else '']\n\n        rows.append(column)\n\n    return rows\n\n\ndef export_sessions_csv(sessions):\n    headers = ['Session Title', 'Session Speakers',\n               'Session Track', 'Session Abstract', 'Created At', 'Email Sent']\n    rows = [headers]\n    for session in sessions:\n        if not session.deleted_at:\n            column = [session.title + ' (' + session.state + ')' if session.title else '']\n            if session.speakers:\n                in_session = ''\n                for speaker in session.speakers:\n                    if speaker.name:\n                        in_session += (speaker.name + '; ')\n                column.append(in_session[:-2])\n            else:\n                column.append('')\n            column.append(session.track.name if session.track and session.track.name else '')\n            column.append(strip_tags(session.short_abstract) if session.short_abstract else '')\n            column.append(session.created_at if session.created_at else '')\n            column.append('Yes' if session.is_mail_sent else 'No')\n            rows.append(column)\n\n    return rows\n\n\ndef export_speakers_csv(speakers):\n    headers = ['Speaker Name', 'Speaker Email', 'Speaker Session(s)',\n               'Speaker Mobile', 'Speaker Bio', 'Speaker Organisation', 'Speaker Position']\n    rows = [headers]\n    for speaker in speakers:\n        column = [speaker.name if speaker.name else '', speaker.email if speaker.email else '']\n        if speaker.sessions:\n            session_details = ''\n            for session in speaker.sessions:\n                if not session.deleted_at:\n                    session_details += session.title + ' (' + session.state + '); '\n            column.append(session_details[:-2])\n        else:\n            column.append('')\n        column.append(speaker.mobile if speaker.mobile else '')\n        column.append(speaker.short_biography if speaker.short_biography else '')\n        column.append(speaker.organisation if speaker.organisation else '')\n        column.append(speaker.position if speaker.position else '')\n        rows.append(column)\n\n    return rows\n", "path": "app/api/helpers/csv_jobs_util.py"}], "after_files": [{"content": "from app.models.helpers.versioning import strip_tags\n\n\ndef export_orders_csv(orders):\n    headers = ['Order#', 'Order Date', 'Status', 'Payment Type', 'Total Amount', 'Quantity',\n               'Discount Code', 'First Name', 'Last Name', 'Email']\n\n    rows = [headers]\n    for order in orders:\n        if order.status != \"deleted\":\n            column = [str(order.get_invoice_number()), str(order.created_at) if order.created_at else '',\n                      str(order.status) if order.status else '', str(order.paid_via) if order.paid_via else '',\n                      str(order.amount) if order.amount else '', str(order.tickets_count),\n                      str(order.discount_code.code) if order.discount_code else '',\n                      str(order.user.first_name)\n                      if order.user and order.user.first_name else '',\n                      str(order.user.last_name)\n                      if order.user and order.user.last_name else '',\n                      str(order.user.email) if order.user and order.user.email else '']\n            rows.append(column)\n\n    return rows\n\n\ndef export_attendees_csv(attendees):\n    headers = ['Order#', 'Order Date', 'Status', 'First Name', 'Last Name', 'Email',\n               'Country', 'Payment Type', 'Ticket Name', 'Ticket Price', 'Ticket Type']\n\n    rows = [headers]\n    for attendee in attendees:\n        column = [str(attendee.order.get_invoice_number()) if attendee.order else '-',\n                  str(attendee.order.created_at) if attendee.order and attendee.order.created_at else '-',\n                  str(attendee.order.status) if attendee.order and attendee.order.status else '-',\n                  str(attendee.firstname) if attendee.firstname else '',\n                  str(attendee.lastname) if attendee.lastname else '',\n                  str(attendee.email) if attendee.email else '',\n                  str(attendee.country) if attendee.country else '',\n                  str(attendee.order.payment_mode) if attendee.order and attendee.order.payment_mode else '',\n                  str(attendee.ticket.name) if attendee.ticket and attendee.ticket.name else '',\n                  str(attendee.ticket.price) if attendee.ticket and attendee.ticket.price else '0',\n                  str(attendee.ticket.type) if attendee.ticket and attendee.ticket.type else '']\n\n        rows.append(column)\n\n    return rows\n\n\ndef export_sessions_csv(sessions):\n    headers = ['Session Title', 'Session Speakers',\n               'Session Track', 'Session Abstract', 'Created At', 'Email Sent',\n               'Level', 'Status', 'Session Type', 'Talk Length']\n    rows = [headers]\n    for session in sessions:\n        if not session.deleted_at:\n            column = [session.title + ' (' + session.state + ')' if session.title else '']\n            if session.speakers:\n                in_session = ''\n                for speaker in session.speakers:\n                    if speaker.name:\n                        in_session += (speaker.name + '; ')\n                column.append(in_session[:-2])\n            else:\n                column.append('')\n            column.append(session.track.name if session.track and session.track.name else '')\n            column.append(strip_tags(session.short_abstract) if session.short_abstract else '')\n            column.append(session.created_at if session.created_at else '')\n            column.append('Yes' if session.is_mail_sent else 'No')\n            column.append(session.level)\n            column.append(session.state)\n            column.append(session.type)\n            column.append(len(session.long_abstract))\n            rows.append(column)\n\n    return rows\n\n\ndef export_speakers_csv(speakers):\n    headers = ['Speaker Name', 'Speaker Email', 'Speaker Session(s)',\n               'Speaker Mobile', 'Speaker Bio', 'Speaker Organisation', 'Speaker Position']\n    rows = [headers]\n    for speaker in speakers:\n        column = [speaker.name if speaker.name else '', speaker.email if speaker.email else '']\n        if speaker.sessions:\n            session_details = ''\n            for session in speaker.sessions:\n                if not session.deleted_at:\n                    session_details += session.title + ' (' + session.state + '); '\n            column.append(session_details[:-2])\n        else:\n            column.append('')\n        column.append(speaker.mobile if speaker.mobile else '')\n        column.append(speaker.short_biography if speaker.short_biography else '')\n        column.append(speaker.organisation if speaker.organisation else '')\n        column.append(speaker.position if speaker.position else '')\n        rows.append(column)\n\n    return rows\n", "path": "app/api/helpers/csv_jobs_util.py"}]}