Merge pull request #27487 from edx/mikix/fix-gated-content-check
fix: properly set contains_gated_content field on xblocks again
This commit is contained in:
@@ -103,6 +103,7 @@ FIELDS_ALLOWED_IN_AUTH_DENIED_CONTENT = [
|
||||
"descendants",
|
||||
"authorization_denial_reason",
|
||||
"authorization_denial_message",
|
||||
'contains_gated_content',
|
||||
]
|
||||
|
||||
|
||||
|
||||
@@ -304,17 +304,11 @@ class OutlineTabTestViews(BaseCourseHomeTests):
|
||||
chapter = ItemFactory.create(category='chapter', parent_location=course.location)
|
||||
sequential = ItemFactory.create(display_name='Test', category='sequential', graded=True, has_score=True,
|
||||
parent_location=chapter.location)
|
||||
problem1 = ItemFactory.create(category='problem', graded=True, has_score=True,
|
||||
parent_location=sequential.location)
|
||||
problem2 = ItemFactory.create(category='problem', graded=True, has_score=True,
|
||||
parent_location=sequential.location)
|
||||
ItemFactory.create(category='problem', graded=True, has_score=True, parent_location=sequential.location)
|
||||
ItemFactory.create(category='problem', graded=True, has_score=True, parent_location=sequential.location)
|
||||
sequential2 = ItemFactory.create(display_name='Ungraded', category='sequential',
|
||||
parent_location=chapter.location)
|
||||
problem3 = ItemFactory.create(category='problem', parent_location=sequential2.location)
|
||||
course.children = [chapter]
|
||||
chapter.children = [sequential, sequential2]
|
||||
sequential.children = [problem1, problem2]
|
||||
sequential2.children = [problem3]
|
||||
ItemFactory.create(category='problem', parent_location=sequential2.location)
|
||||
url = reverse('course-home-outline-tab', args=[course.id])
|
||||
|
||||
CourseEnrollment.enroll(self.user, course.id)
|
||||
|
||||
Reference in New Issue
Block a user