Skip to content
Snippets Groups Projects
Commit 3cbb74ae authored by David Ormsbee's avatar David Ormsbee Committed by Calen Pennington
Browse files

fix breakage in problem checker caused by LoncapaProblem taking a file object...

fix breakage in problem checker caused by LoncapaProblem taking a file object in its constructor instead of a filename
parent accdbdd6
No related branches found
No related tags found
No related merge requests found
......@@ -127,7 +127,7 @@ class LoncapaProblem(object):
responder.preprocess_response()
def __unicode__(self):
return u"LoncapaProblem ({0})".format(os.path.basename(self.filename))
return u"LoncapaProblem ({0})".format(os.path.basename(self.fileobject.name))
def get_state(self):
''' Stored per-user session data neeeded to:
......
......@@ -32,7 +32,7 @@ def main():
log.info("Opening {0}".format(problem_file.name))
try:
problem = LoncapaProblem(problem_file.name, "fakeid", seed=args.seed)
problem = LoncapaProblem(problem_file, "fakeid", seed=args.seed)
except Exception as ex:
log.error("Could not parse file {0}".format(problem_file.name))
log.exception(ex)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment