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
b7473f80
Commit
b7473f80
authored
Jan 07, 2013
by
Diana Huang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make mock service return useful data
parent
e1ec4eec
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
24 additions
and
7 deletions
+24
-7
lms/djangoapps/open_ended_grading/peer_grading_service.py
+24
-7
No files found.
lms/djangoapps/open_ended_grading/peer_grading_service.py
View file @
b7473f80
...
...
@@ -16,24 +16,41 @@ from xmodule.course_module import CourseDescriptor
log
=
logging
.
getLogger
(
__name__
)
class
MockPeerGradingService
(
object
):
# TODO: make this return real results
def
get_next_submission
(
self
,
problem_location
,
grader_id
):
return
{
'success'
:
true
}
return
json
.
dumps
({
'success'
:
True
,
'submission_id'
:
1
,
'submission_key'
:
""
,
'student_response'
:
'fake student response'
,
'prompt'
:
'fake submission prompt'
,
'rubric'
:
'fake rubric'
,
'max_score'
:
4
})
def
save_grade
(
self
,
location
,
grader_id
,
submission_id
,
score
,
feedback
,
submission_key
):
return
{
'success'
:
true
}
return
json
.
dumps
({
'success'
:
True
})
def
is_student_calibrated
(
self
,
problem_location
,
grader_id
):
return
{
'success'
:
true
}
return
json
.
dumps
({
'success'
:
True
,
'calibrated'
:
True
})
def
show_calibration_essay
(
self
,
problem_location
,
grader_id
):
return
{
'success'
:
true
}
return
json
.
dumps
({
'success'
:
True
,
'submission_id'
:
1
,
'submission_key'
:
''
,
'student_response'
:
'fake student response'
,
'prompt'
:
'fake submission prompt'
,
'rubric'
:
'fake rubric'
,
'max_score'
:
4
})
def
save_calibration_essay
(
self
,
problem_location
,
grader_id
,
calibration_essay_id
,
submission_key
,
score
,
feedback
):
return
{
'success'
:
true
}
return
{
'success'
:
True
,
'actual_score'
:
2
}
def
get_problem_list
(
self
,
course_id
,
grader_id
):
return
{
'success'
:
true
}
return
json
.
dumps
({
'success'
:
True
,
'problem_list'
:
[
json
.
dumps
({
'location'
:
'i4x://MITx/3.091x/problem/open_ended_demo1'
,
\
'problem_name'
:
"Problem 1"
,
'num_graded'
:
3
,
'num_pending'
:
5
}),
json
.
dumps
({
'location'
:
'i4x://MITx/3.091x/problem/open_ended_demo2'
,
\
'problem_name'
:
"Problem 2"
,
'num_graded'
:
1
,
'num_pending'
:
5
})
]})
class
PeerGradingService
(
GradingService
):
"""
...
...
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