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
b61df3af
Commit
b61df3af
authored
6 years ago
by
Zainab Amir
Browse files
Options
Downloads
Patches
Plain Diff
LEARNER-6944 Add new fields to SoftwareSecurePhotoVerification
parent
932d65d6
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
lms/djangoapps/verify_student/migrations/0011_add_fields_to_sspv.py
+25
-0
25 additions, 0 deletions
...apps/verify_student/migrations/0011_add_fields_to_sspv.py
lms/djangoapps/verify_student/models.py
+7
-0
7 additions, 0 deletions
lms/djangoapps/verify_student/models.py
with
32 additions
and
0 deletions
lms/djangoapps/verify_student/migrations/0011_add_fields_to_sspv.py
0 → 100644
+
25
−
0
View file @
b61df3af
# -*- coding: utf-8 -*-
# Generated by Django 1.11.16 on 2019-01-10 09:19
from
__future__
import
unicode_literals
from
django.db
import
migrations
,
models
class
Migration
(
migrations
.
Migration
):
dependencies
=
[
(
'
verify_student
'
,
'
0010_manualverification
'
),
]
operations
=
[
migrations
.
AddField
(
model_name
=
'
softwaresecurephotoverification
'
,
name
=
'
expiry_date
'
,
field
=
models
.
DateTimeField
(
blank
=
True
,
db_index
=
True
,
null
=
True
),
),
migrations
.
AddField
(
model_name
=
'
softwaresecurephotoverification
'
,
name
=
'
expiry_email_date
'
,
field
=
models
.
DateTimeField
(
blank
=
True
,
db_index
=
True
,
null
=
True
),
),
]
This diff is collapsed.
Click to expand it.
lms/djangoapps/verify_student/models.py
+
7
−
0
View file @
b61df3af
...
@@ -536,6 +536,13 @@ class SoftwareSecurePhotoVerification(PhotoVerification):
...
@@ -536,6 +536,13 @@ class SoftwareSecurePhotoVerification(PhotoVerification):
IMAGE_LINK_DURATION
=
5
*
60
*
60
*
24
# 5 days in seconds
IMAGE_LINK_DURATION
=
5
*
60
*
60
*
24
# 5 days in seconds
copy_id_photo_from
=
models
.
ForeignKey
(
"
self
"
,
null
=
True
,
blank
=
True
,
on_delete
=
models
.
CASCADE
)
copy_id_photo_from
=
models
.
ForeignKey
(
"
self
"
,
null
=
True
,
blank
=
True
,
on_delete
=
models
.
CASCADE
)
# Fields for functionality of sending email when verification expires
# expiry_date: The date when the SoftwareSecurePhotoVerification will expire
# expiry_email_date: This field is used to maintain a check for learners to which email
# to notify for expired verification is already sent.
expiry_date
=
models
.
DateTimeField
(
null
=
True
,
blank
=
True
,
db_index
=
True
)
expiry_email_date
=
models
.
DateTimeField
(
null
=
True
,
blank
=
True
,
db_index
=
True
)
@classmethod
@classmethod
def
get_initial_verification
(
cls
,
user
,
earliest_allowed_date
=
None
):
def
get_initial_verification
(
cls
,
user
,
earliest_allowed_date
=
None
):
"""
Get initial verification for a user with the
'
photo_id_key
'
.
"""
Get initial verification for a user with the
'
photo_id_key
'
.
...
...
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