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
5b8c3dc1
Commit
5b8c3dc1
authored
Jun 29, 2012
by
Calen Pennington
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make html a RawDescriptor with a slightly different UI
parent
b7062ca5
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
9 deletions
+4
-9
cms/templates/widgets/html-edit.html
+2
-2
common/lib/xmodule/html_module.py
+2
-7
No files found.
cms/templates/widgets/html-edit.html
View file @
5b8c3dc1
...
@@ -33,8 +33,8 @@
...
@@ -33,8 +33,8 @@
</section>
</section>
</section>
</section>
<textarea
name=
""
class=
"edit-box"
rows=
"8"
cols=
"40"
>
${
module.definition['data']
}
</textarea>
<textarea
name=
""
class=
"edit-box"
rows=
"8"
cols=
"40"
>
${
data
}
</textarea>
<div
class=
"preview"
>
${
module.definition['data']
}
</div>
<div
class=
"preview"
>
${
data
}
</div>
<div
class=
"actions wip"
>
<div
class=
"actions wip"
>
<a
href=
""
class=
"save-update"
>
Save
&
Update
</a>
<a
href=
""
class=
"save-update"
>
Save
&
Update
</a>
...
...
common/lib/xmodule/html_module.py
View file @
5b8c3dc1
...
@@ -2,8 +2,7 @@ import json
...
@@ -2,8 +2,7 @@ import json
import
logging
import
logging
from
xmodule.x_module
import
XModule
from
xmodule.x_module
import
XModule
from
xmodule.mako_module
import
MakoModuleDescriptor
from
xmodule.raw_module
import
RawDescriptor
from
xmodule.xml_module
import
XmlDescriptor
from
lxml
import
etree
from
lxml
import
etree
from
pkg_resources
import
resource_string
from
pkg_resources
import
resource_string
...
@@ -19,7 +18,7 @@ class HtmlModule(XModule):
...
@@ -19,7 +18,7 @@ class HtmlModule(XModule):
self
.
html
=
self
.
definition
[
'data'
][
'text'
]
self
.
html
=
self
.
definition
[
'data'
][
'text'
]
class
HtmlDescriptor
(
MakoModuleDescriptor
,
Xml
Descriptor
):
class
HtmlDescriptor
(
Raw
Descriptor
):
"""
"""
Module for putting raw html in a course
Module for putting raw html in a course
"""
"""
...
@@ -28,7 +27,3 @@ class HtmlDescriptor(MakoModuleDescriptor, XmlDescriptor):
...
@@ -28,7 +27,3 @@ class HtmlDescriptor(MakoModuleDescriptor, XmlDescriptor):
js
=
{
'coffee'
:
[
resource_string
(
__name__
,
'js/module/html.coffee'
)]}
js
=
{
'coffee'
:
[
resource_string
(
__name__
,
'js/module/html.coffee'
)]}
js_module
=
'HTML'
js_module
=
'HTML'
@classmethod
def
definition_from_xml
(
cls
,
xml_object
,
system
):
return
{
'data'
:
{
'text'
:
etree
.
tostring
(
xml_object
)}}
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