From 214a814b946b7c06b7251a5d6953e7168d5e15a8 Mon Sep 17 00:00:00 2001 From: Giulio Gratta Date: Mon, 22 Jul 2013 14:24:09 -0700 Subject: [PATCH 1/2] Adjustment to show sequence tool tips in LMS --- common/lib/xmodule/xmodule/css/sequence/display.scss | 3 +++ lms/templates/seq_module.html | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/common/lib/xmodule/xmodule/css/sequence/display.scss b/common/lib/xmodule/xmodule/css/sequence/display.scss index 4baf60a8fed4..1e82b31f109d 100644 --- a/common/lib/xmodule/xmodule/css/sequence/display.scss +++ b/common/lib/xmodule/xmodule/css/sequence/display.scss @@ -211,6 +211,8 @@ nav.sequence-nav { @include transition(all .1s $ease-in-out-quart 0s); white-space: pre; z-index: 99; + visibility: hidden; + pointer-events: none; &:empty { background: none; @@ -238,6 +240,7 @@ nav.sequence-nav { display: block; margin-top: 4px; opacity: 1.0; + visibility: visible; } } } diff --git a/lms/templates/seq_module.html b/lms/templates/seq_module.html index f372d495ca42..fff1279cd640 100644 --- a/lms/templates/seq_module.html +++ b/lms/templates/seq_module.html @@ -3,7 +3,7 @@ - +
    % for idx, item in enumerate(items): @@ -16,7 +16,7 @@ data-id="${item['id']}" data-element="${idx+1}" href="javascript:void(0);"> -

    ${item['title']}, ${item['type']}

    +

    ${item['title']}, ${item['type']}

    % endfor From 2efcb0cdcafabfba2b5a05d92838fbb9b07a5d68 Mon Sep 17 00:00:00 2001 From: Adam Palay Date: Wed, 24 Jul 2013 10:09:12 -0400 Subject: [PATCH 2/2] 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. --- cms/djangoapps/contentstore/features/html-editor.py | 2 +- cms/djangoapps/contentstore/features/video-editor.py | 2 +- common/lib/xmodule/xmodule/discussion_module.py | 12 ++++++++---- common/lib/xmodule/xmodule/html_module.py | 2 +- common/lib/xmodule/xmodule/video_module.py | 8 +++++--- .../courseware/tests/test_module_render.py | 5 ++--- 6 files changed, 18 insertions(+), 13 deletions(-) diff --git a/cms/djangoapps/contentstore/features/html-editor.py b/cms/djangoapps/contentstore/features/html-editor.py index b03388c89ace..c3e0afa48051 100644 --- a/cms/djangoapps/contentstore/features/html-editor.py +++ b/cms/djangoapps/contentstore/features/html-editor.py @@ -14,4 +14,4 @@ def i_created_blank_html_page(step): @step('I see only the HTML display name setting$') 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]]) diff --git a/cms/djangoapps/contentstore/features/video-editor.py b/cms/djangoapps/contentstore/features/video-editor.py index e0f76b30adb8..93d638e62179 100644 --- a/cms/djangoapps/contentstore/features/video-editor.py +++ b/cms/djangoapps/contentstore/features/video-editor.py @@ -7,7 +7,7 @@ @step('I see the correct settings and default values$') def i_see_the_correct_settings_and_values(step): world.verify_all_setting_entries([['Default Speed', 'OEoXaMPEzfM', False], - ['Display Name', 'Video Title', False], + ['Display Name', 'Video', False], ['Download Track', '', False], ['Download Video', '', False], ['Show Captions', 'True', False], diff --git a/common/lib/xmodule/xmodule/discussion_module.py b/common/lib/xmodule/xmodule/discussion_module.py index fac6a498e575..2c6cc9f4ddb3 100644 --- a/common/lib/xmodule/xmodule/discussion_module.py +++ b/common/lib/xmodule/xmodule/discussion_module.py @@ -12,10 +12,14 @@ class DiscussionFields(object): display_name = String( display_name="Display Name", help="Display name for this module", - default="Discussion Tag", - scope=Scope.settings) - data = String(help="XML data for the problem", scope=Scope.content, - default="") + default="Discussion", + scope=Scope.settings + ) + data = String( + help="XML data for the problem", + scope=Scope.content, + default="" + ) discussion_category = String( display_name="Category", default="Week 1", diff --git a/common/lib/xmodule/xmodule/html_module.py b/common/lib/xmodule/xmodule/html_module.py index a482a86fe7b3..1cc7bed948c2 100644 --- a/common/lib/xmodule/xmodule/html_module.py +++ b/common/lib/xmodule/xmodule/html_module.py @@ -25,7 +25,7 @@ class HtmlFields(object): scope=Scope.settings, # it'd be nice to have a useful default but it screws up other things; so, # 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) source_code = String(help="Source code for LaTeX documents. This feature is not well-supported.", scope=Scope.settings) diff --git a/common/lib/xmodule/xmodule/video_module.py b/common/lib/xmodule/xmodule/video_module.py index 1d9ad35135be..6c5640346ee7 100644 --- a/common/lib/xmodule/xmodule/video_module.py +++ b/common/lib/xmodule/xmodule/video_module.py @@ -27,11 +27,13 @@ class VideoFields(object): scope=Scope.settings, # it'd be nice to have a useful default but it screws up other things; so, # 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='', - scope=Scope.content) + scope=Scope.content + ) 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) 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") diff --git a/lms/djangoapps/courseware/tests/test_module_render.py b/lms/djangoapps/courseware/tests/test_module_render.py index 7a2afc8af1fb..6b409f677bfc 100644 --- a/lms/djangoapps/courseware/tests/test_module_render.py +++ b/lms/djangoapps/courseware/tests/test_module_render.py @@ -221,7 +221,7 @@ def test_toc_toy_from_chapter(self): 'format': '', 'due': None, 'active': False}, {'url_name': 'video_123456789012', 'display_name': 'Test Video', 'graded': True, '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}], 'url_name': 'Overview', 'display_name': u'Overview'}, {'active': False, 'sections': @@ -230,7 +230,6 @@ def test_toc_toy_from_chapter(self): '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) - print actual assert reduce(lambda x, y: x and (y in actual), expected, True) def test_toc_toy_from_section(self): @@ -249,7 +248,7 @@ def test_toc_toy_from_section(self): 'format': '', 'due': None, 'active': True}, {'url_name': 'video_123456789012', 'display_name': 'Test Video', 'graded': True, '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}], 'url_name': 'Overview', 'display_name': u'Overview'}, {'active': False, 'sections':