Repository navigation
Stop a note promising the student privacy it does not have - #46
Merged
Merged
Conversation
A note marked "גלוי לתלמיד" is always visible to the parent as well. The server enforces it, and rightly — a parent should not be kept from what was written about their child. The lesson-completion dialog never said so. Two independent checkboxes: tick "גלוי לתלמיד", leave "גלוי להורה" clear, save. The note is saved visible to both, and the teacher has just written something she believes only the student will read. Proven against the running app: ticked student-only, and the parent read it back. The note dialog on the student card already explained the rule in a line under the boxes, so the app had decided how to handle this — the screen used after every single lesson was the one that missed it. Ticking "גלוי לתלמיד" now ticks "גלוי להורה" too, in both dialogs, so the boxes show what will actually be stored rather than a promise the save will break. The completion dialog gets the same explanatory line as the other. Unticking "גלוי לתלמיד" leaves the parent box alone: a note for the parent only is a real thing to want. The server rule itself is unchanged and stays covered by its four tests. Verified in a browser in both dialogs: both boxes end up ticked, and nothing was saved. 24 frontend tests pass.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This branch was successfully deployed
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.
The problem
A note marked
גלוי לתלמידis always visible to the parent too. The server enforces it, and rightly — a parent should not be kept from what was written about their child.The lesson-completion dialog never said so. Two independent checkboxes: tick
גלוי לתלמיד, leaveגלוי להורהclear, save. The note is stored visible to both, and the teacher has just written something she believes only the student will read.Proven against the running app:
The note dialog on the student card already explains the rule in a line under the boxes. So the app had decided how to handle this — the screen used after every single lesson was the one that missed it.
This is the screen where most notes get written: it is inside
סיום שיעור, right after the lesson.The change
Ticking
גלוי לתלמידnow ticksגלוי להורהas well, in both dialogs, so the boxes show what will actually be stored instead of a promise the save will break. The completion dialog gets the same explanatory line the other one has.Unticking
גלוי לתלמידleaves the parent box where it is — a note for the parent only is a real thing to want, and the rule only runs one way.Why not change the rule instead
The rule is the right one and is deliberate; it is in the server on both
POSTandPUT, with four tests covering it (create, update, and both read paths). Nothing about it changes here. What changes is that the screen stops disagreeing with it.Verification
Driven in a browser at 1280px, both dialogs:
Nothing was saved (both dialogs cancelled), and the probe note used to prove the original behaviour was deleted; the demo data is untouched. No JS errors.
24 frontend tests pass. Frontend only; no API change.