Skip to content

Caesar1N/canvas-gamification

 
 

Repository files navigation

Canvas Gamification

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.

  1. Open the website (Normally at localhost:8000)
  2. Login with the super user you just created
  3. Go to the admin section by clicking on the admin button at the top right of the screen
  4. Go to the users section and click on your user
  5. Scroll down and change the role from student to teacher
  6. 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

Opey Adeyemi

Carson Ricca

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • HTML 51.5%
  • Python 24.4%
  • CSS 18.7%
  • JavaScript 5.0%
  • PHP 0.4%
  • Dockerfile 0.0%