Repository navigation
Conversation
The bulk student report card can now include, per student, the number of attendance-validation days read from the student-report site (GET /integration/tikuf-summary). Students are matched by tz. - the site address comes from the STUDENT_REPORT_API_URL env var (never from user settings, so a user cannot make the server call arbitrary hosts) - the key comes from user.additionalData.studentReportApiKey - one request per report run, shared by all students through a 60s cache - if the option is on and the site is not set up, rejects the key or is down, report generation fails with a clear message instead of producing letters without the data that was asked for - the checkbox only shows for users that have a key Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012GTicqeyaQ8prWTxxfKSrP
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Part of buzz-code/ops#62
Lets the existing bulk student report card (
studentReportCardReact) include, per student, the number of attendance-validation (tikuf) days kept in the student-report site. Future "combined" letters can reuse the same util.How it works
showTikuf(checkbox in the report dialog, shown only to users that have a key). When on,getReportDataasks the student-report site for the summary and printsתיקופי נוכחות: N ימיםunder the table.src/utils/tikuf-summary.util.tscallsGET <STUDENT_REPORT_API_URL>/integration/tikuf-summarywithx-api-key. One request per report run (a 60s in-memory cache is shared by the parallel per-student calls). Students are matched by tz (trimmed, leading zeros dropped). Explicit start/end dates are sent asfromDate/toDate; otherwise the report year is sent.Configuration
STUDENT_REPORT_API_URL(base API address of the student-report server; added to.env.template,docker-compose.yml,docker-compose-swarm.yml). It is deliberately an env var and not a user setting:additionalDatais user-writable through the settings endpoint, so a per-user URL would let any user make the server call arbitrary hosts.additionalData.studentReportApiKey, the same value asadditionalData.integrationApiKeyof the matching user on the student-report site (see its endpoint PR).Depends on the student-report endpoint (buzz-code/student-report-nra#97). No
server/sharedchange in this PR.Tests: util spec (normalization, query building, single shared request, tz matching, missing config, unreachable site with retry, 401/500) and a
generateStudentReportCardassertion for the new param. Server typecheck is clean. Full server suite: onlyyear.util.behaviorandattendance-cleanup-sweepfail, both timezone-dependent and failing identically on a clean checkout (they pass withTZ=UTC). The PDF rendering of the new line and the client checkbox were not exercised in a browser.Generated by Claude Code