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
18cf826f
Commit
18cf826f
authored
Aug 28, 2012
by
Victor Shnayder
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove trailing slash from ajax url in ModuleSystem
* also add a check for valid location in modx_dispatch
parent
06495795
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
0 deletions
+6
-0
lms/djangoapps/courseware/module_render.py
+6
-0
No files found.
lms/djangoapps/courseware/module_render.py
View file @
18cf826f
...
@@ -198,6 +198,8 @@ def _get_module(user, request, location, student_module_cache, course_id, positi
...
@@ -198,6 +198,8 @@ def _get_module(user, request, location, student_module_cache, course_id, positi
location
=
descriptor
.
location
.
url
(),
location
=
descriptor
.
location
.
url
(),
dispatch
=
''
),
dispatch
=
''
),
)
)
# Intended use is as {ajax_url}/{dispatch_command}, so get rid of the trailing slash.
ajax_url
=
ajax_url
.
rstrip
(
'/'
)
# Fully qualified callback URL for external queueing system
# Fully qualified callback URL for external queueing system
xqueue_callback_url
=
'{proto}://{host}'
.
format
(
xqueue_callback_url
=
'{proto}://{host}'
.
format
(
...
@@ -410,6 +412,10 @@ def modx_dispatch(request, dispatch, location, course_id):
...
@@ -410,6 +412,10 @@ def modx_dispatch(request, dispatch, location, course_id):
'''
'''
# ''' (fix emacs broken parsing)
# ''' (fix emacs broken parsing)
# Check parameters and fail fast if there's a problem
if
not
Location
.
is_valid
(
location
):
raise
Http404
(
"Invalid location"
)
# Check for submitted files and basic file size checks
# Check for submitted files and basic file size checks
p
=
request
.
POST
.
copy
()
p
=
request
.
POST
.
copy
()
if
request
.
FILES
:
if
request
.
FILES
:
...
...
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