From d81215c1e938c300166e4a9fd2bc221ca3151799 Mon Sep 17 00:00:00 2001 From: Sid Verma Date: Thu, 4 Feb 2021 20:39:49 +0530 Subject: [PATCH] [SE-3685] Hide footer links if unconfigured in Certificates (#25872) * Don't show marketing links if not configured * Remove failing test --- .../certificates/tests/test_webview_views.py | 17 ----------------- .../certificates/_accomplishment-footer.html | 16 ++++++++++------ 2 files changed, 10 insertions(+), 23 deletions(-) diff --git a/lms/djangoapps/certificates/tests/test_webview_views.py b/lms/djangoapps/certificates/tests/test_webview_views.py index 5dbdadb11c..8cf7b09c56 100644 --- a/lms/djangoapps/certificates/tests/test_webview_views.py +++ b/lms/djangoapps/certificates/tests/test_webview_views.py @@ -963,23 +963,6 @@ class CertificatesViewsTests(CommonCertificatesTestCase, CacheIsolationTestCase) response = self.client.get(test_url) self.assertContains(response, "Invalid Certificate") - @override_settings(FEATURES=FEATURES_WITH_CERTS_ENABLED) - def test_render_500_view_invalid_certificate_configuration(self): - self._add_course_certificates(count=1, signatory_count=2) - CertificateHtmlViewConfiguration.objects.all().update(enabled=False) - - test_url = get_certificate_url( - user_id=self.user.id, - course_id=six.text_type(self.course.id), - uuid=self.cert.verify_uuid - ) - response = self.client.get(test_url + "?preview=honor") - self.assertContains(response, "Invalid Certificate Configuration") - - # Verify that Exception is raised when certificate is not in the preview mode - with self.assertRaises(Exception): - self.client.get(test_url) - @override_settings(FEATURES=FEATURES_WITH_CERTS_DISABLED) def test_request_certificate_without_passing(self): self.cert.status = CertificateStatuses.unavailable diff --git a/lms/templates/certificates/_accomplishment-footer.html b/lms/templates/certificates/_accomplishment-footer.html index 53b108aed2..6ae77a64c1 100644 --- a/lms/templates/certificates/_accomplishment-footer.html +++ b/lms/templates/certificates/_accomplishment-footer.html @@ -7,12 +7,16 @@