From bfd441255afce626f57e309aedba84a8b0d0d583 Mon Sep 17 00:00:00 2001 From: kimth Date: Fri, 3 Aug 2012 14:16:20 -0400 Subject: [PATCH] Every path except for 'get_score' gets filename instead of file object --- common/lib/capa/capa/capa_problem.py | 5 +++-- common/lib/capa/capa/responsetypes.py | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/common/lib/capa/capa/capa_problem.py b/common/lib/capa/capa/capa_problem.py index 55b9096021..bdfbbab73d 100644 --- a/common/lib/capa/capa/capa_problem.py +++ b/common/lib/capa/capa/capa_problem.py @@ -31,7 +31,7 @@ import calc from correctmap import CorrectMap import eia import inputtypes -from util import contextualize_text +from util import contextualize_text, convert_files_to_filenames # to be replaced with auto-registering import responsetypes @@ -228,7 +228,8 @@ class LoncapaProblem(object): Calls the Response for each question in this problem, to do the actual grading. ''' - self.student_answers = answers + + self.student_answers = convert_files_to_filenames(answers) oldcmap = self.correct_map # old CorrectMap newcmap = CorrectMap() # start new with empty CorrectMap # log.debug('Responders: %s' % self.responders) diff --git a/common/lib/capa/capa/responsetypes.py b/common/lib/capa/capa/responsetypes.py index dc0fd518ee..2874de7395 100644 --- a/common/lib/capa/capa/responsetypes.py +++ b/common/lib/capa/capa/responsetypes.py @@ -161,7 +161,7 @@ class LoncapaResponse(object): Returns the new CorrectMap, with (correctness,msg,hint,hintmode) for each answer_id. ''' new_cmap = self.get_score(student_answers) - self.get_hints(student_answers, new_cmap, old_cmap) + self.get_hints(convert_files_to_filenames(student_answers), new_cmap, old_cmap) # log.debug('new_cmap = %s' % new_cmap) return new_cmap