Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
edx-proctoring
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
OpenEdx
edx-proctoring
Commits
8a2fa5b6
Commit
8a2fa5b6
authored
Jul 27, 2015
by
chrisndodge
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #43 from edx/cdodge/adjust-callback-payload-schema
change callback schema based on what we're seeing
parents
362240ff
423d7de5
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
13 deletions
+6
-13
edx_proctoring/backends/software_secure.py
+6
-10
edx_proctoring/backends/tests/test_review_payload.py
+0
-3
No files found.
edx_proctoring/backends/software_secure.py
View file @
8a2fa5b6
...
...
@@ -123,15 +123,11 @@ class SoftwareSecureBackendProvider(ProctoringBackendProvider):
)
log
.
info
(
log_msg
)
# payload from SoftwareSecure is a JSON payload
# which has been converted to a dict by our caller
data
=
payload
[
'payload'
]
# what we consider the external_id is SoftwareSecure's 'ssiRecordLocator'
external_id
=
data
[
'examMetaData'
][
'ssiRecordLocator'
]
external_id
=
payload
[
'examMetaData'
][
'ssiRecordLocator'
]
# what we consider the attempt_code is SoftwareSecure's 'examCode'
attempt_code
=
data
[
'examMetaData'
][
'examCode'
]
attempt_code
=
payload
[
'examMetaData'
][
'examCode'
]
# do a lookup on the attempt by examCode, and compare the
# passed in ssiRecordLocator and make sure it matches
...
...
@@ -180,8 +176,8 @@ class SoftwareSecureBackendProvider(ProctoringBackendProvider):
raise
ProctoredExamReviewAlreadyExists
(
err_msg
)
# do some limited parsing of the JSON payload
review_status
=
data
[
'reviewStatus'
]
video_review_link
=
data
[
'videoReviewLink'
]
review_status
=
payload
[
'reviewStatus'
]
video_review_link
=
payload
[
'videoReviewLink'
]
# make a new record in the review table
review
=
ProctoredExamSoftwareSecureReview
(
...
...
@@ -193,10 +189,10 @@ class SoftwareSecureBackendProvider(ProctoringBackendProvider):
review
.
save
()
# go through and populate all of the specific comments
for
comment
in
data
.
get
(
'webCamComments'
,
[]):
for
comment
in
payload
.
get
(
'webCamComments'
,
[]):
self
.
_save_review_comment
(
review
,
comment
)
for
comment
in
data
.
get
(
'desktopComments'
,
[]):
for
comment
in
payload
.
get
(
'desktopComments'
,
[]):
self
.
_save_review_comment
(
review
,
comment
)
def
_save_review_comment
(
self
,
review
,
comment
):
...
...
edx_proctoring/backends/tests/test_review_payload.py
View file @
8a2fa5b6
...
...
@@ -4,8 +4,6 @@ Some canned data for SoftwareSecure callback testing.
TEST_REVIEW_PAYLOAD
=
'''
{
"orgCallbackURL": "http://reds.rpexams.com/reviewerdatatransfer",
"payload": {
"examDate": "Jul 15 2015 1:13AM",
"examProcessingStatus": "Review Completed",
"examTakerEmail": "4d07a01a-1502-422e-b943-93ac04dc6ced",
...
...
@@ -94,5 +92,4 @@ TEST_REVIEW_PAYLOAD = '''
}
]
}
}
'''
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