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
4b57f1ec
Commit
4b57f1ec
authored
May 31, 2012
by
Piotr Mitros
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Unstable commit; syncing computers
parent
66ab1c5a
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
14 additions
and
12 deletions
+14
-12
djangoapps/courseware/module_render.py
+3
-3
djangoapps/courseware/modules/capa_module.py
+1
-1
djangoapps/courseware/modules/html_module.py
+1
-1
djangoapps/courseware/modules/schematic_module.py
+1
-1
djangoapps/courseware/modules/seq_module.py
+2
-2
djangoapps/courseware/modules/template_module.py
+1
-1
djangoapps/courseware/modules/vertical_module.py
+1
-1
djangoapps/courseware/modules/video_module.py
+1
-1
djangoapps/courseware/modules/x_module.py
+3
-1
No files found.
djangoapps/courseware/module_render.py
View file @
4b57f1ec
...
...
@@ -128,14 +128,14 @@ def get_module(user, request, xml_module, module_object_preload):
smod
.
save
()
module_object_preload
.
append
(
smod
)
return
smod
return
(
instance
,
smod
)
def
render_x_module
(
user
,
request
,
xml_module
,
module_object_preload
):
''' Generic module for extensions. This renders to HTML. '''
if
module
==
None
:
if
xml_
module
==
None
:
return
{
"content"
:
""
}
smod
=
get_module
(
user
,
request
,
xml_module
,
module_object_preload
)
(
instance
,
smod
)
=
get_module
(
user
,
request
,
xml_module
,
module_object_preload
)
# Grab content
content
=
instance
.
get_html
()
...
...
djangoapps/courseware/modules/capa_module.py
View file @
4b57f1ec
...
...
@@ -18,7 +18,7 @@ from lxml import etree
## TODO: Abstract out from Django
from
mitxmako.shortcuts
import
render_to_string
from
x_module
import
XModule
from
x_module
import
XModule
,
XModuleDescriptor
from
courseware.capa.capa_problem
import
LoncapaProblem
,
StudentInputError
import
courseware.content_parser
as
content_parser
from
multicourse
import
multicourse_settings
...
...
djangoapps/courseware/modules/html_module.py
View file @
4b57f1ec
...
...
@@ -2,7 +2,7 @@ import json
from
mitxmako.shortcuts
import
render_to_response
,
render_to_string
from
x_module
import
XModule
from
x_module
import
XModule
,
XModuleDescriptor
from
lxml
import
etree
class
ModuleDescriptor
(
XModuleDescriptor
):
...
...
djangoapps/courseware/modules/schematic_module.py
View file @
4b57f1ec
...
...
@@ -4,7 +4,7 @@ import json
from
django.conf
import
settings
from
mitxmako.shortcuts
import
render_to_response
,
render_to_string
from
x_module
import
XModule
from
x_module
import
XModule
,
XModuleDescriptor
class
ModuleDescriptor
(
XModuleDescriptor
):
pass
...
...
djangoapps/courseware/modules/seq_module.py
View file @
4b57f1ec
...
...
@@ -4,7 +4,7 @@ from lxml import etree
from
mitxmako.shortcuts
import
render_to_string
from
x_module
import
XModule
from
x_module
import
XModule
,
XModuleDescriptor
# HACK: This shouldn't be hard-coded to two types
# OBSOLETE: This obsoletes 'type'
...
...
@@ -57,7 +57,7 @@ class Module(XModule):
titles
=
[
"
\n
"
.
join
([
i
.
get
(
"name"
)
.
strip
()
for
i
in
e
.
iter
()
if
i
.
get
(
"name"
)
!=
None
])
\
for
e
in
self
.
xmltree
]
self
.
contents
=
self
.
rendered_children
(
self
)
self
.
contents
=
self
.
rendered_children
()
for
contents
,
title
in
zip
(
self
.
contents
,
titles
):
contents
[
'title'
]
=
title
...
...
djangoapps/courseware/modules/template_module.py
View file @
4b57f1ec
...
...
@@ -3,7 +3,7 @@ import os
from
mitxmako.shortcuts
import
render_to_response
,
render_to_string
from
x_module
import
XModule
from
x_module
import
XModule
,
XModuleDescriptor
from
lxml
import
etree
class
ModuleDescriptor
(
XModuleDescriptor
):
...
...
djangoapps/courseware/modules/vertical_module.py
View file @
4b57f1ec
...
...
@@ -2,7 +2,7 @@ import json
from
mitxmako.shortcuts
import
render_to_response
,
render_to_string
from
x_module
import
XModule
from
x_module
import
XModule
,
XModuleDescriptor
from
lxml
import
etree
class
ModuleDescriptor
(
XModuleDescriptor
):
...
...
djangoapps/courseware/modules/video_module.py
View file @
4b57f1ec
...
...
@@ -5,7 +5,7 @@ from lxml import etree
from
mitxmako.shortcuts
import
render_to_response
,
render_to_string
from
x_module
import
XModule
from
x_module
import
XModule
,
XModuleDescriptor
log
=
logging
.
getLogger
(
"mitx.courseware.modules"
)
...
...
djangoapps/courseware/modules/x_module.py
View file @
4b57f1ec
from
lxml
import
etree
import
courseware.progress
def
dummy_track
(
event_type
,
event
):
...
...
@@ -36,7 +38,7 @@ class XModule(object):
Render all children.
This really ought to return a list of xmodules, instead of dictionaries
'''
children
=
[
render_function
(
e
)
for
e
in
self
.
__xmltree
]
children
=
[
self
.
render_function
(
e
)
for
e
in
self
.
__xmltree
]
return
children
def
__init__
(
self
,
system
=
None
,
xml
=
None
,
item_id
=
None
,
...
...
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