The peer++ evaluation system ensures quality evaluations by matching students with high-level evaluators.
Read more about it here.
Convert ./config/env-example
to .env
and fill in the secret data.
By default port 8080
is used for the webhooks express server
and port 3000
is used for the slack bot using the slackbot API.
The slackbot runs over Websockets instead of HTTP Requests.
- Install NodeJS 18.x or higher.
- Install dependencies:
npm install
- Use
npm run dev
for development mode.
In production environments, use Docker.
- Use
make up
to run in a docker container. - Use
make down
to shut down the docker container.
Or, if you're confident in your Docker skills, you can just use the docker compose
command directly.
In production, we recommend setting up a logrotate in the logs
directory.
Create a logrotate config in the /etc/logrotate.d
folder.
You can use or modify the configuration below:
/root/peer-bot/logs/log.txt {
weekly
missingok
rotate 4
compress
delaycompress
shred
ifempty
create 644 root root
}
- Go to the
peer-bot
directory. - Run
node src/scripts/manageUser.js add <login>
where<login>
is the login of the user you want to add to the peer++ group.
- Go to the
peer-bot
directory. - Run
node src/scripts/manageUser.js remove <login>
where<login>
is the login of the user you want to remove from the peer++ group.
- Go to the
peer-bot
directory. - Run
node src/scripts/getUsers.js
.
- Go to the
peer-bot
directory. - Run
node src/scripts/bookEval.js <scaleID> <teamID> <userID>
where<scaleID>
is the scaleID of the scale you want to use for the evaluation,<teamID>
is the teamID of the team you want to schedule an evaluation for and<userID>
is the userID of the evaluator (the one evaluating the team).
- Go to the
peer-bot
directory. - Run
sqlite3 db/peerdb.sqlite
. - Run
INSERT INTO expiredTeam(teamID) VALUES ('<teamID>');
in the sqlite3 shell, where<teamID>
is the teamID of the team you want to cancel the evaluation for. - Run
.exit
to exit the sqlite3 shell. - Tell the team that they can now cancel the evaluation (make them press x next to the evaluation on the Intranet).
- Run
node src/scripts/addPoint.js <login>
where<login>
is the login of the student who lost an evaluation point for the cancellation. This will refund the point to the student.