No description
  • Python 97.6%
  • Shell 1.3%
  • Dockerfile 1.1%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Maël Gramain 70edfdc7e3 Detect dead PASS session before agenda fetch, not after — refresh silently no-op'd
A dead session doesn't surface as an error anywhere in the agenda-fetch chain:
GetMainMenuDatas.sopx and the classic-ASP Agenda.asp page both 200 with no
structural mismatch, they just come back empty, so parse_events() silently
returned [] and /lessons rendered as an empty "no lessons" week — no RuntimeError
ever reached the except clause that logs the user out. Confirmed against prod:
three real /lessons?refresh=1 hits all 200'd with a tiny empty-list page, no
redirect to /login.

Also check_session_alive() itself was checking for the wrong dead-session
signature (a login page) — the real one lands on OPErreur.aspx?errCode=1
("Session perdue / Vous n'êtes pas ou plus authentifié à OP !"), which never
matched. Fixed the check and now call it upfront in fetch_events_cached()'s live
path, before any of the calls that stay silent on a dead session.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RqAxTJFGhGJDnYP4KMr2Lm
2026-09-09 16:26:13 +02:00
attendance_app Detect dead PASS session before agenda fetch, not after — refresh silently no-op'd 2026-09-09 16:26:13 +02:00
.dockerignore Initial commit: esignature attendance app 2026-09-08 23:16:44 +02:00
.gitignore Initial commit: esignature attendance app 2026-09-08 23:16:44 +02:00
build-and-push.sh Split monolithic app.py into modules, vendor DSFR assets, harden teacher links 2026-09-08 23:53:33 +02:00
docker-compose.yml Initial commit: esignature attendance app 2026-09-08 23:16:44 +02:00
Dockerfile Split monolithic app.py into modules, vendor DSFR assets, harden teacher links 2026-09-08 23:53:33 +02:00
LICENSE Initial commit: esignature attendance app 2026-09-08 23:16:44 +02:00
pass_schedule.py Detect dead PASS session before agenda fetch, not after — refresh silently no-op'd 2026-09-09 16:26:13 +02:00
README.md Cache PASS agenda fetches, fix teacher token races, split partial-sig PDF rows 2026-09-09 14:40:21 +02:00

esignature

Self-hosted attendance sheet for IMT Atlantique's PASS portal (Alcuin/OpenPortal). Students log in with their SSO credentials, the app pulls their weekly agenda, and each course can be signed two ways:

  • Student signature — the student signs their own attendance directly in the app.
  • Teacher signature — a shareable /sign/<token> link (also exposed as a QR code) lets the teacher sign for every student who registered them, in one page, with no login required on their side.

Repo

  • pass_schedule.py — standalone scraper/CLI for the PASS agenda (CAS/SAMLv2 login flow, agenda HTML parsing). Can be used on its own: python3 pass_schedule.py --login <user>.
  • attendance_app/ — Flask web app built on top of it (SQLite storage, PDF export, teacher sign links, QR codes).

Repo: https://git.gnous.eu/mael/esignature

Running

docker compose up --build

or directly:

cd attendance_app
pip install -r requirements.txt
python3 run_local.py

License

WTFPL — see LICENSE.