diff --git a/common/lib/capa/capa/responsetypes.py b/common/lib/capa/capa/responsetypes.py index b102657f89..66212f1e87 100644 --- a/common/lib/capa/capa/responsetypes.py +++ b/common/lib/capa/capa/responsetypes.py @@ -818,7 +818,7 @@ class CodeResponse(LoncapaResponse): ''' Configure CodeResponse from XML. Supports both CodeResponse and ExternalResponse XML - Determines whether in synchronous or asynchronous (queued) mode + TODO: Determines whether in synchronous or asynchronous (queued) mode ''' xml = self.xml self.url = xml.get('url', None) # XML can override external resource (grader/queue) URL diff --git a/common/lib/xmodule/xmodule/tests/__init__.py b/common/lib/xmodule/xmodule/tests/__init__.py index db454aa483..2d8c32d893 100644 --- a/common/lib/xmodule/xmodule/tests/__init__.py +++ b/common/lib/xmodule/xmodule/tests/__init__.py @@ -9,6 +9,7 @@ import unittest import os import fs +import json import numpy import xmodule @@ -291,9 +292,14 @@ class CodeResponseTest(unittest.TestCase): for i in range(numAnswers): old_cmap.update(CorrectMap(answer_id=answer_ids[i], queuekey=1000 + i)) - # Message format inherited from ExternalResponse - correct_score_msg = "EXACT_ANSMESSAGE" - incorrect_score_msg = "WRONG_FORMATMESSAGE" + # TODO: Message format inherited from ExternalResponse + #correct_score_msg = "EXACT_ANSMESSAGE" + #incorrect_score_msg = "WRONG_FORMATMESSAGE" + + # New message format common to external graders + correct_score_msg = json.dumps({'correct':True, 'score':1, 'msg':'MESSAGE'}) + incorrect_score_msg = json.dumps({'correct':False, 'score':0, 'msg':'MESSAGE'}) + xserver_msgs = {'correct': correct_score_msg, 'incorrect': incorrect_score_msg, }