Send email for the failed verification status
Support Team need to handle bulk of tickets every month about the verification status of learners.To avoid it, suitable changes have done to send verification email to the learner. LEARNER-1488
This commit is contained in:
@@ -1812,6 +1812,7 @@ class TestPhotoVerificationResultsCallback(ModuleStoreTestCase):
|
||||
self.assertEqual(attempt.error_code, u'Your photo doesn\'t meet standards.')
|
||||
self.assertEqual(attempt.error_msg, u'"Invalid photo"')
|
||||
self.assertEquals(response.content, 'OK!')
|
||||
self.assertEqual(len(mail.outbox), 1)
|
||||
|
||||
@mock.patch(
|
||||
'lms.djangoapps.verify_student.ssencrypt.has_valid_signature',
|
||||
|
||||
@@ -1179,6 +1179,19 @@ def results_callback(request):
|
||||
log.debug("Denying verification for %s", receipt_id)
|
||||
attempt.deny(json.dumps(reason), error_code=error_code)
|
||||
status = "denied"
|
||||
email_template_context['reason'] = reason
|
||||
email_template_context['reverify_url'] = reverse("verify_student_reverify")
|
||||
email_template_context['faq_url'] = configuration_helpers.get_value(
|
||||
'ID_VERIFICATION_SUPPORT_LINK',
|
||||
settings.SUPPORT_SITE_LINK
|
||||
)
|
||||
context['email_template_context'] = email_template_context
|
||||
context['subject'] = _("Your {platform_name} Verification Has Been Denied").format(
|
||||
platform_name=settings.PLATFORM_NAME
|
||||
)
|
||||
context['message'] = 'emails/failed_verification_email.txt'
|
||||
send_verification_status_email(context)
|
||||
|
||||
elif result == "SYSTEM FAIL":
|
||||
log.debug("System failure for %s -- resetting to must_retry", receipt_id)
|
||||
attempt.system_error(json.dumps(reason), error_code=error_code)
|
||||
|
||||
@@ -294,6 +294,7 @@ MKTG_URL_LINK_MAP.update(ENV_TOKENS.get('MKTG_URL_LINK_MAP', {}))
|
||||
|
||||
# Intentional defaults.
|
||||
SUPPORT_SITE_LINK = ENV_TOKENS.get('SUPPORT_SITE_LINK', SUPPORT_SITE_LINK)
|
||||
ID_VERIFICATION_SUPPORT_LINK = ENV_TOKENS.get('ID_VERIFICATION_SUPPORT_LINK', SUPPORT_SITE_LINK)
|
||||
PASSWORD_RESET_SUPPORT_LINK = ENV_TOKENS.get('PASSWORD_RESET_SUPPORT_LINK', SUPPORT_SITE_LINK)
|
||||
ACTIVATION_EMAIL_SUPPORT_LINK = ENV_TOKENS.get(
|
||||
'ACTIVATION_EMAIL_SUPPORT_LINK', SUPPORT_SITE_LINK
|
||||
|
||||
@@ -2368,6 +2368,7 @@ MKTG_URL_LINK_MAP = {
|
||||
STATIC_TEMPLATE_VIEW_DEFAULT_FILE_EXTENSION = 'html'
|
||||
|
||||
SUPPORT_SITE_LINK = ''
|
||||
ID_VERIFICATION_SUPPORT_LINK = ''
|
||||
PASSWORD_RESET_SUPPORT_LINK = ''
|
||||
ACTIVATION_EMAIL_SUPPORT_LINK = ''
|
||||
|
||||
|
||||
11
lms/templates/emails/failed_verification_email.txt
Normal file
11
lms/templates/emails/failed_verification_email.txt
Normal file
@@ -0,0 +1,11 @@
|
||||
<%! from django.utils.translation import ugettext as _ %>
|
||||
|
||||
${_("Sorry! The photos you submitted for ID verification were not accepted, for the following reason(s):")}
|
||||
|
||||
${_("The photo(s) of you: {reason}").format(reason=reason)}
|
||||
|
||||
${_("Resubmit Verification: {reverify_url}").format(reverify_url=reverify_url)}
|
||||
$(_("ID Verification FAQ: {faq_url}").format(faq_url=faq_url)
|
||||
|
||||
${_("Thank you,")}
|
||||
${_("The {platform_name} team").format(platform_name=platform_name)}
|
||||
@@ -7,5 +7,4 @@ ${_("Congratulations! Your ID verification process was successful.")}
|
||||
${_("Your verification is effective for one year. It will expire on {expiry_date}").format(expiry_date=expiry_date)}
|
||||
|
||||
${_("Thank you,")}
|
||||
|
||||
${_("The {platform_name} team").format(platform_name=platform_name)}
|
||||
|
||||
Reference in New Issue
Block a user