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
f355e4a8
Commit
f355e4a8
authored
Jul 25, 2013
by
Peter Fogg
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
More general solution to word cloud export problems.
parent
0967cb0d
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
2 additions
and
15 deletions
+2
-15
common/lib/xmodule/xmodule/raw_module.py
+2
-0
common/lib/xmodule/xmodule/video_module.py
+0
-7
common/lib/xmodule/xmodule/word_cloud_module.py
+0
-8
No files found.
common/lib/xmodule/xmodule/raw_module.py
View file @
f355e4a8
...
...
@@ -20,6 +20,8 @@ class RawDescriptor(XmlDescriptor, XMLEditingDescriptor):
return
{
'data'
:
etree
.
tostring
(
xml_object
,
pretty_print
=
True
,
encoding
=
'unicode'
)},
[]
def
definition_to_xml
(
self
,
resource_fs
):
if
not
self
.
data
:
return
etree
.
fromstring
(
'<{0} />'
.
format
(
self
.
category
))
try
:
return
etree
.
fromstring
(
self
.
data
)
except
etree
.
XMLSyntaxError
as
err
:
...
...
common/lib/xmodule/xmodule/video_module.py
View file @
f355e4a8
...
...
@@ -130,13 +130,6 @@ class VideoDescriptor(VideoFields,
_parse_video_xml
(
video
,
video
.
data
)
return
video
def
definition_to_xml
(
self
,
resource_fs
):
"""
Override the base implementation. We don't actually have anything in the 'data' field
(it's an empty string), so we just return a simple XML element
"""
return
etree
.
Element
(
'video'
)
def
_parse_video_xml
(
video
,
xml_data
):
"""
...
...
common/lib/xmodule/xmodule/word_cloud_module.py
View file @
f355e4a8
...
...
@@ -9,8 +9,6 @@ If student have answered - words he entered and cloud.
import
json
import
logging
from
lxml
import
etree
from
pkg_resources
import
resource_string
from
xmodule.raw_module
import
RawDescriptor
from
xmodule.editing_module
import
MetadataOnlyEditingDescriptor
...
...
@@ -246,9 +244,3 @@ class WordCloudDescriptor(WordCloudFields, MetadataOnlyEditingDescriptor, RawDes
"""Descriptor for WordCloud Xmodule."""
module_class
=
WordCloudModule
template_dir_name
=
'word_cloud'
def
definition_to_xml
(
self
,
resource_fs
):
"""
Since there's no real data, just return an empty XML tag.
"""
return
etree
.
fromstring
(
'<word_cloud />'
)
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