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
8341f1b7
Commit
8341f1b7
authored
Mar 27, 2015
by
Calen Pennington
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Move type-checking of position earlier in courseware.views.index
parent
85fce7e3
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
7 deletions
+7
-7
lms/djangoapps/courseware/views.py
+7
-7
No files found.
lms/djangoapps/courseware/views.py
View file @
8341f1b7
...
...
@@ -345,6 +345,13 @@ def _index_bulk_op(request, course_key, chapter, section, position):
"""
Render the index page for the specified course.
"""
# Verify that position a string is in fact an int
if
position
is
not
None
:
try
:
int
(
position
)
except
ValueError
:
raise
Http404
(
"Position {} is not an integer!"
.
format
(
position
))
user
=
request
.
user
course
=
get_course_with_access
(
user
,
'load'
,
course_key
,
depth
=
2
)
...
...
@@ -493,13 +500,6 @@ def _index_bulk_op(request, course_key, chapter, section, position):
section_descriptor
,
depth
=
None
)
# Verify that position a string is in fact an int
if
position
is
not
None
:
try
:
int
(
position
)
except
ValueError
:
raise
Http404
(
"Position {} is not an integer!"
.
format
(
position
))
section_module
=
get_module_for_descriptor
(
request
.
user
,
request
,
...
...
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