Commit 379441be by Piotr Mitros

Clean up problem_graded event. Note: Does not fix test cases

parent ae7b44bb
...@@ -295,7 +295,18 @@ class @Problem ...@@ -295,7 +295,18 @@ class @Problem
@updateProgress response @updateProgress response
else else
@gentle_alert response.success @gentle_alert response.success
Logger.log 'problem_graded', [@answers, response.contents], @id
answer_dict = {}
for element in @inputs.serializeArray()
answer_dict[element.name] = element.value
# It'd be nice to log things like hints from the HTML
# but we don't want to log the entire thing for now. It
# can get big.
log_data =
answers : answer_dict
success : response.success
#html: response.contents
Logger.log 'problem_graded', log_data, @id
$.ajaxWithPrefix("#{@url}/problem_check", settings) $.ajaxWithPrefix("#{@url}/problem_check", settings)
...@@ -321,7 +332,18 @@ class @Problem ...@@ -321,7 +332,18 @@ class @Problem
@$('div.action button.check').focus() @$('div.action button.check').focus()
else else
@gentle_alert response.success @gentle_alert response.success
Logger.log 'problem_graded', [@answers, response.contents], @id answer_dict = {}
for element in @inputs.serializeArray()
answer_dict[element.name] = element.value
# It'd be nice to log things like hints from the HTML
# but we don't want to log the entire thing for now. It
# can get big.
log_data =
answers : answer_dict
success : response.success
#html: response.contents
Logger.log 'problem_graded', log_data, @id
).always(@enableCheckButtonAfterResponse) ).always(@enableCheckButtonAfterResponse)
reset: => reset: =>
......
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