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
edx
edx-proctoring
Commits
fbeeb82e
Commit
fbeeb82e
authored
Jul 03, 2017
by
Dennis Jen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update for django 1.11 compatibility.
parent
1dbbeb21
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
38 additions
and
27 deletions
+38
-27
AUTHORS
+1
-1
edx_proctoring/__init__.py
+1
-1
edx_proctoring/management/commands/set_attempt_status.py
+24
-18
edx_proctoring/urls.py
+3
-4
test_settings.py
+7
-0
tox.ini
+2
-3
No files found.
AUTHORS
View file @
fbeeb82e
...
@@ -3,4 +3,4 @@ Muhammad Shoaib <mshoaib@edx.org>
...
@@ -3,4 +3,4 @@ Muhammad Shoaib <mshoaib@edx.org>
Afzal Wali <afzal@edx.org>
Afzal Wali <afzal@edx.org>
Mushtaq Ali <mushtaak@gmail.com>
Mushtaq Ali <mushtaak@gmail.com>
Christina Roberts <christina@edx.org>
Christina Roberts <christina@edx.org>
Dennis Jen <djen@edx.org>
edx_proctoring/__init__.py
View file @
fbeeb82e
...
@@ -4,6 +4,6 @@ The exam proctoring subsystem for the Open edX platform.
...
@@ -4,6 +4,6 @@ The exam proctoring subsystem for the Open edX platform.
from
__future__
import
absolute_import
from
__future__
import
absolute_import
__version__
=
'0.18.
1
'
__version__
=
'0.18.
2
'
default_app_config
=
'edx_proctoring.apps.EdxProctoringConfig'
# pylint: disable=invalid-name
default_app_config
=
'edx_proctoring.apps.EdxProctoringConfig'
# pylint: disable=invalid-name
edx_proctoring/management/commands/set_attempt_status.py
View file @
fbeeb82e
...
@@ -4,9 +4,7 @@ Django management command to manually set the attempt status for a user in a pro
...
@@ -4,9 +4,7 @@ Django management command to manually set the attempt status for a user in a pro
from
__future__
import
absolute_import
from
__future__
import
absolute_import
from
optparse
import
make_option
from
django.core.management.base
import
BaseCommand
,
CommandError
from
django.core.management.base
import
BaseCommand
from
edx_proctoring.models
import
ProctoredExamStudentAttemptStatus
from
edx_proctoring.models
import
ProctoredExamStudentAttemptStatus
...
@@ -16,20 +14,28 @@ class Command(BaseCommand):
...
@@ -16,20 +14,28 @@ class Command(BaseCommand):
Django Management command to force a background check of all possible notifications
Django Management command to force a background check of all possible notifications
"""
"""
option_list
=
BaseCommand
.
option_list
+
(
def
add_arguments
(
self
,
parser
):
make_option
(
'-e'
,
'--exam'
,
parser
.
add_argument
(
metavar
=
'EXAM_ID'
,
'-e'
,
dest
=
'exam_id'
,
'--exam'
,
help
=
'exam_id to change'
),
metavar
=
'EXAM_ID'
,
make_option
(
'-u'
,
'--user'
,
dest
=
'exam_id'
,
metavar
=
'USER'
,
help
=
'exam_id to change'
,
dest
=
'user_id'
,
)
help
=
"user_id of user to affect"
),
parser
.
add_argument
(
make_option
(
'-t'
,
'--to'
,
'-u'
,
metavar
=
'TO_STATUS'
,
'--user'
,
dest
=
'to_status'
,
metavar
=
'USER'
,
help
=
'the status to set'
),
dest
=
'user_id'
,
)
help
=
'user_id of user to affect'
,
)
parser
.
add_argument
(
'-t'
,
'--to'
,
metavar
=
'TO_STATUS'
,
dest
=
'to_status'
,
help
=
'the status to set'
,
)
def
handle
(
self
,
*
args
,
**
options
):
def
handle
(
self
,
*
args
,
**
options
):
"""
"""
...
@@ -56,7 +62,7 @@ class Command(BaseCommand):
...
@@ -56,7 +62,7 @@ class Command(BaseCommand):
print
msg
print
msg
if
not
ProctoredExamStudentAttemptStatus
.
is_valid_status
(
to_status
):
if
not
ProctoredExamStudentAttemptStatus
.
is_valid_status
(
to_status
):
raise
Exception
(
'{to_status} is not a valid attempt status!'
.
format
(
to_status
=
to_status
))
raise
CommandError
(
'{to_status} is not a valid attempt status!'
.
format
(
to_status
=
to_status
))
# get exam, this will throw exception if does not exist, so let it bomb out
# get exam, this will throw exception if does not exist, so let it bomb out
get_exam_by_id
(
exam_id
)
get_exam_by_id
(
exam_id
)
...
...
edx_proctoring/urls.py
View file @
fbeeb82e
...
@@ -5,12 +5,11 @@ URL mappings for edX Proctoring Server.
...
@@ -5,12 +5,11 @@ URL mappings for edX Proctoring Server.
from
__future__
import
absolute_import
from
__future__
import
absolute_import
from
django.conf
import
settings
from
django.conf
import
settings
from
django.conf.urls
import
patterns
,
url
,
include
from
django.conf.urls
import
url
,
include
from
edx_proctoring
import
views
,
callbacks
from
edx_proctoring
import
views
,
callbacks
urlpatterns
=
patterns
(
# pylint: disable=invalid-name
urlpatterns
=
[
''
,
url
(
url
(
r'edx_proctoring/v1/proctored_exam/exam$'
,
r'edx_proctoring/v1/proctored_exam/exam$'
,
views
.
ProctoredExamView
.
as_view
(),
views
.
ProctoredExamView
.
as_view
(),
...
@@ -89,4 +88,4 @@ urlpatterns = patterns( # pylint: disable=invalid-name
...
@@ -89,4 +88,4 @@ urlpatterns = patterns( # pylint: disable=invalid-name
name
=
'edx_proctoring.anonymous.proctoring_review_callback'
name
=
'edx_proctoring.anonymous.proctoring_review_callback'
),
),
url
(
r'^'
,
include
(
'rest_framework.urls'
,
namespace
=
'rest_framework'
))
url
(
r'^'
,
include
(
'rest_framework.urls'
,
namespace
=
'rest_framework'
))
)
]
test_settings.py
View file @
fbeeb82e
...
@@ -100,3 +100,10 @@ PROCTORING_SETTINGS = {
...
@@ -100,3 +100,10 @@ PROCTORING_SETTINGS = {
DEFAULT_FROM_EMAIL
=
'no-reply@example.com'
DEFAULT_FROM_EMAIL
=
'no-reply@example.com'
CONTACT_EMAIL
=
'info@edx.org'
CONTACT_EMAIL
=
'info@edx.org'
TECH_SUPPORT_EMAIL
=
'technical@example.com'
TECH_SUPPORT_EMAIL
=
'technical@example.com'
########## TEMPLATE CONFIGURATION
TEMPLATES
=
[{
'BACKEND'
:
'django.template.backends.django.DjangoTemplates'
,
'APP_DIRS'
:
True
,
}]
########## END TEMPLATE CONFIGURATION
tox.ini
View file @
fbeeb82e
[tox]
[tox]
envlist
=
{py27}-django{18}
envlist
=
{py27}-django{18
,111
}
[doc8]
[doc8]
max-line-length
=
120
max-line-length
=
120
...
@@ -21,8 +21,7 @@ setenv =
...
@@ -21,8 +21,7 @@ setenv =
DJANGO_SETTINGS_MODULE
=
test_settings
DJANGO_SETTINGS_MODULE
=
test_settings
deps
=
deps
=
django18:
Django>=1.8,<1.9
django18:
Django>=1.8,<1.9
django19:
Django>=1.9,<1.10
django111:
Django>=1.11,<2.0
django110:
Django>=1.10,<1.11
-rrequirements/test.txt
-rrequirements/test.txt
commands
=
commands
=
coverage
run
./manage.py
test
{posargs}
coverage
run
./manage.py
test
{posargs}
...
...
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