From 96746721c43f245ba135ba64937f21a763e90222 Mon Sep 17 00:00:00 2001 From: Arjun Singh Date: Tue, 7 Aug 2012 00:11:39 -0400 Subject: [PATCH 1/2] Fixed incorrect default argument so that tests run; however the new value is incorrect and needs to be fixed. --- common/lib/xmodule/xmodule/tests/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/lib/xmodule/xmodule/tests/__init__.py b/common/lib/xmodule/xmodule/tests/__init__.py index 7f6fcfe00c..7b1641956c 100644 --- a/common/lib/xmodule/xmodule/tests/__init__.py +++ b/common/lib/xmodule/xmodule/tests/__init__.py @@ -31,7 +31,7 @@ i4xs = ModuleSystem( user=Mock(), filestore=fs.osfs.OSFS(os.path.dirname(os.path.realpath(__file__))), debug=True, - xqueue_callback_url='/', + xqueue=None, # TODO FIXME is_staff=False ) From 323fb18c7461b4574c88926f6488952ee3e89071 Mon Sep 17 00:00:00 2001 From: Arjun Singh Date: Tue, 7 Aug 2012 00:14:48 -0400 Subject: [PATCH 2/2] 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. --- common/lib/capa/capa/util.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/common/lib/capa/capa/util.py b/common/lib/capa/capa/util.py index 1dc113cd20..211ada4d62 100644 --- a/common/lib/capa/capa/util.py +++ b/common/lib/capa/capa/util.py @@ -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