Commit 2efcb0cd by Adam Palay Committed by Sarina Canelake

Change default names for various LMS components

Embedded discussion component defaults to "Discussion"
Blank HTML page defaults to "Text"
Video component defaults to "Video"

These default names show up in tooltips.
parent 214a814b
...@@ -14,4 +14,4 @@ def i_created_blank_html_page(step): ...@@ -14,4 +14,4 @@ def i_created_blank_html_page(step):
@step('I see only the HTML display name setting$') @step('I see only the HTML display name setting$')
def i_see_only_the_html_display_name(step): def i_see_only_the_html_display_name(step):
world.verify_all_setting_entries([['Display Name', "Blank HTML Page", False]]) world.verify_all_setting_entries([['Display Name', "Text", False]])
...@@ -7,7 +7,7 @@ from lettuce import world, step ...@@ -7,7 +7,7 @@ from lettuce import world, step
@step('I see the correct settings and default values$') @step('I see the correct settings and default values$')
def i_see_the_correct_settings_and_values(step): def i_see_the_correct_settings_and_values(step):
world.verify_all_setting_entries([['Default Speed', 'OEoXaMPEzfM', False], world.verify_all_setting_entries([['Default Speed', 'OEoXaMPEzfM', False],
['Display Name', 'Video Title', False], ['Display Name', 'Video', False],
['Download Track', '', False], ['Download Track', '', False],
['Download Video', '', False], ['Download Video', '', False],
['Show Captions', 'True', False], ['Show Captions', 'True', False],
......
...@@ -12,10 +12,14 @@ class DiscussionFields(object): ...@@ -12,10 +12,14 @@ class DiscussionFields(object):
display_name = String( display_name = String(
display_name="Display Name", display_name="Display Name",
help="Display name for this module", help="Display name for this module",
default="Discussion Tag", default="Discussion",
scope=Scope.settings) scope=Scope.settings
data = String(help="XML data for the problem", scope=Scope.content, )
default="<discussion></discussion>") data = String(
help="XML data for the problem",
scope=Scope.content,
default="<discussion></discussion>"
)
discussion_category = String( discussion_category = String(
display_name="Category", display_name="Category",
default="Week 1", default="Week 1",
......
...@@ -25,7 +25,7 @@ class HtmlFields(object): ...@@ -25,7 +25,7 @@ class HtmlFields(object):
scope=Scope.settings, scope=Scope.settings,
# it'd be nice to have a useful default but it screws up other things; so, # it'd be nice to have a useful default but it screws up other things; so,
# use display_name_with_default for those # use display_name_with_default for those
default="Blank HTML Page" default="Text"
) )
data = String(help="Html contents to display for this module", default=u"", scope=Scope.content) data = String(help="Html contents to display for this module", default=u"", scope=Scope.content)
source_code = String(help="Source code for LaTeX documents. This feature is not well-supported.", scope=Scope.settings) source_code = String(help="Source code for LaTeX documents. This feature is not well-supported.", scope=Scope.settings)
......
...@@ -27,11 +27,13 @@ class VideoFields(object): ...@@ -27,11 +27,13 @@ class VideoFields(object):
scope=Scope.settings, scope=Scope.settings,
# it'd be nice to have a useful default but it screws up other things; so, # it'd be nice to have a useful default but it screws up other things; so,
# use display_name_with_default for those # use display_name_with_default for those
default="Video Title" default="Video"
) )
data = String(help="XML data for the problem", data = String(
help="XML data for the problem",
default='', default='',
scope=Scope.content) scope=Scope.content
)
position = Integer(help="Current position in the video", scope=Scope.user_state, default=0) position = Integer(help="Current position in the video", scope=Scope.user_state, default=0)
show_captions = Boolean(help="This controls whether or not captions are shown by default.", display_name="Show Captions", scope=Scope.settings, default=True) show_captions = Boolean(help="This controls whether or not captions are shown by default.", display_name="Show Captions", scope=Scope.settings, default=True)
youtube_id_1_0 = String(help="This is the Youtube ID reference for the normal speed video.", display_name="Default Speed", scope=Scope.settings, default="OEoXaMPEzfM") youtube_id_1_0 = String(help="This is the Youtube ID reference for the normal speed video.", display_name="Default Speed", scope=Scope.settings, default="OEoXaMPEzfM")
......
...@@ -221,7 +221,7 @@ class TestTOC(TestCase): ...@@ -221,7 +221,7 @@ class TestTOC(TestCase):
'format': '', 'due': None, 'active': False}, 'format': '', 'due': None, 'active': False},
{'url_name': 'video_123456789012', 'display_name': 'Test Video', 'graded': True, {'url_name': 'video_123456789012', 'display_name': 'Test Video', 'graded': True,
'format': '', 'due': None, 'active': False}, 'format': '', 'due': None, 'active': False},
{'url_name': 'video_4f66f493ac8f', 'display_name': 'Video Title', 'graded': True, {'url_name': 'video_4f66f493ac8f', 'display_name': 'Video', 'graded': True,
'format': '', 'due': None, 'active': False}], 'format': '', 'due': None, 'active': False}],
'url_name': 'Overview', 'display_name': u'Overview'}, 'url_name': 'Overview', 'display_name': u'Overview'},
{'active': False, 'sections': {'active': False, 'sections':
...@@ -230,7 +230,6 @@ class TestTOC(TestCase): ...@@ -230,7 +230,6 @@ class TestTOC(TestCase):
'url_name': 'secret:magic', 'display_name': 'secret:magic'}]) 'url_name': 'secret:magic', 'display_name': 'secret:magic'}])
actual = render.toc_for_course(self.portal_user, request, self.toy_course, chapter, None, model_data_cache) actual = render.toc_for_course(self.portal_user, request, self.toy_course, chapter, None, model_data_cache)
print actual
assert reduce(lambda x, y: x and (y in actual), expected, True) assert reduce(lambda x, y: x and (y in actual), expected, True)
def test_toc_toy_from_section(self): def test_toc_toy_from_section(self):
...@@ -249,7 +248,7 @@ class TestTOC(TestCase): ...@@ -249,7 +248,7 @@ class TestTOC(TestCase):
'format': '', 'due': None, 'active': True}, 'format': '', 'due': None, 'active': True},
{'url_name': 'video_123456789012', 'display_name': 'Test Video', 'graded': True, {'url_name': 'video_123456789012', 'display_name': 'Test Video', 'graded': True,
'format': '', 'due': None, 'active': False}, 'format': '', 'due': None, 'active': False},
{'url_name': 'video_4f66f493ac8f', 'display_name': 'Video Title', 'graded': True, {'url_name': 'video_4f66f493ac8f', 'display_name': 'Video', 'graded': True,
'format': '', 'due': None, 'active': False}], 'format': '', 'due': None, 'active': False}],
'url_name': 'Overview', 'display_name': u'Overview'}, 'url_name': 'Overview', 'display_name': u'Overview'},
{'active': False, 'sections': {'active': False, 'sections':
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment