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
1c1034c6
Commit
1c1034c6
authored
Jan 03, 2013
by
Diana Huang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Pass location as a parameter, not as a part of the url
parent
962d83d7
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
2 deletions
+7
-2
lms/djangoapps/open_ended_grading/views.py
+6
-1
lms/urls.py
+1
-1
No files found.
lms/djangoapps/open_ended_grading/views.py
View file @
1c1034c6
...
@@ -71,6 +71,7 @@ def peer_grading(request, course_id):
...
@@ -71,6 +71,7 @@ def peer_grading(request, course_id):
# call problem list service
# call problem list service
success
=
False
success
=
False
error_text
=
""
error_text
=
""
problem_list
=
[]
try
:
try
:
problem_list_text
=
peer_gs
.
get_problem_list
(
course_id
,
request
.
user
.
id
)
problem_list_text
=
peer_gs
.
get_problem_list
(
course_id
,
request
.
user
.
id
)
problem_list_json
=
json
.
loads
(
problem_list_text
)
problem_list_json
=
json
.
loads
(
problem_list_text
)
...
@@ -83,6 +84,9 @@ def peer_grading(request, course_id):
...
@@ -83,6 +84,9 @@ def peer_grading(request, course_id):
except
GradingServiceError
:
except
GradingServiceError
:
error_text
=
"Error occured while contacting the grading service"
error_text
=
"Error occured while contacting the grading service"
success
=
False
success
=
False
except
ValueError
:
error_text
=
"Could not get problem list"
success
=
False
ajax_url
=
reverse
(
'peer_grading'
,
kwargs
=
{
'course_id'
:
course_id
})
ajax_url
=
reverse
(
'peer_grading'
,
kwargs
=
{
'course_id'
:
course_id
})
if
not
ajax_url
.
endswith
(
'/'
):
if
not
ajax_url
.
endswith
(
'/'
):
...
@@ -100,11 +104,12 @@ def peer_grading(request, course_id):
...
@@ -100,11 +104,12 @@ def peer_grading(request, course_id):
'staff_access'
:
False
,
})
'staff_access'
:
False
,
})
def
peer_grading_problem
(
request
,
course_id
,
problem_location
):
def
peer_grading_problem
(
request
,
course_id
):
'''
'''
Show individual problem interface
Show individual problem interface
'''
'''
course
=
get_course_with_access
(
request
.
user
,
course_id
,
'load'
)
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
})
ajax_url
=
reverse
(
'peer_grading'
,
kwargs
=
{
'course_id'
:
course_id
})
if
not
ajax_url
.
endswith
(
'/'
):
if
not
ajax_url
.
endswith
(
'/'
):
...
...
lms/urls.py
View file @
1c1034c6
...
@@ -255,7 +255,7 @@ if settings.COURSEWARE_ENABLED:
...
@@ -255,7 +255,7 @@ if settings.COURSEWARE_ENABLED:
# Peer Grading
# Peer Grading
url
(
r'^courses/(?P<course_id>[^/]+/[^/]+/[^/]+)/peer_grading$'
,
url
(
r'^courses/(?P<course_id>[^/]+/[^/]+/[^/]+)/peer_grading$'
,
'open_ended_grading.views.peer_grading'
,
name
=
'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'
),
'open_ended_grading.views.peer_grading_problem'
,
name
=
'peer_grading_problem'
),
url
(
r'^courses/(?P<course_id>[^/]+/[^/]+/[^/]+)/peer_grading/get_next_submission$'
,
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'
),
'open_ended_grading.peer_grading_service.get_next_submission'
,
name
=
'peer_grading_get_next_submission'
),
...
...
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