From cdebf2f44128d781e615fc0152a25f57694f8c87 Mon Sep 17 00:00:00 2001 From: Anna Date: Wed, 7 Feb 2024 17:07:51 -0500 Subject: [PATCH 1/2] Program certificate for different program tupes --- cms/models.py | 1 + cms/templates/certificate_page.html | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/cms/models.py b/cms/models.py index 97ad9fb235..14e2bc815e 100644 --- a/cms/models.py +++ b/cms/models.py @@ -452,6 +452,7 @@ def get_context(self, request, *args, **kwargs): "end_date": end_date, "CEUs": CEUs, "is_program_certificate": is_program_certificate, + "program_type": self.parent.program.program_type if is_program_certificate else "" } else: raise Http404() diff --git a/cms/templates/certificate_page.html b/cms/templates/certificate_page.html index d4c85adec7..c290a9d835 100755 --- a/cms/templates/certificate_page.html +++ b/cms/templates/certificate_page.html @@ -66,7 +66,7 @@

Congratulations, {{ learner_name }}!

This is to certify that {{ learner_name }} - has successfully completed {% if is_program_certificate %}all courses and received passing grades to earn a MicroMasters program certificate in{% endif %} + has successfully completed {% if is_program_certificate %}all courses and received passing grades to earn a {{ program_type }} program certificate in{% endif %} {{ product_name }} {% if is_program_certificate %} a program of study offered by MITx, an online learning initiative of the Massachusetts Institute of Technology
From 296bfae79711cba53a5173cb0b4ac25ddd5944e5 Mon Sep 17 00:00:00 2001 From: Anna Date: Wed, 7 Feb 2024 17:15:12 -0500 Subject: [PATCH 2/2] format --- cms/models.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/cms/models.py b/cms/models.py index 14e2bc815e..c210539a45 100644 --- a/cms/models.py +++ b/cms/models.py @@ -452,7 +452,9 @@ def get_context(self, request, *args, **kwargs): "end_date": end_date, "CEUs": CEUs, "is_program_certificate": is_program_certificate, - "program_type": self.parent.program.program_type if is_program_certificate else "" + "program_type": self.parent.program.program_type + if is_program_certificate + else "", } else: raise Http404()