Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
E
edx-platform-release
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
1
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Package Registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Admin message
code.vt.edu will be down for maintenance from 0530-0630 EDT Wednesday, April 9th
Show more breadcrumbs
Hsin-Yu Chien
edx-platform-release
Commits
0e187f85
Commit
0e187f85
authored
5 years ago
by
Calen Pennington
Browse files
Options
Downloads
Patches
Plain Diff
Only attempt to use the parent's CONTENT_GATING_PARTITION settings if there is actually a parent
parent
cc985a40
Loading
Loading
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
openedx/features/content_type_gating/field_override.py
+5
-3
5 additions, 3 deletions
openedx/features/content_type_gating/field_override.py
with
5 additions
and
3 deletions
openedx/features/content_type_gating/field_override.py
+
5
−
3
View file @
0e187f85
...
...
@@ -52,9 +52,11 @@ class ContentTypeGatingFieldOverride(FieldOverrideProvider):
# For Feature Based Enrollments, we want to inherit group access configurations
# from parent blocks. The use case is to allow granting access
# to all graded problems in a unit at the unit level
merged_group_access
=
block
.
get_parent
().
merged_group_access
if
merged_group_access
and
CONTENT_GATING_PARTITION_ID
in
merged_group_access
:
return
original_group_access
parent
=
block
.
get_parent
()
if
parent
is
not
None
:
merged_group_access
=
parent
.
merged_group_access
if
merged_group_access
and
CONTENT_GATING_PARTITION_ID
in
merged_group_access
:
return
original_group_access
original_group_access
.
setdefault
(
CONTENT_GATING_PARTITION_ID
,
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment