diff --git a/cms/djangoapps/contentstore/views/preview.py b/cms/djangoapps/contentstore/views/preview.py index 09e234d6ea..c33dd46380 100644 --- a/cms/djangoapps/contentstore/views/preview.py +++ b/cms/djangoapps/contentstore/views/preview.py @@ -282,6 +282,7 @@ def _studio_wrap_xblock(xblock, view, frag, context, display_name_only=False): selected_groups_label = get_visibility_partition_info(xblock)['selected_groups_label'] if selected_groups_label: selected_groups_label = _('Access restricted to: {list_of_groups}').format(list_of_groups=selected_groups_label) + course = modulestore().get_course(xblock.location.course_key) template_context = { 'xblock_context': context, 'xblock': xblock, @@ -293,8 +294,10 @@ def _studio_wrap_xblock(xblock, view, frag, context, display_name_only=False): 'can_edit_visibility': context.get('can_edit_visibility', True), 'selected_groups_label': selected_groups_label, 'can_add': context.get('can_add', True), - 'can_move': context.get('can_move', True) + 'can_move': context.get('can_move', True), + 'language': getattr(course, 'language', None) } + html = render_to_string('studio_xblock_wrapper.html', template_context) frag = wrap_fragment(frag, html) return frag diff --git a/cms/templates/course_info.html b/cms/templates/course_info.html index 4080ea7183..ed983c27a5 100644 --- a/cms/templates/course_info.html +++ b/cms/templates/course_info.html @@ -62,7 +62,11 @@ from openedx.core.djangolib.js_utils import (
-
+
    diff --git a/cms/templates/course_outline.html b/cms/templates/course_outline.html index 3cd55667b6..c4239b94b4 100644 --- a/cms/templates/course_outline.html +++ b/cms/templates/course_outline.html @@ -175,8 +175,11 @@ from openedx.core.djangolib.markup import HTML, Text
    % endif
    - -
    +
    <% course_locator = context_course.location %> diff --git a/cms/templates/studio_xblock_wrapper.html b/cms/templates/studio_xblock_wrapper.html index 420c54ae2f..27fd4427c3 100644 --- a/cms/templates/studio_xblock_wrapper.html +++ b/cms/templates/studio_xblock_wrapper.html @@ -158,7 +158,11 @@ messages = xblock.validate().to_json() % if show_preview: % if is_root or not xblock_url: -
    + % if not is_root and language: +
    + % else: +
    + % endif ${content | n, decode.utf8}
    % else: diff --git a/lms/djangoapps/discussion/templates/discussion/discussion_board_fragment.html b/lms/djangoapps/discussion/templates/discussion/discussion_board_fragment.html index f8f71ef129..94dc0052b2 100644 --- a/lms/djangoapps/discussion/templates/discussion/discussion_board_fragment.html +++ b/lms/djangoapps/discussion/templates/discussion/discussion_board_fragment.html @@ -41,7 +41,11 @@ from openedx.core.djangolib.markup import HTML
    -
    +