From 65c56edb5cabea51f65b121e3bcc0a28122ebe5b Mon Sep 17 00:00:00 2001 From: Diana Huang Date: Mon, 3 Dec 2012 15:04:34 -0500 Subject: [PATCH 1/2] Better error logging when login into queue fails --- common/lib/capa/capa/xqueue_interface.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/common/lib/capa/capa/xqueue_interface.py b/common/lib/capa/capa/xqueue_interface.py index f145cad23c..798867955b 100644 --- a/common/lib/capa/capa/xqueue_interface.py +++ b/common/lib/capa/capa/xqueue_interface.py @@ -81,7 +81,11 @@ class XQueueInterface(object): # Log in, then try again if error and (msg == 'login_required'): - self._login() + (error, content) = self._login() + if error != 0: + # when the login fails + log.debug("Failed to login to queue: %s", content) + return (error, content) if files_to_upload is not None: # Need to rewind file pointers for f in files_to_upload: From 9b1cad90b5ed56d7745ddefbc4885d8ddd34d0a7 Mon Sep 17 00:00:00 2001 From: Diana Huang Date: Mon, 3 Dec 2012 16:52:29 -0500 Subject: [PATCH 2/2] Fix location that gets used for open-ended responses --- common/lib/xmodule/xmodule/capa_module.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/lib/xmodule/xmodule/capa_module.py b/common/lib/xmodule/xmodule/capa_module.py index ead138a225..4c10a1703a 100644 --- a/common/lib/xmodule/xmodule/capa_module.py +++ b/common/lib/xmodule/xmodule/capa_module.py @@ -149,7 +149,7 @@ class CapaModule(XModule): # Need the problem location in openendedresponse to send out. Adding # it to the system here seems like the least clunky way to get it # there. - self.system.set('location', self.location) + self.system.set('location', self.location.url()) try: # TODO (vshnayder): move as much as possible of this work and error