From ff4716ef763af73a7e1bda664bc1b270fe7db724 Mon Sep 17 00:00:00 2001 From: kimth Date: Thu, 19 Jul 2012 10:57:14 -0400 Subject: [PATCH] Further simplification after restricting to one answer field --- common/lib/capa/capa/responsetypes.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/common/lib/capa/capa/responsetypes.py b/common/lib/capa/capa/responsetypes.py index 11bd467482..86c6a08959 100644 --- a/common/lib/capa/capa/responsetypes.py +++ b/common/lib/capa/capa/responsetypes.py @@ -773,7 +773,7 @@ class CodeResponse(LoncapaResponse): # The following process is lifted directly from ExternalResponse ad = rxml.find('awarddetail').text - admap = {'EXACT_ANS':'correct', # TODO: handle other loncapa responses + admap = {'EXACT_ANS': 'correct', # TODO: handle other loncapa responses 'WRONG_FORMAT': 'incorrect', } self.context['correct'] = ['correct'] @@ -794,10 +794,10 @@ class CodeResponse(LoncapaResponse): # does NOT require a queue submission, and the answer is computed (extracted from problem XML) locally. def get_answers(self): anshtml = '
%s

' % self.answer - return dict(zip(self.answer_ids,[anshtml])) + return { self.answer_id: anshtml } def get_initial_display(self): - return dict(zip(self.answer_ids,[self.initial_display])) + return { self.answer_id: self.initial_display } # CodeResponse._send_to_queue implements the same interface as defined for ExternalResponse's 'get_score' def _send_to_queue(self, extra_payload):