diff --git a/lms/djangoapps/shoppingcart/models.py b/lms/djangoapps/shoppingcart/models.py index 92da04594c..699e698827 100644 --- a/lms/djangoapps/shoppingcart/models.py +++ b/lms/djangoapps/shoppingcart/models.py @@ -2,6 +2,7 @@ from datetime import datetime import pytz import logging import smtplib +import textwrap from django.db import models from django.conf import settings @@ -347,8 +348,9 @@ class CertificateItem(OrderItem): item.status = order.status item.qty = 1 item.unit_cost = cost - item.line_desc = _("Certificate of Achievement, {mode_name} for course {course_id}").format(mode_name=mode_info.name, - course_id=course_id) + course_name = course_from_id(course_id).display_name + item.line_desc = _("Certificate of Achievement, {mode_name} for course {course}").format(mode_name=mode_info.name, + course=course_name) item.currency = currency order.currency = currency order.save() @@ -372,6 +374,7 @@ class CertificateItem(OrderItem): @property def additional_instruction_text(self): - return _("Note - you have up to 2 weeks into the course to unenroll from the Verified Certificate option \ - and receive a full refund. To receive your refund, contact {billing_email}.").format( - billing_email=settings.PAYMENT_SUPPORT_EMAIL) + return textwrap.dedent( + _("Note - you have up to 2 weeks into the course to unenroll from the Verified Certificate option \ + and receive a full refund. To receive your refund, contact {billing_email}.").format( + billing_email=settings.PAYMENT_SUPPORT_EMAIL)) diff --git a/lms/templates/shoppingcart/verified_cert_receipt.html b/lms/templates/shoppingcart/verified_cert_receipt.html index e0a9bec23b..0c0485b100 100644 --- a/lms/templates/shoppingcart/verified_cert_receipt.html +++ b/lms/templates/shoppingcart/verified_cert_receipt.html @@ -1,6 +1,6 @@ <%! from django.utils.translation import ugettext as _ %> <%! from django.core.urlresolvers import reverse %> -<%! from django.conf import settings %> +<%! from student.views import course_from_id %> <%inherit file="../main.html" /> <%block name="bodyclass">register verification-process step-confirmation @@ -13,6 +13,8 @@ ${notification} % endif +<% course_id = order_items[0].course_id %> +<% course = course_from_id(course_id) %>
@@ -21,7 +23,7 @@

${_("You are registering for")} - [Course Name] + ${course.display_name} @@ -103,9 +105,9 @@ % for item in order_items: ${item.line_desc} - Starts: [date] + ${_("Starts: {start_date}").format(start_date=course.start_date_text)} @@ -114,7 +116,7 @@

@@ -178,7 +180,6 @@ % endif -<%doc>

${_("Billing details:")}

@@ -189,7 +190,6 @@ ${order.bill_to_country.upper()}

-