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
a6fc27ac
Commit
a6fc27ac
authored
Jun 19, 2012
by
Victor Shnayder
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix accordion rendering bug
* needed to clean the chapter and section vars before rendering
parent
e061e864
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
4 deletions
+5
-4
lms/djangoapps/courseware/views.py
+5
-4
No files found.
lms/djangoapps/courseware/views.py
View file @
a6fc27ac
...
...
@@ -256,15 +256,13 @@ def index(request, course=None, chapter=None, section=None,
{'content': module-error message}
'''
# Can't modify variables of outer scope, so need new ones
chapter_
=
clean
(
chapter
)
section_
=
clean
(
section
)
user
=
request
.
user
module_xml
=
get_module_xml
(
user
,
course
,
chapter
_
,
section_
)
module_xml
=
get_module_xml
(
user
,
course
,
chapter
,
section
)
if
module_xml
is
None
:
log
.
exception
(
"couldn't get module_xml: course/chapter/section: '
%
s/
%
s/
%
s'"
,
course
,
chapter
_
,
section_
)
course
,
chapter
,
section
)
return
{
'content'
:
render_to_string
(
"module-error.html"
,
{})}
student_module_cache
=
preload_student_modules
(
module_xml
)
...
...
@@ -289,6 +287,9 @@ def index(request, course=None, chapter=None, section=None,
# keep track of current course being viewed in django's request.session
request
.
session
[
'coursename'
]
=
course
chapter
=
clean
(
chapter
)
section
=
clean
(
section
)
context
=
{
'csrf'
:
csrf
(
request
)[
'csrf_token'
],
'accordion'
:
render_accordion
(
request
,
course
,
chapter
,
section
),
...
...
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