Merge pull request #1097 from MITx/diana/fix-open-ended-input

Diana/fix open ended input
This commit is contained in:
Victor Shnayder
2012-12-03 14:03:52 -08:00
2 changed files with 6 additions and 2 deletions

View File

@@ -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:

View File

@@ -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