Small web application for managing courses: store students' grades, maintain deadlines, provide scoreboard etc.
In a nutshell, manytask
is a wrapper around google sheets (as database, storing students' scores) and some bunch of functions to interact with gitlab.
The full manytask
setup roughly looks as follows
google sheet
- in readable format, store students' scores/grades- self-hosted
gitlab
instance - storing repos with assignments and students' repo- private repo - a repository with tasks, public and private tests, gold solutions, ect.
- public repo - a repository available to students with tasks and solution templates
- students' group - the group where
manytask
will create repositories for students
each students' repo - fork from public repo
gitlab runners
- place where students' solutions likely to be testedchecker
script - some script to test students' solutions and push scores/grades to themanytask
manytask
instance - web application managing students' grades (in google sheet) and deadlines (web page)
So the main aims of manytask
:
- Store and manage students' grades (store, provide, show, edit, ect)
- Show web page with grades and deadlines for student
- Manage users and repositories creation
Functions for which manytask
is NOT intended:
- Test students' solutions
- Be language/course specific
So basically, manytask will store and display grades for you, but not test solutions' correctness in any way.
- Clone repo
git clone https://github.com/yandexdataschool/manytask
- Create
.env
file with dev environment
cp .env.example .env
- Generate credentials for accessing google spreadsheets API (for this test table)
- Follow the steps described in this article
- Base64 encode the created JSON key (using tools online,
base64
lib in python, orbtoa
function in the browser) - Put it in the .env file by GDOC_ACCOUNT_CREDENTIALS_BASE64 key
Please refer to the system setup documentation.
First you need to create .env
file with debug environment
- gitlab oauth credentials can be taken from
test
app here: gitlab.manytask.org/admin/applications
Create new venv and install requirements
python -m venv .venv
source .venv/bin/activate
python -m pip install -U -r requirements.txt
Run it
FLASK_DEBUG=1 FLASK_APP="manytask:create_app()" python -m flask run --host=0.0.0.0 --port=5050 --reload --without-threads
So, now it's available at localhost:5050
docker build --tag manytask .
docker rm manytask || true
docker run \
--name manytask \
--restart always \
--publish "5050:5050" \
--env-file .env \
--env FLASK_DEBUG=1 \
manytask:latest
So, now it's available at localhost:5050
docker-compose -f docker-compose.development.yml up --build
So, now it's available at localhost:5050
Please, refer to the production documentation.
There is already implemented python lib yandexdataschool/checker for testing students' solutions with manytask integration.
The basic idea: checker
is a script running in a gitlab-ci that performs students' solutions testing and call manytask
api to set scores achieved;
More info in the yandexdataschool/checker repo;
However, you can implement your own checker just following manytask
api:
- All the endpoints require
Authorization: Bearer <token>
orAuthorization: <token>
(deprecated) header containTESTER_TOKEN
, to validate it's authorized checker. - Or, alternatively, being admin (session with admin field)
method | api endpoint | description | required in body | optional in body | return |
---|---|---|---|---|---|
POST | /api/report |
set student's score (optionally save source code) | task , username , user_id (deprecated), score (if None - max score) |
check_deadline , submit_time (%Y-%m-%d %H:%M:%S%z ), commit_time (deprecated), multipart/form-data source files |
user_id , username , task , score , commit_time , submit_time |
GET | /api/score |
get student's score | task , username , user_id (deprecated) |
- | user_id , username , task , score |
POST | /api/update_config |
update course to sent config |
*config yaml file* (see examples) | - | - |
POST | /api/update_cache |
update cached scores for all users | - | - | - |
GET | /api/solutions |
get all solutions for the task | task |
- | zip archive file with solutions |
Please refer yandexdataschool/checker repo for instructions and tips
Originally was developed at gitlab as shad-ts by Fedor Korotkiy for Yandex School of Data Analysis
- Fedor Korotkiy - development of the very first version, 2017-2018
- Ilariia_Belova - updates for python course, 2018
- Vadim Mazaev - updates for python course, 2019-2020
- Nikita Bondartsev - minor updates for python course, 2020-2021
- Konstantin Chernyshev - updates for python course, massive refactor and moving to github, 2020-2024