diff --git a/lms/djangoapps/certificates/views/webview.py b/lms/djangoapps/certificates/views/webview.py index 22d247bd8a..64894780eb 100644 --- a/lms/djangoapps/certificates/views/webview.py +++ b/lms/djangoapps/certificates/views/webview.py @@ -253,16 +253,16 @@ def _update_course_context(request, context, course, course_key, platform_name): if CertificateGenerationCourseSetting.is_language_specific_templates_enabled_for_course(course_key): fields = ['start', 'end', 'max_effort', 'content_language'] course_run_data = get_course_run_details(course_key, fields) - if course_run_data['start'] and course_run_data['end'] and course_run_data['max_effort']: + if course_run_data.get('start') and course_run_data.get('end') and course_run_data.get('max_effort'): # Calculate duration of the course run in weeks, multiplied by max_effort for total Hours of Effort try: - start = parser.parse(course_run_data['start']) - end = parser.parse(course_run_data['end']) - max_effort = int(course_run_data['max_effort']) + start = parser.parse(course_run_data.get('start')) + end = parser.parse(course_run_data.get('end')) + max_effort = int(course_run_data.get('max_effort')) context['hours_of_effort'] = ((end - start).days / 7) * max_effort except ValueError: log.exception('Error occurred while parsing course run details') - context['content_language'] = course_run_data['content_language'] + context['content_language'] = course_run_data.get('content_language') def _update_social_context(request, context, course, user, user_certificate, platform_name): diff --git a/lms/templates/certificates/_accomplishment-rendering.html b/lms/templates/certificates/_accomplishment-rendering.html index 05c67ea26a..204b983d0a 100644 --- a/lms/templates/certificates/_accomplishment-rendering.html +++ b/lms/templates/certificates/_accomplishment-rendering.html @@ -15,10 +15,10 @@ course_mode_class = course_mode if course_mode else ''
- + Image for course mode of type ${course_mode_class} - ${document_title} + ${document_title}
@@ -93,7 +93,7 @@ course_mode_class = course_mode if course_mode else ''
Awarded to:
- + Recipient Image

${accomplishment_copy_name | h}

diff --git a/lms/templates/certificates/_edx-accomplishment-print-help.html b/lms/templates/certificates/_edx-accomplishment-print-help.html new file mode 100644 index 0000000000..3b72e63bd2 --- /dev/null +++ b/lms/templates/certificates/_edx-accomplishment-print-help.html @@ -0,0 +1,17 @@ +<%page expression_filter="h"/> +<%! +from django.utils.translation import ugettext as _ +from openedx.core.djangolib.markup import HTML, Text +%> +
+
+
+ +
+
+
\ No newline at end of file diff --git a/themes/edx.org/lms/templates/certificates/_about-accomplishments.html b/themes/edx.org/lms/templates/certificates/_about-accomplishments.html new file mode 100644 index 0000000000..3794170e25 --- /dev/null +++ b/themes/edx.org/lms/templates/certificates/_about-accomplishments.html @@ -0,0 +1,9 @@ +<%page expression_filter="h"/> +<%! +from django.utils.translation import ugettext as _ +from openedx.core.djangolib.markup import HTML, Text +%> + \ No newline at end of file diff --git a/themes/edx.org/lms/templates/certificates/_about-edx.html b/themes/edx.org/lms/templates/certificates/_about-edx.html new file mode 100644 index 0000000000..4fd4610b6d --- /dev/null +++ b/themes/edx.org/lms/templates/certificates/_about-edx.html @@ -0,0 +1,14 @@ +<%page expression_filter="h"/> +<%! +from django.utils.translation import ugettext as _ +from openedx.core.djangolib.markup import HTML, Text +%> + \ No newline at end of file diff --git a/themes/edx.org/lms/templates/certificates/_accomplishment-banner.html b/themes/edx.org/lms/templates/certificates/_accomplishment-banner.html new file mode 100644 index 0000000000..04910c9e6f --- /dev/null +++ b/themes/edx.org/lms/templates/certificates/_accomplishment-banner.html @@ -0,0 +1,59 @@ +<%page expression_filter="h"/> +<%! +from django.utils.translation import ugettext as _ +from openedx.core.djangolib.markup import HTML, Text +%> +<% +accomplishment_course_title = accomplishment_copy_course_name +if certificate_data and certificate_data.get('course_title', ''): + accomplishment_course_title = certificate_data.get('course_title', '') +course_mode_class = course_mode if course_mode else '' +%> +
+
+ +
\ No newline at end of file diff --git a/themes/edx.org/lms/templates/certificates/_accomplishment-footer.html b/themes/edx.org/lms/templates/certificates/_accomplishment-footer.html new file mode 100644 index 0000000000..fa2c1a1af1 --- /dev/null +++ b/themes/edx.org/lms/templates/certificates/_accomplishment-footer.html @@ -0,0 +1,31 @@ +<%page expression_filter="h"/> +<%! +from django.utils.translation import ugettext as _ +from openedx.core.djangolib.markup import HTML, Text +%> + \ No newline at end of file