def upload_csv_to_report_store(rows, csv_name, course_id, timestamp, config_name='GRADES_DOWNLOAD'):
 report_store = ReportStore.from_config(config_name)
 report_store.store_rows(course_id, u'{course_prefix}_{csv_name}_{timestamp_str}.csv'.format(course_prefix=course_filename_prefix_generator(course_id), csv_name=csv_name, timestamp_str=timestamp.strftime('%Y-%m-%d-%H%M')), rows)
 tracker.emit(REPORT_REQUESTED_EVENT_NAME, {'report_type': csv_name})

def upload_csv_to_report_store ( rows , csv_name , course_id , timestamp , config_name = 'GRADES_DOWNLOAD' ) : report_store = ReportStore . from_config ( config_name ) report_store . store_rows ( course_id , u'{course_prefix}_{csv_name}_{timestamp_str}.csv' . format ( course_prefix = course_filename_prefix_generator ( course_id ) , csv_name = csv_name , timestamp_str = timestamp . strftime ( '%Y-%m-%d-%H%M' ) ) , rows ) tracker . emit ( REPORT_REQUESTED_EVENT_NAME , { 'report_type' : csv_name } )
upload data as a csv using reportstore .