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
fa1f4f2b
Commit
fa1f4f2b
authored
Jul 24, 2014
by
Christina Roberts
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #4474 from Stanford-Online/sjang92/null_tabname_bugfix
Bugfix: New Tab name being initialized as null
parents
c015e7d4
2c3aebf9
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
0 deletions
+12
-0
cms/djangoapps/contentstore/views/item.py
+1
-0
cms/djangoapps/contentstore/views/tests/test_item.py
+11
-0
No files found.
cms/djangoapps/contentstore/views/item.py
View file @
fa1f4f2b
...
...
@@ -430,6 +430,7 @@ def _create_item(request):
# if we add one then we need to also add it to the policy information (i.e. metadata)
# we should remove this once we can break this reference from the course to static tabs
if
category
==
'static_tab'
:
display_name
=
display_name
or
_
(
"Empty"
)
# Prevent name being None
course
=
store
.
get_course
(
dest_usage_key
.
course_key
)
course
.
tabs
.
append
(
StaticTab
(
...
...
cms/djangoapps/contentstore/views/tests/test_item.py
View file @
fa1f4f2b
...
...
@@ -246,6 +246,17 @@ class TestCreateItem(ItemTest):
obj
=
self
.
get_item_from_modulestore
(
usage_key
)
self
.
assertEqual
(
obj
.
start
,
datetime
(
2030
,
1
,
1
,
tzinfo
=
UTC
))
def
test_static_tabs_initialization
(
self
):
"""
Test that static tab display names are not being initialized as None.
"""
# Add a new static tab with no explicit name
resp
=
self
.
create_xblock
(
category
=
'static_tab'
)
usage_key
=
self
.
response_usage_key
(
resp
)
# Check that its name is not None
new_tab
=
self
.
get_item_from_modulestore
(
usage_key
)
self
.
assertEquals
(
new_tab
.
display_name
,
'Empty'
)
class
TestDuplicateItem
(
ItemTest
):
"""
...
...
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