Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
E
edx-platform-release
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
1
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Package Registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Hsin-Yu Chien
edx-platform-release
Commits
ed6e4645
Commit
ed6e4645
authored
9 years ago
by
Afeef Janjua
Browse files
Options
Downloads
Patches
Plain Diff
allow reverification for pending status ('must_retry', 'submitted')
parent
f475200a
Loading
Loading
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
AUTHORS
+1
-0
1 addition, 0 deletions
AUTHORS
lms/djangoapps/verify_student/tests/test_views.py
+11
-3
11 additions, 3 deletions
lms/djangoapps/verify_student/tests/test_views.py
lms/djangoapps/verify_student/views.py
+5
-1
5 additions, 1 deletion
lms/djangoapps/verify_student/views.py
with
17 additions
and
4 deletions
AUTHORS
+
1
−
0
View file @
ed6e4645
...
...
@@ -255,3 +255,4 @@ Douglas Hall <dhall@edx.org>
Awais Jibran <awaisdar001@gmail.com>
Muhammad Rehan <muhammadrehan69@gmail.com>
Shawn Milochik <shawn@milochik.com>
Afeef Janjua <janjua.afeef@gmail.com>
This diff is collapsed.
Click to expand it.
lms/djangoapps/verify_student/tests/test_views.py
+
11
−
3
View file @
ed6e4645
...
...
@@ -1870,14 +1870,22 @@ class TestReverifyView(TestCase):
# Allow the student to reverify
self
.
_assert_can_reverify
()
def
test_reverify_view_cannot_reverify_pending
(
self
):
def
test_reverify_view_can_reverify_pending
(
self
):
"""
Test that the user can still re-verify even if the previous photo
verification is in pending state.
A photo verification is considered in pending state when the user has
either submitted the photo verification (status in database:
'
submitted
'
)
or photo verification submission failed (status in database:
'
must_retry
'
).
"""
# User has submitted a verification attempt, but Software Secure has not yet responded
attempt
=
SoftwareSecurePhotoVerification
.
objects
.
create
(
user
=
self
.
user
)
attempt
.
mark_ready
()
attempt
.
submit
()
# Can
not
reverify because an attempt has already been submitted.
self
.
_assert_can
not
_reverify
()
# Can re
-
verify because an attempt has already been submitted.
self
.
_assert_can_reverify
()
def
test_reverify_view_cannot_reverify_approved
(
self
):
# Submitted attempt has been approved
...
...
This diff is collapsed.
Click to expand it.
lms/djangoapps/verify_student/views.py
+
5
−
1
View file @
ed6e4645
...
...
@@ -1350,7 +1350,11 @@ class ReverifyView(View):
Backbone views used in the initial verification flow.
"""
status
,
_
=
SoftwareSecurePhotoVerification
.
user_status
(
request
.
user
)
if
status
in
[
"
must_reverify
"
,
"
expired
"
]:
# 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
"
]:
context
=
{
"
user_full_name
"
:
request
.
user
.
profile
.
name
,
"
platform_name
"
:
settings
.
PLATFORM_NAME
,
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment