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
2cc72ca0
Commit
2cc72ca0
authored
Jul 30, 2014
by
Ben McMorran
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Show category when an xblock does not have a default display name
parent
0181bb2d
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
1 deletions
+10
-1
cms/djangoapps/contentstore/views/component.py
+1
-1
cms/djangoapps/contentstore/views/tests/test_item.py
+9
-0
No files found.
cms/djangoapps/contentstore/views/component.py
View file @
2cc72ca0
...
...
@@ -372,7 +372,7 @@ def get_component_templates(course):
if
category
in
ADVANCED_COMPONENT_TYPES
and
not
category
in
categories
:
# boilerplates not supported for advanced components
try
:
component_display_name
=
get_component_display_name
(
category
)
component_display_name
=
get_component_display_name
(
category
,
default_display_name
=
category
)
advanced_component_templates
[
'templates'
]
.
append
(
create_template_dict
(
component_display_name
,
...
...
cms/djangoapps/contentstore/views/tests/test_item.py
View file @
2cc72ca0
...
...
@@ -1114,6 +1114,15 @@ class TestComponentTemplates(CourseTestCase):
self
.
assertNotEqual
(
only_template
.
get
(
'category'
),
'video'
)
self
.
assertNotEqual
(
only_template
.
get
(
'category'
),
'openassessment'
)
def
test_advanced_components_without_display_name
(
self
):
"""
Test that advanced components without display names display their category instead.
"""
self
.
course
.
advanced_modules
.
append
(
'graphical_slider_tool'
)
self
.
templates
=
get_component_templates
(
self
.
course
)
template
=
self
.
get_templates_of_type
(
'advanced'
)[
0
]
self
.
assertEqual
(
template
.
get
(
'display_name'
),
'graphical_slider_tool'
)
def
test_advanced_problems
(
self
):
"""
Test the handling of advanced problem templates.
...
...
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