diff --git a/lms/djangoapps/verify_student/tests/test_views.py b/lms/djangoapps/verify_student/tests/test_views.py index 1638f7c30ca974d7760e3bff24acc0f7e485cfd0..ec0b7c7c343bd2271fb3788f8b025ebc5c95678b 100644 --- a/lms/djangoapps/verify_student/tests/test_views.py +++ b/lms/djangoapps/verify_student/tests/test_views.py @@ -1875,6 +1875,12 @@ class TestReverifyView(TestCase): success = self.client.login(username=self.USERNAME, password=self.PASSWORD) self.assertTrue(success, msg="Could not log in") + def test_reverify_view_can_do_initial_verification(self): + """ + Test that a User can use reverify link for initial verification. + """ + self._assert_can_reverify() + def test_reverify_view_can_reverify_denied(self): # User has a denied attempt, so can reverify attempt = SoftwareSecurePhotoVerification.objects.create(user=self.user) diff --git a/lms/djangoapps/verify_student/views.py b/lms/djangoapps/verify_student/views.py index fcd45a52a3909794a2fbbaee0f1b43ae29277890..516a52a8e19c1b1c8f9d78f11fa724daa10036e6 100644 --- a/lms/djangoapps/verify_student/views.py +++ b/lms/djangoapps/verify_student/views.py @@ -1358,10 +1358,12 @@ class ReverifyView(View): """ status, _ = SoftwareSecurePhotoVerification.user_status(request.user) - # If the verification process is still ongoing i.e. the status for photo - # verification is either 'submitted' or 'must_retry' then its marked as - # 'pending' - if status in ["must_reverify", "expired", "pending"]: + # If the user has no initial verification or if the verification + # process is still ongoing 'pending' or expired then allow the user to + # submit the photo verification. + # A photo verification is marked as 'pending' if its status is either + # 'submitted' or 'must_retry'. + if status in ["none", "must_reverify", "expired", "pending"]: context = { "user_full_name": request.user.profile.name, "platform_name": settings.PLATFORM_NAME,