added instrumentation to count: user logins, registrations, correct answers, wrong answers, enrollment

This commit is contained in:
Vik Paruchuri
2012-10-22 19:50:34 -04:00
parent f50519ae48
commit f296815d51
2 changed files with 12 additions and 4 deletions

View File

@@ -2,7 +2,7 @@
# class used to store graded responses to CAPA questions
#
# Used by responsetypes and capa_problem
from statsd import statsd
class CorrectMap(object):
"""
@@ -53,6 +53,11 @@ class CorrectMap(object):
'hintmode': hintmode,
'queuestate': queuestate,
}
if correctness=="correct":
statsd.increment("user.correct_answer")
else:
statsd.increment("user.incorrect_answer)
def __repr__(self):
return repr(self.cmap)