Commit afcd6fb1 by kimth

Safe logging of File-included answers

parent eeaa1e04
......@@ -16,6 +16,7 @@ from xmodule.exceptions import NotFoundError
from progress import Progress
from capa.capa_problem import LoncapaProblem
from capa.responsetypes import StudentInputError
from capa.util import convert_files_to_filenames
log = logging.getLogger("mitx.courseware")
......@@ -415,8 +416,7 @@ class CapaModule(XModule):
event_info['problem_id'] = self.location.url()
answers = self.make_dict_of_responses(get)
event_info['answers'] = answers
event_info['answers'] = convert_files_to_filenames(answers)
# Too late. Cannot submit
if self.closed():
......@@ -424,8 +424,7 @@ class CapaModule(XModule):
self.system.track_function('save_problem_check_fail', event_info)
raise NotFoundError('Problem is closed')
# Problem submitted. Student should reset before checking
# again.
# Problem submitted. Student should reset before checking again
if self.lcp.done and self.rerandomize == "always":
event_info['failure'] = 'unreset'
self.system.track_function('save_problem_check_fail', event_info)
......
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