adedd new relic debugging to normalized_score

This commit is contained in:
Tom Staubitz
2015-04-24 16:28:51 +02:00
parent 8697c8b23a
commit 3307ebbabb

View File

@ -38,6 +38,7 @@ class Submission < ActiveRecord::Base
end
def normalized_score
::NewRelic::Agent.add_custom_parameters({ unnormalized_score: score })
if !score.nil? && !exercise.maximum_score.nil? && (exercise.maximum_score > 0)
score / exercise.maximum_score
else