Debugging correctmap state

This commit is contained in:
kimth
2012-08-27 14:50:03 -04:00
parent b50f9759e1
commit ff38f5b390
2 changed files with 4 additions and 7 deletions

View File

@@ -14,6 +14,7 @@ This is used by capa_module.
from __future__ import division
import json
import logging
import math
import numpy
@@ -97,6 +98,8 @@ class LoncapaProblem(object):
if 'student_answers' in state:
self.student_answers = state['student_answers']
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'])
if 'done' in state:
self.done = state['done']

View File

@@ -464,13 +464,7 @@ class CapaModule(XModule):
raise NotFoundError('Problem must be reset before it can be checked again')
# Problem queued. Students must wait XQUEUE_WAITTIME_BETWEEN_REQUESTS
try:
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:
if self.lcp.is_queued():
current_time = datetime.datetime.now()
prev_submit_time = self.lcp.get_recentmost_queuetime()
waittime_between_requests = settings.XQUEUE_WAITTIME_BETWEEN_REQUESTS