Repository navigation
Conversation
This was referenced Nov 4, 2026
Exam phase 2 (docs/exams.md). Each course with a question bank gets an exam: 20 questions drawn across its modules in proportion to their size (at least one per module), in random order with shuffled options, and no feedback until you submit. An optional exam-conditions timer gives 90 seconds a question and submits when it runs out. Results show a score per module, every missed question with your answer, the right one and the explanation, and links back to the lessons. Attempts are kept on the device, and course pages link to the exam with the best score so far. The logic is pure and seeded in src/lib/exams.ts; banks load on demand through src/content/questionBanks.ts, so lesson pages don't download them. Number keys pick an answer and Enter moves on. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01EC6Zzt5akQu7TEHdGquZzp
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01EC6Zzt5akQu7TEHdGquZzp
A7med7x7
force-pushed
the
autopilot/exams-1-question-bank
branch
from
November 6, 2026 03:13
2adb790 to
9130296
Compare
A7med7x7
force-pushed
the
autopilot/exams-2-exam-page
branch
from
November 6, 2026 03:13
cd1464e to
63f382f
Compare
This branch has not been 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.
Exam phase 2 of 6 (
docs/exams.md): course exams.What students get
/courses/<course>/exam, linked from every course page that has questions ("Take a course exam", with the best score so far on that device).localStorage(decoded:exams:v1, last 20 per course). Syncing them to accounts is phase 6.How it's built
src/lib/exams.ts: pure, seeded logic (allocateuses the largest-remainder method, plusbuildExamandscoreExam) and the attempt storage.src/content/questionBanks.ts: loads a course's bank on demand, so lesson pages never download question banks (checked in the build output: each bank is its own chunk).src/pages/ExamPage.tsx: lazy-loaded route, registered before the lesson route. A test checks no lesson is ever namedexam.Also in this PR
Before stacking, I rebased #53 onto
main, where a Computer Graphics quiz option had been reworded ("slants" → "leans sideways"). I carried that change into the graphics bank and re-checked all 259 questions againstmain's quiz files: identical.Tests (37 new)
src/test/exams.test.ts: allocation adds up, respects limits and gives every module a question; on every real course bank, an exam has the right size, no repeats, covers every module that has questions, and keeps each question's right answer through the shuffle; seeding is deterministic; scoring by module adds up; attempts storage keeps 20 and survives corrupt data.src/test/exam-page.test.tsx: a perfect 20/20 run, submitting with gaps (confirmation, then "No answer" for each and explanations shown), number keys, auto-submit when the timer runs out (fake timers), and a course with no questions yet.Checked
npm run lint(0 errors),tsc(app and node),npm run test(52 files, 2,433 tests),npm run build. In a browser at 390 px, light and dark: course page entry, intro, a timed exam answered by keyboard, results, and a direct load of/courses/logic-design/exam. No page errors, no horizontal overflow. The selected answer was too subtle at first, so its number now gets a filled badge.Generated by Claude Code