From e47ff641f38968dd637627df710df646d81e8400 Mon Sep 17 00:00:00 2001 From: kimth Date: Thu, 9 Aug 2012 11:57:59 -0400 Subject: [PATCH 1/3] Testing new instances of xqueue --- common/lib/capa/capa/responsetypes.py | 2 +- common/lib/capa/capa/xqueue_interface.py | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) 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/capa/capa/xqueue_interface.py b/common/lib/capa/capa/xqueue_interface.py index 70f086120e..55c6f938ff 100644 --- a/common/lib/capa/capa/xqueue_interface.py +++ b/common/lib/capa/capa/xqueue_interface.py @@ -10,7 +10,8 @@ import time # TODO: Collection of parameters to be hooked into rest of edX system XQUEUE_LMS_AUTH = { 'username': 'LMS', 'password': 'PaloAltoCA' } -XQUEUE_URL = 'http://xqueue.edx.org' +#XQUEUE_URL = 'http://xqueue.edx.org' +XQUEUE_URL = 'http://ec2-50-19-40-84.compute-1.amazonaws.com' log = logging.getLogger('mitx.' + __name__) From 6b1bf0d4caebd5fbc0e2237ce6712fe2b5d7b3bd Mon Sep 17 00:00:00 2001 From: kimth Date: Thu, 9 Aug 2012 12:05:34 -0400 Subject: [PATCH 2/3] Fix tests with new score_msg format --- common/lib/xmodule/xmodule/tests/__init__.py | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/common/lib/xmodule/xmodule/tests/__init__.py b/common/lib/xmodule/xmodule/tests/__init__.py index 1115d85c7f..3b222b0e04 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, } From 062eff12c449788f150bd2d28c5ec5ffa000f4e0 Mon Sep 17 00:00:00 2001 From: kimth Date: Thu, 9 Aug 2012 12:06:36 -0400 Subject: [PATCH 3/3] Remove test url of xqueue --- common/lib/capa/capa/xqueue_interface.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/common/lib/capa/capa/xqueue_interface.py b/common/lib/capa/capa/xqueue_interface.py index 55c6f938ff..70f086120e 100644 --- a/common/lib/capa/capa/xqueue_interface.py +++ b/common/lib/capa/capa/xqueue_interface.py @@ -10,8 +10,7 @@ import time # TODO: Collection of parameters to be hooked into rest of edX system XQUEUE_LMS_AUTH = { 'username': 'LMS', 'password': 'PaloAltoCA' } -#XQUEUE_URL = 'http://xqueue.edx.org' -XQUEUE_URL = 'http://ec2-50-19-40-84.compute-1.amazonaws.com' +XQUEUE_URL = 'http://xqueue.edx.org' log = logging.getLogger('mitx.' + __name__)