Merge pull request #18996 from edx/mhughes/remove-checklist-waffles
Remove waffles gating permanent checklist features
This commit is contained in:
@@ -2,14 +2,13 @@
|
||||
This module contains various configuration settings via
|
||||
waffle switches for the contentstore app.
|
||||
"""
|
||||
from openedx.core.djangoapps.waffle_utils import CourseWaffleFlag, WaffleFlagNamespace, WaffleSwitchNamespace
|
||||
from openedx.core.djangoapps.waffle_utils import WaffleFlagNamespace, WaffleSwitchNamespace
|
||||
|
||||
# Namespace
|
||||
WAFFLE_NAMESPACE = u'studio'
|
||||
|
||||
# Switches
|
||||
ENABLE_ACCESSIBILITY_POLICY_PAGE = u'enable_policy_page'
|
||||
ENABLE_CHECKLISTS_PAGE = u'enable_checklists_page'
|
||||
|
||||
|
||||
def waffle():
|
||||
@@ -24,11 +23,3 @@ def waffle_flags():
|
||||
Returns the namespaced, cached, audited Waffle Flag class for Studio pages.
|
||||
"""
|
||||
return WaffleFlagNamespace(name=WAFFLE_NAMESPACE, log_prefix=u'Studio: ')
|
||||
|
||||
|
||||
# Flags
|
||||
ENABLE_CHECKLISTS_QUALITY = CourseWaffleFlag(
|
||||
waffle_namespace=waffle_flags(),
|
||||
flag_name=u'enable_checklists_quality',
|
||||
flag_undefined_default=False
|
||||
)
|
||||
|
||||
@@ -1,27 +0,0 @@
|
||||
"""Util methods for Waffle checks"""
|
||||
|
||||
from cms.djangoapps.contentstore.config.waffle import waffle, ENABLE_CHECKLISTS_PAGE, ENABLE_CHECKLISTS_QUALITY
|
||||
from student.roles import GlobalStaff
|
||||
|
||||
|
||||
def should_show_checklists_page():
|
||||
"""
|
||||
Determine if the ENABLE_CHECKLISTS_PAGE waffle switch is set
|
||||
"""
|
||||
|
||||
if waffle().is_enabled(ENABLE_CHECKLISTS_PAGE):
|
||||
return True
|
||||
|
||||
return False
|
||||
|
||||
|
||||
def should_show_checklists_quality(course_key):
|
||||
"""
|
||||
Determine if the ENABLE_CHECKLISTS_QUALITY waffle flag is set
|
||||
and if the user is able to see it
|
||||
"""
|
||||
|
||||
if ENABLE_CHECKLISTS_QUALITY.is_enabled(course_key):
|
||||
return True
|
||||
|
||||
return False
|
||||
Reference in New Issue
Block a user