Contents
Canvas Gamification is a platform where course instructors can provide questions to their student in forms of practice, assignments, quizzes, or exams.
- Multiple Choice
- Check Box
- Java Coding
- Parsons
If you are using windown please run this command before you clone the project. It will prevent the line endings to change from LF ro CRLF.
git config --global core.autocrlf input
- Python 3.7
- Required Packages is listed in requirements.txt
- Docker
- Required to run judge0 locally or deploying the website
- Installation
- Judge0 server
- Provided in docker compose
- Mailing System
- For production requires an SMTP mailing service. Provide the details in env files.
- For local development the email will be printed in console.
- reCaptcha
- For production, you need to obtain your reCaptcha key and provide it in env files.
- Details
- For local development, recaptcha will be automatically validated
In local development you can set the environment variables in env/gamification.dev.env. All the field are pre populated so if you just want to run the website locally don't change it.
Go to canvas_gamification/settings.py and change
DEBUG=True
Ensure Python3 is installed, then upgrade/install pip
python3 -m pip install pip --upgrade
Optionally you set virtual environment for python install Pipenv
python3 -m pip install pipenv
Next navigate to the project directory, once in the project directory create a virtual environment with Pipenv
pipenv shell
To install all necessary dependencies
pip install -r requirements.txt
To be able to execute user's code you need to have judge0 up and running. docker-compose.dev.yml is ready to run judge0. Environment variables in env/gamification.dev.env is set to use this instance of judge0.
sudo docker-compose -f docker-compose.dev.yml up -d
Then apply the migrations
python3 manage.py migrate
Now you can run the server by
python3 manage.py runserver
To initialize sample questions you can use
python3 manage.py populate-db --all
To use the website you need an admin user. Create a super use by
python3 manage.py createsuperuser
You also need to give this user a teacher access to the website.
- Open the website (Normally at localhost:8000)
- Login with the super user you just created
- Go to the admin section by clicking on the admin button at the top right of the screen
- Go to the users section and click on your user
- Scroll down and change the role from student to teacher
- Save the user and open the website again
python3 manage.py test
For local development, it is recommended not to use docker for the website but only for judge0 which is provided in docker-compose.dev.yml
For production, copy env/gamification.sample.env to env/gamification.env. Fill the variables in it and run the server by
sudo docker-compose up -d
The server should be up and running on port 80
Documentation is located at "docs/" folder.
Generate the html file by running this code under docs/ directory
make html
Keyvan Khademi
- Email: keyvankhademi@gmail.com
- GitHub: keyvankhademi
Opey Adeyemi
- Email: opeyadeyemi@gmail.com
- GitHub: opeyem1a
Carson Ricca
- Email: carsonricca28@gmail.com
- GitHub: carson-ricca