© Léon McGregor, Manuel Maarek, 2017-2020
- Linux or Windows 10 with LXSS
- Python 3 (preferrably 3.5 or higher)
- Python virtualenv package
- This may require pip 3
- Resources to conduct coursework tasks (e.g. java, javac)
- Create a Venv
python3 -m virtualenv name-of-your-venv
- Or
python3.5 -m venv name-of-your-venv
- Choose a short name for your venv
- Ensure this is run using python3
- Or
- Activate Venv
source name-of-your-venv/bin/activate
- Clone Repository with
git clone
- Go into repository
cd repository/website
- Install Necessary Packages
pip install -r requirements.txt
- Locate
website/main/default_local.py
andwebsite/main/default_secret.py
- Copy this into
website/main/local.py
andwebsite/main/secret.py
respectively, and edit the variables within the file accordingly- Developing using the built-in webserver? DONT use an HTTP prefix in local.py
- Make these checks and then run the commands within
init-dev.sh
- Double-check usernames within
setfacl
commands - If only running local debug, and not serving over apache,
setfacl
commands are not needed - Make sure to set appropriate admin user details
- Double-check usernames within
- Run the server using
manage.py runserver 0.0.0.0:8000
- [Optional] Add
0.0.0.0 example.com
to your/etc/hosts
- [Optional] Add
- Visit either http://example.com:8000 or http://localhost:8000 in a web browser
- Logins only work through gitlab, so you need to set this up
- Log in as a GitLab administrator
- Go to /admin/applications and make a new one
- Set the redirect URI as: http://your-url.domain/prefixes/complete/gitlab/
- Set the "scopes" as [api, read_user]
- Copy the secrets to
secret.py
- Create a
roles.csv
file in the base directory like so:- email,role,course where email is an email, role is teacher|student, course is a course ID
- emails should match those used on gitlab
- Create a
groups.csv
file in the base directory like so:- "group_id","user_ids", where group_id is a number and user_ids is a CSV string of user ids surrounded by quotes
- Log in to gitlab as a teacher
- Open the peer-testing website
- You will go through the gitlab authorisation flow
- You will then be taken to the teacher admin page
- Enrolled users are added automatically to their course when they log in
- Make it
- The coursework ID must be the same as the project/repository that code will be fetched from