-
Notifications
You must be signed in to change notification settings - Fork 84
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #324 from edx/andya/add-transifex
Upgrade proctoring to use Transifex
- Loading branch information
Showing
78 changed files
with
2,199 additions
and
676 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,28 +1,20 @@ | ||
language: python | ||
cache: pip | ||
python: | ||
- "2.7" | ||
- 2.7 | ||
env: | ||
- DJANGO_SETTINGS_MODULE=settings | ||
|
||
- DJANGO_SETTINGS_MODULE=test_settings | ||
before_install: | ||
- "export DISPLAY=:99.0" | ||
- "sh -e /etc/init.d/xvfb start" | ||
|
||
# Set Travis builds to use docker container | ||
sudo: false | ||
|
||
- export DISPLAY=:99.0 | ||
- sh -e /etc/init.d/xvfb start | ||
- pip install --upgrade pip # pip-tools requires pip >= 6.1 | ||
install: | ||
- npm install | ||
- "pip install -r local_requirements.txt" | ||
- "pip install -r requirements.txt" | ||
- "pip install -r test_requirements.txt" | ||
- "pip install coveralls" | ||
|
||
- pip install setuptools==32.3.1 # need newer version than Travis default | ||
- make install | ||
script: | ||
- coverage run ./manage.py test edx_proctoring | ||
- coverage report -m | ||
- gulp test | ||
- pep8 edx_proctoring | ||
- pylint edx_proctoring --report=no | ||
|
||
after_success: coveralls | ||
- make test-all | ||
- gulp test | ||
after_success: | ||
- coverage xml | ||
- bash <(curl -s https://codecov.io/bash) -cF python -f coverage.xml | ||
- bash <(curl -s https://codecov.io/bash) -cF javascript -f build/coverage-js/coverage.xml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
[main] | ||
host = https://www.transifex.com | ||
|
||
[edx-platform.edx-proctoring] | ||
file_filter = edx_proctoring/locale/<lang>/LC_MESSAGES/django.po | ||
source_file = edx_proctoring/locale/en/LC_MESSAGES/django.po | ||
source_lang = en | ||
type = PO | ||
|
||
[edx-platform.edx-proctoring-js] | ||
file_filter = edx_proctoring/locale/<lang>/LC_MESSAGES/djangojs.po | ||
source_file = edx_proctoring/locale/en/LC_MESSAGES/django.po | ||
source_lang = en | ||
type = PO |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
We don't maintain a detailed changelog. For details of changes, please see | ||
either the `GitHub commit history`_. | ||
|
||
.. _GitHub commit history: https://github.com/edx/edx-proctoring/commits/master |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
include AUTHORS | ||
include CHANGELOG.rst | ||
include CONTRIBUTING.rst | ||
include LICENSE.txt | ||
include README.rst | ||
graft edx_proctoring | ||
prune edx_proctoring/static/proctoring/spec | ||
global-exclude *.pyc |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,95 @@ | ||
.PHONY: help upgrade requirements clean quality requirements docs \ | ||
test test-all coverage \ | ||
compile_translations dummy_translations extract_translations \ | ||
fake_translations pull_translations push_translations | ||
|
||
.DEFAULT_GOAL := help | ||
|
||
define BROWSER_PYSCRIPT | ||
import os, webbrowser, sys | ||
try: | ||
from urllib import pathname2url | ||
except: | ||
from urllib.request import pathname2url | ||
|
||
webbrowser.open("file://" + pathname2url(os.path.abspath(sys.argv[1]))) | ||
endef | ||
export BROWSER_PYSCRIPT | ||
BROWSER := python -c "$$BROWSER_PYSCRIPT" | ||
|
||
help: ## display this help message | ||
@echo "Please use \`make <target>' where <target> is one of" | ||
@perl -nle'print $& if m{^[a-zA-Z_-]+:.*?## .*$$}' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m %-25s\033[0m %s\n", $$1, $$2}' | ||
|
||
clean: ## remove generated byte code, coverage reports, and build artifacts | ||
find . -name '*.pyc' -exec rm -f {} + | ||
find . -name '*.pyo' -exec rm -f {} + | ||
find . -name '*~' -exec rm -f {} + | ||
rm -fr build/ | ||
rm -fr dist/ | ||
rm -fr *.egg-info | ||
|
||
upgrade: ## update the requirements/*.txt files with the latest packages satisfying requirements/*.in | ||
pip install -q pip-tools | ||
pip-compile --upgrade -o requirements/base.txt requirements/base.in | ||
pip-compile --upgrade -o requirements/dev.txt requirements/dev.in requirements/quality.in | ||
pip-compile --upgrade -o requirements/doc.txt requirements/base.in requirements/doc.in | ||
pip-compile --upgrade -o requirements/quality.txt requirements/quality.in | ||
pip-compile --upgrade -o requirements/test.txt requirements/base.in requirements/test.in | ||
# Let tox control the Django version for tests | ||
sed '/django==/d' requirements/test.txt > requirements/test.tmp | ||
mv requirements/test.tmp requirements/test.txt | ||
|
||
requirements: ## install development environment requirements | ||
pip install -qr requirements/dev.txt --exists-action w | ||
pip-sync requirements/*.txt requirements/private.* | ||
|
||
install: upgrade requirements | ||
./manage.py syncdb --noinput --settings=test_settings | ||
./manage.py migrate --settings=test_settings | ||
npm install | ||
|
||
coverage: clean ## generate and view HTML coverage report | ||
py.test --cov-report html | ||
$(BROWSER) htmlcov/index.html | ||
|
||
docs: ## generate Sphinx HTML documentation, including API docs | ||
tox -e docs | ||
$(BROWSER) docs/_build/html/index.html | ||
|
||
compile_translations: ## compile translation files, outputting .po files for each supported language | ||
./manage.py compilemessages | ||
|
||
dummy_translations: ## generate dummy translation (.po) files | ||
i18n_tool dummy --config ./edx_proctoring/locale/config.yaml | ||
|
||
extract_translations: ## extract strings to be translated, outputting .mo files | ||
rm -rf docs/_build | ||
./manage.py makemessages -l en -v1 -d django --ignore="edx-proctoring/*" | ||
./manage.py makemessages -l en -v1 -d djangojs --ignore="edx-proctoring/*" | ||
|
||
fake_translations: extract_translations dummy_translations compile_translations ## generate and compile dummy translation files | ||
|
||
pull_translations: ## pull translations from Transifex | ||
tx pull -a | ||
|
||
push_translations: ## push source translation files (.po) from Transifex | ||
tx push -s | ||
|
||
validate_translations: fake_translations detect_changed_source_translations | ||
|
||
quality: ## check coding style with pycodestyle and pylint | ||
tox -e quality | ||
|
||
test-python: clean ## run tests in the current virtualenv | ||
./manage.py test edx_proctoring --verbosity=3 | ||
|
||
test-js: | ||
gulp test | ||
|
||
test-all: ## run tests on every supported Python/Django combination | ||
tox -e quality | ||
tox | ||
|
||
diff_cover: test | ||
diff-cover coverage.xml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,133 @@ | ||
django-component-views | ||
============================= | ||
|
||
.. image:: https://img.shields.io/pypi/v/edx-proctoring.svg | ||
:target: https://pypi.python.org/pypi/edx-proctoring/ | ||
:alt: PyPI | ||
|
||
.. image:: https://travis-ci.org/edx/edx-proctoring.svg?branch=master | ||
:target: https://travis-ci.org/edx/edx-proctoring | ||
:alt: Travis | ||
|
||
.. image:: https://codecov.io/gh/edx/edx-proctoring/branch/master/graph/badge.svg | ||
:target: https://codecov.io/gh/edx/edx-proctoring | ||
:alt: Codecov | ||
|
||
.. image:: https://img.shields.io/pypi/pyversions/edx-proctoring.svg | ||
:target: https://pypi.python.org/pypi/edx-proctoring/ | ||
:alt: Supported Python versions | ||
|
||
.. image:: https://img.shields.io/github/license/edx/django-component-views.svg | ||
:target: https://github.com/edx/edx-proctoring/blob/master/LICENSE.txt | ||
:alt: License | ||
|
||
This is the exam proctoring subsystem for the Open edX platform. | ||
|
||
Overview | ||
-------- | ||
|
||
Proctored exams are exams with time limits that learners complete while online | ||
proctoring software monitors their computers and behavior for activity that | ||
might be evidence of cheating. This Python library provides the proctoring | ||
implementation used by Open edX. | ||
|
||
Documentation | ||
------------- | ||
|
||
For documentation about taking a proctored exam, see `Taking a Proctored Exam`_. | ||
|
||
For authoring documentation, see `Including Proctored Exams In Your Course`_. | ||
|
||
Installation | ||
------------ | ||
|
||
To install edx-proctoring: | ||
|
||
mkvirtualenv edx-proctoring | ||
make install | ||
|
||
To run the tests: | ||
|
||
make test-all | ||
|
||
For a full list of Make targets: | ||
|
||
make help | ||
|
||
Configuration | ||
------------- | ||
|
||
In order to use edx-proctoring, you must obtain an account (and secret | ||
configuration - see below) with SoftwareSecure, which provides the proctoring | ||
review services that edx-proctoring integrates with. | ||
|
||
You will need to turn on the ENABLE_SPECIAL_EXAMS in lms.env.json and | ||
cms.env.json FEATURES dictionary:: | ||
|
||
"FEATURES": { | ||
: | ||
"ENABLE_SPECIAL_EXAMS": true, | ||
: | ||
} | ||
|
||
Also in your lms.env.json and cms.env.json file please add the following:: | ||
|
||
|
||
"PROCTORING_SETTINGS": { | ||
"LINK_URLS": { | ||
"contact_us": "{add link here}", | ||
"faq": "{add link here}", | ||
"online_proctoring_rules": "{add link here}", | ||
"tech_requirements": "{add link here}" | ||
} | ||
}, | ||
|
||
In your lms.auth.json file, please add the following *secure* information:: | ||
|
||
"PROCTORING_BACKEND_PROVIDER": { | ||
"class": "edx_proctoring.backends.software_secure.SoftwareSecureBackendProvider", | ||
"options": { | ||
"crypto_key": "{add SoftwareSecure crypto key here}", | ||
"exam_register_endpoint": "{add enpoint to SoftwareSecure}", | ||
"exam_sponsor": "{add SoftwareSecure sponsor}", | ||
"organization": "{add SoftwareSecure organization}", | ||
"secret_key": "{add SoftwareSecure secret key}", | ||
"secret_key_id": "{add SoftwareSecure secret key id}", | ||
"software_download_url": "{add SoftwareSecure download url}" | ||
} | ||
}, | ||
|
||
You will need to restart services after these configuration changes for them to | ||
take effect. | ||
|
||
License | ||
------- | ||
|
||
The code in this repository is licensed under the AGPL 3.0 unless | ||
otherwise noted. | ||
|
||
Please see ``LICENSE.txt`` for details. | ||
|
||
How To Contribute | ||
----------------- | ||
|
||
Contributions are very welcome. | ||
|
||
Please read `How To Contribute <https://github.com/edx/edx-platform/blob/master/CONTRIBUTING.rst>`_ for details. | ||
|
||
Even though they were written with ``edx-platform`` in mind, the guidelines | ||
should be followed for Open edX code in general. | ||
|
||
Reporting Security Issues | ||
------------------------- | ||
|
||
Please do not report security issues in public. Please email [email protected]. | ||
|
||
Getting Help | ||
------------ | ||
|
||
Have a question about this repository, or about Open edX in general? Please | ||
refer to this `list of resources`_ if you need any assistance. | ||
|
||
.. _list of resources: https://open.edx.org/getting-help | ||
.. _Including Proctored Exams In Your Course: http://edx.readthedocs.io/projects/edx-partner-course-staff/en/latest/course_features/credit_courses/proctored_exams.html |
Oops, something went wrong.