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
54cdd329
Commit
54cdd329
authored
Sep 12, 2013
by
Jason Bau
Browse files
Options
Browse Files
Download
Plain Diff
Merge commit '
8194eedc
' into edx-west/rc-20130912
parents
2eb82fb9
8194eedc
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
23 additions
and
9 deletions
+23
-9
lms/djangoapps/verify_student/models.py
+1
-0
lms/djangoapps/verify_student/views.py
+2
-2
lms/static/js/verify_student/photocapture.js
+20
-7
No files found.
lms/djangoapps/verify_student/models.py
View file @
54cdd329
...
@@ -410,6 +410,7 @@ class SoftwareSecurePhotoVerification(PhotoVerification):
...
@@ -410,6 +410,7 @@ class SoftwareSecurePhotoVerification(PhotoVerification):
# Update our record fields
# Update our record fields
self
.
photo_id_key
=
rsa_encrypted_aes_key
.
encode
(
'base64'
)
self
.
photo_id_key
=
rsa_encrypted_aes_key
.
encode
(
'base64'
)
self
.
save
()
@status_before_must_be
(
"must_retry"
,
"ready"
,
"submitted"
)
@status_before_must_be
(
"must_retry"
,
"ready"
,
"submitted"
)
def
submit
(
self
):
def
submit
(
self
):
...
...
lms/djangoapps/verify_student/views.py
View file @
54cdd329
...
@@ -180,8 +180,8 @@ def results_callback(request):
...
@@ -180,8 +180,8 @@ def results_callback(request):
settings
.
VERIFY_STUDENT
[
"SOFTWARE_SECURE"
][
"API_SECRET_KEY"
]
settings
.
VERIFY_STUDENT
[
"SOFTWARE_SECURE"
][
"API_SECRET_KEY"
]
)
)
#
if not sig_valid:
if
not
sig_valid
:
#
return HttpResponseBadRequest(_("Signature is invalid"))
return
HttpResponseBadRequest
(
_
(
"Signature is invalid"
))
receipt_id
=
body_dict
.
get
(
"EdX-ID"
)
receipt_id
=
body_dict
.
get
(
"EdX-ID"
)
result
=
body_dict
.
get
(
"Result"
)
result
=
body_dict
.
get
(
"Result"
)
...
...
lms/static/js/verify_student/photocapture.js
View file @
54cdd329
...
@@ -230,6 +230,18 @@ function linkNewWindow(e) {
...
@@ -230,6 +230,18 @@ function linkNewWindow(e) {
e
.
preventDefault
();
e
.
preventDefault
();
}
}
function
waitForFlashLoad
(
func
,
flash_object
)
{
if
(
!
flash_object
.
hasOwnProperty
(
'percentLoaded'
)
||
flash_object
.
percentLoaded
()
<
100
){
setTimeout
(
function
()
{
waitForFlashLoad
(
func
,
flash_object
);
},
50
);
}
else
{
func
(
flash_object
);
}
}
$
(
document
).
ready
(
function
()
{
$
(
document
).
ready
(
function
()
{
$
(
".carousel-nav"
).
addClass
(
'sr'
);
$
(
".carousel-nav"
).
addClass
(
'sr'
);
$
(
"#pay_button"
).
click
(
function
(){
$
(
"#pay_button"
).
click
(
function
(){
...
@@ -266,13 +278,14 @@ $(document).ready(function() {
...
@@ -266,13 +278,14 @@ $(document).ready(function() {
if
(
!
hasHtml5CameraSupport
)
{
if
(
!
hasHtml5CameraSupport
)
{
$
(
"#face_capture_div"
).
html
(
objectTagForFlashCamera
(
"face_flash"
));
$
(
"#face_capture_div"
).
html
(
objectTagForFlashCamera
(
"face_flash"
));
$
(
"#photo_id_capture_div"
).
html
(
objectTagForFlashCamera
(
"photo_id_flash"
));
$
(
"#photo_id_capture_div"
).
html
(
objectTagForFlashCamera
(
"photo_id_flash"
));
// wait for the flash object to be loaded
// wait for the flash object to be loaded and then check for a camera
// TODO: we need a better solution for this
if
(
browserHasFlash
())
{
setTimeout
(
function
()
{
waitForFlashLoad
(
function
(
flash_object
)
{
if
(
browserHasFlash
()
&&
!
$
(
'#face_flash'
)[
0
].
hasOwnProperty
(
'hasCamera'
))
{
if
(
!
flash_object
.
hasOwnProperty
(
'hasCamera'
)){
onVideoFail
(
'NO_DEVICES_FOUND'
);
onVideoFail
(
'NO_DEVICES_FOUND'
);
}
}
},
1000
);
},
$
(
'#face_flash'
)[
0
]);
}
}
}
analytics
.
pageview
(
"Capture Face Photo"
);
analytics
.
pageview
(
"Capture Face Photo"
);
...
...
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