Add acceptedStudentsCSVExport function to stats.py script.
This funtion is used to generate CSV with all accepted students. It still needs some work and I left TODOs there. I also added helper function for saving data to CSV, which can be reused for other kinds of reports.
"""
Code used in a couple of places to work with the current thread's environment.
Current users include i18n and request prefix handling.
"""
try:
import threading
currentThread = threading.currentThread
except ImportError:
def currentThread():
return "no threading"