diff --git a/common/lib/xmodule/xmodule/library_content_module.py b/common/lib/xmodule/xmodule/library_content_module.py index 2d78cf1e8a..9f80d22d5e 100644 --- a/common/lib/xmodule/xmodule/library_content_module.py +++ b/common/lib/xmodule/xmodule/library_content_module.py @@ -407,8 +407,8 @@ class LibraryContentDescriptor(LibraryContentFields, MakoModuleDescriptor, XmlDe StudioValidationMessage.WARNING, ( ngettext( - u'The specified libraries are configured to fetch {count} problem, ', - u'The specified libraries are configured to fetch {count} problems, ', + u'The specified library is configured to fetch {count} problem, ', + u'The specified library is configured to fetch {count} problems, ', self.max_count ) + ngettext( diff --git a/common/lib/xmodule/xmodule/library_tools.py b/common/lib/xmodule/xmodule/library_tools.py index d1b2c737f3..40afbbb549 100644 --- a/common/lib/xmodule/xmodule/library_tools.py +++ b/common/lib/xmodule/xmodule/library_tools.py @@ -104,15 +104,15 @@ class LibraryToolsService(object): def update_children(self, dest_block, user_id, user_perms=None): """ - This method is to be used when any of the libraries that a LibraryContentModule - references have been updated. It will re-fetch all matching blocks from + This method is to be used when the library that a LibraryContentModule + references has been updated. It will re-fetch all matching blocks from the libraries, and copy them as children of dest_block. The children will be given new block_ids, but the definition ID used should be the exact same definition ID used in the library. - This method will update dest_block's 'source_libraries' field to store - the version number of the libraries used, so we easily determine if - dest_block is up to date or not. + This method will update dest_block's 'source_library_version' field to + store the version number of the libraries used, so we easily determine + if dest_block is up to date or not. """ if user_perms and not user_perms.can_write(dest_block.location.course_key): raise PermissionDenied() @@ -125,7 +125,7 @@ class LibraryToolsService(object): library_key = dest_block.source_library_key library = self._get_library(library_key) if library is None: - raise ValueError("Required library not found.") + raise ValueError("Requested library not found.") if user_perms and not user_perms.can_read(library_key): raise PermissionDenied() filter_children = (dest_block.capa_type != ANY_CAPA_TYPE_VALUE) diff --git a/common/lib/xmodule/xmodule/tests/test_library_content.py b/common/lib/xmodule/xmodule/tests/test_library_content.py index 485bfad0ae..1feeddea29 100644 --- a/common/lib/xmodule/xmodule/tests/test_library_content.py +++ b/common/lib/xmodule/xmodule/tests/test_library_content.py @@ -126,14 +126,14 @@ class TestLibraryContentModule(LibraryContentTest): Test that the validation method of LibraryContent blocks can validate the source_library setting. """ - # When source_libraries is blank, the validation summary should say this block needs to be configured: + # When source_library_id is blank, the validation summary should say this block needs to be configured: self.lc_block.source_library_id = "" result = self.lc_block.validate() self.assertFalse(result) # Validation fails due to at least one warning/message self.assertTrue(result.summary) self.assertEqual(StudioValidationMessage.NOT_CONFIGURED, result.summary.type) - # When source_libraries references a non-existent library, we should get an error: + # When source_library_id references a non-existent library, we should get an error: self.lc_block.source_library_id = "library-v1:BAD+WOLF" result = self.lc_block.validate() self.assertFalse(result) # Validation fails due to at least one warning/message @@ -141,7 +141,7 @@ class TestLibraryContentModule(LibraryContentTest): self.assertEqual(StudioValidationMessage.ERROR, result.summary.type) self.assertIn("invalid", result.summary.text) - # When source_libraries is set but the block needs to be updated, the summary should say so: + # When source_library_id is set but the block needs to be updated, the summary should say so: self.lc_block.source_library_id = unicode(self.library.location.library_key) result = self.lc_block.validate() self.assertFalse(result) # Validation fails due to at least one warning/message 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 fa49f339a5..24ec806fef 100644 --- a/common/test/acceptance/tests/studio/test_studio_library_container.py +++ b/common/test/acceptance/tests/studio/test_studio_library_container.py @@ -219,7 +219,7 @@ class StudioLibraryContainerTest(StudioLibraryTest, UniqueCourseTest): And I set Problem Type selector so "Any" Then I can see that "No matching content" warning is shown """ - expected_tpl = "The specified libraries are configured to fetch {count} problems, " \ + expected_tpl = "The specified library is configured to fetch {count} problems, " \ "but there are only {actual} matching problems." library_container = self._get_library_xblock_wrapper(self.unit_page.xblocks[1])