Commit 167d2dd8 by David Ormsbee

adding debug logging to show how often we're opening problem files (35x for /profile)

parent 4926701e
import copy import copy
import logging
import math import math
import numpy import numpy
import os import os
...@@ -19,6 +20,8 @@ from responsetypes import numericalresponse, formularesponse, customresponse, sc ...@@ -19,6 +20,8 @@ from responsetypes import numericalresponse, formularesponse, customresponse, sc
import calc import calc
import eia import eia
log = logging.getLogger("mitx.courseware")
response_types = {'numericalresponse':numericalresponse, response_types = {'numericalresponse':numericalresponse,
'formularesponse':formularesponse, 'formularesponse':formularesponse,
'customresponse':customresponse, 'customresponse':customresponse,
...@@ -80,6 +83,7 @@ class LoncapaProblem(object): ...@@ -80,6 +83,7 @@ class LoncapaProblem(object):
self.seed=struct.unpack('i', os.urandom(4))[0] self.seed=struct.unpack('i', os.urandom(4))[0]
## Parse XML file ## Parse XML file
log.debug(u"LoncapaProblem() opening file {0}".format(filename))
file_text = open(filename).read() file_text = open(filename).read()
# Convert startouttext and endouttext to proper <text></text> # Convert startouttext and endouttext to proper <text></text>
# TODO: Do with XML operations # TODO: Do with XML operations
......
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