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
d6ba142e
Commit
d6ba142e
authored
Nov 06, 2015
by
Chris Dodge
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
SoftwareSecure does not allow colons in exam names - replace them with dashes
parent
1bcc2308
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
12 additions
and
3 deletions
+12
-3
edx_proctoring/backends/software_secure.py
+3
-1
edx_proctoring/backends/tests/test_software_secure.py
+8
-1
setup.py
+1
-1
No files found.
edx_proctoring/backends/software_secure.py
View file @
d6ba142e
...
@@ -355,6 +355,8 @@ class SoftwareSecureBackendProvider(ProctoringBackendProvider):
...
@@ -355,6 +355,8 @@ class SoftwareSecureBackendProvider(ProctoringBackendProvider):
now
=
datetime
.
datetime
.
utcnow
()
now
=
datetime
.
datetime
.
utcnow
()
start_time_str
=
now
.
strftime
(
"
%
a,
%
d
%
b
%
Y
%
H:
%
M:
%
S GMT"
)
start_time_str
=
now
.
strftime
(
"
%
a,
%
d
%
b
%
Y
%
H:
%
M:
%
S GMT"
)
end_time_str
=
(
now
+
datetime
.
timedelta
(
minutes
=
time_limit_mins
))
.
strftime
(
"
%
a,
%
d
%
b
%
Y
%
H:
%
M:
%
S GMT"
)
end_time_str
=
(
now
+
datetime
.
timedelta
(
minutes
=
time_limit_mins
))
.
strftime
(
"
%
a,
%
d
%
b
%
Y
%
H:
%
M:
%
S GMT"
)
# note, SoftwareSecure does not appear to allow colons in the exam names
exam_name
=
exam
[
'exam_name'
]
.
replace
(
':'
,
'-'
)
return
{
return
{
"examCode"
:
attempt_code
,
"examCode"
:
attempt_code
,
"organization"
:
self
.
organization
,
"organization"
:
self
.
organization
,
...
@@ -365,7 +367,7 @@ class SoftwareSecureBackendProvider(ProctoringBackendProvider):
...
@@ -365,7 +367,7 @@ class SoftwareSecureBackendProvider(ProctoringBackendProvider):
"reviewerNotes"
:
reviewer_notes
,
"reviewerNotes"
:
reviewer_notes
,
"examPassword"
:
self
.
_encrypt_password
(
self
.
crypto_key
,
attempt_code
),
"examPassword"
:
self
.
_encrypt_password
(
self
.
crypto_key
,
attempt_code
),
"examSponsor"
:
self
.
exam_sponsor
,
"examSponsor"
:
self
.
exam_sponsor
,
"examName"
:
exam
[
'exam_name'
]
,
"examName"
:
exam
_name
,
"ssiProduct"
:
'rp-now'
,
"ssiProduct"
:
'rp-now'
,
# need to pass in a URL to the LMS?
# need to pass in a URL to the LMS?
"examUrl"
:
callback_url
,
"examUrl"
:
callback_url
,
...
...
edx_proctoring/backends/tests/test_software_secure.py
View file @
d6ba142e
...
@@ -219,7 +219,7 @@ class SoftwareSecureTests(TestCase):
...
@@ -219,7 +219,7 @@ class SoftwareSecureTests(TestCase):
exam_id
=
create_exam
(
exam_id
=
create_exam
(
course_id
=
'foo/bar/baz'
,
course_id
=
'foo/bar/baz'
,
content_id
=
'content'
,
content_id
=
'content'
,
exam_name
=
'Sample Exam'
,
exam_name
=
'Sample Exam
with : Colon
'
,
time_limit_mins
=
10
,
time_limit_mins
=
10
,
is_proctored
=
True
is_proctored
=
True
)
)
...
@@ -236,6 +236,13 @@ class SoftwareSecureTests(TestCase):
...
@@ -236,6 +236,13 @@ class SoftwareSecureTests(TestCase):
# assert that we use the default that is defined in system configuration
# assert that we use the default that is defined in system configuration
self
.
assertEqual
(
result
[
'reviewerNotes'
],
constants
.
DEFAULT_SOFTWARE_SECURE_REVIEW_POLICY
)
self
.
assertEqual
(
result
[
'reviewerNotes'
],
constants
.
DEFAULT_SOFTWARE_SECURE_REVIEW_POLICY
)
# the check that if a colon was passed in for the exam name, then the colon was changed to
# a dash. This is because SoftwareSecure cannot handle a colon in the exam name
if
':'
in
exam
[
'exam_name'
]:
self
.
assertIn
(
'-'
,
result
[
'examName'
])
self
.
assertNotIn
(
':'
,
result
[
'examName'
])
return
result
return
result
with
HTTMock
(
mock_response_content
):
with
HTTMock
(
mock_response_content
):
...
...
setup.py
View file @
d6ba142e
...
@@ -34,7 +34,7 @@ def load_requirements(*requirements_paths):
...
@@ -34,7 +34,7 @@ def load_requirements(*requirements_paths):
setup
(
setup
(
name
=
'edx-proctoring'
,
name
=
'edx-proctoring'
,
version
=
'0.10.1
7
'
,
version
=
'0.10.1
8
'
,
description
=
'Proctoring subsystem for Open edX'
,
description
=
'Proctoring subsystem for Open edX'
,
long_description
=
open
(
'README.md'
)
.
read
(),
long_description
=
open
(
'README.md'
)
.
read
(),
author
=
'edX'
,
author
=
'edX'
,
...
...
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