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
fe86c25f
Commit
fe86c25f
authored
Jan 03, 2013
by
Diana Huang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Bug fixes for the JS and the peer grading service
parent
28501ca5
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
9 deletions
+8
-9
lms/djangoapps/open_ended_grading/peer_grading_service.py
+5
-5
lms/static/coffee/src/peer_grading/peer_grading_problem.coffee
+3
-4
No files found.
lms/djangoapps/open_ended_grading/peer_grading_service.py
View file @
fe86c25f
...
@@ -33,12 +33,13 @@ class PeerGradingService(GradingService):
...
@@ -33,12 +33,13 @@ class PeerGradingService(GradingService):
{
'location'
:
problem_location
,
'grader_id'
:
grader_id
})
{
'location'
:
problem_location
,
'grader_id'
:
grader_id
})
return
response
return
response
def
save_grade
(
self
,
grader_id
,
submission_id
,
score
,
feedback
,
submission_key
):
def
save_grade
(
self
,
location
,
grader_id
,
submission_id
,
score
,
feedback
,
submission_key
):
data
=
{
'grader_id'
:
grader_id
,
data
=
{
'grader_id'
:
grader_id
,
'submission_id'
:
submission_id
,
'submission_id'
:
submission_id
,
'score'
:
score
,
'score'
:
score
,
'feedback'
:
feedback
,
'feedback'
:
feedback
,
'submission_key'
:
submission_key
}
'submission_key'
:
submission_key
,
'location'
:
location
}
return
self
.
post
(
self
.
save_grade_url
,
False
,
data
)
return
self
.
post
(
self
.
save_grade_url
,
False
,
data
)
def
is_student_calibrated
(
self
,
problem_location
,
grader_id
):
def
is_student_calibrated
(
self
,
problem_location
,
grader_id
):
...
@@ -61,7 +62,6 @@ class PeerGradingService(GradingService):
...
@@ -61,7 +62,6 @@ class PeerGradingService(GradingService):
def
get_problem_list
(
self
,
course_id
,
grader_id
):
def
get_problem_list
(
self
,
course_id
,
grader_id
):
params
=
{
'course_id'
:
course_id
,
'student_id'
:
grader_id
}
params
=
{
'course_id'
:
course_id
,
'student_id'
:
grader_id
}
response
=
self
.
get
(
self
.
get_problem_list_url
,
False
,
params
)
response
=
self
.
get
(
self
.
get_problem_list_url
,
False
,
params
)
log
.
debug
(
"Response! {0}"
.
format
(
response
))
return
response
return
response
...
@@ -115,7 +115,7 @@ def get_next_submission(request, course_id):
...
@@ -115,7 +115,7 @@ def get_next_submission(request, course_id):
p
=
request
.
POST
p
=
request
.
POST
location
=
p
[
'location'
]
location
=
p
[
'location'
]
return
HttpResponse
(
_get_next
(
course_id
,
request
.
user
.
id
,
location
),
return
HttpResponse
(
_get_next
_submission
(
course_id
,
request
.
user
.
id
,
location
),
mimetype
=
"application/json"
)
mimetype
=
"application/json"
)
def
_get_next_submission
(
course_id
,
grader_id
,
location
):
def
_get_next_submission
(
course_id
,
grader_id
,
location
):
...
@@ -144,7 +144,7 @@ def save_grade(request, course_id):
...
@@ -144,7 +144,7 @@ def save_grade(request, course_id):
feedback
=
p
[
'feedback'
]
feedback
=
p
[
'feedback'
]
submission_key
=
p
[
'submission_key'
]
submission_key
=
p
[
'submission_key'
]
try
:
try
:
response
=
peer_grading_service
()
.
save_grade
(
grader_id
,
submission_id
,
response
=
peer_grading_service
()
.
save_grade
(
location
,
grader_id
,
submission_id
,
score
,
feedback
,
submission_key
)
score
,
feedback
,
submission_key
)
return
HttpResponse
(
response
,
mimetype
=
"application/json"
)
return
HttpResponse
(
response
,
mimetype
=
"application/json"
)
except
GradingServiceError
:
except
GradingServiceError
:
...
...
lms/static/coffee/src/peer_grading/peer_grading_problem.coffee
View file @
fe86c25f
...
@@ -45,7 +45,6 @@ class PeerGradingProblemBackend
...
@@ -45,7 +45,6 @@ class PeerGradingProblemBackend
response
=
response
=
success
:
true
success
:
true
return
response
return
response
...
@@ -101,9 +100,9 @@ class PeerGradingProblem
...
@@ -101,9 +100,9 @@ class PeerGradingProblem
fetch_submission_essay
:
()
=>
fetch_submission_essay
:
()
=>
@
backend
.
post
(
'get_next_submission'
,
{
location
:
@
location
},
@
render_submission
)
@
backend
.
post
(
'get_next_submission'
,
{
location
:
@
location
},
@
render_submission
)
construct_data
:
()
=
>
construct_data
:
()
-
>
data
=
data
=
score
:
@
score
score
:
$
(
'input[name="score-selection"]:checked'
).
val
()
location
:
@
location
location
:
@
location
submission_id
:
@
essay_id_input
.
val
()
submission_id
:
@
essay_id_input
.
val
()
submission_key
:
@
submission_key_input
.
val
()
submission_key
:
@
submission_key_input
.
val
()
...
@@ -254,7 +253,7 @@ class PeerGradingProblem
...
@@ -254,7 +253,7 @@ class PeerGradingProblem
mock_backend
=
tru
e
mock_backend
=
fals
e
ajax_url
=
$
(
'.peer-grading'
).
data
(
'ajax_url'
)
ajax_url
=
$
(
'.peer-grading'
).
data
(
'ajax_url'
)
backend
=
new
PeerGradingProblemBackend
(
ajax_url
,
mock_backend
)
backend
=
new
PeerGradingProblemBackend
(
ajax_url
,
mock_backend
)
$
(
document
).
ready
(()
->
new
PeerGradingProblem
(
backend
))
$
(
document
).
ready
(()
->
new
PeerGradingProblem
(
backend
))
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