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
7567e5eb
Commit
7567e5eb
authored
Jun 01, 2012
by
Piotr Mitros
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Working snapshot. Simple get_children. get_module taken out of render_module.
parent
98d8f4b5
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
2 deletions
+4
-2
djangoapps/courseware/module_render.py
+3
-2
djangoapps/courseware/modules/seq_module.py
+1
-0
No files found.
djangoapps/courseware/module_render.py
View file @
7567e5eb
...
...
@@ -18,6 +18,7 @@ from models import StudentModule
from
multicourse
import
multicourse_settings
import
courseware.modules
import
courseware.content_parser
as
content_parser
log
=
logging
.
getLogger
(
"mitx.courseware"
)
...
...
@@ -128,14 +129,14 @@ def get_module(user, request, xml_module, module_object_preload):
smod
.
save
()
module_object_preload
.
append
(
smod
)
return
(
instance
,
smod
)
return
(
instance
,
smod
,
module_type
)
def
render_x_module
(
user
,
request
,
xml_module
,
module_object_preload
):
''' Generic module for extensions. This renders to HTML. '''
if
xml_module
==
None
:
return
{
"content"
:
""
}
(
instance
,
smod
)
=
get_module
(
user
,
request
,
xml_module
,
module_object_preload
)
(
instance
,
smod
,
module_type
)
=
get_module
(
user
,
request
,
xml_module
,
module_object_preload
)
# Grab content
content
=
instance
.
get_html
()
...
...
djangoapps/courseware/modules/seq_module.py
View file @
7567e5eb
...
...
@@ -58,6 +58,7 @@ class Module(XModule):
for
e
in
self
.
xmltree
]
self
.
contents
=
self
.
rendered_children
()
self
.
contents
=
[
j
(
m
)
for
m
in
self
.
contents
]
for
contents
,
title
in
zip
(
self
.
contents
,
titles
):
contents
[
'title'
]
=
title
...
...
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