forge
Explore
Log in

Don't you dare go Hollow

Commits

Commits on dcf123a8823bd55f0a656ce94de6b865f41dc08aFiltered to src/api/exams/postExamQuestionToBank.tsClear filter

2026-07-24

feat: 🏦 school-wide question bank with two-way exam bridgesAhmet Kaan Gümüş · 0f9e79a
feat: 🏦 school-wide question bank with two-way exam bridges

- mirror the backend bank contract: src/api/bank-questions (create/list/
  read/update/delete, question + per-choice image upload/fetch/delete)
  with types, BANK_QUESTION_LIMITS, and full API tests
- bridges in src/api/exams: postExamQuestionFromBank instantiates a
  template into an exam, postExamQuestionToBank saves an exam question
  back as a template; add the missing getExamChoiceImageBlob
- /question-bank page, teacher+ guarded: subject and owner filters,
  side-panel create/edit, confirm delete, nav item
- exam questions panel gains "Add from bank" (hidden once read-only,
  since from-bank mutates the exam) and a per-row "Save to bank" that
  stays available on finished exams — saving copies out, it never
  touches the exam
- repeat saves confirm first and relabel to "save another copy": the
  copies are independent, editing one never changes the other
- generalize question-form for both flows instead of forking it: widen
  initial to a structural type, pass image sources as props
- fix: correct answer was sent as a pre-compaction index, so blanking a
  choice above it silently moved the answer key on graded exams; remap
  by row identity and block submit when the marked choice is blanked
- fix: a PATCH carrying choices wipes every per-option image server-side
  and the exam path never restored them; one shared choice-compaction
  helper now re-uploads at post-compaction slots and names the options
  it could not carry over
- fix: removeChoice left correct pointing at the row that slid into the
  deleted slot
- read the question count off .latest so the new refetch paths cannot
  blank the panel
- localize the bank 403/409 strings; EN/TR throughout