diff --git a/common/test/acceptance/tests/lms/test_lms_instructor_dashboard.py b/common/test/acceptance/tests/lms/test_lms_instructor_dashboard.py index 1cf4dd3ddd..0b1fc27b18 100644 --- a/common/test/acceptance/tests/lms/test_lms_instructor_dashboard.py +++ b/common/test/acceptance/tests/lms/test_lms_instructor_dashboard.py @@ -416,8 +416,9 @@ class CertificatesTest(BaseInstructorDashboardTest): """ Scenario: On the Certificates tab of the Instructor Dashboard, Generate Certificates button is visible. Given that I am on the Certificates tab on the Instructor Dashboard - Then I see 'Generate Certificates' button - And when I click on 'Generate Certificates' button + And the instructor-generation feature flag has been enabled + Then I see a 'Generate Certificates' button + And when I click on the 'Generate Certificates' button Then I should see a status message and 'Generate Certificates' button should be disabled. """ self.assertTrue(self.certificates_section.generate_certificates_button.visible) diff --git a/lms/djangoapps/instructor/views/instructor_dashboard.py b/lms/djangoapps/instructor/views/instructor_dashboard.py index def8ae9fd5..965492fe7c 100644 --- a/lms/djangoapps/instructor/views/instructor_dashboard.py +++ b/lms/djangoapps/instructor/views/instructor_dashboard.py @@ -245,12 +245,15 @@ def _section_certificates(course): for cert_status in example_cert_status ) ) + instructor_generation_enabled = settings.FEATURES.get('CERTIFICATES_INSTRUCTOR_GENERATION', False) + return { 'section_key': 'certificates', 'section_display_name': _('Certificates'), 'example_certificate_status': example_cert_status, 'can_enable_for_course': can_enable_for_course, 'enabled_for_course': certs_api.cert_generation_enabled(course.id), + 'instructor_generation_enabled': instructor_generation_enabled, 'urls': { 'generate_example_certificates': reverse( 'generate_example_certificates', diff --git a/lms/envs/bok_choy.env.json b/lms/envs/bok_choy.env.json index 6d4587d6fe..db5c28e966 100644 --- a/lms/envs/bok_choy.env.json +++ b/lms/envs/bok_choy.env.json @@ -66,6 +66,7 @@ "AUTH_USE_OPENID_PROVIDER": true, "CERTIFICATES_ENABLED": true, "CERTIFICATES_HTML_VIEW": true, + "CERTIFICATES_INSTRUCTOR_GENERATION": true, "MULTIPLE_ENROLLMENT_ROLES": true, "SOCIAL_SHARING_SETTINGS": { "CUSTOM_COURSE_URLS": true, diff --git a/lms/envs/common.py b/lms/envs/common.py index a030bf9e51..a30ae7fb8a 100644 --- a/lms/envs/common.py +++ b/lms/envs/common.py @@ -379,6 +379,9 @@ FEATURES = { # Certificates Web/HTML Views 'CERTIFICATES_HTML_VIEW': False, + # Batch-Generated Certificates from Instructor Dashboard + 'CERTIFICATES_INSTRUCTOR_GENERATION': False, + # Social Media Sharing on Student Dashboard 'SOCIAL_SHARING_SETTINGS': { # Note: Ensure 'CUSTOM_COURSE_URLS' has a matching value in cms/envs/common.py diff --git a/lms/templates/instructor/instructor_dashboard_2/certificates.html b/lms/templates/instructor/instructor_dashboard_2/certificates.html index 7789497b29..9180a304d6 100644 --- a/lms/templates/instructor/instructor_dashboard_2/certificates.html +++ b/lms/templates/instructor/instructor_dashboard_2/certificates.html @@ -56,26 +56,28 @@ % endif -
${_("The status for any active tasks appears in a table below.")}
-${_("The status for any active tasks appears in a table below.")}
+