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
19bc6574
Commit
19bc6574
authored
Jan 10, 2013
by
Diana Huang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use correct version of the grader id.
parent
c4d1b2e6
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
5 deletions
+7
-5
lms/djangoapps/open_ended_grading/staff_grading_service.py
+5
-4
lms/djangoapps/open_ended_grading/views.py
+2
-1
No files found.
lms/djangoapps/open_ended_grading/staff_grading_service.py
View file @
19bc6574
...
...
@@ -16,6 +16,7 @@ from django.http import HttpResponse, Http404
from
courseware.access
import
has_access
from
util.json_request
import
expect_json
from
xmodule.course_module
import
CourseDescriptor
from
student.models
import
unique_id_for_user
log
=
logging
.
getLogger
(
__name__
)
...
...
@@ -206,11 +207,11 @@ def get_next(request, course_id):
if
len
(
missing
)
>
0
:
return
_err_response
(
'Missing required keys {0}'
.
format
(
', '
.
join
(
missing
)))
grader_id
=
request
.
user
.
id
grader_id
=
unique_id_for_user
(
request
.
user
)
p
=
request
.
POST
location
=
p
[
'location'
]
return
HttpResponse
(
_get_next
(
course_id
,
request
.
user
.
id
,
location
),
return
HttpResponse
(
_get_next
(
course_id
,
grader_
id
,
location
),
mimetype
=
"application/json"
)
...
...
@@ -238,7 +239,7 @@ def get_problem_list(request, course_id):
"""
_check_access
(
request
.
user
,
course_id
)
try
:
response
=
staff_grading_service
()
.
get_problem_list
(
course_id
,
request
.
user
.
id
)
response
=
staff_grading_service
()
.
get_problem_list
(
course_id
,
unique_id_for_user
(
request
.
user
)
)
return
HttpResponse
(
response
,
mimetype
=
"application/json"
)
except
GradingServiceError
:
...
...
@@ -287,7 +288,7 @@ def save_grade(request, course_id):
return
_err_response
(
'Missing required keys {0}'
.
format
(
', '
.
join
(
missing
)))
grader_id
=
request
.
user
.
id
grader_id
=
unique_id_for_user
(
request
.
user
)
p
=
request
.
POST
...
...
lms/djangoapps/open_ended_grading/views.py
View file @
19bc6574
...
...
@@ -21,6 +21,7 @@ from django_comment_client.models import Role, FORUM_ROLE_ADMINISTRATOR, FORUM_R
from
django_comment_client.utils
import
has_forum_access
from
psychometrics
import
psychoanalyze
from
student.models
import
CourseEnrollment
from
student.models
import
unique_id_for_user
from
xmodule.course_module
import
CourseDescriptor
from
xmodule.modulestore
import
Location
from
xmodule.modulestore.django
import
modulestore
...
...
@@ -78,7 +79,7 @@ def peer_grading(request, course_id):
error_text
=
""
problem_list
=
[]
try
:
problem_list_text
=
peer_gs
.
get_problem_list
(
course_id
,
request
.
user
.
id
)
problem_list_text
=
peer_gs
.
get_problem_list
(
course_id
,
unique_id_for_user
(
request
.
user
)
)
problem_list_json
=
json
.
loads
(
problem_list_text
)
success
=
problem_list_json
[
'success'
]
if
'error'
in
problem_list_json
:
...
...
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