refactor: rename descriptor -> block within lms/djangoapps/course_api
Co-authored-by: Agrendalath <piotr@surowiec.it>
This commit is contained in:
committed by
Agrendalath
parent
c80fba689a
commit
a0d23b20f5
@@ -33,7 +33,7 @@ class StudentViewTransformer(BlockStructureTransformer):
|
||||
for block_key in block_structure.topological_traversal():
|
||||
block = block_structure.get_xblock(block_key)
|
||||
|
||||
# We're iterating through descriptors (not bound to a user) that are
|
||||
# We're iterating through blocks (not bound to a user) that are
|
||||
# given to us by the modulestore. The reason we look at
|
||||
# block.__class__ is to avoid the XModuleDescriptor -> XModule
|
||||
# proxying that would happen if we just examined block directly,
|
||||
|
||||
@@ -163,8 +163,8 @@ class TestCourseDetailSerializer(TestCourseSerializer): # lint-amnesty, pylint:
|
||||
super().setUp()
|
||||
|
||||
# update the expected_data to include the 'overview' data.
|
||||
about_descriptor = XBlock.load_class('about')
|
||||
overview_template = about_descriptor.get_template('overview.yaml')
|
||||
about_block = XBlock.load_class('about')
|
||||
overview_template = about_block.get_template('overview.yaml')
|
||||
self.expected_data['overview'] = overview_template.get('data')
|
||||
|
||||
# override test case
|
||||
|
||||
@@ -226,8 +226,8 @@ class ProgressTabView(RetrieveAPIView):
|
||||
user_grade = course_grade.percent
|
||||
user_has_passing_grade = user_grade >= course.lowest_passing_grade
|
||||
|
||||
descriptor = modulestore().get_course(course_key)
|
||||
grading_policy = descriptor.grading_policy
|
||||
block = modulestore().get_course(course_key)
|
||||
grading_policy = block.grading_policy
|
||||
verification_status = IDVerificationService.user_status(student)
|
||||
verification_link = None
|
||||
if verification_status['status'] is None or verification_status['status'] == 'expired':
|
||||
|
||||
Reference in New Issue
Block a user