Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
E
edx-platform-release
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Package Registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Hsin-Yu Chien
edx-platform-release
Commits
1c1034c6
Commit
1c1034c6
authored
12 years ago
by
Diana Huang
Browse files
Options
Downloads
Patches
Plain Diff
Pass location as a parameter, not as a part of the url
parent
962d83d7
Loading
Loading
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
lms/djangoapps/open_ended_grading/views.py
+6
-1
6 additions, 1 deletion
lms/djangoapps/open_ended_grading/views.py
lms/urls.py
+1
-1
1 addition, 1 deletion
lms/urls.py
with
7 additions
and
2 deletions
lms/djangoapps/open_ended_grading/views.py
+
6
−
1
View file @
1c1034c6
...
...
@@ -71,6 +71,7 @@ def peer_grading(request, course_id):
# call problem list service
success
=
False
error_text
=
""
problem_list
=
[]
try
:
problem_list_text
=
peer_gs
.
get_problem_list
(
course_id
,
request
.
user
.
id
)
problem_list_json
=
json
.
loads
(
problem_list_text
)
...
...
@@ -83,6 +84,9 @@ def peer_grading(request, course_id):
except
GradingServiceError
:
error_text
=
"
Error occured while contacting the grading service
"
success
=
False
except
ValueError
:
error_text
=
"
Could not get problem list
"
success
=
False
ajax_url
=
reverse
(
'
peer_grading
'
,
kwargs
=
{
'
course_id
'
:
course_id
})
if
not
ajax_url
.
endswith
(
'
/
'
):
...
...
@@ -100,11 +104,12 @@ def peer_grading(request, course_id):
'
staff_access
'
:
False
,
})
def
peer_grading_problem
(
request
,
course_id
,
problem_location
):
def
peer_grading_problem
(
request
,
course_id
):
'''
Show individual problem interface
'''
course
=
get_course_with_access
(
request
.
user
,
course_id
,
'
load
'
)
problem_location
=
request
.
GET
.
get
(
"
location
"
)
ajax_url
=
reverse
(
'
peer_grading
'
,
kwargs
=
{
'
course_id
'
:
course_id
})
if
not
ajax_url
.
endswith
(
'
/
'
):
...
...
This diff is collapsed.
Click to expand it.
lms/urls.py
+
1
−
1
View file @
1c1034c6
...
...
@@ -255,7 +255,7 @@ if settings.COURSEWARE_ENABLED:
# Peer Grading
url
(
r
'
^courses/(?P<course_id>[^/]+/[^/]+/[^/]+)/peer_grading$
'
,
'
open_ended_grading.views.peer_grading
'
,
name
=
'
peer_grading
'
),
url
(
r
'
^courses/(?P<course_id>[^/]+/[^/]+/[^/]+)/peer_grading/problem
/(?P<problem_location>.*)
$
'
,
url
(
r
'
^courses/(?P<course_id>[^/]+/[^/]+/[^/]+)/peer_grading/problem$
'
,
'
open_ended_grading.views.peer_grading_problem
'
,
name
=
'
peer_grading_problem
'
),
url
(
r
'
^courses/(?P<course_id>[^/]+/[^/]+/[^/]+)/peer_grading/get_next_submission$
'
,
'
open_ended_grading.peer_grading_service.get_next_submission
'
,
name
=
'
peer_grading_get_next_submission
'
),
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment