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
baac1eb8
Commit
baac1eb8
authored
Feb 03, 2012
by
Bridger Maxwell
Browse files
Options
Browse Files
Download
Plain Diff
Merge
parents
0d699f28
6e7e00c8
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
13 additions
and
3 deletions
+13
-3
courseware/capa/capa_problem.py
+6
-0
courseware/modules/html_module.py
+6
-3
settings_new_askbot.py
+1
-0
No files found.
courseware/capa/capa_problem.py
View file @
baac1eb8
...
...
@@ -193,6 +193,12 @@ class LoncapaProblem(object):
if
problemtree
.
tag
in
html_transforms
:
tree
.
tag
=
html_transforms
[
problemtree
.
tag
][
'tag'
]
# Reset attributes. Otherwise, we get metadata in HTML
# (e.g. answers)
# TODO: We should remove and not zero them.
# I'm not sure how to do that quickly with lxml
for
k
in
tree
.
keys
():
tree
.
set
(
k
,
""
)
# TODO: Fix. This loses Element().tail
#if problemtree.tag in html_skip:
...
...
courseware/modules/html_module.py
View file @
baac1eb8
...
...
@@ -17,13 +17,16 @@ class HtmlModule(XModule):
return
"html"
def
get_html
(
self
):
if
self
.
filename
!=
None
:
return
render_to_string
(
self
.
filename
,
{
'id'
:
self
.
item_id
})
else
:
if
self
.
filename
==
None
:
xmltree
=
etree
.
fromstring
(
self
.
xml
)
textlist
=
[
xmltree
.
text
]
+
[
etree
.
tostring
(
i
)
for
i
in
xmltree
]
+
[
xmltree
.
tail
]
textlist
=
[
i
for
i
in
textlist
if
type
(
i
)
==
str
]
return
""
.
join
(
textlist
)
try
:
filename
=
settings
.
DATA_DIR
+
"html/"
+
self
.
filename
+
".xml"
return
open
(
filename
)
.
read
()
except
:
# For backwards compatibility. TODO: Remove
return
render_to_string
(
self
.
filename
,
{
'id'
:
self
.
item_id
})
def
__init__
(
self
,
xml
,
item_id
,
ajax_url
=
None
,
track_url
=
None
,
state
=
None
,
track_function
=
None
,
render_function
=
None
):
XModule
.
__init__
(
self
,
xml
,
item_id
,
ajax_url
,
track_url
,
state
,
track_function
,
render_function
)
...
...
settings_new_askbot.py
View file @
baac1eb8
...
...
@@ -328,6 +328,7 @@ LIVESETTINGS_OPTIONS = {
'SETTINGS'
:
{
'MIN_REP'
:
{
'MIN_REP_TO_VOTE_UP'
:
1
,
'MIN_REP_TO_UPLOAD_FILES'
:
1
,
},
'SOCIAL_SHARING'
:
{
'ENABLE_SHARING_TWITTER'
:
False
,
...
...
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