Skip to content

Add registration and consultation APIs; preserve standalone grades - #136

Open
michalmedvecky wants to merge 2 commits into
EdupageAPI:masterfrom
michalmedvecky:codex/read-participation
Open

michalmedvecky wants to merge 2 commits into
EdupageAPI:masterfrom
michalmedvecky:codex/read-participation

Conversation

@michalmedvecky

Copy link
Copy Markdown

Adds access to assigned registrations/surveys, consultation availability and own bookings, plus explicit booking/cancellation methods. It also fixes marks without a paper/event: udalostid=0 now reads the subject, teacher, date and value from the grade row instead of discarding it.

Changes:

  • typed registration details/history, consultation blocks and server slot states; timezone-aware dates and no JavaScript evaluation;
  • explicit writes with fresh availability/ownership checks, confirmation and read-back verification; dry_run only reads and uncertain writes are not retried;
  • distinct grade_id for standalone marks (event_id=None), numeric event-ID normalization, and received/parsed/skipped reports without logging grade values.

Related to #135: this includes the numeric-ID normalization, but also retains standalone marks. Missing metadata for a nonzero event reference raises explicitly rather than silently dropping a mark from averages.

Tests: the complete suite passes using the repository's python -m unittest discover -s tests -v (84 tests). Pytest also passes: 84 tests plus 45 subtests. Booking tests use unittest, matching the existing suite and CI; fixtures contain synthetic/anonymized data, not account payloads.

Development and automated testing were carried out by coding agents, with iterative live-account feedback from me. I am successfully using these modules through Home Assistant OS 2026.10.1 with two child entries: consultation reads, child/teacher filtering, standalone marks and dry runs work; an existing real booking survived upgrades. Actual cancellation and an open registration/survey are not yet live-validated (the school currently has none open). This is validation at one school, not a claim of compatibility with all EduPage deployments.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant