Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
edx-platform
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
edx
edx-platform
Commits
0b93054c
Commit
0b93054c
authored
Nov 20, 2015
by
zubair-arbi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Allow user to submit initial verification through reverify flow
ECOM-2933
parent
6a76db08
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
4 deletions
+12
-4
lms/djangoapps/verify_student/tests/test_views.py
+6
-0
lms/djangoapps/verify_student/views.py
+6
-4
No files found.
lms/djangoapps/verify_student/tests/test_views.py
View file @
0b93054c
...
...
@@ -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
)
...
...
lms/djangoapps/verify_student/views.py
View file @
0b93054c
...
...
@@ -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
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment