Commit 622001a7 authored by Haoyu Z's avatar Haoyu Z
Browse files

add submissions

parent 86875ad2
......@@ -61,13 +61,14 @@ def main():
extractData(conn, cur)
conn.close()
for question_id in [1,2,3,4,5,6,7,8]:
if question_id != 2:
continue
f = open("hw1-provenance/q"+question_id)
question_submissions = query[question_id]
for student_id in list(question_submissions.keys()):
f.write("studet_id: "+student_id + "\n")
submissions = question_submissions[student_id]
for sub_id in list(submissions.keys()):
try:
'''try:
conn = psycopg2.connect("dbname=provdb user=joker password=m")
cur = conn.cursor()
commitAndExecute(conn, cur, 'SET search_path TO public, provsql;')
......@@ -77,7 +78,8 @@ def main():
exit(1)
finally:
if conn is not None:
conn.close()
conn.close()'''
f.write(submissions[sub_id]+"\n")
f.close()
......
Supports Markdown
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