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
c9a5e9b8
Commit
c9a5e9b8
authored
Mar 27, 2014
by
Calen Pennington
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Record metrics about the staff grading service
parent
f2b554db
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
25 additions
and
4 deletions
+25
-4
lms/djangoapps/open_ended_grading/staff_grading_service.py
+25
-4
No files found.
lms/djangoapps/open_ended_grading/staff_grading_service.py
View file @
c9a5e9b8
...
@@ -77,6 +77,8 @@ class StaffGradingService(GradingService):
...
@@ -77,6 +77,8 @@ class StaffGradingService(GradingService):
Interface to staff grading backend.
Interface to staff grading backend.
"""
"""
METRIC_NAME
=
'edxapp.open_ended_grading.staff_grading_service'
def
__init__
(
self
,
config
):
def
__init__
(
self
,
config
):
config
[
'system'
]
=
LmsModuleSystem
(
config
[
'system'
]
=
LmsModuleSystem
(
static_url
=
'/static'
,
static_url
=
'/static'
,
...
@@ -114,7 +116,14 @@ class StaffGradingService(GradingService):
...
@@ -114,7 +116,14 @@ class StaffGradingService(GradingService):
GradingServiceError: something went wrong with the connection.
GradingServiceError: something went wrong with the connection.
"""
"""
params
=
{
'course_id'
:
course_id
,
'grader_id'
:
grader_id
}
params
=
{
'course_id'
:
course_id
,
'grader_id'
:
grader_id
}
return
self
.
get
(
self
.
get_problem_list_url
,
params
)
.
json
()
result
=
self
.
get
(
self
.
get_problem_list_url
,
params
)
.
json
()
tags
=
[
u'course_id:{}'
.
format
(
course_id
)]
self
.
_record_result
(
'get_problem_list'
,
result
,
tags
)
dog_stats_api
.
histogram
(
self
.
_metric_name
(
'get_problem_list.result.length'
),
len
(
result
.
get
(
'problem_list'
,
[]))
)
return
result
def
get_next
(
self
,
course_id
,
location
,
grader_id
):
def
get_next
(
self
,
course_id
,
location
,
grader_id
):
"""
"""
...
@@ -137,7 +146,10 @@ class StaffGradingService(GradingService):
...
@@ -137,7 +146,10 @@ class StaffGradingService(GradingService):
response
=
self
.
get
(
self
.
get_next_url
,
response
=
self
.
get
(
self
.
get_next_url
,
params
=
{
'location'
:
location
,
params
=
{
'location'
:
location
,
'grader_id'
:
grader_id
})
'grader_id'
:
grader_id
})
return
self
.
_render_rubric
(
response
.
json
())
result
=
self
.
_render_rubric
(
response
.
json
())
tags
=
[
u'course_id:{}'
.
format
(
course_id
)]
self
.
_record_result
(
'get_next'
,
result
,
tags
)
return
result
def
save_grade
(
self
,
course_id
,
grader_id
,
submission_id
,
score
,
feedback
,
skipped
,
rubric_scores
,
def
save_grade
(
self
,
course_id
,
grader_id
,
submission_id
,
score
,
feedback
,
skipped
,
rubric_scores
,
submission_flagged
):
submission_flagged
):
...
@@ -163,11 +175,20 @@ class StaffGradingService(GradingService):
...
@@ -163,11 +175,20 @@ class StaffGradingService(GradingService):
'submission_flagged'
:
submission_flagged
}
'submission_flagged'
:
submission_flagged
}
response
=
self
.
post
(
self
.
save_grade_url
,
data
=
data
)
response
=
self
.
post
(
self
.
save_grade_url
,
data
=
data
)
return
self
.
_render_rubric
(
response
.
json
())
result
=
self
.
_render_rubric
(
response
.
json
())
tags
=
[
u'course_id:{}'
.
format
(
course_id
)]
self
.
_record_result
(
'save_grade'
,
result
,
tags
)
return
result
def
get_notifications
(
self
,
course_id
):
def
get_notifications
(
self
,
course_id
):
params
=
{
'course_id'
:
course_id
}
params
=
{
'course_id'
:
course_id
}
return
self
.
get
(
self
.
get_notifications_url
,
params
)
.
json
()
result
=
self
.
get
(
self
.
get_notifications_url
,
params
)
.
json
()
tags
=
[
u'course_id:{}'
.
format
(
course_id
),
u'staff_needs_to_grade:{}'
.
format
(
result
.
get
(
'staff_needs_to_grade'
))
]
self
.
_record_result
(
'get_notifications'
,
result
,
tags
)
return
result
# don't initialize until staff_grading_service() is called--means that just
# don't initialize until staff_grading_service() is called--means that just
...
...
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