T11: Grades provider (courses, course detail) #10
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "t11-grades"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
T11: Grades provider (
fit.grades.courses,fit.grades.course)Stacked on #9 (
t10-sirius) → … → #1. Merge those first.What
src/providers/grades.ts:fit.grades.courses({ semester? }): a per-course summary withpointsTotal,finalScore(mark A–F or points),assessment(whether the zápočet/credit is granted) and the raw overview items. Items carrying an upstreamerrorare never used as the headline value.fit.grades.course({ code, semester? }): the full breakdown as a depth-first tree (id/parentId/depth), with name, type, value, min/max/required and the teacher's note. Hidden items are excluded (showHidden=false, plus a client-side filter). Orphans go to the root, and cycles can't loop forever.semester-code). If that fails, it falls back to the server default.fit.gradesnamespace docs explain KOS semester codes (B251 = winter 2025/26) and value types.grades.fit.cvut.czfrontend bundle (MyClassificationService) and recorded them, with what still needs verifying, indocs/apis.md, which now also indexes the Usermap and Sirius sources. Only student endpoints undercvut:grades:user-readare used. Nothing teacher-only orcourse-restricted.^[A-Za-z0-9]{2,5}-[A-Za-z0-9.]{1,15}$, uppercased and URL-encoded), as are semesters (^[AB]\d{3}$) and usernames. Parsing is lenient (values can be number, string, boolean or null), and real shape drift returns "unexpected response".fit.grades.courses, because "do I have the zápočet" is a grades question.Verified
bun run lint && bun run typecheck && bun run test: 152 tests, 9 of them for Grades. They cover the summary mapping and error items, the semester resolution URL, an explicit semester, fallback without one, invalid semesters, shape drift, tree order, hidden items, orphans, cycles, 404, course-code injection, and Czech and English search.bun run dev+curl /api/functionslists 7 functions.docs/apis.md.Astra review (gpt-6-astra)
"No concrete, unintended defects found." It confirmed that input validation prevents path injection, requests stay scoped to the connected user, and the safe HTTP error handling is reused. It noted that live-API compatibility is unverified, as documented.
🤖 Generated with Claude Code