diff --git a/cms/djangoapps/contentstore/features/component.py b/cms/djangoapps/contentstore/features/component.py index 8adbb0fdae..38fb905bcf 100644 --- a/cms/djangoapps/contentstore/features/component.py +++ b/cms/djangoapps/contentstore/features/component.py @@ -55,9 +55,9 @@ def see_a_multi_step_component(step, category): if category == 'HTML': html_matcher = { 'Text': '\n \n', - 'Announcement': '

Announcement Date

', - 'Zooming Image Tool': '

Zooming Image Tool

', - 'E-text Written in LaTeX': '

Example: E-text page

', + 'Announcement': '

Announcement Date

', + 'Zooming Image Tool': '

Zooming Image Tool

', + 'E-text Written in LaTeX': '

Example: E-text page

', 'Raw HTML': '

This template is similar to the Text template. The only difference is', } actual_html = world.css_html(selector, index=idx) diff --git a/cms/djangoapps/contentstore/features/problem-editor.py b/cms/djangoapps/contentstore/features/problem-editor.py index c8fc76ed87..b1d7c97159 100644 --- a/cms/djangoapps/contentstore/features/problem-editor.py +++ b/cms/djangoapps/contentstore/features/problem-editor.py @@ -125,6 +125,9 @@ def my_display_name_change_is_persisted_on_save(step): @step('the problem display name is "(.*)"$') def verify_problem_display_name(step, name): + """ + name is uppercased because the heading styles are uppercase in css + """ assert_equal(name, world.browser.find_by_css('.problem-header').text) diff --git a/cms/static/sass/_build.scss b/cms/static/sass/_build.scss index dcf8f2bc81..57a133fa83 100644 --- a/cms/static/sass/_build.scss +++ b/cms/static/sass/_build.scss @@ -75,6 +75,7 @@ // ==================== @import 'xmodule/modules/css/module-styles.scss'; @import 'xmodule/descriptors/css/module-styles.scss'; +@import 'xmodule/headings'; @import 'elements/xmodules'; // styling for Studio-specific contexts @import 'developer'; // used for any developer-created scss that needs further polish/refactoring diff --git a/cms/static/sass/xmodule/_headings.scss b/cms/static/sass/xmodule/_headings.scss new file mode 100644 index 0000000000..af8402b020 --- /dev/null +++ b/cms/static/sass/xmodule/_headings.scss @@ -0,0 +1,121 @@ +/* + * This comes from the UXPL, and is modified for use. + * The UXPL isn't available retroactively, so this shims + * the headings from the UXPL with what we're using in + * the platform to better sync things up in the meantime. + * It is scoped to #seq_content, specifically for xblock. + * + * Once the UXPl is fitted retroactively, this can be removed. + */ + +$headings-count: 8; + +$headings-font-weight-light: 200; +$headings-font-weight-normal: 400; +$headings-font-weight-bold: 600; +$headings-base-font-family: inherit; +$headings-base-color: $gray-d2; + +%reset-headings { + margin: 0; + font-weight: $headings-font-weight-normal; + font-size: inherit; + line-height: inherit; + color: $headings-base-color; +} + +%hd-1 { + margin-bottom: 1.41575em !important; + font-size: 2em !important; + line-height: 1.4em !important; +} + + +%hd-2 { + margin-bottom: 1em !important; + font-size: 1.5em !important; + font-weight: $headings-font-weight-normal !important; + line-height: 1.4em !important; +} + + +%hd-3 { + margin-bottom: ($baseline / 2) !important; + font-size: 1.35em !important; + font-weight: $headings-font-weight-normal !important; + line-height: 1.4em !important; +} + + +%hd-4 { + margin-bottom: ($baseline / 2) !important; + font-size: 1.25em !important; + font-weight: $headings-font-weight-bold !important; + line-height: 1.4em !important; +} + + +%hd-5 { + margin-bottom: ($baseline / 2) !important; + font-size: 1.1em !important; + font-weight: $headings-font-weight-bold !important; + line-height: 1.4em !important; +} + + +%hd-6 { + margin-bottom: ($baseline / 2) !important; + font-size: 1em !important; + font-weight: $headings-font-weight-bold !important; + line-height: 1.4em !important; +} + +%hd-7 { + margin-bottom: ($baseline / 4); + font-size: 14px; + font-weight: $headings-font-weight-bold; + text-transform: uppercase; + line-height: 1.6em; + letter-spacing: 1px; +} + +%hd-8 { + margin-bottom: ($baseline / 8); + font-size: 12px; + font-weight: $headings-font-weight-bold; + text-transform: uppercase; + line-height: 1.5em; + letter-spacing: 1px; +} + +.wrapper-xblock { + + .hd-1, + .hd-2, + .hd-3, + .hd-4, + .hd-5, + .hd-6, + .hd-7, + .hd-8 { + @extend %reset-headings; + } + + + // ---------------------------- + // #CANNED + // ---------------------------- + // canned heading classes + @for $i from 1 through $headings-count { + .hd-#{$i} { + @extend %hd-#{$i}; + } + } + + h3 { + @extend %hd-2; + font-weight: $headings-font-weight-normal !important; + // override external modules and xblocks that use inline CSS + text-transform: initial; + } +} diff --git a/cms/templates/ux/reference/container.html b/cms/templates/ux/reference/container.html index 8563122086..6a2632a90d 100644 --- a/cms/templates/ux/reference/container.html +++ b/cms/templates/ux/reference/container.html @@ -336,7 +336,7 @@

-

+

Multiple Choice

diff --git a/common/lib/xmodule/xmodule/css/annotatable/display.scss b/common/lib/xmodule/xmodule/css/annotatable/display.scss index 6a5e7d88bd..4d438346fc 100644 --- a/common/lib/xmodule/xmodule/css/annotatable/display.scss +++ b/common/lib/xmodule/xmodule/css/annotatable/display.scss @@ -13,11 +13,6 @@ $annotatable--body-font-size: em(14); .annotatable-header { margin-bottom: .5em; - .annotatable-title { - font-size: em(22); - text-transform: uppercase; - padding: ($baseline/10) ($baseline/5); - } } .annotatable-section { diff --git a/common/lib/xmodule/xmodule/js/fixtures/annotatable.html b/common/lib/xmodule/xmodule/js/fixtures/annotatable.html index 59e77fdf27..5f80304a87 100644 --- a/common/lib/xmodule/xmodule/js/fixtures/annotatable.html +++ b/common/lib/xmodule/xmodule/js/fixtures/annotatable.html @@ -1,7 +1,7 @@
-
First Annotation Exercise
+

First Annotation Exercise

@@ -32,4 +32,3 @@ - diff --git a/common/lib/xmodule/xmodule/js/fixtures/crowdsource_hinter.html b/common/lib/xmodule/xmodule/js/fixtures/crowdsource_hinter.html index d7d6d952d2..09644c1369 100644 --- a/common/lib/xmodule/xmodule/js/fixtures/crowdsource_hinter.html +++ b/common/lib/xmodule/xmodule/js/fixtures/crowdsource_hinter.html @@ -8,7 +8,7 @@
-

+

Numerical Input

diff --git a/common/lib/xmodule/xmodule/js/fixtures/jsinput_problem.html b/common/lib/xmodule/xmodule/js/fixtures/jsinput_problem.html index 1d48e92e3a..a0250c5685 100644 --- a/common/lib/xmodule/xmodule/js/fixtures/jsinput_problem.html +++ b/common/lib/xmodule/xmodule/js/fixtures/jsinput_problem.html @@ -1,4 +1,4 @@ -

Custom Javascript Display and Grading

+

Custom Javascript Display and Grading

diff --git a/common/lib/xmodule/xmodule/js/fixtures/problem_content.html b/common/lib/xmodule/xmodule/js/fixtures/problem_content.html index 60c0c78a7c..2091a03a00 100644 --- a/common/lib/xmodule/xmodule/js/fixtures/problem_content.html +++ b/common/lib/xmodule/xmodule/js/fixtures/problem_content.html @@ -1,4 +1,4 @@ -

Problem Header

+

Problem Header

diff --git a/common/lib/xmodule/xmodule/js/fixtures/problem_content_1240.html b/common/lib/xmodule/xmodule/js/fixtures/problem_content_1240.html index cb6aab2541..b87b5e857e 100644 --- a/common/lib/xmodule/xmodule/js/fixtures/problem_content_1240.html +++ b/common/lib/xmodule/xmodule/js/fixtures/problem_content_1240.html @@ -1,4 +1,4 @@ -

Problem Header

+

Problem Header

diff --git a/common/lib/xmodule/xmodule/js/spec/problem/edit_spec.coffee b/common/lib/xmodule/xmodule/js/spec/problem/edit_spec.coffee index a10ad3d4e4..771708d752 100644 --- a/common/lib/xmodule/xmodule/js/spec/problem/edit_spec.coffee +++ b/common/lib/xmodule/xmodule/js/spec/problem/edit_spec.coffee @@ -710,7 +710,7 @@ describe 'MarkdownEditingDescriptor', -> """) expect(data).toEqual("""

Not a header

-

A header

+

A header

Multiple choice w/ parentheticals

diff --git a/common/lib/xmodule/xmodule/js/src/problem/edit.coffee b/common/lib/xmodule/xmodule/js/src/problem/edit.coffee index 0f0f2c1e4e..224abb6763 100644 --- a/common/lib/xmodule/xmodule/js/src/problem/edit.coffee +++ b/common/lib/xmodule/xmodule/js/src/problem/edit.coffee @@ -202,7 +202,7 @@ class @MarkdownEditingDescriptor extends XModule.Descriptor xml = xml.replace(/\r\n/g, '\n'); // replace headers - xml = xml.replace(/(^.*?$)(?=\n\=\=+$)/gm, '

$1

'); + xml = xml.replace(/(^.*?$)(?=\n\=\=+$)/gm, '

$1

'); xml = xml.replace(/\n^\=\=+$/gm, ''); // Pull out demand hints, || a hint || diff --git a/common/lib/xmodule/xmodule/templates/html/announcement.yaml b/common/lib/xmodule/xmodule/templates/html/announcement.yaml index a0f4b07e4e..b1e17153f5 100644 --- a/common/lib/xmodule/xmodule/templates/html/announcement.yaml +++ b/common/lib/xmodule/xmodule/templates/html/announcement.yaml @@ -5,14 +5,14 @@ data: |

To use this template, replace the example text with your own text.

When you add the component, be sure to select Settings to specify a Display Name and other values that apply.

-

Announcement Date

+

Announcement Date

Short note that introduces the topic

Instructor's name

-

Heading for announcement 1

+

Heading for announcement 1

Announcement 1 text

-

Heading for announcement 2

+

Heading for announcement 2

Announcement 2 text

-
\ No newline at end of file +
diff --git a/common/lib/xmodule/xmodule/templates/html/iframe.yaml b/common/lib/xmodule/xmodule/templates/html/iframe.yaml index 65d8caac88..9e79e7e125 100644 --- a/common/lib/xmodule/xmodule/templates/html/iframe.yaml +++ b/common/lib/xmodule/xmodule/templates/html/iframe.yaml @@ -2,7 +2,7 @@ metadata: display_name: IFrame Tool data: | -

IFrame Tool

+

IFrame Tool

Use the IFrame tool to embed an exercise or tool from any web site into your course content. For example, the tool below allows learners to experiment with how the shape of a triangle affects a line that is derived from the triangle.

Exercises in an IFrame are not graded. To embed graded exercises, use a Custom JavaScript Problem.

The following code is the HTML format required to use the IFrame tool. For the IFrame in this template, you must replace the values in italics.

diff --git a/common/lib/xmodule/xmodule/templates/html/image_modal.yaml b/common/lib/xmodule/xmodule/templates/html/image_modal.yaml index 5efc6cba48..9ed87e9b68 100644 --- a/common/lib/xmodule/xmodule/templates/html/image_modal.yaml +++ b/common/lib/xmodule/xmodule/templates/html/image_modal.yaml @@ -2,7 +2,7 @@ metadata: display_name: Full Screen Image Tool data: | -

Full Screen Image Tool

+

Full Screen Image Tool

Use the Full Screen Image tool to allow learners to open and zoom in on a larger version of an image in your course.

With the Full Screen Image tool, learners can see the image's details as well as its context within the unit.

To enable users to view the larger image, you wrap the smaller image in a link to the larger version of the image.

diff --git a/common/lib/xmodule/xmodule/templates/html/latex_html.yaml b/common/lib/xmodule/xmodule/templates/html/latex_html.yaml index f82c60ed8d..bd45ed4e62 100644 --- a/common/lib/xmodule/xmodule/templates/html/latex_html.yaml +++ b/common/lib/xmodule/xmodule/templates/html/latex_html.yaml @@ -12,7 +12,7 @@ metadata: data: | -

Example: E-text page

+

Example: E-text page

You can write complex equations in LaTeX.

When you add the component, be sure to select Settings to specify a Display Name and other values that apply.

diff --git a/common/lib/xmodule/xmodule/templates/html/zooming_image.yaml b/common/lib/xmodule/xmodule/templates/html/zooming_image.yaml index 16bc5a6932..b91717550b 100644 --- a/common/lib/xmodule/xmodule/templates/html/zooming_image.yaml +++ b/common/lib/xmodule/xmodule/templates/html/zooming_image.yaml @@ -2,7 +2,7 @@ metadata: display_name: Zooming Image Tool data: | -

Zooming Image Tool

+

Zooming Image Tool

Use the Zooming Image Tool to enable learners to see details of large, complex images.

With the Zooming Image Tool, the learner can move the mouse pointer over a part of the image to enlarge it and see more detail.

To use the Zooming Image Tool, you must first add the jquery.loupeAndLightbox.js JavaScript file to your course.

diff --git a/common/static/css/tinymce-studio-content.css b/common/static/css/tinymce-studio-content.css index f747cc7ea3..8938e60986 100644 --- a/common/static/css/tinymce-studio-content.css +++ b/common/static/css/tinymce-studio-content.css @@ -20,47 +20,52 @@ scrollbar-track-color: #F5F5F5; } -.mce-content-body h1 { +.mce-content-body h1, +.mce-content-body .hd-1 { color: #3c3c3c; font-weight: normal; font-size: 2em; line-height: 1.4em; - letter-spacing: 1px; - margin: 0 0 1.416em 0; + margin: 0 0 1.41575em 0; } -.mce-content-body h2 { +.mce-content-body h2, +.mce-content-body .hd-2, +.mce-content-body h3 { color: #646464; font-weight: 300; - font-size: 1.2em; - line-height: 1.2em; - letter-spacing: 1px; - margin-bottom: 15px; + font-size: 1.6em; + line-height: 1.4em; + margin-bottom: 1.6em; text-transform: uppercase; - -webkit-font-smoothing: antialiased; } -.mce-content-body h3, .mce-content-body h4, .mce-content-body h5, .mce-content-body h6 { +.mce-content-body .hd-3, +.mce-content-body h4, +.mce-content-body .hd-4, +.mce-content-body h5, +.mce-content-body .hd-5, +.mce-content-body h6, +.mce-content-body .hd-6 { margin: 0 0 10px 0; font-weight: 600; } -.mce-content-body h3 { +.mce-content-body h4, +.mce-content-body .hd-4 { + font-size: 1.4em; +} + +.mce-content-body h5, +.mce-content-body .hd-5 { font-size: 1.2em; } -.mce-content-body h4 { +.mce-content-body h6, +.mce-content-body .hd-6 { font-size: 1em; } -.mce-content-body h5 { - font-size: .83em; -} - -.mce-content-body h6 { - font-size: 0.75em; -} - .mce-content-body p { margin-bottom: 1.416em; font-size: 1em; diff --git a/common/test/acceptance/pages/lms/library.py b/common/test/acceptance/pages/lms/library.py index 25bbd963ca..bc5087b46d 100644 --- a/common/test/acceptance/pages/lms/library.py +++ b/common/test/acceptance/pages/lms/library.py @@ -44,5 +44,5 @@ class LibraryContentXBlockWrapper(PageObject): """ Gets headers of all child XBlocks as list of strings """ - child_blocks_headers = self.q(css=self._bounded_selector("div[data-id] h3.problem-header")) + child_blocks_headers = self.q(css=self._bounded_selector("div[data-id] .problem-header")) return frozenset(child.text for child in child_blocks_headers) diff --git a/common/test/acceptance/tests/test_annotatable.py b/common/test/acceptance/tests/test_annotatable.py index 487d344d6a..74a6421d57 100644 --- a/common/test/acceptance/tests/test_annotatable.py +++ b/common/test/acceptance/tests/test_annotatable.py @@ -115,7 +115,7 @@ class AnnotatableProblemTest(UniqueCourseTest): self.courseware_page.visit() annotation_component_page = AnnotationComponentPage(self.browser) self.assertEqual( - annotation_component_page.component_name, 'TEST ANNOTATION MODULE'.format() + annotation_component_page.component_name, 'Test Annotation Module'.format() ) return annotation_component_page diff --git a/common/test/acceptance/tests/video/test_video_module.py b/common/test/acceptance/tests/video/test_video_module.py index f90215bffd..90d89a482a 100644 --- a/common/test/acceptance/tests/video/test_video_module.py +++ b/common/test/acceptance/tests/video/test_video_module.py @@ -630,10 +630,11 @@ class YouTubeVideoTest(VideoBaseTest): """ Scenario: Multiple videos in sequentials all load and work, switching between sequentials Given it has videos "A,B" in "Youtube" mode in position "1" of sequential - And videos "E,F" in "Youtube" mode in position "2" of sequential + And videos "C,D" in "Youtube" mode in position "2" of sequential """ self.verticals = [ - [{'display_name': 'A'}, {'display_name': 'B'}], [{'display_name': 'C'}, {'display_name': 'D'}] + [{'display_name': 'A'}, {'display_name': 'B'}], + [{'display_name': 'C'}, {'display_name': 'D'}] ] tab1_video_names = ['A', 'B'] @@ -651,15 +652,16 @@ class YouTubeVideoTest(VideoBaseTest): # go to video self.navigate_to_video() - execute_video_steps(tab1_video_names) # go to second sequential position + # import ipdb; ipdb.set_trace() self.go_to_sequential_position(2) execute_video_steps(tab2_video_names) # go back to first sequential position # we are again playing tab 1 videos to ensure that switching didn't broke some video functionality. + # import ipdb; ipdb.set_trace() self.go_to_sequential_position(1) execute_video_steps(tab1_video_names) diff --git a/lms/djangoapps/courseware/features/navigation.py b/lms/djangoapps/courseware/features/navigation.py index e0d426cc0e..bcc7a04d2b 100644 --- a/lms/djangoapps/courseware/features/navigation.py +++ b/lms/djangoapps/courseware/features/navigation.py @@ -115,6 +115,9 @@ def when_i_navigate_to_an_item_in_a_sequence(step): @step(u'I see the content of the section') def then_i_see_the_content_of_the_section(step): + """ + Uppercasing the title here since CSS does it on the front-end + """ wait_for_problem('Problem 2') diff --git a/lms/djangoapps/courseware/features/word_cloud.py b/lms/djangoapps/courseware/features/word_cloud.py index 3329b4e734..b94e143720 100644 --- a/lms/djangoapps/courseware/features/word_cloud.py +++ b/lms/djangoapps/courseware/features/word_cloud.py @@ -40,6 +40,9 @@ def fill_inputs(_step): @step('I see the result with words count') def see_result(_step): + """ + Uppercasing since CSS capitalizes the headings + """ strong_css = '.your_words strong' target_text = set([world.css_text(strong_css, i) for i in range(2)]) assert set(['text1', 'text2']) == target_text diff --git a/lms/static/sass/_build-course.scss b/lms/static/sass/_build-course.scss index 662b00dd2f..f671ab71c6 100644 --- a/lms/static/sass/_build-course.scss +++ b/lms/static/sass/_build-course.scss @@ -66,3 +66,6 @@ // responsive @import 'base/layouts'; // temporary spot for responsive course + +// xmodule +@import 'xmodule/headings'; diff --git a/lms/static/sass/xmodule/_headings.scss b/lms/static/sass/xmodule/_headings.scss new file mode 100644 index 0000000000..e88882c842 --- /dev/null +++ b/lms/static/sass/xmodule/_headings.scss @@ -0,0 +1,121 @@ +/* + * This comes from the UXPL, and is modified for use. + * The UXPL isn't available retroactively, so this shims + * the headings from the UXPL with what we're using in + * the platform to better sync things up in the meantime. + * It is scoped to #seq_content, specifically for xblock. + * + * Once the UXPl is fitted retroactively, this can be removed. + */ + +$headings-count: 8; + +$headings-font-weight-light: 200; +$headings-font-weight-normal: 400; +$headings-font-weight-bold: 600; +$headings-base-font-family: inherit; +$headings-base-color: $gray-d2; + +%reset-headings { + margin: 0; + font-weight: $headings-font-weight-normal; + font-size: inherit; + line-height: inherit; + color: $headings-base-color; +} + +%hd-1 { + margin-bottom: 1.41575em !important; + font-size: 2em !important; + line-height: 1.4em !important; +} + + +%hd-2 { + margin-bottom: 1em !important; + font-size: 1.5em !important; + font-weight: $headings-font-weight-normal !important; + line-height: 1.4em !important; +} + + +%hd-3 { + margin-bottom: ($baseline / 2) !important; + font-size: 1.35em !important; + font-weight: $headings-font-weight-normal !important; + line-height: 1.4em !important; +} + + +%hd-4 { + margin-bottom: ($baseline / 2) !important; + font-size: 1.25em !important; + font-weight: $headings-font-weight-bold !important; + line-height: 1.4em !important; +} + + +%hd-5 { + margin-bottom: ($baseline / 2) !important; + font-size: 1.1em !important; + font-weight: $headings-font-weight-bold !important; + line-height: 1.4em !important; +} + + +%hd-6 { + margin-bottom: ($baseline / 2) !important; + font-size: 1em !important; + font-weight: $headings-font-weight-bold !important; + line-height: 1.4em !important; +} + +%hd-7 { + margin-bottom: ($baseline / 4); + font-size: 14px; + font-weight: $headings-font-weight-bold; + text-transform: uppercase; + line-height: 1.6em; + letter-spacing: 1px; +} + +%hd-8 { + margin-bottom: ($baseline / 8); + font-size: 12px; + font-weight: $headings-font-weight-bold; + text-transform: uppercase; + line-height: 1.5em; + letter-spacing: 1px; +} + +#seq_content { + + .hd-1, + .hd-2, + .hd-3, + .hd-4, + .hd-5, + .hd-6, + .hd-7, + .hd-8 { + @extend %reset-headings; + } + + + // ---------------------------- + // #CANNED + // ---------------------------- + // canned heading classes + @for $i from 1 through $headings-count { + .hd-#{$i} { + @extend %hd-#{$i}; + } + } + + h3 { + @extend %hd-2; + font-weight: $headings-font-weight-normal !important; + // override external modules and xblocks that use inline CSS + text-transform: initial; + } +} diff --git a/lms/templates/annotatable.html b/lms/templates/annotatable.html index 20a85d0ca2..49c2e8677b 100644 --- a/lms/templates/annotatable.html +++ b/lms/templates/annotatable.html @@ -3,7 +3,7 @@
% if display_name is not UNDEFINED and display_name is not None: -
${display_name}
+

${display_name}

% endif
diff --git a/lms/templates/components/header/header.underscore b/lms/templates/components/header/header.underscore index 2abc4a2716..d383a1ce4a 100644 --- a/lms/templates/components/header/header.underscore +++ b/lms/templates/components/header/header.underscore @@ -9,7 +9,7 @@ <% }) %> <% } %> -

