From add5c1130b65706e7cb4076e6f673f06490f770a Mon Sep 17 00:00:00 2001 From: "Albert (AJ) St. Aubin" Date: Tue, 15 Jun 2021 14:36:00 -0400 Subject: [PATCH] feature: Update text for downloadable certs --- common/djangoapps/student/tests/test_certificates.py | 7 +++---- lms/djangoapps/courseware/tests/test_views.py | 8 ++++---- .../dashboard/_dashboard_certificate_information.html | 6 +++--- 3 files changed, 10 insertions(+), 11 deletions(-) diff --git a/common/djangoapps/student/tests/test_certificates.py b/common/djangoapps/student/tests/test_certificates.py index 68935bd93d..6f01490386 100644 --- a/common/djangoapps/student/tests/test_certificates.py +++ b/common/djangoapps/student/tests/test_certificates.py @@ -81,7 +81,7 @@ class CertificateDisplayTestBase(SharedModuleStoreTestCase): Inspect the dashboard to see if a certificate can be downloaded. """ response = self.client.get(reverse('dashboard')) - self.assertContains(response, 'Download Your ID Verified') + self.assertContains(response, 'Download my') self.assertContains(response, self.DOWNLOAD_URL) def _check_can_download_certificate_no_id(self): @@ -91,7 +91,6 @@ class CertificateDisplayTestBase(SharedModuleStoreTestCase): """ response = self.client.get(reverse('dashboard')) self.assertContains(response, 'Download') - self.assertContains(response, '(PDF)') self.assertContains(response, self.DOWNLOAD_URL) def _check_can_not_download_certificate(self): @@ -100,8 +99,8 @@ class CertificateDisplayTestBase(SharedModuleStoreTestCase): """ response = self.client.get(reverse('dashboard')) self.assertNotContains(response, 'View Test_Certificate') - self.assertNotContains(response, 'Download Your Test_Certificate (PDF)') - self.assertNotContains(response, 'Download Test_Certificate (PDF)') + self.assertNotContains(response, 'Download my Test_Certificate') + self.assertNotContains(response, 'Download my Test_Certificate') self.assertNotContains(response, self.DOWNLOAD_URL) diff --git a/lms/djangoapps/courseware/tests/test_views.py b/lms/djangoapps/courseware/tests/test_views.py index 3933229472..0727eba046 100644 --- a/lms/djangoapps/courseware/tests/test_views.py +++ b/lms/djangoapps/courseware/tests/test_views.py @@ -1484,8 +1484,8 @@ class ProgressPageTests(ProgressPageBaseTests): self.store.update_item(self.course, self.user.id) resp = self._get_progress_page() - self.assertNotContains(resp, "View Your Certificate") - self.assertNotContains(resp, "You can now view your certificate") + self.assertNotContains(resp, "View my Certificate") + self.assertNotContains(resp, "You can now View my Certificate") self.assertContains(resp, "Your certificate is available") self.assertContains(resp, "earned a certificate for this course.") @@ -1875,8 +1875,8 @@ class ProgressPageTests(ProgressPageBaseTests): self.assertNotContains(resp, 'Request Certificate') self.assertContains(resp, 'Your certificate has been invalidated') self.assertContains(resp, 'Please contact your course team if you have any questions.') - self.assertNotContains(resp, 'View Your Certificate') - self.assertNotContains(resp, 'Download Your Certificate') + self.assertNotContains(resp, 'View my Certificate') + self.assertNotContains(resp, 'Download my Certificate') def generate_certificate(self, url, mode): """ Dry method to generate certificate. """ diff --git a/lms/templates/dashboard/_dashboard_certificate_information.html b/lms/templates/dashboard/_dashboard_certificate_information.html index 3c2f988355..5169845562 100644 --- a/lms/templates/dashboard/_dashboard_certificate_information.html +++ b/lms/templates/dashboard/_dashboard_certificate_information.html @@ -91,21 +91,21 @@ else:
  • - ${_("Download {cert_name_short} (PDF)").format(cert_name_short=cert_name_short,)} + ${_("Download my {cert_name_short}").format(cert_name_short=cert_name_short,)}
  • % elif cert_status['status'] == 'downloadable' and enrollment.mode == 'verified' and cert_status['mode'] == 'honor':
  • - ${_("Download Your {cert_name_short} (PDF)").format(cert_name_short=cert_name_short)} + ${_("Download my {cert_name_short}").format(cert_name_short=cert_name_short)}
  • % elif cert_status['status'] == 'downloadable' and enrollment.mode in CourseMode.VERIFIED_MODES:
  • - ${_("Download Your ID Verified {cert_name_short} (PDF)").format(cert_name_short=cert_name_short)} + ${_("Download my {cert_name_short}").format(cert_name_short=cert_name_short)}
  • % endif