diff --git a/common/lib/xmodule/xmodule/library_content_module.py b/common/lib/xmodule/xmodule/library_content_module.py index b27cc1f3cb..8571540f75 100644 --- a/common/lib/xmodule/xmodule/library_content_module.py +++ b/common/lib/xmodule/xmodule/library_content_module.py @@ -263,21 +263,8 @@ class LibraryContentModule(LibraryContentFields, XModule, StudioEditableModule): 'display_name': self.display_name or self.url_name, })) self.render_children(context, fragment, can_reorder=False, can_add=False) - else: - # When shown on a unit page, don't show any sort of preview - just the status of this block. - library_names = [] - lib_tools = self.runtime.service(self, 'library_tools') - for library_key, version in self.source_libraries: # pylint: disable=unused-variable - lib_name = lib_tools.get_library_display_name(library_key) - if lib_name is not None: - library_names.append(lib_name) + # else: When shown on a unit page, don't show any sort of preview - just the status of this block in the validation area. - if library_names: - fragment.add_content(self.system.render_template('library-block-author-view.html', { - 'library_names': library_names, - 'max_count': self.max_count, - 'num_children': len(self.children), # pylint: disable=no-member - })) # The following JS is used to make the "Update now" button work on the unit page and the container view: fragment.add_javascript_url(self.runtime.local_resource_url(self, 'public/js/library_content_edit.js')) fragment.initialize_js('LibraryContentAuthorView') diff --git a/common/test/acceptance/tests/studio/test_studio_library_container.py b/common/test/acceptance/tests/studio/test_studio_library_container.py index 6e8fddeb8e..d7a592c79f 100644 --- a/common/test/acceptance/tests/studio/test_studio_library_container.py +++ b/common/test/acceptance/tests/studio/test_studio_library_container.py @@ -146,7 +146,7 @@ class StudioLibraryContainerTest(ContainerBase, StudioLibraryTest): library_block = self._get_library_xblock_wrapper(self.unit_page.xblocks[0]) self.assertFalse(library_block.has_validation_warning) - self.assertIn("3 matching components", library_block.author_content) + #self.assertIn("3 matching components", library_block.author_content) # Removed this assert until a summary message is added back to the author view (SOL-192) self.library_fixture.create_xblock(self.library_fixture.library_location, XBlockFixtureDesc("html", "Html4")) @@ -161,4 +161,4 @@ class StudioLibraryContainerTest(ContainerBase, StudioLibraryTest): library_block = self._get_library_xblock_wrapper(self.unit_page.xblocks[0]) self.assertFalse(library_block.has_validation_message) - self.assertIn("4 matching components", library_block.author_content) + #self.assertIn("4 matching components", library_block.author_content) # Removed this assert until a summary message is added back to the author view (SOL-192) diff --git a/lms/templates/library-block-author-view.html b/lms/templates/library-block-author-view.html deleted file mode 100644 index ade6f8dc11..0000000000 --- a/lms/templates/library-block-author-view.html +++ /dev/null @@ -1,10 +0,0 @@ -<%! -from django.utils.translation import ungettext -%> -
${ungettext( - 'This component will be replaced by {max_count} component randomly chosen from the {num_children} matching components in {lib_names}.', - 'This component will be replaced by {max_count} components randomly chosen from the {num_children} matching components in {lib_names}.', - max_count - ).format(max_count=max_count, num_children=num_children, lib_names=', '.join(library_names))}
-