From 95460dd1439b969f35b5f3493428888a933f88bb Mon Sep 17 00:00:00 2001 From: Alex Dusenbery Date: Thu, 22 Jun 2017 17:53:45 -0400 Subject: [PATCH] EDUCATOR-514 | Hide the certificate_available_date field until we enable the feature. --- cms/djangoapps/models/settings/course_metadata.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/cms/djangoapps/models/settings/course_metadata.py b/cms/djangoapps/models/settings/course_metadata.py index f581fee3e7..e9475f1a90 100644 --- a/cms/djangoapps/models/settings/course_metadata.py +++ b/cms/djangoapps/models/settings/course_metadata.py @@ -5,6 +5,8 @@ from django.conf import settings from django.utils.translation import ugettext as _ from xblock.fields import Scope +from openedx.core.djangoapps.waffle_utils import WaffleSwitchNamespace + from xblock_django.models import XBlockStudioConfigurationFlag from xmodule.modulestore.django import modulestore @@ -101,6 +103,13 @@ class CourseMetadata(object): if not XBlockStudioConfigurationFlag.is_enabled(): filtered_list.append('allow_unsupported_xblocks') + # TODO: https://openedx.atlassian.net/browse/EDUCATOR-736 + # Before we roll out the auto-certs feature, move this to a good, shared + # place such that we're not repeating code found in LMS. + switches = WaffleSwitchNamespace(name=u'certificates', log_prefix=u'Certificates: ') + if not switches.is_enabled(u'instructor_paced_only'): + filtered_list.append('certificate_available_date') + return filtered_list @classmethod