Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
E
edx-platform-release
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
1
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Package Registry
Operate
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Admin message
code.vt.edu will be down for maintenance from 0530-0630 EDT Wednesday, March 26th
Show more breadcrumbs
Hsin-Yu Chien
edx-platform-release
Commits
5b8c3dc1
Commit
5b8c3dc1
authored
12 years ago
by
Calen Pennington
Browse files
Options
Downloads
Patches
Plain Diff
Make html a RawDescriptor with a slightly different UI
parent
b7062ca5
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
cms/templates/widgets/html-edit.html
+2
-2
2 additions, 2 deletions
cms/templates/widgets/html-edit.html
common/lib/xmodule/html_module.py
+2
-7
2 additions, 7 deletions
common/lib/xmodule/html_module.py
with
4 additions
and
9 deletions
cms/templates/widgets/html-edit.html
+
2
−
2
View file @
5b8c3dc1
...
...
@@ -33,8 +33,8 @@
</section>
</section>
<textarea
name=
""
class=
"edit-box"
rows=
"8"
cols=
"40"
>
${
module.definition['
data
']
}
</textarea>
<div
class=
"preview"
>
${
module.definition['
data
']
}
</div>
<textarea
name=
""
class=
"edit-box"
rows=
"8"
cols=
"40"
>
${data}
</textarea>
<div
class=
"preview"
>
${data}
</div>
<div
class=
"actions wip"
>
<a
href=
""
class=
"save-update"
>
Save
&
Update
</a>
...
...
This diff is collapsed.
Click to expand it.
common/lib/xmodule/html_module.py
+
2
−
7
View file @
5b8c3dc1
...
...
@@ -2,8 +2,7 @@ import json
import
logging
from
xmodule.x_module
import
XModule
from
xmodule.mako_module
import
MakoModuleDescriptor
from
xmodule.xml_module
import
XmlDescriptor
from
xmodule.raw_module
import
RawDescriptor
from
lxml
import
etree
from
pkg_resources
import
resource_string
...
...
@@ -19,7 +18,7 @@ class HtmlModule(XModule):
self
.
html
=
self
.
definition
[
'
data
'
][
'
text
'
]
class
HtmlDescriptor
(
MakoModuleDescriptor
,
Xml
Descriptor
):
class
HtmlDescriptor
(
Raw
Descriptor
):
"""
Module for putting raw html in a course
"""
...
...
@@ -28,7 +27,3 @@ class HtmlDescriptor(MakoModuleDescriptor, XmlDescriptor):
js
=
{
'
coffee
'
:
[
resource_string
(
__name__
,
'
js/module/html.coffee
'
)]}
js_module
=
'
HTML
'
@classmethod
def
definition_from_xml
(
cls
,
xml_object
,
system
):
return
{
'
data
'
:
{
'
text
'
:
etree
.
tostring
(
xml_object
)}}
This diff is collapsed.
Click to expand it.
Preview
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment