Commit 310adbef by Arjun Singh

Poor fix for a breaking change in which student answers that were arrays (e.g.…

Poor fix for a breaking change in which student answers that were arrays (e.g. those resulting from a checkbox group) would be converted to strings and graded incorrectly.
parent 85c9ac6a
......@@ -39,5 +39,10 @@ def convert_files_to_filenames(answers):
'''
new_answers = dict()
for answer_id in answers.keys():
new_answers[answer_id] = unicode(answers[answer_id])
# TODO This should be done more cleanly; however, this fixes bugs
# that were introduced with this function.
if isinstance(answers[answer_id], list):
new_answers[answer_id] = answers[answer_id]
else:
new_answers[answer_id] = unicode(answers[answer_id])
return new_answers
Markdown is supported
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