refactor: convert course_module term to course_block

This commit is contained in:
0x29a
2022-10-27 03:24:30 +02:00
committed by Piotr Surowiec
parent d3fee38a37
commit 83396ffb07
62 changed files with 335 additions and 335 deletions

View File

@@ -103,7 +103,7 @@ class AboutTestCase(LoginEnrollmentTestCase, SharedModuleStoreTestCase, EventTra
@override_settings(COURSE_ABOUT_VISIBILITY_PERMISSION="see_about_page")
def test_visible_about_page_settings(self):
"""
Verify that the About Page honors the permission settings in the course module
Verify that the About Page honors the permission settings in the course block
"""
url = reverse('about_course', args=[str(self.course_with_about.id)])
resp = self.client.get(url)

View File

@@ -367,7 +367,7 @@ class CourseInstantiationTests(ModuleStoreTestCase):
@ddt.data(*itertools.product(range(5), [None, 0, 5]))
@ddt.unpack
def test_repeated_course_module_instantiation(self, loops, course_depth):
def test_repeated_course_block_instantiation(self, loops, course_depth):
with modulestore().default_store(ModuleStoreEnum.Type.split):
course = CourseFactory.create()
@@ -385,7 +385,7 @@ class CourseInstantiationTests(ModuleStoreTestCase):
field_data_cache = FieldDataCache.cache_for_descriptor_descendents(
course.id, self.user, course, depth=course_depth
)
course_module = get_module_for_descriptor(
course_block = get_module_for_descriptor(
self.user,
fake_request,
course,
@@ -393,7 +393,7 @@ class CourseInstantiationTests(ModuleStoreTestCase):
course.id,
course=course
)
for chapter in course_module.get_children():
for chapter in course_block.get_children():
for section in chapter.get_children():
for item in section.get_children():
assert item.graded

View File

@@ -312,7 +312,7 @@ class SplitTestPosition(SharedModuleStoreTestCase):
self.client.login(username=self.student.username, password='test')
def test_changing_position_works(self):
# Make a mock FieldDataCache for this course, so we can get the course module
# Make a mock FieldDataCache for this course, so we can get the course block
mock_field_data_cache = FieldDataCache([self.course], self.course.id, self.student)
course = get_module_for_descriptor(
self.student,

View File

@@ -1109,7 +1109,7 @@ class BaseDueDateTests(ModuleStoreTestCase):
def test_backwards_compatibility(self):
# The test course being used has show_timezone = False in the policy file
# (and no due_date_display_format set). This is to test our backwards compatibility--
# in course_module's init method, the date_display_format will be set accordingly to
# in course_block's init method, the date_display_format will be set accordingly to
# remove the timezone.
course = self.set_up_course(due_date_display_format=None, show_timezone=False)
response = self.get_response(course)