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
d41f709c
Commit
d41f709c
authored
12 years ago
by
kimth
Browse files
Options
Downloads
Patches
Plain Diff
Moved xqueue_callback URLs into the course
parent
cbfdf597
Loading
Loading
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
lms/djangoapps/courseware/module_render.py
+8
-4
8 additions, 4 deletions
lms/djangoapps/courseware/module_render.py
lms/urls.py
+3
-1
3 additions, 1 deletion
lms/urls.py
with
11 additions
and
5 deletions
lms/djangoapps/courseware/module_render.py
+
8
−
4
View file @
d41f709c
...
...
@@ -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.
'''
...
...
This diff is collapsed.
Click to expand it.
lms/urls.py
+
3
−
1
View file @
d41f709c
...
...
@@ -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
...
...
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