gostudentubl
Automated attendance runner for Moodle-based courses with scheduled execution.
gostudentubl
Automated attendance runner for Moodle-based courses with scheduled execution.
Local run
- Copy environment template:
cp .env.example .env
- Fill required values in
.env. - Run locally:
make run
Docker agent deployment
This project can run as a long-lived Docker service (attendance-agent) that executes scheduled jobs internally.
Deploy
make docker-deploy
Equivalent command:
docker compose up -d --build
Cross-project WhatsApp integration (same host)
If wa-bot-notif runs as a separate Docker project on the same machine, use a shared external network.
- Create shared network once:
docker network create homelab_integration
- Set in
.env:
INTEGRATION_NETWORK=homelab_integration
WA_ENDPOINT=http://wa-bot-notif-api:5000/send
If wa-bot-notif uses a non-default PORT (for example 5001), match it in WA_ENDPOINT.
- Start
wa-bot-notifstack first, then this stack.
Do not use localhost for cross-container calls; use service/container DNS on the shared network.
Operate
- Tail logs:
make docker-logs
- Restart:
make docker-restart
- Stop:
make docker-down
Trigger manual run in container
The app listens to SIGUSR1 and executes a direct attendance run.
make docker-signal-run
Equivalent command:
docker compose kill -s SIGUSR1 attendance-agent
Notes
- Scheduler timezone is controlled by
TIMEZONE. - App logs go to stdout and rotating
app.loginside container workdir (/app). - Keep secrets only in
.env(already ignored by git). - Run a single agent instance unless you add distributed locking, otherwise duplicate attendance jobs can occur.
Quiz and Assignment Tracking
The runner now tracks richer assignment/quiz metadata and sends smarter notifications:
- Assignment list parsing: due date, submission status, grade.
- Quiz list parsing: close date, grade.
- Detail page fetch pipeline for assignments/quizzes (limited per run).
- Deadline reminders (24h and 12h windows) for unfinished items.
- Optional AI suggestion pipeline via OpenRouter for pending tasks.
Relevant environment variables:
DETAIL_FETCH_ENABLED(defaulttrue)DETAIL_FETCH_LIMIT(default10)OPENROUTER_ENDPOINT(defaulthttps://openrouter.ai/api/v1/chat/completions)OPENROUTER_API_KEY(required whenSUGGESTION_ENABLED=true)OPENROUTER_MODEL(defaultanthropic/claude-sonnet-4-20250514)SUGGESTION_ENABLED(defaultfalse)SUGGESTION_LIMIT(default5)
Periode Mode
This project supports dynamic period filtering so monthly manual config updates are optional.
PERIODE_MODE=auto(recommended): accepts current month and next month (MMYY) automatically.- Example in Feb 2026:
0226and0326are accepted.
- Example in Feb 2026:
PERIODE_MODE=manual: accepts only values inALLOWED_PERIODES(comma separated).PERIODE_MODE=legacy: keeps strictCURRENT_PERIODEequality behavior.
Additional safety setting:
MAX_COURSES_PER_RUN: hard cap to prevent accidental over-selection.0disables the cap (default behavior).