From 39295f194166cc091810db35f316c2606cab33b2 Mon Sep 17 00:00:00 2001 From: Chris Dodge Date: Mon, 9 Nov 2015 11:22:22 -0500 Subject: [PATCH] Add support for microsite overrides (template & configuration) for the ID Verification Status display on the dashboard --- lms/djangoapps/verify_student/models.py | 3 ++- lms/templates/dashboard.html | 3 ++- lms/templates/dashboard/_dashboard_status_verification.html | 3 ++- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/lms/djangoapps/verify_student/models.py b/lms/djangoapps/verify_student/models.py index 24a03c50e9..259c82a0fb 100644 --- a/lms/djangoapps/verify_student/models.py +++ b/lms/djangoapps/verify_student/models.py @@ -44,6 +44,7 @@ from xmodule.modulestore.django import modulestore from xmodule.modulestore.exceptions import ItemNotFoundError from xmodule_django.models import CourseKeyField +from microsite_configuration.templatetags.microsite import platform_name log = logging.getLogger(__name__) @@ -319,7 +320,7 @@ class PhotoVerification(StatusModel): if attempt.created_at < cls._earliest_allowed_date(): return ( 'expired', - _("Your {platform_name} verification has expired.").format(platform_name=settings.PLATFORM_NAME) + _("Your {platform_name} verification has expired.").format(platform_name=platform_name()) ) # If someone is denied their original verification attempt, they can try to reverify. diff --git a/lms/templates/dashboard.html b/lms/templates/dashboard.html index a54bb972dd..b7738fd989 100644 --- a/lms/templates/dashboard.html +++ b/lms/templates/dashboard.html @@ -7,6 +7,7 @@ import third_party_auth from third_party_auth import pipeline from microsite_configuration import microsite from django.core.urlresolvers import reverse +from microsite_configuration import microsite import json %> @@ -175,7 +176,7 @@ import json % endif - <%include file='dashboard/_dashboard_status_verification.html' /> + <%include file="${microsite.get_template_path('dashboard/_dashboard_status_verification.html')}" /> diff --git a/lms/templates/dashboard/_dashboard_status_verification.html b/lms/templates/dashboard/_dashboard_status_verification.html index 160a2ef93e..029474f10c 100644 --- a/lms/templates/dashboard/_dashboard_status_verification.html +++ b/lms/templates/dashboard/_dashboard_status_verification.html @@ -2,6 +2,7 @@ <%! from django.utils.translation import ugettext as _ from django.core.urlresolvers import reverse +from microsite_configuration.templatetags.microsite import platform_name %> %if verification_status == 'approved': @@ -39,7 +40,7 @@ from django.core.urlresolvers import reverse %if verification_status in ['must_reverify', 'expired']:
  • -${_("{platform_name} Verification Status").format(platform_name=settings.PLATFORM_NAME)} +${_("{platform_name} Verification Status").format(platform_name=platform_name())}
    ${verification_msg}