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
fff9afde
Commit
fff9afde
authored
Jan 09, 2013
by
Don Mitchell
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Minor cleanups
parent
b8f530e8
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
6 deletions
+5
-6
cms/djangoapps/contentstore/tests/tests.py
+1
-1
common/lib/xmodule/xmodule/capa_module.py
+4
-5
No files found.
cms/djangoapps/contentstore/tests/tests.py
View file @
fff9afde
...
...
@@ -441,7 +441,7 @@ class ContentStoreTest(TestCase):
def
test_capa_module
(
self
):
"""Test that a problem
w/ markdown has markdown and uses the right html etc
"""
"""Test that a problem
treats markdown specially.
"""
CourseFactory
.
create
(
org
=
'MITx'
,
course
=
'999'
,
display_name
=
'Robot Super Course'
)
problem_data
=
{
...
...
common/lib/xmodule/xmodule/capa_module.py
View file @
fff9afde
...
...
@@ -685,13 +685,12 @@ class CapaDescriptor(RawDescriptor):
_context
.
update
({
'markdown'
:
self
.
metadata
.
get
(
'markdown'
,
''
)})
return
_context
# overriding super's definition in a way which may get out of sync. It could call the super definition and
# then remove the 'markdown' property, but that seems expensive. Can't add markdown to system_metadata_fields
# because that prevents save_item from saving changes to it. We may want a list of metadata fields that are
# editable only via specific editors?
@property
def
editable_metadata_fields
(
self
):
subset
=
[
name
for
name
in
self
.
metadata
.
keys
()
if
name
!=
'markdown'
and
name
not
in
self
.
system_metadata_fields
]
"""Remove metadata from the editable fields since it has its own editor"""
subset
=
super
(
CapaDescriptor
,
self
)
.
editable_metadata_fields
if
'markdown'
in
subset
:
subset
.
remove
(
'markdown'
)
return
subset
...
...
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