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
f162ba8b
Commit
f162ba8b
authored
Aug 10, 2012
by
kimth
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Moved xqueue_callback URLs into the course
parent
03bd7595
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
5 deletions
+11
-5
lms/djangoapps/courseware/module_render.py
+8
-4
lms/urls.py
+3
-1
No files found.
lms/djangoapps/courseware/module_render.py
View file @
f162ba8b
...
...
@@ -157,9 +157,13 @@ def get_module(user, request, location, student_module_cache, position=None):
# ajax_url = settings.MITX_ROOT_URL + '/modx/' + descriptor.location.url() + '/'
# Fully qualified callback URL for external queueing system
xqueue_callback_url
=
(
request
.
build_absolute_uri
(
'/'
)
+
settings
.
MITX_ROOT_URL
+
'xqueue/'
+
str
(
user
.
id
)
+
'/'
+
descriptor
.
location
.
url
()
+
'/'
+
'score_update'
)
xqueue_callback_url
=
request
.
build_absolute_uri
(
'/'
)[:
-
1
]
# Trailing slash provided by reverse
xqueue_callback_url
+=
reverse
(
'xqueue_callback'
,
kwargs
=
dict
(
course_id
=
descriptor
.
location
.
course_id
,
userid
=
str
(
user
.
id
),
id
=
descriptor
.
location
.
url
(),
dispatch
=
'score_update'
),
)
# Default queuename is course-specific and is derived from the course that
# contains the current module.
...
...
@@ -265,7 +269,7 @@ def get_shared_instance_module(user, module, student_module_cache):
return
None
@csrf_exempt
def
xqueue_callback
(
request
,
userid
,
id
,
dispatch
):
def
xqueue_callback
(
request
,
course_id
,
userid
,
id
,
dispatch
):
'''
Entry point for graded results from the queueing system.
'''
...
...
lms/urls.py
View file @
f162ba8b
...
...
@@ -103,7 +103,9 @@ if settings.COURSEWARE_ENABLED:
url
(
r'^courses/(?P<course_id>[^/]+/[^/]+/[^/]+)/modx/(?P<id>.*?)/(?P<dispatch>[^/]*)$'
,
'courseware.module_render.modx_dispatch'
,
name
=
'modx_dispatch'
),
url
(
r'^xqueue/(?P<userid>[^/]*)/(?P<id>.*?)/(?P<dispatch>[^/]*)$'
,
'courseware.module_render.xqueue_callback'
),
url
(
r'^courses/(?P<course_id>[^/]+/[^/]+/[^/]+)/xqueue/(?P<userid>[^/]*)/(?P<id>.*?)/(?P<dispatch>[^/]*)$'
,
'courseware.module_render.xqueue_callback'
,
name
=
'xqueue_callback'
),
url
(
r'^change_setting$'
,
'student.views.change_setting'
),
# TODO: These views need to be updated before they work
...
...
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