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
f3bd9ab2
Commit
f3bd9ab2
authored
May 21, 2013
by
cahrens
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Get rid of empty, store ID.
parent
3dc97913
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
16 additions
and
37 deletions
+16
-37
cms/djangoapps/contentstore/features/problem-editor.py
+2
-4
cms/djangoapps/contentstore/views/component.py
+1
-2
cms/templates/unit.html
+12
-30
cms/xmodule_namespace.py
+1
-1
No files found.
cms/djangoapps/contentstore/features/problem-editor.py
View file @
f3bd9ab2
...
...
@@ -4,8 +4,6 @@
from
lettuce
import
world
,
step
from
nose.tools
import
assert_true
,
assert_equal
,
assert_in
from
terrain.steps
import
reload_the_page
from
selenium.common.exceptions
import
StaleElementReferenceException
import
time
############### ACTIONS ####################
...
...
@@ -15,5 +13,5 @@ def i_created_blank_common_problem(step):
step
.
given
(
'I have added a new subsection'
)
step
.
given
(
'I expand the first section'
)
world
.
css_click
(
'a.new-unit-item'
)
time
.
sleep
(
float
(
2
)
)
# world.css_click('a.p
roblem')
world
.
css_click
(
'.large-problem-icon'
)
world
.
css_click
(
'#i4x://edx/templates/problem/Blank_Common_P
roblem'
)
cms/djangoapps/contentstore/views/component.py
View file @
f3bd9ab2
...
...
@@ -149,8 +149,7 @@ def edit_unit(request, location):
component_templates
[
category
]
.
append
((
template
.
display_name_with_default
,
template
.
location
.
url
(),
hasattr
(
template
,
'markdown'
)
and
template
.
markdown
is
not
None
,
template
.
cms
.
empty
,
hasattr
(
template
,
'markdown'
)
and
template
.
markdown
is
not
None
))
components
=
[
...
...
cms/templates/unit.html
View file @
f3bd9ab2
...
...
@@ -78,22 +78,13 @@
% endif
<div
class=
"tab current"
id=
"tab1"
>
<ul
class=
"new-component-template"
>
% for name, location, has_markdown
, is_empty
in templates:
% for name, location, has_markdown in templates:
% if has_markdown or type != "problem":
% if is_empty:
<li
class=
"editor-md empty"
>
<a
href=
"#"
data-location=
"${location}"
>
<span
class=
"name"
>
${name}
</span>
</a>
</li>
% else:
<li
class=
"editor-md"
>
<a
href=
"#"
data-location=
"${location}"
>
<span
class=
"name"
>
${name}
</span>
</a>
</li>
% endif
<li
class=
"editor-md"
>
<a
href=
"#"
id=
"${location}"
data-location=
"${location}"
>
<span
class=
"name"
>
${name}
</span>
</a>
</li>
% endif
%endfor
...
...
@@ -102,23 +93,14 @@
% if type == "problem":
<div
class=
"tab"
id=
"tab2"
>
<ul
class=
"new-component-template"
>
% for name, location, has_markdown
, is_empty
in templates:
% for name, location, has_markdown in templates:
% if not has_markdown:
% if is_empty:
<li
class=
"editor-manual empty"
>
<a
href=
"#"
data-location=
"${location}"
>
<span
class=
"name"
>
${name}
</span>
</a>
</li>
% else:
<li
class=
"editor-manual"
>
<a
href=
"#"
data-location=
"${location}"
>
<span
class=
"name"
>
${name}
</span>
</a>
<li
class=
"editor-manual"
>
<a
href=
"#"
id=
"${location}"
data-location=
"${location}"
>
<span
class=
"name"
>
${name}
</span>
</a>
</li>
% endif
</li>
% endif
% endfor
</ul>
...
...
cms/xmodule_namespace.py
View file @
f3bd9ab2
...
...
@@ -28,4 +28,4 @@ class CmsNamespace(Namespace):
"""
published_date
=
DateTuple
(
help
=
"Date when the module was published"
,
scope
=
Scope
.
settings
)
published_by
=
String
(
help
=
"Id of the user who published this module"
,
scope
=
Scope
.
settings
)
empty
=
StringyBoolean
(
help
=
"Whether this is an empty template"
,
scope
=
Scope
.
settings
,
default
=
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