Commit 92ae50d4 by Renzo Lucioni

Remove unused code and include problem ID of data we send

parent c770458e
...@@ -22,7 +22,6 @@ class @Problem ...@@ -22,7 +22,6 @@ class @Problem
@$('section.action input:button').click @refreshAnswers @$('section.action input:button').click @refreshAnswers
@$('section.action input.check').click @check_fd @$('section.action input.check').click @check_fd
#@$('section.action input.check').click @check
@$('section.action input.reset').click @reset @$('section.action input.reset').click @reset
@$('section.action button.show').click @show @$('section.action button.show').click @show
@$('section.action input.save').click @save @$('section.action input.save').click @save
...@@ -162,10 +161,6 @@ class @Problem ...@@ -162,10 +161,6 @@ class @Problem
# maybe preferable to consolidate all dispatches to use FormData # maybe preferable to consolidate all dispatches to use FormData
### ###
check_fd: => check_fd: =>
# Calling check from check_fd will result in firing the 'problem_check' event twice,
# since it is also called in the check function.
# Logger.log 'problem_check', @answers
# If there are no file inputs in the problem, we can fall back on @check # If there are no file inputs in the problem, we can fall back on @check
if $('input:file').length == 0 if $('input:file').length == 0
@check() @check()
...@@ -243,6 +238,7 @@ class @Problem ...@@ -243,6 +238,7 @@ class @Problem
# Segment.io # Segment.io
analytics.track "Problem Checked", analytics.track "Problem Checked",
problem_id: @id
answers: @answers answers: @answers
$.postWithPrefix "#{@url}/problem_check", @answers, (response) => $.postWithPrefix "#{@url}/problem_check", @answers, (response) =>
......
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