Conversation
…t taking FRQTemplate carried neither prompt content nor a rubric, so the editor had nothing to persist and the test renderer fell back to hardcoded AP Human Geography content for every FRQ. This adds the missing data model and fixes the authoring and test-taking paths that depend on it. Data model - types/frq.ts: add criteria, prompt, answerType, status, timeLimitMinutes - add src/lib/frq/template.ts to normalize legacy and partial template docs so older documents keep loading Authoring and taking - editorRenderer/editorFooter: actually persist questions and rubric - testRenderer: render the real prompt and rubric, and persist drafts - admin subject page: surface load errors, clean up references to deleted units, and tolerate partial fetch failures - subject page, sidebar layout, and sidebar: add the missing FRQ links - remove components/global/frqFooter.tsx, which had no remaining references Rules and tooling - firestore.rules: null-guard resource in the FRQ collections, where a missing document raised an evaluation error that surfaced to the client as "insufficient permissions"; let graders read templates, since the rubric and prompt they score against live there - firestore.rules: also add the graded-frqs grades key here so the whole rules file lands in one PR. It is declarative and unused until the grading PR that builds on this branch. - package.json: add deploy:rules
The grading queue read `gradableFrqSubmissions`, a collection name from an earlier schema pass that nothing writes to, so the queue was permanently empty no matter how many tests students submitted. The grader view itself rendered mock data rather than the submission being graded. - frq-grading list: read `ungraded-frqs`, the collection the student test writes to, and resolve templates through their real nested location instead of a flat `frqTemplates` collection - frq-grading list: gate on grader/admin access, so a non-grader sees why the queue is empty rather than an unexplained blank page - frq-grading/[id]: load the real submission and its template - gradingRenderer: score against the template's rubric and write grades back, replacing the mock content Builds on the data model and rules from the previous PR.
The student feedback page rendered `fallBackData.ts` — a fixture of sample scores and comments — so every student saw the same placeholder feedback regardless of what a grader had actually written. - frq-feedback/[id]: load the student's real graded submission - add src/lib/frq/feedbackDocument.ts to adapt a graded submission into the shape the feedback view renders, tolerating older graded documents - feedbackRenderer and the feedback/* components: thread readOnly through, so a student cannot edit the rubric they are being shown - delete feedback/fallBackData.ts, now unreferenced Builds on the data model and rules from the first PR. Independent of the grading PR — the two touch no files in common.
FRQ 1/3: give templates real prompt and rubric data; fix authoring and test taking
FRQ 2/3: point grading at the collection submissions are actually written to
FRQ 3/3: show students their real feedback instead of placeholder data
Frq 1 data model and authoring
main carries commit ff5fcdc, the blanket revert of PR #376 ("Frq feature"). The frq branch was then rebuilt from the pre-revert merge base c528939 and the bugs that caused the revert were fixed in PRs #379-#382. Because the rebuild produced new commit SHAs, git cannot relate the revert to the work that supersedes it, so every FRQ file collides: 18 conflicts, plus 10 files that main deleted and frq never touched, which git resolves silently as deletions. main has no independent changes since the merge base. Its only commits are the #376 merge, the revert, and the #377 merge, so every conflicting hunk on main's side is reverted pre-FRQ code that the fix PRs replace. The merge is therefore resolved to the frq tree in full, which also restores the 10 files that would otherwise have been dropped: firebase.json, firestore.indexes.json, frqRefs.ts, responseEditor.tsx, FRQDropdown.tsx, FRQFooter.tsx, unitFrqs.tsx, and feedback/header.tsx, feedback/leftSide.tsx, feedback/types.ts. Verified: next build succeeds and emits all five FRQ routes (authoring, taking, /frq-grading, /frq-grading/[id], /frq-feedback/[id]).
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.
No description provided.