diff --git a/lms/djangoapps/verify_student/models.py b/lms/djangoapps/verify_student/models.py index 18ac4313d9..10bd7ad9ae 100644 --- a/lms/djangoapps/verify_student/models.py +++ b/lms/djangoapps/verify_student/models.py @@ -299,7 +299,10 @@ class PhotoVerification(StatusModel): return ('none', error_msg) if attempt.created_at < cls._earliest_allowed_date(): - return ('expired', error_msg) + return ( + 'expired', + _("Your {platform_name} verification has expired.").format(platform_name=settings.PLATFORM_NAME) + ) # If someone is denied their original verification attempt, they can try to reverify. # However, if a midcourse reverification is denied, that denial is permanent. @@ -742,7 +745,7 @@ class SoftwareSecurePhotoVerification(PhotoVerification): ("photoIdReasons", "Text not clear"): _("We couldn't read your name from your photo ID image."), ("generalReasons", "Name mismatch"): _("The name associated with your account and the name on your ID do not match."), ("userPhotoReasons", "Image not clear"): _("The image of your face was not clear."), - ("userPhotoReasons", "Face out of view"): _("Your face was not visible in your self-photo"), + ("userPhotoReasons", "Face out of view"): _("Your face was not visible in your self-photo."), } try: diff --git a/lms/djangoapps/verify_student/tests/test_models.py b/lms/djangoapps/verify_student/tests/test_models.py index 4f1b3beecf..cbbc3160d7 100644 --- a/lms/djangoapps/verify_student/tests/test_models.py +++ b/lms/djangoapps/verify_student/tests/test_models.py @@ -382,6 +382,14 @@ class TestPhotoVerification(TestCase): reverify_status = SoftwareSecurePhotoVerification.user_status(user=user, window=window) self.assertEquals(reverify_status, ('denied', '')) + reverify_attempt.status = 'approved' + # pylint: disable=protected-access + reverify_attempt.created_at = SoftwareSecurePhotoVerification._earliest_allowed_date() + timedelta(days=-1) + reverify_attempt.save() + reverify_status = SoftwareSecurePhotoVerification.user_status(user=user, window=window) + message = 'Your {platform_name} verification has expired.'.format(platform_name=settings.PLATFORM_NAME) + self.assertEquals(reverify_status, ('expired', message)) + def test_display(self): user = UserFactory.create() window = MidcourseReverificationWindowFactory() diff --git a/lms/templates/dashboard/_dashboard_status_verification.html b/lms/templates/dashboard/_dashboard_status_verification.html index 65ccedb323..b605b35e73 100644 --- a/lms/templates/dashboard/_dashboard_status_verification.html +++ b/lms/templates/dashboard/_dashboard_status_verification.html @@ -38,23 +38,23 @@ %endif -%if verification_status == 'must_reverify': +%if verification_status in ['must_reverify', 'expired']:
${_("If you fail to pass a verification attempt before your course ends, you will not receive a verified certificate.")}
+${_("To receive a verified certificate, you have to submit a new photo of yourself and your government-issued photo ID before the course ends.")}