Repository navigation
Show students' Cal 1 Card photos to staff - #98
Closed
rabiachadha wants to merge 1 commit into
Closed
rabiachadha wants to merge 1 commit into
rabiachadha wants to merge 1 commit into
Conversation
Staff see each student's photo on the roster cards, the attendance lists
and the student's history page, with a placeholder when there's none.
- Store each student's SID (Canvas's sis_user_id) at login and when staff
add them by email (migration 0005_sid).
- c1c_service.py fetches photos from the C1C API the way seating does:
/c1c-api/v1/photo/{sid}, basic auth, through C1C_PROXY_URL, with the
same settings. Development uses a drawn fake unless MOCK_C1C=false.
- GET /api/students/<id>/photo serves a photo to staff in the course
only, with Cache-Control: private, and nothing is saved.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Author
|
Please look at new PR: #99 as base branch on this PR was not updated locally, caused many merged conflicts, so made claude copy them over to new branch |
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.
Closes #4
Staff now see each student's Cal 1 Card photo, so TAs can learn names. Students never see photos.
Where photos appear
Students without a photo get a gray placeholder.
How it works
users.sidcolumn (migration0005_sid) is filled from Canvas'ssis_user_idwhen a student logs in and when staff add a student by email. We confirmed bCourses returnssis_user_idon a student's own profile.server/c1c_service.pyfetches photos the same way seating does (server/services/c1c/__init__.py):GET {C1C_API_DOMAIN}/c1c-api/v1/photo/{sid}with basic auth, throughC1C_PROXY_URL, with a 10-second timeout. Any failure means no photo. The setting names match seating's.GET /offerings/<id>/api/students/<user_id>/photoserves the photo only to staff in that course. It sendsCache-Control: private, max-age=3600and saves nothing. SIDs are never sent to the browser.MOCK_C1C=false.Not in this PR
407 Proxy Authentication Requiredfrom a laptop, so no real photo has come back yet. Waiting on Silas.Testing
tests/unit/test_roster_photos.py, plus SID checks in the login and add-students tests.🤖 Generated with Claude Code