<%- title %>

+

<%- title %>

<%- description %>

diff --git a/lms/templates/imageannotation.html b/lms/templates/imageannotation.html index d54b1ae886..192dfa35f3 100644 --- a/lms/templates/imageannotation.html +++ b/lms/templates/imageannotation.html @@ -11,7 +11,7 @@
% if display_name is not UNDEFINED and display_name is not None: -
${display_name}
+

${display_name}

% endif
% if instructions_html is not UNDEFINED and instructions_html is not None: @@ -27,12 +27,12 @@ % endif
-
+
<%namespace name='static' file='/static_content.html'/> ${static.css(group='style-vendor-tinymce-content', raw=True)} ${static.css(group='style-vendor-tinymce-skin', raw=True)} ${static.css(group='style-xmodule-annotations', raw=True)} -
+
${_('Note: only instructors may annotate.')}
@@ -57,9 +57,9 @@ $(this).parents('.annotatable-section:first').find('.annotatable-instructions')[slideMethod](); } $('.annotatable-toggle-instructions').on('click', onClickHideInstructions); - + //Grab uri of the course - var parts = window.location.href.split("/"), + var parts = window.location.href.split("/"), uri = '', courseid; for (var index = 0; index <= 9; index += 1) uri += parts[index]+"/"; //Get the unit url @@ -79,16 +79,16 @@ optionsAnnotator: { permissions:{ user: { - id:"${user.email}", + id:"${user.email}", name:"${user.username}" }, userString: function (user) { - if (user && user.name) + if (user && user.name) return user.name; return user; }, userId: function (user) { - if (user && user.id) + if (user && user.id) return user.id; return user; }, @@ -112,7 +112,7 @@ } for (_i = 0, _len = tokens.length; _i < _len; _i++) { token = tokens[_i]; - + if (this.userId(user) === token) { return true; @@ -199,7 +199,7 @@ window.osda = osda; // END TODO - var userId = ('${default_tab}'.toLowerCase() === 'instructor') ? + var userId = ('${default_tab}'.toLowerCase() === 'instructor') ? '${instructor_email}': '${user.email}'; diff --git a/lms/templates/lti.html b/lms/templates/lti.html index faf55d6aef..e41642320e 100644 --- a/lms/templates/lti.html +++ b/lms/templates/lti.html @@ -3,7 +3,7 @@ import json from django.utils.translation import ugettext as _ %> -

+

## Translators: "External resource" means that this learning module is hosted on a platform external to the edX LMS ${display_name} (${_('External resource')})

@@ -51,13 +51,13 @@ from django.utils.translation import ugettext as _ > % endif % elif not hide_launch: -

+

${_('Please provide launch_url. Click "Edit", and fill in the required fields.')}

% endif % if has_score and comment: - +