refactor: rename module -> block within lms/djangoapps/courseware

Also, removed unused `_has_access_xmodule` methid from `lms/djangoapps/courseware/access.py`.
This commit is contained in:
0x29a
2022-12-23 15:27:31 +01:00
committed by Agrendalath
parent 611563600c
commit 9d8375ff99
55 changed files with 432 additions and 443 deletions

View File

@@ -125,15 +125,15 @@ class CompletionServiceTestCase(CompletionWaffleTestMixin, SharedModuleStoreTest
module_system.descriptor_runtime = module.runtime._descriptor_system # pylint: disable=protected-access
module_system._services['library_tools'] = LibraryToolsService(self.store, self.user.id) # pylint: disable=protected-access
def get_module(descriptor):
"""Mocks module_system get_module function"""
def get_block(descriptor):
"""Mocks module_system get_block_for_descriptor function"""
sub_module_system = get_test_system(course_id=module.location.course_key)
sub_module_system.get_module = get_module
sub_module_system.get_block_for_descriptor = get_block
sub_module_system.descriptor_runtime = descriptor._runtime # pylint: disable=protected-access
descriptor.bind_for_student(sub_module_system, self.user.id)
return descriptor
module_system.get_module = get_module
module_system.get_block_for_descriptor = get_block
module.xmodule_runtime = module_system
def test_completion_service(self):