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
d23eb93f
Commit
d23eb93f
authored
Dec 28, 2012
by
Diana Huang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add new peer grading service with some rudimentary logic
parent
125945de
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
25 additions
and
0 deletions
+25
-0
lms/djangoapps/open_ended_grading/peer_grading_service.py
+25
-0
No files found.
lms/djangoapps/open_ended_grading/peer_grading_service.py
View file @
d23eb93f
...
...
@@ -6,6 +6,8 @@ import sys
from
django.conf
import
settings
from
django.http
import
HttpResponse
,
Http404
from
grading_service
import
GradingService
from
grading_service
import
GradingServiceError
from
courseware.access
import
has_access
from
util.json_request
import
expect_json
...
...
@@ -13,3 +15,26 @@ from xmodule.course_module import CourseDescriptor
log
=
logging
.
getLogger
(
__name__
)
class
PeerGradingService
(
GradingService
):
"""
Interface with the grading controller for peer grading
"""
def
__init__
(
self
,
config
):
super
(
PeerGradingService
,
self
)
.
__init__
(
config
)
self
.
get_next_submission_url
=
self
.
url
+
'/get_next_submission/'
self
.
save_grade_url
=
self
.
url
+
'/save_grade/'
self
.
is_student_calibrated_url
=
self
.
url
+
'/is_student_calibrated/'
self
.
show_calibration_essay
=
self
.
url
+
'/show_calibration_essay/'
self
.
save_calibration_essay
=
self
.
url
+
'/save_calibration_essay/'
def
get_next_submission
(
self
,
problem_location
,
grader_id
):
return
self
.
get
(
self
.
get_next_submission_url
,
False
,
{
'location'
:
problem_location
,
'grader_id'
:
grader_id
})
def
save_grade
(
self
,
grader_id
,
submission_id
,
score
,
feedback
,
submission_key
):
data
=
{
'grader_id'
:
grader_id
,
'submission_id'
:
submission_id
,
'score'
:
score
,
'feedback'
:
feedback
,
'submission_key'
,
submission_key
}
return
self
.
post
(
self
.
save_grade_url
,
False
,
data
)
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