Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
E
edx-platform-release
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
1
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
2723f051
Commit
2723f051
authored
12 years ago
by
Victor Shnayder
Committed by
Matthew Mongeau
12 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Fix render of lms index with no chapter or section.
parent
b8c248fd
Loading
Loading
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
lms/djangoapps/courseware/views.py
+6
-4
6 additions, 4 deletions
lms/djangoapps/courseware/views.py
with
6 additions
and
4 deletions
lms/djangoapps/courseware/views.py
+
6
−
4
View file @
2723f051
...
...
@@ -82,7 +82,11 @@ def profile(request, student_id=None):
def
render_accordion
(
request
,
course
,
chapter
,
section
):
'''
Draws navigation bar. Takes current position in accordion as
parameter. Returns (initialization_javascript, content)
'''
parameter.
If chapter and section are
''
or None, renders a default accordion.
Returns (initialization_javascript, content)
'''
if
not
course
:
course
=
"
6.002 Spring 2012
"
...
...
@@ -221,10 +225,8 @@ def index(request, course=None, chapter=None, section=None,
'''
Fixes URLs -- we convert spaces to _ in URLs to prevent
funny encoding characters and keep the URLs readable. This undoes
that transformation.
TODO: Properly replace underscores. (Q: what is properly?)
'''
return
s
.
replace
(
'
_
'
,
'
'
)
return
s
.
replace
(
'
_
'
,
'
'
)
if
s
is
not
None
else
None
def
get_submodule_ids
(
module_xml
):
'''
...
...
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