Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
edx-platform
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
edx
edx-platform
Commits
7e23e265
Commit
7e23e265
authored
Apr 02, 2014
by
Calen Pennington
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Rename metrics so that we capture checks as well as scores and number of attempts
parent
630a0b08
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
6 deletions
+6
-6
common/lib/xmodule/xmodule/capa_base.py
+6
-6
No files found.
common/lib/xmodule/xmodule/capa_base.py
View file @
7e23e265
...
...
@@ -876,7 +876,7 @@ class CapaMixin(CapaFields):
answers_without_files
=
convert_files_to_filenames
(
answers
)
event_info
[
'answers'
]
=
answers_without_files
metric_name
=
'capa.check_problem'
metric_name
=
u'capa.check_problem.{}'
.
format
_
=
self
.
runtime
.
service
(
self
,
"i18n"
)
.
ugettext
...
...
@@ -885,7 +885,7 @@ class CapaMixin(CapaFields):
event_info
[
'failure'
]
=
'closed'
self
.
runtime
.
track_function
(
'problem_check_fail'
,
event_info
)
if
dog_stats_api
:
dog_stats_api
.
increment
(
metric_name
,
[
u'result:failed'
,
u'failure:closed'
])
dog_stats_api
.
increment
(
metric_name
(
'checks'
)
,
[
u'result:failed'
,
u'failure:closed'
])
raise
NotFoundError
(
_
(
"Problem is closed."
))
# Problem submitted. Student should reset before checking again
...
...
@@ -893,7 +893,7 @@ class CapaMixin(CapaFields):
event_info
[
'failure'
]
=
'unreset'
self
.
runtime
.
track_function
(
'problem_check_fail'
,
event_info
)
if
dog_stats_api
:
dog_stats_api
.
increment
(
metric_name
,
[
u'result:failed'
,
u'failure:unreset'
])
dog_stats_api
.
increment
(
metric_name
(
'checks'
)
,
[
u'result:failed'
,
u'failure:unreset'
])
raise
NotFoundError
(
_
(
"Problem must be reset before it can be checked again."
))
# Problem queued. Students must wait a specified waittime before they are allowed to submit
...
...
@@ -962,13 +962,13 @@ class CapaMixin(CapaFields):
self
.
runtime
.
track_function
(
'problem_check'
,
event_info
)
if
dog_stats_api
:
dog_stats_api
.
increment
(
metric_name
,
[
u'result:success'
])
dog_stats_api
.
increment
(
metric_name
(
'checks'
)
,
[
u'result:success'
])
dog_stats_api
.
histogram
(
u'{}.correct_pct'
.
format
(
metric_name
),
metric_name
(
'correct_pct'
),
float
(
published_grade
[
'grade'
])
/
published_grade
[
'max_grade'
],
)
dog_stats_api
.
histogram
(
u'{}.attempts'
.
format
(
metric_name
),
metric_name
(
'attempts'
),
self
.
attempts
,
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment