Skip to content
Snippets Groups Projects
Commit b97e63d0 authored by Charles Circo's avatar Charles Circo
Browse files

Merge branch 'remove-unused-files' into 'main'

Remove files that are no longer used

See merge request !18
parents 07f578ef 7b6c8cd4
Branches main
1 merge request!18Remove files that are no longer used
BROWSER=none
\ No newline at end of file
BROWSER=none
import csv
import json
csv_path = r'C:\Users\12408\Downloads\test.csv' #Change according to the location of csv file
json_path = r'./src/utils/csvtopy.json'
with open(csv_path, 'r', encoding='ISO-8859-1') as csvfile, open(json_path, 'w') as jsonfile:
reader = csv.reader(csvfile)
headers = next(reader)
rows = []
for row in reader:
row_dict = {}
for i in range(len(headers)):
row_dict[headers[i]] = row[i]
rows.append(row_dict)
json.dump(rows, jsonfile, indent=4)
\ No newline at end of file
//looks like json file that is returned from grade distribution GET request
//from open edx API
//will have to change this to a function & use hook later b/c it won't be constant
export const FakeData = [
{
module_id:
'i4x://edX/DemoX/Demo_Course/problem/97fd93e33a18495488578e9e74fa4cae',
course_id: 'edX/DemoX/Demo_Course',
grade: 1,
max_grade: 2,
count: 5,
created: '2014-09-12T114957',
},
{
module_id:
'i4x://edX/DemoX/Demo_Course/problem/97fd93e33a18495488578e9e74fa4cae',
course_id: 'edX/DemoX/Demo_Course',
grade: 2,
max_grade: 2,
count: 256,
created: '2014-09-12T114957',
},
];
//looks like json file that is returned from grade distribution GET request
//from open edx API
//will have to change this to a function & use hook later b/c it won't be constant
// data from the json file to be used in the charts
import jsondata from './csvToPy.json';
export const data = jsondata;
\ No newline at end of file
This diff is collapsed.
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment