Dalite NG is a Peer Instruction Tool for online learning platforms such as Open edX. It is implemented in Django as an LTI tool and should be compatible with most online learning platforms. Dalite NG is a rewrite of the Dalite tool as a cleaner, Django-based LTI tool.
-
Install the requirements (you probably want to set up a virtualenv first). using
pip-tools
$ pip install pip-tools $ pip-sync requirements/requirements-base.txt -
Set up the database connection. The default configuration is to use the MySQL database
dalite_ng
and the userdalite
. To set up the database, run these commands as the MySQL superuser:mysql> CREATE DATABASE dalite_ng; mysql> CREATE USER 'dalite'@'localhost' IDENTIFIED BY 'your password here'; mysql> GRANT ALL PRIVILEGES ON dalite_ng.* TO 'dalite'@'localhost'; mysql> GRANT ALL PRIVILEGES ON test_dalite_ng.* TO 'dalite'@'localhost';
The password can be passed in the environment:
$ export DALITE_DB_PASSWORD='your password here'
-
Generate a secret key, e.g. using
tools/gen_secret_key.py
, an put it indalite/local_settings.py
along with aPWD_KEY
andTOKEN_KEY
. -
Create the database tables and the superuser.
$ ./manage.py migrate $ ./manage.py createsuperuser
-
Run the Django development server.
$ python -X dev manage.py runserver
-
Add Sample Consent Form
- Navigate to
127.0.0.1:8000/admin/tos
and add a sample Terms of Service (mark it as current) - Login as a Teacher
npx gulp build
Browserslist (90.22% global coverage: http://browserl.ist/?q=last+3+versions%2C+iOS%3E%3D8%2C+ie+11%2C+not+dead)
['last 3 versions', 'iOS>=8', 'ie 11', 'Safari 9.1', 'not dead']
The thumbs up and down icons were taken from the Entypo pictograms by Daniel Bruce.
$ pytest --cov --cov-report html
Requires Redis 5.0.0
-
Installation (env) $ wget http://download.redis.io/releases/redis-5.0.0.tar.gz (env) $ tar xzf redis-5.0.0.tar.gz (env) $ cd redis-5.0.0 (env) $ make
-
Start redis (env) $ redis-5.0.0/src/redis-server
-
Start celery worker (for development) (env) $ celery -A dalite worker -l debug
-
Start beat scheduler (for development) (env) $ celery -A dalite beat -l debug --scheduler django_celery_beat.schedulers:DatabaseScheduler
-
Schedule tasks at: /admin/django_celery_beat/
django-admin makemessages -d djangojs -l fr -i=node_modules/* -i=venv* -i=static/CACHE/* -i=static/admin/* -i=*.min.js
:
Javascript
Delete static directory in project root and run:
django-admin makemessages -d djangojs -l fr -i=node_modules/* -i=venv*
django-admin makemessages -l fr -i=node_modules/* -i=venv*
../manage.py compilemessages -l fr
makefile
:
Command shortcuts
make test
:
Runs pytest with migration and coverage options
make test-cdb
:
Runs pytest with migration and coverage options, re-creating the db
- Build the index
$ ./manage.py search_index --rebuild
- Add config to
local_settings.py
:
ELASTICSEARCH_DSL = { "default": {"hosts": "<username>:<password>@localhost:9200"}, }
## Snyk
Javascript vulnerability dependency scanning via Snyk is incorporated in the CircleCI config. To scan locally, authenticate with your Snyk account and then test:
`npx snyk auth`
`npx snyk test --all-projects` or `npx snyk monitor --all-projects`
Security analysis of application code is available via:
`npx snyk code test`