Skip to content
Snippets Groups Projects
Unverified Commit 7dacd54d authored by Matthew Piatetsky's avatar Matthew Piatetsky Committed by GitHub
Browse files

Merge pull request #20132 from edx/REVMI-92

Clarify partially enabled state in the FBE support tool
parents dc156e4f d9096e43
No related branches found
No related tags found
No related merge requests found
......@@ -46,12 +46,17 @@ class FeatureBasedEnrollmentsSupportView(View):
course = CourseOverview.objects.values('display_name').get(id=key)
duration_config = CourseDurationLimitConfig.current(course_key=key)
gating_config = ContentTypeGatingConfig.current(course_key=key)
misconfigured = duration_config.enabled != gating_config.enabled
partially_enabled = duration_config.enabled != gating_config.enabled
if misconfigured:
enabled = 'Partial'
enabled_as_of = 'Misconfigured'
reason = 'Misconfiguration'
if partially_enabled:
if duration_config.enabled:
enabled = 'Course Duration Limits Only'
enabled_as_of = str(duration_config.enabled_as_of) if duration_config.enabled_as_of else 'N/A'
reason = 'Course duration limits are enabled for this course, but content type gating is disabled.'
elif gating_config.enabled:
enabled = 'Content Type Gating Only'
enabled_as_of = str(gating_config.enabled_as_of) if gating_config.enabled_as_of else 'N/A'
reason = 'Content type gating is enabled for this course, but course duration limits are disabled.'
else:
enabled = duration_config.enabled or False
enabled_as_of = str(duration_config.enabled_as_of) if duration_config.enabled_as_of else 'N/A'
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment