Skip to content
Snippets Groups Projects
Commit 1c1034c6 authored by Diana Huang's avatar Diana Huang
Browse files

Pass location as a parameter, not as a part of the url

parent 962d83d7
No related merge requests found
......@@ -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('/'):
......
......@@ -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'),
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment