Commit ff38f5b3 by kimth

Debugging correctmap state

parent b50f9759
...@@ -14,6 +14,7 @@ This is used by capa_module. ...@@ -14,6 +14,7 @@ This is used by capa_module.
from __future__ import division from __future__ import division
import json
import logging import logging
import math import math
import numpy import numpy
...@@ -97,6 +98,8 @@ class LoncapaProblem(object): ...@@ -97,6 +98,8 @@ class LoncapaProblem(object):
if 'student_answers' in state: if 'student_answers' in state:
self.student_answers = state['student_answers'] self.student_answers = state['student_answers']
if 'correct_map' in state: if 'correct_map' in state:
print 'THK: LoncapaProblem.__init__'
print json.dumps(state['correct_map'], indent=4)
self.correct_map.set_dict(state['correct_map']) self.correct_map.set_dict(state['correct_map'])
if 'done' in state: if 'done' in state:
self.done = state['done'] self.done = state['done']
......
...@@ -464,13 +464,7 @@ class CapaModule(XModule): ...@@ -464,13 +464,7 @@ class CapaModule(XModule):
raise NotFoundError('Problem must be reset before it can be checked again') raise NotFoundError('Problem must be reset before it can be checked again')
# Problem queued. Students must wait XQUEUE_WAITTIME_BETWEEN_REQUESTS # Problem queued. Students must wait XQUEUE_WAITTIME_BETWEEN_REQUESTS
try: if self.lcp.is_queued():
is_queued = self.lcp.is_queued()
except KeyError:
log.info("Caught KeyError arising from 'queuekey'-->'queuestate' conversion for CapaModule name=%s" % self.name)
is_queued = False
if is_queued:
current_time = datetime.datetime.now() current_time = datetime.datetime.now()
prev_submit_time = self.lcp.get_recentmost_queuetime() prev_submit_time = self.lcp.get_recentmost_queuetime()
waittime_between_requests = settings.XQUEUE_WAITTIME_BETWEEN_REQUESTS waittime_between_requests = settings.XQUEUE_WAITTIME_BETWEEN_REQUESTS
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment